···442442 * piix_set_piomode - Initialize host controller PATA PIO timings443443 * @ap: Port whose timings we are configuring444444 * @adev: um445445- * @pio: PIO mode, 0 - 4446445 *447446 * Set PIO mode for device, in host controller PCI config space.448447 *
+49-32
drivers/scsi/libata-core.c
···41324132}4133413341344134/**41354135+ * ata_host_set_remove - PCI layer callback for device removal41364136+ * @host_set: ATA host set that was removed41374137+ *41384138+ * Unregister all objects associated with this host set. Free those 41394139+ * objects.41404140+ *41414141+ * LOCKING:41424142+ * Inherited from calling layer (may sleep).41434143+ */41444144+41454145+41464146+void ata_host_set_remove(struct ata_host_set *host_set)41474147+{41484148+ struct ata_port *ap;41494149+ unsigned int i;41504150+41514151+ for (i = 0; i < host_set->n_ports; i++) {41524152+ ap = host_set->ports[i];41534153+ scsi_remove_host(ap->host);41544154+ }41554155+41564156+ free_irq(host_set->irq, host_set);41574157+41584158+ for (i = 0; i < host_set->n_ports; i++) {41594159+ ap = host_set->ports[i];41604160+41614161+ ata_scsi_release(ap->host);41624162+41634163+ if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) {41644164+ struct ata_ioports *ioaddr = &ap->ioaddr;41654165+41664166+ if (ioaddr->cmd_addr == 0x1f0)41674167+ release_region(0x1f0, 8);41684168+ else if (ioaddr->cmd_addr == 0x170)41694169+ release_region(0x170, 8);41704170+ }41714171+41724172+ scsi_host_put(ap->host);41734173+ }41744174+41754175+ if (host_set->ops->host_stop)41764176+ host_set->ops->host_stop(host_set);41774177+41784178+ kfree(host_set);41794179+}41804180+41814181+/**41354182 * ata_scsi_release - SCSI layer callback hook for host unload41364183 * @host: libata host to be unloaded41374184 *···45184471{45194472 struct device *dev = pci_dev_to_dev(pdev);45204473 struct ata_host_set *host_set = dev_get_drvdata(dev);45214521- struct ata_port *ap;45224522- unsigned int i;4523447445244524- for (i = 0; i < host_set->n_ports; i++) {45254525- ap = host_set->ports[i];45264526-45274527- scsi_remove_host(ap->host);45284528- }45294529-45304530- free_irq(host_set->irq, host_set);45314531-45324532- for (i = 0; i < host_set->n_ports; i++) {45334533- ap = host_set->ports[i];45344534-45354535- ata_scsi_release(ap->host);45364536-45374537- if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) {45384538- struct ata_ioports *ioaddr = &ap->ioaddr;45394539-45404540- if (ioaddr->cmd_addr == 0x1f0)45414541- release_region(0x1f0, 8);45424542- else if (ioaddr->cmd_addr == 0x170)45434543- release_region(0x170, 8);45444544- }45454545-45464546- scsi_host_put(ap->host);45474547- }45484548-45494549- if (host_set->ops->host_stop)45504550- host_set->ops->host_stop(host_set);45514551-45524552- kfree(host_set);45534553-44754475+ ata_host_set_remove(host_set);45544476 pci_release_regions(pdev);45554477 pci_disable_device(pdev);45564478 dev_set_drvdata(dev, NULL);···45894573EXPORT_SYMBOL_GPL(ata_std_bios_param);45904574EXPORT_SYMBOL_GPL(ata_std_ports);45914575EXPORT_SYMBOL_GPL(ata_device_add);45764576+EXPORT_SYMBOL_GPL(ata_host_set_remove);45924577EXPORT_SYMBOL_GPL(ata_sg_init);45934578EXPORT_SYMBOL_GPL(ata_sg_init_one);45944579EXPORT_SYMBOL_GPL(ata_qc_complete);