diff options
-rw-r--r-- | drivers/scsi/ata_piix.c | 1 | ||||
-rw-r--r-- | drivers/scsi/libata-core.c | 81 | ||||
-rw-r--r-- | drivers/scsi/sata_nv.c | 2 | ||||
-rw-r--r-- | include/linux/libata.h | 1 | ||||
-rw-r--r-- | include/linux/pci_ids.h | 3 |
5 files changed, 54 insertions, 34 deletions
diff --git a/drivers/scsi/ata_piix.c b/drivers/scsi/ata_piix.c index 87e0c36f1554..d71cef767cec 100644 --- a/drivers/scsi/ata_piix.c +++ b/drivers/scsi/ata_piix.c | |||
@@ -442,7 +442,6 @@ static void piix_sata_phy_reset(struct ata_port *ap) | |||
442 | * piix_set_piomode - Initialize host controller PATA PIO timings | 442 | * piix_set_piomode - Initialize host controller PATA PIO timings |
443 | * @ap: Port whose timings we are configuring | 443 | * @ap: Port whose timings we are configuring |
444 | * @adev: um | 444 | * @adev: um |
445 | * @pio: PIO mode, 0 - 4 | ||
446 | * | 445 | * |
447 | * Set PIO mode for device, in host controller PCI config space. | 446 | * Set PIO mode for device, in host controller PCI config space. |
448 | * | 447 | * |
diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index d92273cbe0de..e5b01997117a 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c | |||
@@ -4132,6 +4132,53 @@ err_out: | |||
4132 | } | 4132 | } |
4133 | 4133 | ||
4134 | /** | 4134 | /** |
4135 | * ata_host_set_remove - PCI layer callback for device removal | ||
4136 | * @host_set: ATA host set that was removed | ||
4137 | * | ||
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 | /** | ||
4135 | * ata_scsi_release - SCSI layer callback hook for host unload | 4182 | * ata_scsi_release - SCSI layer callback hook for host unload |
4136 | * @host: libata host to be unloaded | 4183 | * @host: libata host to be unloaded |
4137 | * | 4184 | * |
@@ -4471,39 +4518,8 @@ void ata_pci_remove_one (struct pci_dev *pdev) | |||
4471 | { | 4518 | { |
4472 | struct device *dev = pci_dev_to_dev(pdev); | 4519 | struct device *dev = pci_dev_to_dev(pdev); |
4473 | struct ata_host_set *host_set = dev_get_drvdata(dev); | 4520 | struct ata_host_set *host_set = dev_get_drvdata(dev); |
4474 | struct ata_port *ap; | ||
4475 | unsigned int i; | ||
4476 | |||
4477 | for (i = 0; i < host_set->n_ports; i++) { | ||
4478 | ap = host_set->ports[i]; | ||
4479 | |||
4480 | scsi_remove_host(ap->host); | ||
4481 | } | ||
4482 | |||
4483 | free_irq(host_set->irq, host_set); | ||
4484 | |||
4485 | for (i = 0; i < host_set->n_ports; i++) { | ||
4486 | ap = host_set->ports[i]; | ||
4487 | |||
4488 | ata_scsi_release(ap->host); | ||
4489 | |||
4490 | if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) { | ||
4491 | struct ata_ioports *ioaddr = &ap->ioaddr; | ||
4492 | |||
4493 | if (ioaddr->cmd_addr == 0x1f0) | ||
4494 | release_region(0x1f0, 8); | ||
4495 | else if (ioaddr->cmd_addr == 0x170) | ||
4496 | release_region(0x170, 8); | ||
4497 | } | ||
4498 | |||
4499 | scsi_host_put(ap->host); | ||
4500 | } | ||
4501 | |||
4502 | if (host_set->ops->host_stop) | ||
4503 | host_set->ops->host_stop(host_set); | ||
4504 | |||
4505 | kfree(host_set); | ||
4506 | 4521 | ||
4522 | ata_host_set_remove(host_set); | ||
4507 | pci_release_regions(pdev); | 4523 | pci_release_regions(pdev); |
4508 | pci_disable_device(pdev); | 4524 | pci_disable_device(pdev); |
4509 | dev_set_drvdata(dev, NULL); | 4525 | dev_set_drvdata(dev, NULL); |
@@ -4573,6 +4589,7 @@ module_exit(ata_exit); | |||
4573 | EXPORT_SYMBOL_GPL(ata_std_bios_param); | 4589 | EXPORT_SYMBOL_GPL(ata_std_bios_param); |
4574 | EXPORT_SYMBOL_GPL(ata_std_ports); | 4590 | EXPORT_SYMBOL_GPL(ata_std_ports); |
4575 | EXPORT_SYMBOL_GPL(ata_device_add); | 4591 | EXPORT_SYMBOL_GPL(ata_device_add); |
4592 | EXPORT_SYMBOL_GPL(ata_host_set_remove); | ||
4576 | EXPORT_SYMBOL_GPL(ata_sg_init); | 4593 | EXPORT_SYMBOL_GPL(ata_sg_init); |
4577 | EXPORT_SYMBOL_GPL(ata_sg_init_one); | 4594 | EXPORT_SYMBOL_GPL(ata_sg_init_one); |
4578 | EXPORT_SYMBOL_GPL(ata_qc_complete); | 4595 | EXPORT_SYMBOL_GPL(ata_qc_complete); |
diff --git a/drivers/scsi/sata_nv.c b/drivers/scsi/sata_nv.c index a1d62dee3be6..c05653c7779d 100644 --- a/drivers/scsi/sata_nv.c +++ b/drivers/scsi/sata_nv.c | |||
@@ -158,6 +158,8 @@ static struct pci_device_id nv_pci_tbl[] = { | |||
158 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP51 }, | 158 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP51 }, |
159 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA, | 159 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA, |
160 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP55 }, | 160 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP55 }, |
161 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2, | ||
162 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, MCP55 }, | ||
161 | { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, | 163 | { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, |
162 | PCI_ANY_ID, PCI_ANY_ID, | 164 | PCI_ANY_ID, PCI_ANY_ID, |
163 | PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC }, | 165 | PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC }, |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 022105c745fc..ceee1fc42c60 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
@@ -393,6 +393,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
393 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 393 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
394 | #endif /* CONFIG_PCI */ | 394 | #endif /* CONFIG_PCI */ |
395 | extern int ata_device_add(struct ata_probe_ent *ent); | 395 | extern int ata_device_add(struct ata_probe_ent *ent); |
396 | extern void ata_host_set_remove(struct ata_host_set *host_set); | ||
396 | extern int ata_scsi_detect(Scsi_Host_Template *sht); | 397 | extern int ata_scsi_detect(Scsi_Host_Template *sht); |
397 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 398 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
398 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 399 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c49d28eca561..b86a4b77007e 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -1268,7 +1268,8 @@ | |||
1268 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | 1268 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 |
1269 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | 1269 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 |
1270 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E | 1270 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E |
1271 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x036F | 1271 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E |
1272 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F | ||
1272 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | 1273 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 |
1273 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | 1274 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 |
1274 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | 1275 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B |