···442 * piix_set_piomode - Initialize host controller PATA PIO timings443 * @ap: Port whose timings we are configuring444 * @adev: um445- * @pio: PIO mode, 0 - 4446 *447 * Set PIO mode for device, in host controller PCI config space.448 *
···442 * piix_set_piomode - Initialize host controller PATA PIO timings443 * @ap: Port whose timings we are configuring444 * @adev: um0445 *446 * Set PIO mode for device, in host controller PCI config space.447 *
+49-32
drivers/scsi/libata-core.c
···4132}41334134/**000000000000000000000000000000000000000000000004135 * ata_scsi_release - SCSI layer callback hook for host unload4136 * @host: libata host to be unloaded4137 *···4518{4519 struct device *dev = pci_dev_to_dev(pdev);4520 struct ata_host_set *host_set = dev_get_drvdata(dev);4521- struct ata_port *ap;4522- unsigned int i;45234524- for (i = 0; i < host_set->n_ports; i++) {4525- ap = host_set->ports[i];4526-4527- scsi_remove_host(ap->host);4528- }4529-4530- free_irq(host_set->irq, host_set);4531-4532- for (i = 0; i < host_set->n_ports; i++) {4533- ap = host_set->ports[i];4534-4535- ata_scsi_release(ap->host);4536-4537- if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) {4538- struct ata_ioports *ioaddr = &ap->ioaddr;4539-4540- if (ioaddr->cmd_addr == 0x1f0)4541- release_region(0x1f0, 8);4542- else if (ioaddr->cmd_addr == 0x170)4543- release_region(0x170, 8);4544- }4545-4546- scsi_host_put(ap->host);4547- }4548-4549- if (host_set->ops->host_stop)4550- host_set->ops->host_stop(host_set);4551-4552- kfree(host_set);4553-4554 pci_release_regions(pdev);4555 pci_disable_device(pdev);4556 dev_set_drvdata(dev, NULL);···4589EXPORT_SYMBOL_GPL(ata_std_bios_param);4590EXPORT_SYMBOL_GPL(ata_std_ports);4591EXPORT_SYMBOL_GPL(ata_device_add);04592EXPORT_SYMBOL_GPL(ata_sg_init);4593EXPORT_SYMBOL_GPL(ata_sg_init_one);4594EXPORT_SYMBOL_GPL(ata_qc_complete);
···4132}41334134/**4135+ * ata_host_set_remove - PCI layer callback for device removal4136+ * @host_set: ATA host set that was removed4137+ *4138+ * Unregister all objects associated with this host set. Free those 4139+ * objects.4140+ *4141+ * LOCKING:4142+ * Inherited from calling layer (may sleep).4143+ */4144+4145+4146+void ata_host_set_remove(struct ata_host_set *host_set)4147+{4148+ struct ata_port *ap;4149+ unsigned int i;4150+4151+ for (i = 0; i < host_set->n_ports; i++) {4152+ ap = host_set->ports[i];4153+ scsi_remove_host(ap->host);4154+ }4155+4156+ free_irq(host_set->irq, host_set);4157+4158+ for (i = 0; i < host_set->n_ports; i++) {4159+ ap = host_set->ports[i];4160+4161+ ata_scsi_release(ap->host);4162+4163+ if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) {4164+ struct ata_ioports *ioaddr = &ap->ioaddr;4165+4166+ if (ioaddr->cmd_addr == 0x1f0)4167+ release_region(0x1f0, 8);4168+ else if (ioaddr->cmd_addr == 0x170)4169+ release_region(0x170, 8);4170+ }4171+4172+ scsi_host_put(ap->host);4173+ }4174+4175+ if (host_set->ops->host_stop)4176+ host_set->ops->host_stop(host_set);4177+4178+ kfree(host_set);4179+}4180+4181+/**4182 * ata_scsi_release - SCSI layer callback hook for host unload4183 * @host: libata host to be unloaded4184 *···4471{4472 struct device *dev = pci_dev_to_dev(pdev);4473 struct ata_host_set *host_set = dev_get_drvdata(dev);0044744475+ ata_host_set_remove(host_set);000000000000000000000000000004476 pci_release_regions(pdev);4477 pci_disable_device(pdev);4478 dev_set_drvdata(dev, NULL);···4573EXPORT_SYMBOL_GPL(ata_std_bios_param);4574EXPORT_SYMBOL_GPL(ata_std_ports);4575EXPORT_SYMBOL_GPL(ata_device_add);4576+EXPORT_SYMBOL_GPL(ata_host_set_remove);4577EXPORT_SYMBOL_GPL(ata_sg_init);4578EXPORT_SYMBOL_GPL(ata_sg_init_one);4579EXPORT_SYMBOL_GPL(ata_qc_complete);