diff options
author | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-23 19:44:52 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-23 19:44:52 -0400 |
commit | 87e807b6c461bbd449496a4c3ab78ab164a4ba97 (patch) | |
tree | 6f5af52317ace30c1229e356a332093981763e39 /drivers | |
parent | 2ead1aa6f14ed542af0c9e2302a51ea02128f587 (diff) | |
parent | 536f8098026bde1368bbfcbcb9682a7637b73df2 (diff) |
Merge branch 'upstream' from master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
Diffstat (limited to 'drivers')
-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 |
3 files changed, 51 insertions, 33 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 }, |