diff options
| author | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 11:06:16 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-10-04 11:06:16 -0400 |
| commit | e30fdb1e026c2d05f216d2e5a25bfafdfd261ec2 (patch) | |
| tree | 0f65410e1d86f29107af8a665e277efd0393451c | |
| parent | 5b9b5572c87b460cd91f7722ac233d1873cfb084 (diff) | |
| parent | 15a7c3bbe344d75e4891c7d30595899c12ccfaa1 (diff) | |
Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] pata_artop: kill gcc warning
[PATCH] libata: turn off NCQ if queue depth is adjusted to 1
[PATCH] libata: cosmetic changes to constants
[libata] DocBook minor updates, fixes
[libata] PCI ID table cleanup in various drivers
[libata] Print out Status register, if a BSY-sleep takes too long
[libata] init probe_ent->private_data in a common location
[libata] minor PCI IDE probe fixes and cleanups
[libata] Use new PCI_VDEVICE() macro to dramatically shorten ID lists
[PATCH] Fix reference of uninitialised memory in ata_device_add()
52 files changed, 359 insertions, 418 deletions
diff --git a/Documentation/DocBook/libata.tmpl b/Documentation/DocBook/libata.tmpl index c684abf0d3b2..07a635590b36 100644 --- a/Documentation/DocBook/libata.tmpl +++ b/Documentation/DocBook/libata.tmpl | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | </authorgroup> | 14 | </authorgroup> |
| 15 | 15 | ||
| 16 | <copyright> | 16 | <copyright> |
| 17 | <year>2003-2005</year> | 17 | <year>2003-2006</year> |
| 18 | <holder>Jeff Garzik</holder> | 18 | <holder>Jeff Garzik</holder> |
| 19 | </copyright> | 19 | </copyright> |
| 20 | 20 | ||
diff --git a/drivers/ata/ahci.c b/drivers/ata/ahci.c index 1aabc81d82f1..54e1f38ce301 100644 --- a/drivers/ata/ahci.c +++ b/drivers/ata/ahci.c | |||
| @@ -299,76 +299,46 @@ static const struct ata_port_info ahci_port_info[] = { | |||
| 299 | 299 | ||
| 300 | static const struct pci_device_id ahci_pci_tbl[] = { | 300 | static const struct pci_device_id ahci_pci_tbl[] = { |
| 301 | /* Intel */ | 301 | /* Intel */ |
| 302 | { PCI_VENDOR_ID_INTEL, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 302 | { PCI_VDEVICE(INTEL, 0x2652), board_ahci }, /* ICH6 */ |
| 303 | board_ahci }, /* ICH6 */ | 303 | { PCI_VDEVICE(INTEL, 0x2653), board_ahci }, /* ICH6M */ |
| 304 | { PCI_VENDOR_ID_INTEL, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 304 | { PCI_VDEVICE(INTEL, 0x27c1), board_ahci }, /* ICH7 */ |
| 305 | board_ahci }, /* ICH6M */ | 305 | { PCI_VDEVICE(INTEL, 0x27c5), board_ahci }, /* ICH7M */ |
| 306 | { PCI_VENDOR_ID_INTEL, 0x27c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 306 | { PCI_VDEVICE(INTEL, 0x27c3), board_ahci }, /* ICH7R */ |
| 307 | board_ahci }, /* ICH7 */ | 307 | { PCI_VDEVICE(AL, 0x5288), board_ahci }, /* ULi M5288 */ |
| 308 | { PCI_VENDOR_ID_INTEL, 0x27c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 308 | { PCI_VDEVICE(INTEL, 0x2681), board_ahci }, /* ESB2 */ |
| 309 | board_ahci }, /* ICH7M */ | 309 | { PCI_VDEVICE(INTEL, 0x2682), board_ahci }, /* ESB2 */ |
| 310 | { PCI_VENDOR_ID_INTEL, 0x27c3, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 310 | { PCI_VDEVICE(INTEL, 0x2683), board_ahci }, /* ESB2 */ |
| 311 | board_ahci }, /* ICH7R */ | 311 | { PCI_VDEVICE(INTEL, 0x27c6), board_ahci }, /* ICH7-M DH */ |
| 312 | { PCI_VENDOR_ID_AL, 0x5288, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 312 | { PCI_VDEVICE(INTEL, 0x2821), board_ahci }, /* ICH8 */ |
| 313 | board_ahci }, /* ULi M5288 */ | 313 | { PCI_VDEVICE(INTEL, 0x2822), board_ahci }, /* ICH8 */ |
| 314 | { PCI_VENDOR_ID_INTEL, 0x2681, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 314 | { PCI_VDEVICE(INTEL, 0x2824), board_ahci }, /* ICH8 */ |
| 315 | board_ahci }, /* ESB2 */ | 315 | { PCI_VDEVICE(INTEL, 0x2829), board_ahci }, /* ICH8M */ |
| 316 | { PCI_VENDOR_ID_INTEL, 0x2682, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 316 | { PCI_VDEVICE(INTEL, 0x282a), board_ahci }, /* ICH8M */ |
| 317 | board_ahci }, /* ESB2 */ | ||
| 318 | { PCI_VENDOR_ID_INTEL, 0x2683, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 319 | board_ahci }, /* ESB2 */ | ||
| 320 | { PCI_VENDOR_ID_INTEL, 0x27c6, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 321 | board_ahci }, /* ICH7-M DH */ | ||
| 322 | { PCI_VENDOR_ID_INTEL, 0x2821, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 323 | board_ahci }, /* ICH8 */ | ||
| 324 | { PCI_VENDOR_ID_INTEL, 0x2822, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 325 | board_ahci }, /* ICH8 */ | ||
| 326 | { PCI_VENDOR_ID_INTEL, 0x2824, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 327 | board_ahci }, /* ICH8 */ | ||
| 328 | { PCI_VENDOR_ID_INTEL, 0x2829, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 329 | board_ahci }, /* ICH8M */ | ||
| 330 | { PCI_VENDOR_ID_INTEL, 0x282a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 331 | board_ahci }, /* ICH8M */ | ||
| 332 | 317 | ||
| 333 | /* JMicron */ | 318 | /* JMicron */ |
| 334 | { 0x197b, 0x2360, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 319 | { PCI_VDEVICE(JMICRON, 0x2360), board_ahci }, /* JMicron JMB360 */ |
| 335 | board_ahci }, /* JMicron JMB360 */ | 320 | { PCI_VDEVICE(JMICRON, 0x2361), board_ahci }, /* JMicron JMB361 */ |
| 336 | { 0x197b, 0x2361, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 321 | { PCI_VDEVICE(JMICRON, 0x2363), board_ahci }, /* JMicron JMB363 */ |
| 337 | board_ahci }, /* JMicron JMB361 */ | 322 | { PCI_VDEVICE(JMICRON, 0x2365), board_ahci }, /* JMicron JMB365 */ |
| 338 | { 0x197b, 0x2363, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 323 | { PCI_VDEVICE(JMICRON, 0x2366), board_ahci }, /* JMicron JMB366 */ |
| 339 | board_ahci }, /* JMicron JMB363 */ | ||
| 340 | { 0x197b, 0x2365, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 341 | board_ahci }, /* JMicron JMB365 */ | ||
| 342 | { 0x197b, 0x2366, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 343 | board_ahci }, /* JMicron JMB366 */ | ||
| 344 | 324 | ||
| 345 | /* ATI */ | 325 | /* ATI */ |
| 346 | { PCI_VENDOR_ID_ATI, 0x4380, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 326 | { PCI_VDEVICE(ATI, 0x4380), board_ahci }, /* ATI SB600 non-raid */ |
| 347 | board_ahci }, /* ATI SB600 non-raid */ | 327 | { PCI_VDEVICE(ATI, 0x4381), board_ahci }, /* ATI SB600 raid */ |
| 348 | { PCI_VENDOR_ID_ATI, 0x4381, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 349 | board_ahci }, /* ATI SB600 raid */ | ||
| 350 | 328 | ||
| 351 | /* VIA */ | 329 | /* VIA */ |
| 352 | { PCI_VENDOR_ID_VIA, 0x3349, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 330 | { PCI_VDEVICE(VIA, 0x3349), board_ahci_vt8251 }, /* VIA VT8251 */ |
| 353 | board_ahci_vt8251 }, /* VIA VT8251 */ | ||
| 354 | 331 | ||
| 355 | /* NVIDIA */ | 332 | /* NVIDIA */ |
| 356 | { PCI_VENDOR_ID_NVIDIA, 0x044c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 333 | { PCI_VDEVICE(NVIDIA, 0x044c), board_ahci }, /* MCP65 */ |
| 357 | board_ahci }, /* MCP65 */ | 334 | { PCI_VDEVICE(NVIDIA, 0x044d), board_ahci }, /* MCP65 */ |
| 358 | { PCI_VENDOR_ID_NVIDIA, 0x044d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 335 | { PCI_VDEVICE(NVIDIA, 0x044e), board_ahci }, /* MCP65 */ |
| 359 | board_ahci }, /* MCP65 */ | 336 | { PCI_VDEVICE(NVIDIA, 0x044f), board_ahci }, /* MCP65 */ |
| 360 | { PCI_VENDOR_ID_NVIDIA, 0x044e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 361 | board_ahci }, /* MCP65 */ | ||
| 362 | { PCI_VENDOR_ID_NVIDIA, 0x044f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 363 | board_ahci }, /* MCP65 */ | ||
| 364 | 337 | ||
| 365 | /* SiS */ | 338 | /* SiS */ |
| 366 | { PCI_VENDOR_ID_SI, 0x1184, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 339 | { PCI_VDEVICE(SI, 0x1184), board_ahci }, /* SiS 966 */ |
| 367 | board_ahci }, /* SiS 966 */ | 340 | { PCI_VDEVICE(SI, 0x1185), board_ahci }, /* SiS 966 */ |
| 368 | { PCI_VENDOR_ID_SI, 0x1185, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 341 | { PCI_VDEVICE(SI, 0x0186), board_ahci }, /* SiS 968 */ |
| 369 | board_ahci }, /* SiS 966 */ | ||
| 370 | { PCI_VENDOR_ID_SI, 0x0186, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 371 | board_ahci }, /* SiS 968 */ | ||
| 372 | 342 | ||
| 373 | { } /* terminate list */ | 343 | { } /* terminate list */ |
| 374 | }; | 344 | }; |
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index b4abd6850367..dce65651d858 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c | |||
| @@ -2340,7 +2340,8 @@ unsigned int ata_busy_sleep (struct ata_port *ap, | |||
| 2340 | 2340 | ||
| 2341 | if (status & ATA_BUSY) | 2341 | if (status & ATA_BUSY) |
| 2342 | ata_port_printk(ap, KERN_WARNING, | 2342 | ata_port_printk(ap, KERN_WARNING, |
| 2343 | "port is slow to respond, please be patient\n"); | 2343 | "port is slow to respond, please be patient " |
| 2344 | "(Status 0x%x)\n", status); | ||
| 2344 | 2345 | ||
| 2345 | timeout = timer_start + tmout; | 2346 | timeout = timer_start + tmout; |
| 2346 | while ((status & ATA_BUSY) && (time_before(jiffies, timeout))) { | 2347 | while ((status & ATA_BUSY) && (time_before(jiffies, timeout))) { |
| @@ -2350,7 +2351,8 @@ unsigned int ata_busy_sleep (struct ata_port *ap, | |||
| 2350 | 2351 | ||
| 2351 | if (status & ATA_BUSY) { | 2352 | if (status & ATA_BUSY) { |
| 2352 | ata_port_printk(ap, KERN_ERR, "port failed to respond " | 2353 | ata_port_printk(ap, KERN_ERR, "port failed to respond " |
| 2353 | "(%lu secs)\n", tmout / HZ); | 2354 | "(%lu secs, Status 0x%x)\n", |
| 2355 | tmout / HZ, status); | ||
| 2354 | return 1; | 2356 | return 1; |
| 2355 | } | 2357 | } |
| 2356 | 2358 | ||
| @@ -5478,11 +5480,10 @@ int ata_device_add(const struct ata_probe_ent *ent) | |||
| 5478 | int irq_line = ent->irq; | 5480 | int irq_line = ent->irq; |
| 5479 | 5481 | ||
| 5480 | ap = ata_port_add(ent, host, i); | 5482 | ap = ata_port_add(ent, host, i); |
| 5483 | host->ports[i] = ap; | ||
| 5481 | if (!ap) | 5484 | if (!ap) |
| 5482 | goto err_out; | 5485 | goto err_out; |
| 5483 | 5486 | ||
| 5484 | host->ports[i] = ap; | ||
| 5485 | |||
| 5486 | /* dummy? */ | 5487 | /* dummy? */ |
| 5487 | if (ent->dummy_port_mask & (1 << i)) { | 5488 | if (ent->dummy_port_mask & (1 << i)) { |
| 5488 | ata_port_printk(ap, KERN_INFO, "DUMMY\n"); | 5489 | ata_port_printk(ap, KERN_INFO, "DUMMY\n"); |
| @@ -5740,7 +5741,7 @@ void ata_host_remove(struct ata_host *host) | |||
| 5740 | 5741 | ||
| 5741 | /** | 5742 | /** |
| 5742 | * ata_scsi_release - SCSI layer callback hook for host unload | 5743 | * ata_scsi_release - SCSI layer callback hook for host unload |
| 5743 | * @host: libata host to be unloaded | 5744 | * @shost: libata host to be unloaded |
| 5744 | * | 5745 | * |
| 5745 | * Performs all duties necessary to shut down a libata port... | 5746 | * Performs all duties necessary to shut down a libata port... |
| 5746 | * Kill port kthread, disable port, and release resources. | 5747 | * Kill port kthread, disable port, and release resources. |
| @@ -5786,6 +5787,7 @@ ata_probe_ent_alloc(struct device *dev, const struct ata_port_info *port) | |||
| 5786 | probe_ent->mwdma_mask = port->mwdma_mask; | 5787 | probe_ent->mwdma_mask = port->mwdma_mask; |
| 5787 | probe_ent->udma_mask = port->udma_mask; | 5788 | probe_ent->udma_mask = port->udma_mask; |
| 5788 | probe_ent->port_ops = port->port_ops; | 5789 | probe_ent->port_ops = port->port_ops; |
| 5790 | probe_ent->private_data = port->private_data; | ||
| 5789 | 5791 | ||
| 5790 | return probe_ent; | 5792 | return probe_ent; |
| 5791 | } | 5793 | } |
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 3986ec8741b4..b0d0cc41f3e8 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c | |||
| @@ -889,6 +889,7 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) | |||
| 889 | { | 889 | { |
| 890 | struct ata_port *ap = ata_shost_to_port(sdev->host); | 890 | struct ata_port *ap = ata_shost_to_port(sdev->host); |
| 891 | struct ata_device *dev; | 891 | struct ata_device *dev; |
| 892 | unsigned long flags; | ||
| 892 | int max_depth; | 893 | int max_depth; |
| 893 | 894 | ||
| 894 | if (queue_depth < 1) | 895 | if (queue_depth < 1) |
| @@ -904,6 +905,14 @@ int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) | |||
| 904 | queue_depth = max_depth; | 905 | queue_depth = max_depth; |
| 905 | 906 | ||
| 906 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, queue_depth); | 907 | scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, queue_depth); |
| 908 | |||
| 909 | spin_lock_irqsave(ap->lock, flags); | ||
| 910 | if (queue_depth > 1) | ||
| 911 | dev->flags &= ~ATA_DFLAG_NCQ_OFF; | ||
| 912 | else | ||
| 913 | dev->flags |= ATA_DFLAG_NCQ_OFF; | ||
| 914 | spin_unlock_irqrestore(ap->lock, flags); | ||
| 915 | |||
| 907 | return queue_depth; | 916 | return queue_depth; |
| 908 | } | 917 | } |
| 909 | 918 | ||
| @@ -1293,7 +1302,8 @@ static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc, const u8 *scsicm | |||
| 1293 | */ | 1302 | */ |
| 1294 | goto nothing_to_do; | 1303 | goto nothing_to_do; |
| 1295 | 1304 | ||
| 1296 | if ((dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ) { | 1305 | if ((dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ_OFF | |
| 1306 | ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ) { | ||
| 1297 | /* yay, NCQ */ | 1307 | /* yay, NCQ */ |
| 1298 | if (!lba_48_ok(block, n_block)) | 1308 | if (!lba_48_ok(block, n_block)) |
| 1299 | goto out_of_range; | 1309 | goto out_of_range; |
| @@ -3174,7 +3184,7 @@ void ata_scsi_dev_rescan(void *data) | |||
| 3174 | 3184 | ||
| 3175 | /** | 3185 | /** |
| 3176 | * ata_sas_port_alloc - Allocate port for a SAS attached SATA device | 3186 | * ata_sas_port_alloc - Allocate port for a SAS attached SATA device |
| 3177 | * @pdev: PCI device that the scsi device is attached to | 3187 | * @host: ATA host container for all SAS ports |
| 3178 | * @port_info: Information from low-level host driver | 3188 | * @port_info: Information from low-level host driver |
| 3179 | * @shost: SCSI host that the scsi device is attached to | 3189 | * @shost: SCSI host that the scsi device is attached to |
| 3180 | * | 3190 | * |
diff --git a/drivers/ata/libata-sff.c b/drivers/ata/libata-sff.c index 08b3a407473e..06daaa3736a2 100644 --- a/drivers/ata/libata-sff.c +++ b/drivers/ata/libata-sff.c | |||
| @@ -828,7 +828,6 @@ ata_pci_init_native_mode(struct pci_dev *pdev, struct ata_port_info **port, int | |||
| 828 | 828 | ||
| 829 | probe_ent->irq = pdev->irq; | 829 | probe_ent->irq = pdev->irq; |
| 830 | probe_ent->irq_flags = IRQF_SHARED; | 830 | probe_ent->irq_flags = IRQF_SHARED; |
| 831 | probe_ent->private_data = port[0]->private_data; | ||
| 832 | 831 | ||
| 833 | if (ports & ATA_PORT_PRIMARY) { | 832 | if (ports & ATA_PORT_PRIMARY) { |
| 834 | probe_ent->port[p].cmd_addr = pci_resource_start(pdev, 0); | 833 | probe_ent->port[p].cmd_addr = pci_resource_start(pdev, 0); |
| @@ -878,7 +877,6 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev, | |||
| 878 | return NULL; | 877 | return NULL; |
| 879 | 878 | ||
| 880 | probe_ent->n_ports = 2; | 879 | probe_ent->n_ports = 2; |
| 881 | probe_ent->private_data = port[0]->private_data; | ||
| 882 | 880 | ||
| 883 | if (port_mask & ATA_PORT_PRIMARY) { | 881 | if (port_mask & ATA_PORT_PRIMARY) { |
| 884 | probe_ent->irq = ATA_PRIMARY_IRQ; | 882 | probe_ent->irq = ATA_PRIMARY_IRQ; |
| @@ -908,6 +906,8 @@ static struct ata_probe_ent *ata_pci_init_legacy_port(struct pci_dev *pdev, | |||
| 908 | probe_ent->_host_flags |= ATA_HOST_SIMPLEX; | 906 | probe_ent->_host_flags |= ATA_HOST_SIMPLEX; |
| 909 | } | 907 | } |
| 910 | ata_std_ports(&probe_ent->port[1]); | 908 | ata_std_ports(&probe_ent->port[1]); |
| 909 | |||
| 910 | /* FIXME: could be pointing to stack area; must copy */ | ||
| 911 | probe_ent->pinfo2 = port[1]; | 911 | probe_ent->pinfo2 = port[1]; |
| 912 | } else | 912 | } else |
| 913 | probe_ent->dummy_port_mask |= ATA_PORT_SECONDARY; | 913 | probe_ent->dummy_port_mask |= ATA_PORT_SECONDARY; |
| @@ -946,35 +946,21 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
| 946 | { | 946 | { |
| 947 | struct ata_probe_ent *probe_ent = NULL; | 947 | struct ata_probe_ent *probe_ent = NULL; |
| 948 | struct ata_port_info *port[2]; | 948 | struct ata_port_info *port[2]; |
| 949 | u8 tmp8, mask; | 949 | u8 mask; |
| 950 | unsigned int legacy_mode = 0; | 950 | unsigned int legacy_mode = 0; |
| 951 | int disable_dev_on_err = 1; | 951 | int disable_dev_on_err = 1; |
| 952 | int rc; | 952 | int rc; |
| 953 | 953 | ||
| 954 | DPRINTK("ENTER\n"); | 954 | DPRINTK("ENTER\n"); |
| 955 | 955 | ||
| 956 | BUG_ON(n_ports < 1 || n_ports > 2); | ||
| 957 | |||
| 956 | port[0] = port_info[0]; | 958 | port[0] = port_info[0]; |
| 957 | if (n_ports > 1) | 959 | if (n_ports > 1) |
| 958 | port[1] = port_info[1]; | 960 | port[1] = port_info[1]; |
| 959 | else | 961 | else |
| 960 | port[1] = port[0]; | 962 | port[1] = port[0]; |
| 961 | 963 | ||
| 962 | if ((port[0]->flags & ATA_FLAG_NO_LEGACY) == 0 | ||
| 963 | && (pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) { | ||
| 964 | /* TODO: What if one channel is in native mode ... */ | ||
| 965 | pci_read_config_byte(pdev, PCI_CLASS_PROG, &tmp8); | ||
| 966 | mask = (1 << 2) | (1 << 0); | ||
| 967 | if ((tmp8 & mask) != mask) | ||
| 968 | legacy_mode = (1 << 3); | ||
| 969 | } | ||
| 970 | |||
| 971 | /* FIXME... */ | ||
| 972 | if ((!legacy_mode) && (n_ports > 2)) { | ||
| 973 | printk(KERN_ERR "ata: BUG: native mode, n_ports > 2\n"); | ||
| 974 | n_ports = 2; | ||
| 975 | /* For now */ | ||
| 976 | } | ||
| 977 | |||
| 978 | /* FIXME: Really for ATA it isn't safe because the device may be | 964 | /* FIXME: Really for ATA it isn't safe because the device may be |
| 979 | multi-purpose and we want to leave it alone if it was already | 965 | multi-purpose and we want to leave it alone if it was already |
| 980 | enabled. Secondly for shared use as Arjan says we want refcounting | 966 | enabled. Secondly for shared use as Arjan says we want refcounting |
| @@ -987,6 +973,16 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
| 987 | if (rc) | 973 | if (rc) |
| 988 | return rc; | 974 | return rc; |
| 989 | 975 | ||
| 976 | if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) { | ||
| 977 | u8 tmp8; | ||
| 978 | |||
| 979 | /* TODO: What if one channel is in native mode ... */ | ||
| 980 | pci_read_config_byte(pdev, PCI_CLASS_PROG, &tmp8); | ||
| 981 | mask = (1 << 2) | (1 << 0); | ||
| 982 | if ((tmp8 & mask) != mask) | ||
| 983 | legacy_mode = (1 << 3); | ||
| 984 | } | ||
| 985 | |||
| 990 | rc = pci_request_regions(pdev, DRV_NAME); | 986 | rc = pci_request_regions(pdev, DRV_NAME); |
| 991 | if (rc) { | 987 | if (rc) { |
| 992 | disable_dev_on_err = 0; | 988 | disable_dev_on_err = 0; |
| @@ -1039,7 +1035,7 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
| 1039 | goto err_out_regions; | 1035 | goto err_out_regions; |
| 1040 | } | 1036 | } |
| 1041 | 1037 | ||
| 1042 | /* FIXME: If we get no DMA mask we should fall back to PIO */ | 1038 | /* TODO: If we get no DMA mask we should fall back to PIO */ |
| 1043 | rc = pci_set_dma_mask(pdev, ATA_DMA_MASK); | 1039 | rc = pci_set_dma_mask(pdev, ATA_DMA_MASK); |
| 1044 | if (rc) | 1040 | if (rc) |
| 1045 | goto err_out_regions; | 1041 | goto err_out_regions; |
| @@ -1062,13 +1058,17 @@ int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_info, | |||
| 1062 | 1058 | ||
| 1063 | pci_set_master(pdev); | 1059 | pci_set_master(pdev); |
| 1064 | 1060 | ||
| 1065 | /* FIXME: check ata_device_add return */ | 1061 | if (!ata_device_add(probe_ent)) { |
| 1066 | ata_device_add(probe_ent); | 1062 | rc = -ENODEV; |
| 1063 | goto err_out_ent; | ||
| 1064 | } | ||
| 1067 | 1065 | ||
| 1068 | kfree(probe_ent); | 1066 | kfree(probe_ent); |
| 1069 | 1067 | ||
| 1070 | return 0; | 1068 | return 0; |
| 1071 | 1069 | ||
| 1070 | err_out_ent: | ||
| 1071 | kfree(probe_ent); | ||
| 1072 | err_out_regions: | 1072 | err_out_regions: |
| 1073 | if (legacy_mode & ATA_PORT_PRIMARY) | 1073 | if (legacy_mode & ATA_PORT_PRIMARY) |
| 1074 | release_region(ATA_PRIMARY_CMD, 8); | 1074 | release_region(ATA_PRIMARY_CMD, 8); |
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c index 87af3b5861ab..3f49e38217da 100644 --- a/drivers/ata/pata_ali.c +++ b/drivers/ata/pata_ali.c | |||
| @@ -644,10 +644,11 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 644 | return ata_pci_init_one(pdev, port_info, 2); | 644 | return ata_pci_init_one(pdev, port_info, 2); |
| 645 | } | 645 | } |
| 646 | 646 | ||
| 647 | static struct pci_device_id ali[] = { | 647 | static const struct pci_device_id ali[] = { |
| 648 | { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5228), }, | 648 | { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5228), }, |
| 649 | { PCI_DEVICE(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M5229), }, | 649 | { PCI_VDEVICE(AL, PCI_DEVICE_ID_AL_M5229), }, |
| 650 | { 0, }, | 650 | |
| 651 | { }, | ||
| 651 | }; | 652 | }; |
| 652 | 653 | ||
| 653 | static struct pci_driver ali_pci_driver = { | 654 | static struct pci_driver ali_pci_driver = { |
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c index 599ee266722c..29234c897118 100644 --- a/drivers/ata/pata_amd.c +++ b/drivers/ata/pata_amd.c | |||
| @@ -662,27 +662,28 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 662 | } | 662 | } |
| 663 | 663 | ||
| 664 | static const struct pci_device_id amd[] = { | 664 | static const struct pci_device_id amd[] = { |
| 665 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_COBRA_7401, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 665 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_COBRA_7401), 0 }, |
| 666 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7409, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1 }, | 666 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_VIPER_7409), 1 }, |
| 667 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_VIPER_7411, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 3 }, | 667 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_VIPER_7411), 3 }, |
| 668 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_OPUS_7441, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 668 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_OPUS_7441), 4 }, |
| 669 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_8111_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5 }, | 669 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_8111_IDE), 5 }, |
| 670 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 7 }, | 670 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_IDE), 7 }, |
| 671 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 671 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2_IDE), 8 }, |
| 672 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 672 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_IDE), 8 }, |
| 673 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 673 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3_IDE), 8 }, |
| 674 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 674 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_IDE), 8 }, |
| 675 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 675 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_IDE), 8 }, |
| 676 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 676 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_IDE), 8 }, |
| 677 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 677 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_IDE), 8 }, |
| 678 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 678 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE), 8 }, |
| 679 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 679 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_IDE), 8 }, |
| 680 | { PCI_VENDOR_ID_AMD, PCI_DEVICE_ID_AMD_CS5536_IDE, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 9 }, | 680 | { PCI_VDEVICE(AMD, PCI_DEVICE_ID_AMD_CS5536_IDE), 9 }, |
| 681 | { 0, }, | 681 | |
| 682 | { }, | ||
| 682 | }; | 683 | }; |
| 683 | 684 | ||
| 684 | static struct pci_driver amd_pci_driver = { | 685 | static struct pci_driver amd_pci_driver = { |
| 685 | .name = DRV_NAME, | 686 | .name = DRV_NAME, |
| 686 | .id_table = amd, | 687 | .id_table = amd, |
| 687 | .probe = amd_init_one, | 688 | .probe = amd_init_one, |
| 688 | .remove = ata_pci_remove_one | 689 | .remove = ata_pci_remove_one |
| @@ -698,7 +699,6 @@ static void __exit amd_exit(void) | |||
| 698 | pci_unregister_driver(&amd_pci_driver); | 699 | pci_unregister_driver(&amd_pci_driver); |
| 699 | } | 700 | } |
| 700 | 701 | ||
| 701 | |||
| 702 | MODULE_AUTHOR("Alan Cox"); | 702 | MODULE_AUTHOR("Alan Cox"); |
| 703 | MODULE_DESCRIPTION("low-level driver for AMD PATA IDE"); | 703 | MODULE_DESCRIPTION("low-level driver for AMD PATA IDE"); |
| 704 | MODULE_LICENSE("GPL"); | 704 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_artop.c b/drivers/ata/pata_artop.c index c4ccb75a4f1d..690828eb5226 100644 --- a/drivers/ata/pata_artop.c +++ b/drivers/ata/pata_artop.c | |||
| @@ -426,7 +426,7 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 426 | .port_ops = &artop6260_ops, | 426 | .port_ops = &artop6260_ops, |
| 427 | }; | 427 | }; |
| 428 | struct ata_port_info *port_info[2]; | 428 | struct ata_port_info *port_info[2]; |
| 429 | struct ata_port_info *info; | 429 | struct ata_port_info *info = NULL; |
| 430 | int ports = 2; | 430 | int ports = 2; |
| 431 | 431 | ||
| 432 | if (!printed_version++) | 432 | if (!printed_version++) |
| @@ -470,16 +470,20 @@ static int artop_init_one (struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 470 | pci_write_config_byte(pdev, 0x4a, (reg & ~0x01) | 0x80); | 470 | pci_write_config_byte(pdev, 0x4a, (reg & ~0x01) | 0x80); |
| 471 | 471 | ||
| 472 | } | 472 | } |
| 473 | |||
| 474 | BUG_ON(info == NULL); | ||
| 475 | |||
| 473 | port_info[0] = port_info[1] = info; | 476 | port_info[0] = port_info[1] = info; |
| 474 | return ata_pci_init_one(pdev, port_info, ports); | 477 | return ata_pci_init_one(pdev, port_info, ports); |
| 475 | } | 478 | } |
| 476 | 479 | ||
| 477 | static const struct pci_device_id artop_pci_tbl[] = { | 480 | static const struct pci_device_id artop_pci_tbl[] = { |
| 478 | { 0x1191, 0x0005, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 481 | { PCI_VDEVICE(ARTOP, 0x0005), 0 }, |
| 479 | { 0x1191, 0x0006, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 482 | { PCI_VDEVICE(ARTOP, 0x0006), 1 }, |
| 480 | { 0x1191, 0x0007, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 483 | { PCI_VDEVICE(ARTOP, 0x0007), 1 }, |
| 481 | { 0x1191, 0x0008, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, | 484 | { PCI_VDEVICE(ARTOP, 0x0008), 2 }, |
| 482 | { 0x1191, 0x0009, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 2}, | 485 | { PCI_VDEVICE(ARTOP, 0x0009), 2 }, |
| 486 | |||
| 483 | { } /* terminate list */ | 487 | { } /* terminate list */ |
| 484 | }; | 488 | }; |
| 485 | 489 | ||
| @@ -500,7 +504,6 @@ static void __exit artop_exit(void) | |||
| 500 | pci_unregister_driver(&artop_pci_driver); | 504 | pci_unregister_driver(&artop_pci_driver); |
| 501 | } | 505 | } |
| 502 | 506 | ||
| 503 | |||
| 504 | module_init(artop_init); | 507 | module_init(artop_init); |
| 505 | module_exit(artop_exit); | 508 | module_exit(artop_exit); |
| 506 | 509 | ||
diff --git a/drivers/ata/pata_atiixp.c b/drivers/ata/pata_atiixp.c index 6c2269b6bd3c..1ce28d2125f4 100644 --- a/drivers/ata/pata_atiixp.c +++ b/drivers/ata/pata_atiixp.c | |||
| @@ -267,12 +267,13 @@ static int atiixp_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 267 | return ata_pci_init_one(dev, port_info, 2); | 267 | return ata_pci_init_one(dev, port_info, 2); |
| 268 | } | 268 | } |
| 269 | 269 | ||
| 270 | static struct pci_device_id atiixp[] = { | 270 | static const struct pci_device_id atiixp[] = { |
| 271 | { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP200_IDE), }, | 271 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP200_IDE), }, |
| 272 | { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP300_IDE), }, | 272 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP300_IDE), }, |
| 273 | { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), }, | 273 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP400_IDE), }, |
| 274 | { PCI_DEVICE(PCI_VENDOR_ID_ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), }, | 274 | { PCI_VDEVICE(ATI, PCI_DEVICE_ID_ATI_IXP600_IDE), }, |
| 275 | { 0, }, | 275 | |
| 276 | { }, | ||
| 276 | }; | 277 | }; |
| 277 | 278 | ||
| 278 | static struct pci_driver atiixp_pci_driver = { | 279 | static struct pci_driver atiixp_pci_driver = { |
| @@ -293,7 +294,6 @@ static void __exit atiixp_exit(void) | |||
| 293 | pci_unregister_driver(&atiixp_pci_driver); | 294 | pci_unregister_driver(&atiixp_pci_driver); |
| 294 | } | 295 | } |
| 295 | 296 | ||
| 296 | |||
| 297 | MODULE_AUTHOR("Alan Cox"); | 297 | MODULE_AUTHOR("Alan Cox"); |
| 298 | MODULE_DESCRIPTION("low-level driver for ATI IXP200/300/400"); | 298 | MODULE_DESCRIPTION("low-level driver for ATI IXP200/300/400"); |
| 299 | MODULE_LICENSE("GPL"); | 299 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_cmd64x.c b/drivers/ata/pata_cmd64x.c index e92b0ef43ec5..b9bbd1d454bf 100644 --- a/drivers/ata/pata_cmd64x.c +++ b/drivers/ata/pata_cmd64x.c | |||
| @@ -468,16 +468,17 @@ static int cmd64x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 468 | return ata_pci_init_one(pdev, port_info, 2); | 468 | return ata_pci_init_one(pdev, port_info, 2); |
| 469 | } | 469 | } |
| 470 | 470 | ||
| 471 | static struct pci_device_id cmd64x[] = { | 471 | static const struct pci_device_id cmd64x[] = { |
| 472 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_643, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 472 | { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_643), 0 }, |
| 473 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_646, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 473 | { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_646), 1 }, |
| 474 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_648, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4}, | 474 | { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_648), 4 }, |
| 475 | { PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_CMD_649, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 5}, | 475 | { PCI_VDEVICE(CMD, PCI_DEVICE_ID_CMD_649), 5 }, |
| 476 | { 0, }, | 476 | |
| 477 | { }, | ||
| 477 | }; | 478 | }; |
| 478 | 479 | ||
| 479 | static struct pci_driver cmd64x_pci_driver = { | 480 | static struct pci_driver cmd64x_pci_driver = { |
| 480 | .name = DRV_NAME, | 481 | .name = DRV_NAME, |
| 481 | .id_table = cmd64x, | 482 | .id_table = cmd64x, |
| 482 | .probe = cmd64x_init_one, | 483 | .probe = cmd64x_init_one, |
| 483 | .remove = ata_pci_remove_one | 484 | .remove = ata_pci_remove_one |
| @@ -488,13 +489,11 @@ static int __init cmd64x_init(void) | |||
| 488 | return pci_register_driver(&cmd64x_pci_driver); | 489 | return pci_register_driver(&cmd64x_pci_driver); |
| 489 | } | 490 | } |
| 490 | 491 | ||
| 491 | |||
| 492 | static void __exit cmd64x_exit(void) | 492 | static void __exit cmd64x_exit(void) |
| 493 | { | 493 | { |
| 494 | pci_unregister_driver(&cmd64x_pci_driver); | 494 | pci_unregister_driver(&cmd64x_pci_driver); |
| 495 | } | 495 | } |
| 496 | 496 | ||
| 497 | |||
| 498 | MODULE_AUTHOR("Alan Cox"); | 497 | MODULE_AUTHOR("Alan Cox"); |
| 499 | MODULE_DESCRIPTION("low-level driver for CMD64x series PATA controllers"); | 498 | MODULE_DESCRIPTION("low-level driver for CMD64x series PATA controllers"); |
| 500 | MODULE_LICENSE("GPL"); | 499 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_cs5520.c b/drivers/ata/pata_cs5520.c index a6c6cebd0dae..2cd3c0ff76df 100644 --- a/drivers/ata/pata_cs5520.c +++ b/drivers/ata/pata_cs5520.c | |||
| @@ -299,10 +299,11 @@ static void __devexit cs5520_remove_one(struct pci_dev *pdev) | |||
| 299 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the | 299 | /* For now keep DMA off. We can set it for all but A rev CS5510 once the |
| 300 | core ATA code can handle it */ | 300 | core ATA code can handle it */ |
| 301 | 301 | ||
| 302 | static struct pci_device_id pata_cs5520[] = { | 302 | static const struct pci_device_id pata_cs5520[] = { |
| 303 | { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5510), }, | 303 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5510), }, |
| 304 | { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5520), }, | 304 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5520), }, |
| 305 | { 0, }, | 305 | |
| 306 | { }, | ||
| 306 | }; | 307 | }; |
| 307 | 308 | ||
| 308 | static struct pci_driver cs5520_pci_driver = { | 309 | static struct pci_driver cs5520_pci_driver = { |
| @@ -312,7 +313,6 @@ static struct pci_driver cs5520_pci_driver = { | |||
| 312 | .remove = cs5520_remove_one | 313 | .remove = cs5520_remove_one |
| 313 | }; | 314 | }; |
| 314 | 315 | ||
| 315 | |||
| 316 | static int __init cs5520_init(void) | 316 | static int __init cs5520_init(void) |
| 317 | { | 317 | { |
| 318 | return pci_register_driver(&cs5520_pci_driver); | 318 | return pci_register_driver(&cs5520_pci_driver); |
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c index 7bba4d954e9c..a07cc81ef791 100644 --- a/drivers/ata/pata_cs5530.c +++ b/drivers/ata/pata_cs5530.c | |||
| @@ -353,13 +353,14 @@ fail_put: | |||
| 353 | return -ENODEV; | 353 | return -ENODEV; |
| 354 | } | 354 | } |
| 355 | 355 | ||
| 356 | static struct pci_device_id cs5530[] = { | 356 | static const struct pci_device_id cs5530[] = { |
| 357 | { PCI_DEVICE(PCI_VENDOR_ID_CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), }, | 357 | { PCI_VDEVICE(CYRIX, PCI_DEVICE_ID_CYRIX_5530_IDE), }, |
| 358 | { 0, }, | 358 | |
| 359 | { }, | ||
| 359 | }; | 360 | }; |
| 360 | 361 | ||
| 361 | static struct pci_driver cs5530_pci_driver = { | 362 | static struct pci_driver cs5530_pci_driver = { |
| 362 | .name = DRV_NAME, | 363 | .name = DRV_NAME, |
| 363 | .id_table = cs5530, | 364 | .id_table = cs5530, |
| 364 | .probe = cs5530_init_one, | 365 | .probe = cs5530_init_one, |
| 365 | .remove = ata_pci_remove_one | 366 | .remove = ata_pci_remove_one |
| @@ -370,13 +371,11 @@ static int __init cs5530_init(void) | |||
| 370 | return pci_register_driver(&cs5530_pci_driver); | 371 | return pci_register_driver(&cs5530_pci_driver); |
| 371 | } | 372 | } |
| 372 | 373 | ||
| 373 | |||
| 374 | static void __exit cs5530_exit(void) | 374 | static void __exit cs5530_exit(void) |
| 375 | { | 375 | { |
| 376 | pci_unregister_driver(&cs5530_pci_driver); | 376 | pci_unregister_driver(&cs5530_pci_driver); |
| 377 | } | 377 | } |
| 378 | 378 | ||
| 379 | |||
| 380 | MODULE_AUTHOR("Alan Cox"); | 379 | MODULE_AUTHOR("Alan Cox"); |
| 381 | MODULE_DESCRIPTION("low-level driver for the Cyrix/NS/AMD 5530"); | 380 | MODULE_DESCRIPTION("low-level driver for the Cyrix/NS/AMD 5530"); |
| 382 | MODULE_LICENSE("GPL"); | 381 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_cs5535.c b/drivers/ata/pata_cs5535.c index d64fcdceaf01..f8def3f9c618 100644 --- a/drivers/ata/pata_cs5535.c +++ b/drivers/ata/pata_cs5535.c | |||
| @@ -257,9 +257,10 @@ static int cs5535_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 257 | return ata_pci_init_one(dev, ports, 1); | 257 | return ata_pci_init_one(dev, ports, 1); |
| 258 | } | 258 | } |
| 259 | 259 | ||
| 260 | static struct pci_device_id cs5535[] = { | 260 | static const struct pci_device_id cs5535[] = { |
| 261 | { PCI_DEVICE(PCI_VENDOR_ID_NS, 0x002D), }, | 261 | { PCI_VDEVICE(NS, 0x002D), }, |
| 262 | { 0, }, | 262 | |
| 263 | { }, | ||
| 263 | }; | 264 | }; |
| 264 | 265 | ||
| 265 | static struct pci_driver cs5535_pci_driver = { | 266 | static struct pci_driver cs5535_pci_driver = { |
| @@ -274,13 +275,11 @@ static int __init cs5535_init(void) | |||
| 274 | return pci_register_driver(&cs5535_pci_driver); | 275 | return pci_register_driver(&cs5535_pci_driver); |
| 275 | } | 276 | } |
| 276 | 277 | ||
| 277 | |||
| 278 | static void __exit cs5535_exit(void) | 278 | static void __exit cs5535_exit(void) |
| 279 | { | 279 | { |
| 280 | pci_unregister_driver(&cs5535_pci_driver); | 280 | pci_unregister_driver(&cs5535_pci_driver); |
| 281 | } | 281 | } |
| 282 | 282 | ||
| 283 | |||
| 284 | MODULE_AUTHOR("Alan Cox, Jens Altmann, Wolfgan Zuleger, Alexander Kiausch"); | 283 | MODULE_AUTHOR("Alan Cox, Jens Altmann, Wolfgan Zuleger, Alexander Kiausch"); |
| 285 | MODULE_DESCRIPTION("low-level driver for the NS/AMD 5530"); | 284 | MODULE_DESCRIPTION("low-level driver for the NS/AMD 5530"); |
| 286 | MODULE_LICENSE("GPL"); | 285 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_cypress.c b/drivers/ata/pata_cypress.c index dfa5ac539048..247b43608b14 100644 --- a/drivers/ata/pata_cypress.c +++ b/drivers/ata/pata_cypress.c | |||
| @@ -184,8 +184,8 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i | |||
| 184 | }; | 184 | }; |
| 185 | static struct ata_port_info *port_info[1] = { &info }; | 185 | static struct ata_port_info *port_info[1] = { &info }; |
| 186 | 186 | ||
| 187 | /* Devfn 1 is the ATA primary. The secondary is magic and on devfn2. For the | 187 | /* Devfn 1 is the ATA primary. The secondary is magic and on devfn2. |
| 188 | moment we don't handle the secondary. FIXME */ | 188 | For the moment we don't handle the secondary. FIXME */ |
| 189 | 189 | ||
| 190 | if (PCI_FUNC(pdev->devfn) != 1) | 190 | if (PCI_FUNC(pdev->devfn) != 1) |
| 191 | return -ENODEV; | 191 | return -ENODEV; |
| @@ -193,13 +193,14 @@ static int cy82c693_init_one(struct pci_dev *pdev, const struct pci_device_id *i | |||
| 193 | return ata_pci_init_one(pdev, port_info, 1); | 193 | return ata_pci_init_one(pdev, port_info, 1); |
| 194 | } | 194 | } |
| 195 | 195 | ||
| 196 | static struct pci_device_id cy82c693[] = { | 196 | static const struct pci_device_id cy82c693[] = { |
| 197 | { PCI_VENDOR_ID_CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 197 | { PCI_VDEVICE(CONTAQ, PCI_DEVICE_ID_CONTAQ_82C693), }, |
| 198 | { 0, }, | 198 | |
| 199 | { }, | ||
| 199 | }; | 200 | }; |
| 200 | 201 | ||
| 201 | static struct pci_driver cy82c693_pci_driver = { | 202 | static struct pci_driver cy82c693_pci_driver = { |
| 202 | .name = DRV_NAME, | 203 | .name = DRV_NAME, |
| 203 | .id_table = cy82c693, | 204 | .id_table = cy82c693, |
| 204 | .probe = cy82c693_init_one, | 205 | .probe = cy82c693_init_one, |
| 205 | .remove = ata_pci_remove_one | 206 | .remove = ata_pci_remove_one |
diff --git a/drivers/ata/pata_efar.c b/drivers/ata/pata_efar.c index 95cd1ca181f5..ef18c60fe140 100644 --- a/drivers/ata/pata_efar.c +++ b/drivers/ata/pata_efar.c | |||
| @@ -305,7 +305,8 @@ static int efar_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 305 | } | 305 | } |
| 306 | 306 | ||
| 307 | static const struct pci_device_id efar_pci_tbl[] = { | 307 | static const struct pci_device_id efar_pci_tbl[] = { |
| 308 | { 0x1055, 0x9130, PCI_ANY_ID, PCI_ANY_ID, }, | 308 | { PCI_VDEVICE(EFAR, 0x9130), }, |
| 309 | |||
| 309 | { } /* terminate list */ | 310 | { } /* terminate list */ |
| 310 | }; | 311 | }; |
| 311 | 312 | ||
| @@ -326,7 +327,6 @@ static void __exit efar_exit(void) | |||
| 326 | pci_unregister_driver(&efar_pci_driver); | 327 | pci_unregister_driver(&efar_pci_driver); |
| 327 | } | 328 | } |
| 328 | 329 | ||
| 329 | |||
| 330 | module_init(efar_init); | 330 | module_init(efar_init); |
| 331 | module_exit(efar_exit); | 331 | module_exit(efar_exit); |
| 332 | 332 | ||
diff --git a/drivers/ata/pata_hpt366.c b/drivers/ata/pata_hpt366.c index 8c757438f350..6d3e4c0f15fe 100644 --- a/drivers/ata/pata_hpt366.c +++ b/drivers/ata/pata_hpt366.c | |||
| @@ -444,13 +444,14 @@ static int hpt36x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 444 | return ata_pci_init_one(dev, port_info, 2); | 444 | return ata_pci_init_one(dev, port_info, 2); |
| 445 | } | 445 | } |
| 446 | 446 | ||
| 447 | static struct pci_device_id hpt36x[] = { | 447 | static const struct pci_device_id hpt36x[] = { |
| 448 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366), }, | 448 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), }, |
| 449 | { 0, }, | 449 | |
| 450 | { }, | ||
| 450 | }; | 451 | }; |
| 451 | 452 | ||
| 452 | static struct pci_driver hpt36x_pci_driver = { | 453 | static struct pci_driver hpt36x_pci_driver = { |
| 453 | .name = DRV_NAME, | 454 | .name = DRV_NAME, |
| 454 | .id_table = hpt36x, | 455 | .id_table = hpt36x, |
| 455 | .probe = hpt36x_init_one, | 456 | .probe = hpt36x_init_one, |
| 456 | .remove = ata_pci_remove_one | 457 | .remove = ata_pci_remove_one |
diff --git a/drivers/ata/pata_hpt37x.c b/drivers/ata/pata_hpt37x.c index 10318c0012ef..7350443948c1 100644 --- a/drivers/ata/pata_hpt37x.c +++ b/drivers/ata/pata_hpt37x.c | |||
| @@ -1219,17 +1219,18 @@ static int hpt37x_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 1219 | return ata_pci_init_one(dev, port_info, 2); | 1219 | return ata_pci_init_one(dev, port_info, 2); |
| 1220 | } | 1220 | } |
| 1221 | 1221 | ||
| 1222 | static struct pci_device_id hpt37x[] = { | 1222 | static const struct pci_device_id hpt37x[] = { |
| 1223 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366), }, | 1223 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), }, |
| 1224 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT371), }, | 1224 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT371), }, |
| 1225 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT372), }, | 1225 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372), }, |
| 1226 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT374), }, | 1226 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT374), }, |
| 1227 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT302), }, | 1227 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT302), }, |
| 1228 | { 0, }, | 1228 | |
| 1229 | { }, | ||
| 1229 | }; | 1230 | }; |
| 1230 | 1231 | ||
| 1231 | static struct pci_driver hpt37x_pci_driver = { | 1232 | static struct pci_driver hpt37x_pci_driver = { |
| 1232 | .name = DRV_NAME, | 1233 | .name = DRV_NAME, |
| 1233 | .id_table = hpt37x, | 1234 | .id_table = hpt37x, |
| 1234 | .probe = hpt37x_init_one, | 1235 | .probe = hpt37x_init_one, |
| 1235 | .remove = ata_pci_remove_one | 1236 | .remove = ata_pci_remove_one |
| @@ -1240,13 +1241,11 @@ static int __init hpt37x_init(void) | |||
| 1240 | return pci_register_driver(&hpt37x_pci_driver); | 1241 | return pci_register_driver(&hpt37x_pci_driver); |
| 1241 | } | 1242 | } |
| 1242 | 1243 | ||
| 1243 | |||
| 1244 | static void __exit hpt37x_exit(void) | 1244 | static void __exit hpt37x_exit(void) |
| 1245 | { | 1245 | { |
| 1246 | pci_unregister_driver(&hpt37x_pci_driver); | 1246 | pci_unregister_driver(&hpt37x_pci_driver); |
| 1247 | } | 1247 | } |
| 1248 | 1248 | ||
| 1249 | |||
| 1250 | MODULE_AUTHOR("Alan Cox"); | 1249 | MODULE_AUTHOR("Alan Cox"); |
| 1251 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT37x/30x"); | 1250 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT37x/30x"); |
| 1252 | MODULE_LICENSE("GPL"); | 1251 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_hpt3x2n.c b/drivers/ata/pata_hpt3x2n.c index 5c5d4f6ab901..58cfb2bc8098 100644 --- a/drivers/ata/pata_hpt3x2n.c +++ b/drivers/ata/pata_hpt3x2n.c | |||
| @@ -560,16 +560,17 @@ static int hpt3x2n_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 560 | return ata_pci_init_one(dev, port_info, 2); | 560 | return ata_pci_init_one(dev, port_info, 2); |
| 561 | } | 561 | } |
| 562 | 562 | ||
| 563 | static struct pci_device_id hpt3x2n[] = { | 563 | static const struct pci_device_id hpt3x2n[] = { |
| 564 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT366), }, | 564 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT366), }, |
| 565 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT372), }, | 565 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372), }, |
| 566 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT302), }, | 566 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT302), }, |
| 567 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT372N), }, | 567 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT372N), }, |
| 568 | { 0, }, | 568 | |
| 569 | { }, | ||
| 569 | }; | 570 | }; |
| 570 | 571 | ||
| 571 | static struct pci_driver hpt3x2n_pci_driver = { | 572 | static struct pci_driver hpt3x2n_pci_driver = { |
| 572 | .name = DRV_NAME, | 573 | .name = DRV_NAME, |
| 573 | .id_table = hpt3x2n, | 574 | .id_table = hpt3x2n, |
| 574 | .probe = hpt3x2n_init_one, | 575 | .probe = hpt3x2n_init_one, |
| 575 | .remove = ata_pci_remove_one | 576 | .remove = ata_pci_remove_one |
| @@ -580,13 +581,11 @@ static int __init hpt3x2n_init(void) | |||
| 580 | return pci_register_driver(&hpt3x2n_pci_driver); | 581 | return pci_register_driver(&hpt3x2n_pci_driver); |
| 581 | } | 582 | } |
| 582 | 583 | ||
| 583 | |||
| 584 | static void __exit hpt3x2n_exit(void) | 584 | static void __exit hpt3x2n_exit(void) |
| 585 | { | 585 | { |
| 586 | pci_unregister_driver(&hpt3x2n_pci_driver); | 586 | pci_unregister_driver(&hpt3x2n_pci_driver); |
| 587 | } | 587 | } |
| 588 | 588 | ||
| 589 | |||
| 590 | MODULE_AUTHOR("Alan Cox"); | 589 | MODULE_AUTHOR("Alan Cox"); |
| 591 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT3x2n/30x"); | 590 | MODULE_DESCRIPTION("low-level driver for the Highpoint HPT3x2n/30x"); |
| 592 | MODULE_LICENSE("GPL"); | 591 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_hpt3x3.c b/drivers/ata/pata_hpt3x3.c index 1f084ab1ccc6..3334d72e251b 100644 --- a/drivers/ata/pata_hpt3x3.c +++ b/drivers/ata/pata_hpt3x3.c | |||
| @@ -192,13 +192,14 @@ static int hpt3x3_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 192 | return ata_pci_init_one(dev, port_info, 2); | 192 | return ata_pci_init_one(dev, port_info, 2); |
| 193 | } | 193 | } |
| 194 | 194 | ||
| 195 | static struct pci_device_id hpt3x3[] = { | 195 | static const struct pci_device_id hpt3x3[] = { |
| 196 | { PCI_DEVICE(PCI_VENDOR_ID_TTI, PCI_DEVICE_ID_TTI_HPT343), }, | 196 | { PCI_VDEVICE(TTI, PCI_DEVICE_ID_TTI_HPT343), }, |
| 197 | { 0, }, | 197 | |
| 198 | { }, | ||
| 198 | }; | 199 | }; |
| 199 | 200 | ||
| 200 | static struct pci_driver hpt3x3_pci_driver = { | 201 | static struct pci_driver hpt3x3_pci_driver = { |
| 201 | .name = DRV_NAME, | 202 | .name = DRV_NAME, |
| 202 | .id_table = hpt3x3, | 203 | .id_table = hpt3x3, |
| 203 | .probe = hpt3x3_init_one, | 204 | .probe = hpt3x3_init_one, |
| 204 | .remove = ata_pci_remove_one | 205 | .remove = ata_pci_remove_one |
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c index 82a46ff40000..18ff3e59a89b 100644 --- a/drivers/ata/pata_it821x.c +++ b/drivers/ata/pata_it821x.c | |||
| @@ -808,14 +808,15 @@ static int it821x_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 808 | return ata_pci_init_one(pdev, port_info, 2); | 808 | return ata_pci_init_one(pdev, port_info, 2); |
| 809 | } | 809 | } |
| 810 | 810 | ||
| 811 | static struct pci_device_id it821x[] = { | 811 | static const struct pci_device_id it821x[] = { |
| 812 | { PCI_DEVICE(PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8211), }, | 812 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8211), }, |
| 813 | { PCI_DEVICE(PCI_VENDOR_ID_ITE, PCI_DEVICE_ID_ITE_8212), }, | 813 | { PCI_VDEVICE(ITE, PCI_DEVICE_ID_ITE_8212), }, |
| 814 | { 0, }, | 814 | |
| 815 | { }, | ||
| 815 | }; | 816 | }; |
| 816 | 817 | ||
| 817 | static struct pci_driver it821x_pci_driver = { | 818 | static struct pci_driver it821x_pci_driver = { |
| 818 | .name = DRV_NAME, | 819 | .name = DRV_NAME, |
| 819 | .id_table = it821x, | 820 | .id_table = it821x, |
| 820 | .probe = it821x_init_one, | 821 | .probe = it821x_init_one, |
| 821 | .remove = ata_pci_remove_one | 822 | .remove = ata_pci_remove_one |
| @@ -826,13 +827,11 @@ static int __init it821x_init(void) | |||
| 826 | return pci_register_driver(&it821x_pci_driver); | 827 | return pci_register_driver(&it821x_pci_driver); |
| 827 | } | 828 | } |
| 828 | 829 | ||
| 829 | |||
| 830 | static void __exit it821x_exit(void) | 830 | static void __exit it821x_exit(void) |
| 831 | { | 831 | { |
| 832 | pci_unregister_driver(&it821x_pci_driver); | 832 | pci_unregister_driver(&it821x_pci_driver); |
| 833 | } | 833 | } |
| 834 | 834 | ||
| 835 | |||
| 836 | MODULE_AUTHOR("Alan Cox"); | 835 | MODULE_AUTHOR("Alan Cox"); |
| 837 | MODULE_DESCRIPTION("low-level driver for the IT8211/IT8212 IDE RAID controller"); | 836 | MODULE_DESCRIPTION("low-level driver for the IT8211/IT8212 IDE RAID controller"); |
| 838 | MODULE_LICENSE("GPL"); | 837 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_jmicron.c b/drivers/ata/pata_jmicron.c index be3a866b111f..52a2bdf3c38d 100644 --- a/drivers/ata/pata_jmicron.c +++ b/drivers/ata/pata_jmicron.c | |||
| @@ -229,11 +229,12 @@ static int jmicron_init_one (struct pci_dev *pdev, const struct pci_device_id *i | |||
| 229 | } | 229 | } |
| 230 | 230 | ||
| 231 | static const struct pci_device_id jmicron_pci_tbl[] = { | 231 | static const struct pci_device_id jmicron_pci_tbl[] = { |
| 232 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361}, | 232 | { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB361), 361}, |
| 233 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB363), 363}, | 233 | { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB363), 363}, |
| 234 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB365), 365}, | 234 | { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB365), 365}, |
| 235 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB366), 366}, | 235 | { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB366), 366}, |
| 236 | { PCI_DEVICE(PCI_VENDOR_ID_JMICRON, PCI_DEVICE_ID_JMICRON_JMB368), 368}, | 236 | { PCI_VDEVICE(JMICRON, PCI_DEVICE_ID_JMICRON_JMB368), 368}, |
| 237 | |||
| 237 | { } /* terminate list */ | 238 | { } /* terminate list */ |
| 238 | }; | 239 | }; |
| 239 | 240 | ||
diff --git a/drivers/ata/pata_mpiix.c b/drivers/ata/pata_mpiix.c index 3c65393c1f01..9dfe3e9abea3 100644 --- a/drivers/ata/pata_mpiix.c +++ b/drivers/ata/pata_mpiix.c | |||
| @@ -274,11 +274,10 @@ static void __devexit mpiix_remove_one(struct pci_dev *pdev) | |||
| 274 | dev_set_drvdata(dev, NULL); | 274 | dev_set_drvdata(dev, NULL); |
| 275 | } | 275 | } |
| 276 | 276 | ||
| 277 | |||
| 278 | |||
| 279 | static const struct pci_device_id mpiix[] = { | 277 | static const struct pci_device_id mpiix[] = { |
| 280 | { PCI_DEVICE(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82371MX), }, | 278 | { PCI_VDEVICE(INTEL, PCI_DEVICE_ID_INTEL_82371MX), }, |
| 281 | { 0, }, | 279 | |
| 280 | { }, | ||
| 282 | }; | 281 | }; |
| 283 | 282 | ||
| 284 | static struct pci_driver mpiix_pci_driver = { | 283 | static struct pci_driver mpiix_pci_driver = { |
| @@ -293,13 +292,11 @@ static int __init mpiix_init(void) | |||
| 293 | return pci_register_driver(&mpiix_pci_driver); | 292 | return pci_register_driver(&mpiix_pci_driver); |
| 294 | } | 293 | } |
| 295 | 294 | ||
| 296 | |||
| 297 | static void __exit mpiix_exit(void) | 295 | static void __exit mpiix_exit(void) |
| 298 | { | 296 | { |
| 299 | pci_unregister_driver(&mpiix_pci_driver); | 297 | pci_unregister_driver(&mpiix_pci_driver); |
| 300 | } | 298 | } |
| 301 | 299 | ||
| 302 | |||
| 303 | MODULE_AUTHOR("Alan Cox"); | 300 | MODULE_AUTHOR("Alan Cox"); |
| 304 | MODULE_DESCRIPTION("low-level driver for Intel MPIIX"); | 301 | MODULE_DESCRIPTION("low-level driver for Intel MPIIX"); |
| 305 | MODULE_LICENSE("GPL"); | 302 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_netcell.c b/drivers/ata/pata_netcell.c index 76eb9c90bee1..f5672de99c22 100644 --- a/drivers/ata/pata_netcell.c +++ b/drivers/ata/pata_netcell.c | |||
| @@ -142,7 +142,8 @@ static int netcell_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
| 142 | } | 142 | } |
| 143 | 143 | ||
| 144 | static const struct pci_device_id netcell_pci_tbl[] = { | 144 | static const struct pci_device_id netcell_pci_tbl[] = { |
| 145 | { PCI_DEVICE(PCI_VENDOR_ID_NETCELL, PCI_DEVICE_ID_REVOLUTION), }, | 145 | { PCI_VDEVICE(NETCELL, PCI_DEVICE_ID_REVOLUTION), }, |
| 146 | |||
| 146 | { } /* terminate list */ | 147 | { } /* terminate list */ |
| 147 | }; | 148 | }; |
| 148 | 149 | ||
diff --git a/drivers/ata/pata_ns87410.c b/drivers/ata/pata_ns87410.c index 2005a95f48f6..2a3dbeed89b4 100644 --- a/drivers/ata/pata_ns87410.c +++ b/drivers/ata/pata_ns87410.c | |||
| @@ -200,12 +200,13 @@ static int ns87410_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | static const struct pci_device_id ns87410[] = { | 202 | static const struct pci_device_id ns87410[] = { |
| 203 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_87410), }, | 203 | { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_87410), }, |
| 204 | { 0, }, | 204 | |
| 205 | { }, | ||
| 205 | }; | 206 | }; |
| 206 | 207 | ||
| 207 | static struct pci_driver ns87410_pci_driver = { | 208 | static struct pci_driver ns87410_pci_driver = { |
| 208 | .name = DRV_NAME, | 209 | .name = DRV_NAME, |
| 209 | .id_table = ns87410, | 210 | .id_table = ns87410, |
| 210 | .probe = ns87410_init_one, | 211 | .probe = ns87410_init_one, |
| 211 | .remove = ata_pci_remove_one | 212 | .remove = ata_pci_remove_one |
| @@ -216,13 +217,11 @@ static int __init ns87410_init(void) | |||
| 216 | return pci_register_driver(&ns87410_pci_driver); | 217 | return pci_register_driver(&ns87410_pci_driver); |
| 217 | } | 218 | } |
| 218 | 219 | ||
| 219 | |||
| 220 | static void __exit ns87410_exit(void) | 220 | static void __exit ns87410_exit(void) |
| 221 | { | 221 | { |
| 222 | pci_unregister_driver(&ns87410_pci_driver); | 222 | pci_unregister_driver(&ns87410_pci_driver); |
| 223 | } | 223 | } |
| 224 | 224 | ||
| 225 | |||
| 226 | MODULE_AUTHOR("Alan Cox"); | 225 | MODULE_AUTHOR("Alan Cox"); |
| 227 | MODULE_DESCRIPTION("low-level driver for Nat Semi 87410"); | 226 | MODULE_DESCRIPTION("low-level driver for Nat Semi 87410"); |
| 228 | MODULE_LICENSE("GPL"); | 227 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_oldpiix.c b/drivers/ata/pata_oldpiix.c index 31a285ca88dc..fc947dfecd73 100644 --- a/drivers/ata/pata_oldpiix.c +++ b/drivers/ata/pata_oldpiix.c | |||
| @@ -303,7 +303,8 @@ static int oldpiix_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
| 303 | } | 303 | } |
| 304 | 304 | ||
| 305 | static const struct pci_device_id oldpiix_pci_tbl[] = { | 305 | static const struct pci_device_id oldpiix_pci_tbl[] = { |
| 306 | { PCI_DEVICE(0x8086, 0x1230), }, | 306 | { PCI_VDEVICE(INTEL, 0x1230), }, |
| 307 | |||
| 307 | { } /* terminate list */ | 308 | { } /* terminate list */ |
| 308 | }; | 309 | }; |
| 309 | 310 | ||
| @@ -324,7 +325,6 @@ static void __exit oldpiix_exit(void) | |||
| 324 | pci_unregister_driver(&oldpiix_pci_driver); | 325 | pci_unregister_driver(&oldpiix_pci_driver); |
| 325 | } | 326 | } |
| 326 | 327 | ||
| 327 | |||
| 328 | module_init(oldpiix_init); | 328 | module_init(oldpiix_init); |
| 329 | module_exit(oldpiix_exit); | 329 | module_exit(oldpiix_exit); |
| 330 | 330 | ||
diff --git a/drivers/ata/pata_opti.c b/drivers/ata/pata_opti.c index 57fe21f3a975..a7320ba15575 100644 --- a/drivers/ata/pata_opti.c +++ b/drivers/ata/pata_opti.c | |||
| @@ -256,13 +256,14 @@ static int opti_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 256 | } | 256 | } |
| 257 | 257 | ||
| 258 | static const struct pci_device_id opti[] = { | 258 | static const struct pci_device_id opti[] = { |
| 259 | { PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C621, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0}, | 259 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C621), 0 }, |
| 260 | { PCI_VENDOR_ID_OPTI, PCI_DEVICE_ID_OPTI_82C825, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 1}, | 260 | { PCI_VDEVICE(OPTI, PCI_DEVICE_ID_OPTI_82C825), 1 }, |
| 261 | { 0, }, | 261 | |
| 262 | { }, | ||
| 262 | }; | 263 | }; |
| 263 | 264 | ||
| 264 | static struct pci_driver opti_pci_driver = { | 265 | static struct pci_driver opti_pci_driver = { |
| 265 | .name = DRV_NAME, | 266 | .name = DRV_NAME, |
| 266 | .id_table = opti, | 267 | .id_table = opti, |
| 267 | .probe = opti_init_one, | 268 | .probe = opti_init_one, |
| 268 | .remove = ata_pci_remove_one | 269 | .remove = ata_pci_remove_one |
| @@ -273,7 +274,6 @@ static int __init opti_init(void) | |||
| 273 | return pci_register_driver(&opti_pci_driver); | 274 | return pci_register_driver(&opti_pci_driver); |
| 274 | } | 275 | } |
| 275 | 276 | ||
| 276 | |||
| 277 | static void __exit opti_exit(void) | 277 | static void __exit opti_exit(void) |
| 278 | { | 278 | { |
| 279 | pci_unregister_driver(&opti_pci_driver); | 279 | pci_unregister_driver(&opti_pci_driver); |
diff --git a/drivers/ata/pata_optidma.c b/drivers/ata/pata_optidma.c index 7296a20cd107..c6906b4215de 100644 --- a/drivers/ata/pata_optidma.c +++ b/drivers/ata/pata_optidma.c | |||
| @@ -512,12 +512,13 @@ static int optidma_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 512 | } | 512 | } |
| 513 | 513 | ||
| 514 | static const struct pci_device_id optidma[] = { | 514 | static const struct pci_device_id optidma[] = { |
| 515 | { PCI_DEVICE(0x1045, 0xD568), }, /* Opti 82C700 */ | 515 | { PCI_VDEVICE(OPTI, 0xD568), }, /* Opti 82C700 */ |
| 516 | { 0, }, | 516 | |
| 517 | { }, | ||
| 517 | }; | 518 | }; |
| 518 | 519 | ||
| 519 | static struct pci_driver optidma_pci_driver = { | 520 | static struct pci_driver optidma_pci_driver = { |
| 520 | .name = DRV_NAME, | 521 | .name = DRV_NAME, |
| 521 | .id_table = optidma, | 522 | .id_table = optidma, |
| 522 | .probe = optidma_init_one, | 523 | .probe = optidma_init_one, |
| 523 | .remove = ata_pci_remove_one | 524 | .remove = ata_pci_remove_one |
| @@ -528,13 +529,11 @@ static int __init optidma_init(void) | |||
| 528 | return pci_register_driver(&optidma_pci_driver); | 529 | return pci_register_driver(&optidma_pci_driver); |
| 529 | } | 530 | } |
| 530 | 531 | ||
| 531 | |||
| 532 | static void __exit optidma_exit(void) | 532 | static void __exit optidma_exit(void) |
| 533 | { | 533 | { |
| 534 | pci_unregister_driver(&optidma_pci_driver); | 534 | pci_unregister_driver(&optidma_pci_driver); |
| 535 | } | 535 | } |
| 536 | 536 | ||
| 537 | |||
| 538 | MODULE_AUTHOR("Alan Cox"); | 537 | MODULE_AUTHOR("Alan Cox"); |
| 539 | MODULE_DESCRIPTION("low-level driver for Opti Firestar/Firestar Plus"); | 538 | MODULE_DESCRIPTION("low-level driver for Opti Firestar/Firestar Plus"); |
| 540 | MODULE_LICENSE("GPL"); | 539 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_pdc2027x.c b/drivers/ata/pata_pdc2027x.c index bd4ed6734edc..d894d9918b1d 100644 --- a/drivers/ata/pata_pdc2027x.c +++ b/drivers/ata/pata_pdc2027x.c | |||
| @@ -108,13 +108,14 @@ static struct pdc2027x_udma_timing { | |||
| 108 | }; | 108 | }; |
| 109 | 109 | ||
| 110 | static const struct pci_device_id pdc2027x_pci_tbl[] = { | 110 | static const struct pci_device_id pdc2027x_pci_tbl[] = { |
| 111 | { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20268, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_100 }, | 111 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20268), PDC_UDMA_100 }, |
| 112 | { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20269, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, | 112 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20269), PDC_UDMA_133 }, |
| 113 | { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20270, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_100 }, | 113 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20270), PDC_UDMA_100 }, |
| 114 | { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20271, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, | 114 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20271), PDC_UDMA_133 }, |
| 115 | { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20275, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, | 115 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20275), PDC_UDMA_133 }, |
| 116 | { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20276, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, | 116 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20276), PDC_UDMA_133 }, |
| 117 | { PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20277, PCI_ANY_ID, PCI_ANY_ID, 0, 0, PDC_UDMA_133 }, | 117 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20277), PDC_UDMA_133 }, |
| 118 | |||
| 118 | { } /* terminate list */ | 119 | { } /* terminate list */ |
| 119 | }; | 120 | }; |
| 120 | 121 | ||
diff --git a/drivers/ata/pata_pdc202xx_old.c b/drivers/ata/pata_pdc202xx_old.c index 48f43432764e..5ba9eb20a6c2 100644 --- a/drivers/ata/pata_pdc202xx_old.c +++ b/drivers/ata/pata_pdc202xx_old.c | |||
| @@ -385,17 +385,18 @@ static int pdc_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 385 | return ata_pci_init_one(dev, port_info, 2); | 385 | return ata_pci_init_one(dev, port_info, 2); |
| 386 | } | 386 | } |
| 387 | 387 | ||
| 388 | static struct pci_device_id pdc[] = { | 388 | static const struct pci_device_id pdc[] = { |
| 389 | { PCI_DEVICE(PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0}, | 389 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20246), 0 }, |
| 390 | { PCI_DEVICE(PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1}, | 390 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20262), 1 }, |
| 391 | { PCI_DEVICE(PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20263), 1}, | 391 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20263), 1 }, |
| 392 | { PCI_DEVICE(PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20265), 2}, | 392 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20265), 2 }, |
| 393 | { PCI_DEVICE(PCI_VENDOR_ID_PROMISE, PCI_DEVICE_ID_PROMISE_20267), 2}, | 393 | { PCI_VDEVICE(PROMISE, PCI_DEVICE_ID_PROMISE_20267), 2 }, |
| 394 | { 0, }, | 394 | |
| 395 | { }, | ||
| 395 | }; | 396 | }; |
| 396 | 397 | ||
| 397 | static struct pci_driver pdc_pci_driver = { | 398 | static struct pci_driver pdc_pci_driver = { |
| 398 | .name = DRV_NAME, | 399 | .name = DRV_NAME, |
| 399 | .id_table = pdc, | 400 | .id_table = pdc, |
| 400 | .probe = pdc_init_one, | 401 | .probe = pdc_init_one, |
| 401 | .remove = ata_pci_remove_one | 402 | .remove = ata_pci_remove_one |
| @@ -406,13 +407,11 @@ static int __init pdc_init(void) | |||
| 406 | return pci_register_driver(&pdc_pci_driver); | 407 | return pci_register_driver(&pdc_pci_driver); |
| 407 | } | 408 | } |
| 408 | 409 | ||
| 409 | |||
| 410 | static void __exit pdc_exit(void) | 410 | static void __exit pdc_exit(void) |
| 411 | { | 411 | { |
| 412 | pci_unregister_driver(&pdc_pci_driver); | 412 | pci_unregister_driver(&pdc_pci_driver); |
| 413 | } | 413 | } |
| 414 | 414 | ||
| 415 | |||
| 416 | MODULE_AUTHOR("Alan Cox"); | 415 | MODULE_AUTHOR("Alan Cox"); |
| 417 | MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267"); | 416 | MODULE_DESCRIPTION("low-level driver for Promise 2024x and 20262-20267"); |
| 418 | MODULE_LICENSE("GPL"); | 417 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_radisys.c b/drivers/ata/pata_radisys.c index c20bcf43ed6d..1af83d7694d5 100644 --- a/drivers/ata/pata_radisys.c +++ b/drivers/ata/pata_radisys.c | |||
| @@ -300,7 +300,8 @@ static int radisys_init_one (struct pci_dev *pdev, const struct pci_device_id *e | |||
| 300 | } | 300 | } |
| 301 | 301 | ||
| 302 | static const struct pci_device_id radisys_pci_tbl[] = { | 302 | static const struct pci_device_id radisys_pci_tbl[] = { |
| 303 | { 0x1331, 0x8201, PCI_ANY_ID, PCI_ANY_ID, }, | 303 | { PCI_VDEVICE(RADISYS, 0x8201), }, |
| 304 | |||
| 304 | { } /* terminate list */ | 305 | { } /* terminate list */ |
| 305 | }; | 306 | }; |
| 306 | 307 | ||
| @@ -321,7 +322,6 @@ static void __exit radisys_exit(void) | |||
| 321 | pci_unregister_driver(&radisys_pci_driver); | 322 | pci_unregister_driver(&radisys_pci_driver); |
| 322 | } | 323 | } |
| 323 | 324 | ||
| 324 | |||
| 325 | module_init(radisys_init); | 325 | module_init(radisys_init); |
| 326 | module_exit(radisys_exit); | 326 | module_exit(radisys_exit); |
| 327 | 327 | ||
diff --git a/drivers/ata/pata_rz1000.c b/drivers/ata/pata_rz1000.c index eccc6fd45032..4533b6357d99 100644 --- a/drivers/ata/pata_rz1000.c +++ b/drivers/ata/pata_rz1000.c | |||
| @@ -170,20 +170,20 @@ fail: | |||
| 170 | return -ENODEV; | 170 | return -ENODEV; |
| 171 | } | 171 | } |
| 172 | 172 | ||
| 173 | static struct pci_device_id pata_rz1000[] = { | 173 | static const struct pci_device_id pata_rz1000[] = { |
| 174 | { PCI_DEVICE(PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000), }, | 174 | { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1000), }, |
| 175 | { PCI_DEVICE(PCI_VENDOR_ID_PCTECH, PCI_DEVICE_ID_PCTECH_RZ1001), }, | 175 | { PCI_VDEVICE(PCTECH, PCI_DEVICE_ID_PCTECH_RZ1001), }, |
| 176 | { 0, }, | 176 | |
| 177 | { }, | ||
| 177 | }; | 178 | }; |
| 178 | 179 | ||
| 179 | static struct pci_driver rz1000_pci_driver = { | 180 | static struct pci_driver rz1000_pci_driver = { |
| 180 | .name = DRV_NAME, | 181 | .name = DRV_NAME, |
| 181 | .id_table = pata_rz1000, | 182 | .id_table = pata_rz1000, |
| 182 | .probe = rz1000_init_one, | 183 | .probe = rz1000_init_one, |
| 183 | .remove = ata_pci_remove_one | 184 | .remove = ata_pci_remove_one |
| 184 | }; | 185 | }; |
| 185 | 186 | ||
| 186 | |||
| 187 | static int __init rz1000_init(void) | 187 | static int __init rz1000_init(void) |
| 188 | { | 188 | { |
| 189 | return pci_register_driver(&rz1000_pci_driver); | 189 | return pci_register_driver(&rz1000_pci_driver); |
diff --git a/drivers/ata/pata_sc1200.c b/drivers/ata/pata_sc1200.c index 107e6cd3dc0d..067d9d223e35 100644 --- a/drivers/ata/pata_sc1200.c +++ b/drivers/ata/pata_sc1200.c | |||
| @@ -253,13 +253,14 @@ static int sc1200_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 253 | return ata_pci_init_one(dev, port_info, 1); | 253 | return ata_pci_init_one(dev, port_info, 1); |
| 254 | } | 254 | } |
| 255 | 255 | ||
| 256 | static struct pci_device_id sc1200[] = { | 256 | static const struct pci_device_id sc1200[] = { |
| 257 | { PCI_DEVICE(PCI_VENDOR_ID_NS, PCI_DEVICE_ID_NS_SCx200_IDE), }, | 257 | { PCI_VDEVICE(NS, PCI_DEVICE_ID_NS_SCx200_IDE), }, |
| 258 | { 0, }, | 258 | |
| 259 | { }, | ||
| 259 | }; | 260 | }; |
| 260 | 261 | ||
| 261 | static struct pci_driver sc1200_pci_driver = { | 262 | static struct pci_driver sc1200_pci_driver = { |
| 262 | .name = DRV_NAME, | 263 | .name = DRV_NAME, |
| 263 | .id_table = sc1200, | 264 | .id_table = sc1200, |
| 264 | .probe = sc1200_init_one, | 265 | .probe = sc1200_init_one, |
| 265 | .remove = ata_pci_remove_one | 266 | .remove = ata_pci_remove_one |
| @@ -270,13 +271,11 @@ static int __init sc1200_init(void) | |||
| 270 | return pci_register_driver(&sc1200_pci_driver); | 271 | return pci_register_driver(&sc1200_pci_driver); |
| 271 | } | 272 | } |
| 272 | 273 | ||
| 273 | |||
| 274 | static void __exit sc1200_exit(void) | 274 | static void __exit sc1200_exit(void) |
| 275 | { | 275 | { |
| 276 | pci_unregister_driver(&sc1200_pci_driver); | 276 | pci_unregister_driver(&sc1200_pci_driver); |
| 277 | } | 277 | } |
| 278 | 278 | ||
| 279 | |||
| 280 | MODULE_AUTHOR("Alan Cox, Mark Lord"); | 279 | MODULE_AUTHOR("Alan Cox, Mark Lord"); |
| 281 | MODULE_DESCRIPTION("low-level driver for the NS/AMD SC1200"); | 280 | MODULE_DESCRIPTION("low-level driver for the NS/AMD SC1200"); |
| 282 | MODULE_LICENSE("GPL"); | 281 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c index a5c8d7e121d1..5bbf76ec14a4 100644 --- a/drivers/ata/pata_serverworks.c +++ b/drivers/ata/pata_serverworks.c | |||
| @@ -553,13 +553,14 @@ static int serverworks_init_one(struct pci_dev *pdev, const struct pci_device_id | |||
| 553 | return ata_pci_init_one(pdev, port_info, ports); | 553 | return ata_pci_init_one(pdev, port_info, ports); |
| 554 | } | 554 | } |
| 555 | 555 | ||
| 556 | static struct pci_device_id serverworks[] = { | 556 | static const struct pci_device_id serverworks[] = { |
| 557 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, | 557 | { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_OSB4IDE), 0}, |
| 558 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 2}, | 558 | { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB5IDE), 2}, |
| 559 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2}, | 559 | { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE), 2}, |
| 560 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 2}, | 560 | { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_CSB6IDE2), 2}, |
| 561 | { PCI_DEVICE(PCI_VENDOR_ID_SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 2}, | 561 | { PCI_VDEVICE(SERVERWORKS, PCI_DEVICE_ID_SERVERWORKS_HT1000IDE), 2}, |
| 562 | { 0, }, | 562 | |
| 563 | { }, | ||
| 563 | }; | 564 | }; |
| 564 | 565 | ||
| 565 | static struct pci_driver serverworks_pci_driver = { | 566 | static struct pci_driver serverworks_pci_driver = { |
| @@ -574,13 +575,11 @@ static int __init serverworks_init(void) | |||
| 574 | return pci_register_driver(&serverworks_pci_driver); | 575 | return pci_register_driver(&serverworks_pci_driver); |
| 575 | } | 576 | } |
| 576 | 577 | ||
| 577 | |||
| 578 | static void __exit serverworks_exit(void) | 578 | static void __exit serverworks_exit(void) |
| 579 | { | 579 | { |
| 580 | pci_unregister_driver(&serverworks_pci_driver); | 580 | pci_unregister_driver(&serverworks_pci_driver); |
| 581 | } | 581 | } |
| 582 | 582 | ||
| 583 | |||
| 584 | MODULE_AUTHOR("Alan Cox"); | 583 | MODULE_AUTHOR("Alan Cox"); |
| 585 | MODULE_DESCRIPTION("low-level driver for Serverworks OSB4/CSB5/CSB6"); | 584 | MODULE_DESCRIPTION("low-level driver for Serverworks OSB4/CSB5/CSB6"); |
| 586 | MODULE_LICENSE("GPL"); | 585 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_sil680.c b/drivers/ata/pata_sil680.c index c8b2e26db70d..4a2b72b4be8a 100644 --- a/drivers/ata/pata_sil680.c +++ b/drivers/ata/pata_sil680.c | |||
| @@ -348,12 +348,13 @@ static int sil680_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 348 | } | 348 | } |
| 349 | 349 | ||
| 350 | static const struct pci_device_id sil680[] = { | 350 | static const struct pci_device_id sil680[] = { |
| 351 | { PCI_DEVICE(PCI_VENDOR_ID_CMD, PCI_DEVICE_ID_SII_680), }, | 351 | { PCI_VDEVICE(CMD, PCI_DEVICE_ID_SII_680), }, |
| 352 | { 0, }, | 352 | |
| 353 | { }, | ||
| 353 | }; | 354 | }; |
| 354 | 355 | ||
| 355 | static struct pci_driver sil680_pci_driver = { | 356 | static struct pci_driver sil680_pci_driver = { |
| 356 | .name = DRV_NAME, | 357 | .name = DRV_NAME, |
| 357 | .id_table = sil680, | 358 | .id_table = sil680, |
| 358 | .probe = sil680_init_one, | 359 | .probe = sil680_init_one, |
| 359 | .remove = ata_pci_remove_one | 360 | .remove = ata_pci_remove_one |
| @@ -364,13 +365,11 @@ static int __init sil680_init(void) | |||
| 364 | return pci_register_driver(&sil680_pci_driver); | 365 | return pci_register_driver(&sil680_pci_driver); |
| 365 | } | 366 | } |
| 366 | 367 | ||
| 367 | |||
| 368 | static void __exit sil680_exit(void) | 368 | static void __exit sil680_exit(void) |
| 369 | { | 369 | { |
| 370 | pci_unregister_driver(&sil680_pci_driver); | 370 | pci_unregister_driver(&sil680_pci_driver); |
| 371 | } | 371 | } |
| 372 | 372 | ||
| 373 | |||
| 374 | MODULE_AUTHOR("Alan Cox"); | 373 | MODULE_AUTHOR("Alan Cox"); |
| 375 | MODULE_DESCRIPTION("low-level driver for SI680 PATA"); | 374 | MODULE_DESCRIPTION("low-level driver for SI680 PATA"); |
| 376 | MODULE_LICENSE("GPL"); | 375 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c index 17791e2785f9..b9ffafb4198c 100644 --- a/drivers/ata/pata_sis.c +++ b/drivers/ata/pata_sis.c | |||
| @@ -988,8 +988,9 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) | |||
| 988 | } | 988 | } |
| 989 | 989 | ||
| 990 | static const struct pci_device_id sis_pci_tbl[] = { | 990 | static const struct pci_device_id sis_pci_tbl[] = { |
| 991 | { PCI_DEVICE(PCI_VENDOR_ID_SI, 0x5513), }, /* SiS 5513 */ | 991 | { PCI_VDEVICE(SI, 0x5513), }, /* SiS 5513 */ |
| 992 | { PCI_DEVICE(PCI_VENDOR_ID_SI, 0x5518), }, /* SiS 5518 */ | 992 | { PCI_VDEVICE(SI, 0x5518), }, /* SiS 5518 */ |
| 993 | |||
| 993 | { } | 994 | { } |
| 994 | }; | 995 | }; |
| 995 | 996 | ||
| @@ -1010,7 +1011,6 @@ static void __exit sis_exit(void) | |||
| 1010 | pci_unregister_driver(&sis_pci_driver); | 1011 | pci_unregister_driver(&sis_pci_driver); |
| 1011 | } | 1012 | } |
| 1012 | 1013 | ||
| 1013 | |||
| 1014 | module_init(sis_init); | 1014 | module_init(sis_init); |
| 1015 | module_exit(sis_exit); | 1015 | module_exit(sis_exit); |
| 1016 | 1016 | ||
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c index 5b762acc5687..08a6dc88676f 100644 --- a/drivers/ata/pata_sl82c105.c +++ b/drivers/ata/pata_sl82c105.c | |||
| @@ -351,9 +351,10 @@ static int sl82c105_init_one(struct pci_dev *dev, const struct pci_device_id *id | |||
| 351 | return ata_pci_init_one(dev, port_info, 1); /* For now */ | 351 | return ata_pci_init_one(dev, port_info, 1); /* For now */ |
| 352 | } | 352 | } |
| 353 | 353 | ||
| 354 | static struct pci_device_id sl82c105[] = { | 354 | static const struct pci_device_id sl82c105[] = { |
| 355 | { PCI_DEVICE(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105), }, | 355 | { PCI_VDEVICE(WINBOND, PCI_DEVICE_ID_WINBOND_82C105), }, |
| 356 | { 0, }, | 356 | |
| 357 | { }, | ||
| 357 | }; | 358 | }; |
| 358 | 359 | ||
| 359 | static struct pci_driver sl82c105_pci_driver = { | 360 | static struct pci_driver sl82c105_pci_driver = { |
| @@ -368,13 +369,11 @@ static int __init sl82c105_init(void) | |||
| 368 | return pci_register_driver(&sl82c105_pci_driver); | 369 | return pci_register_driver(&sl82c105_pci_driver); |
| 369 | } | 370 | } |
| 370 | 371 | ||
| 371 | |||
| 372 | static void __exit sl82c105_exit(void) | 372 | static void __exit sl82c105_exit(void) |
| 373 | { | 373 | { |
| 374 | pci_unregister_driver(&sl82c105_pci_driver); | 374 | pci_unregister_driver(&sl82c105_pci_driver); |
| 375 | } | 375 | } |
| 376 | 376 | ||
| 377 | |||
| 378 | MODULE_AUTHOR("Alan Cox"); | 377 | MODULE_AUTHOR("Alan Cox"); |
| 379 | MODULE_DESCRIPTION("low-level driver for Sl82c105"); | 378 | MODULE_DESCRIPTION("low-level driver for Sl82c105"); |
| 380 | MODULE_LICENSE("GPL"); | 379 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_triflex.c b/drivers/ata/pata_triflex.c index a954ed93a40c..9640f80e8b0d 100644 --- a/drivers/ata/pata_triflex.c +++ b/drivers/ata/pata_triflex.c | |||
| @@ -248,13 +248,13 @@ static int triflex_init_one(struct pci_dev *dev, const struct pci_device_id *id) | |||
| 248 | } | 248 | } |
| 249 | 249 | ||
| 250 | static const struct pci_device_id triflex[] = { | 250 | static const struct pci_device_id triflex[] = { |
| 251 | { PCI_VENDOR_ID_COMPAQ, PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE, | 251 | { PCI_VDEVICE(COMPAQ, PCI_DEVICE_ID_COMPAQ_TRIFLEX_IDE), }, |
| 252 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0 }, | 252 | |
| 253 | { 0, }, | 253 | { }, |
| 254 | }; | 254 | }; |
| 255 | 255 | ||
| 256 | static struct pci_driver triflex_pci_driver = { | 256 | static struct pci_driver triflex_pci_driver = { |
| 257 | .name = DRV_NAME, | 257 | .name = DRV_NAME, |
| 258 | .id_table = triflex, | 258 | .id_table = triflex, |
| 259 | .probe = triflex_init_one, | 259 | .probe = triflex_init_one, |
| 260 | .remove = ata_pci_remove_one | 260 | .remove = ata_pci_remove_one |
| @@ -265,13 +265,11 @@ static int __init triflex_init(void) | |||
| 265 | return pci_register_driver(&triflex_pci_driver); | 265 | return pci_register_driver(&triflex_pci_driver); |
| 266 | } | 266 | } |
| 267 | 267 | ||
| 268 | |||
| 269 | static void __exit triflex_exit(void) | 268 | static void __exit triflex_exit(void) |
| 270 | { | 269 | { |
| 271 | pci_unregister_driver(&triflex_pci_driver); | 270 | pci_unregister_driver(&triflex_pci_driver); |
| 272 | } | 271 | } |
| 273 | 272 | ||
| 274 | |||
| 275 | MODULE_AUTHOR("Alan Cox"); | 273 | MODULE_AUTHOR("Alan Cox"); |
| 276 | MODULE_DESCRIPTION("low-level driver for Compaq Triflex"); | 274 | MODULE_DESCRIPTION("low-level driver for Compaq Triflex"); |
| 277 | MODULE_LICENSE("GPL"); | 275 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index 7b5dd2343b9a..1e7be9eee9c3 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
| @@ -529,15 +529,16 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
| 529 | } | 529 | } |
| 530 | 530 | ||
| 531 | static const struct pci_device_id via[] = { | 531 | static const struct pci_device_id via[] = { |
| 532 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C576_1), }, | 532 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C576_1), }, |
| 533 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1), }, | 533 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_82C586_1), }, |
| 534 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_6410), }, | 534 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_6410), }, |
| 535 | { PCI_DEVICE(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), }, | 535 | { PCI_VDEVICE(VIA, PCI_DEVICE_ID_VIA_SATA_EIDE), }, |
| 536 | { 0, }, | 536 | |
| 537 | { }, | ||
| 537 | }; | 538 | }; |
| 538 | 539 | ||
| 539 | static struct pci_driver via_pci_driver = { | 540 | static struct pci_driver via_pci_driver = { |
| 540 | .name = DRV_NAME, | 541 | .name = DRV_NAME, |
| 541 | .id_table = via, | 542 | .id_table = via, |
| 542 | .probe = via_init_one, | 543 | .probe = via_init_one, |
| 543 | .remove = ata_pci_remove_one | 544 | .remove = ata_pci_remove_one |
| @@ -548,13 +549,11 @@ static int __init via_init(void) | |||
| 548 | return pci_register_driver(&via_pci_driver); | 549 | return pci_register_driver(&via_pci_driver); |
| 549 | } | 550 | } |
| 550 | 551 | ||
| 551 | |||
| 552 | static void __exit via_exit(void) | 552 | static void __exit via_exit(void) |
| 553 | { | 553 | { |
| 554 | pci_unregister_driver(&via_pci_driver); | 554 | pci_unregister_driver(&via_pci_driver); |
| 555 | } | 555 | } |
| 556 | 556 | ||
| 557 | |||
| 558 | MODULE_AUTHOR("Alan Cox"); | 557 | MODULE_AUTHOR("Alan Cox"); |
| 559 | MODULE_DESCRIPTION("low-level driver for VIA PATA"); | 558 | MODULE_DESCRIPTION("low-level driver for VIA PATA"); |
| 560 | MODULE_LICENSE("GPL"); | 559 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/pdc_adma.c b/drivers/ata/pdc_adma.c index 0e23ecb77bc2..81f3d219e70e 100644 --- a/drivers/ata/pdc_adma.c +++ b/drivers/ata/pdc_adma.c | |||
| @@ -192,8 +192,7 @@ static struct ata_port_info adma_port_info[] = { | |||
| 192 | }; | 192 | }; |
| 193 | 193 | ||
| 194 | static const struct pci_device_id adma_ata_pci_tbl[] = { | 194 | static const struct pci_device_id adma_ata_pci_tbl[] = { |
| 195 | { PCI_VENDOR_ID_PDC, 0x1841, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 195 | { PCI_VDEVICE(PDC, 0x1841), board_1841_idx }, |
| 196 | board_1841_idx }, | ||
| 197 | 196 | ||
| 198 | { } /* terminate list */ | 197 | { } /* terminate list */ |
| 199 | }; | 198 | }; |
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c index c01496df4a99..e6aa1a86d5cf 100644 --- a/drivers/ata/sata_mv.c +++ b/drivers/ata/sata_mv.c | |||
| @@ -533,19 +533,20 @@ static const struct ata_port_info mv_port_info[] = { | |||
| 533 | }; | 533 | }; |
| 534 | 534 | ||
| 535 | static const struct pci_device_id mv_pci_tbl[] = { | 535 | static const struct pci_device_id mv_pci_tbl[] = { |
| 536 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5040), 0, 0, chip_504x}, | 536 | { PCI_VDEVICE(MARVELL, 0x5040), chip_504x }, |
| 537 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5041), 0, 0, chip_504x}, | 537 | { PCI_VDEVICE(MARVELL, 0x5041), chip_504x }, |
| 538 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5080), 0, 0, chip_5080}, | 538 | { PCI_VDEVICE(MARVELL, 0x5080), chip_5080 }, |
| 539 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x5081), 0, 0, chip_508x}, | 539 | { PCI_VDEVICE(MARVELL, 0x5081), chip_508x }, |
| 540 | 540 | ||
| 541 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x6040), 0, 0, chip_604x}, | 541 | { PCI_VDEVICE(MARVELL, 0x6040), chip_604x }, |
| 542 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x6041), 0, 0, chip_604x}, | 542 | { PCI_VDEVICE(MARVELL, 0x6041), chip_604x }, |
| 543 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x6042), 0, 0, chip_6042}, | 543 | { PCI_VDEVICE(MARVELL, 0x6042), chip_6042 }, |
| 544 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x6080), 0, 0, chip_608x}, | 544 | { PCI_VDEVICE(MARVELL, 0x6080), chip_608x }, |
| 545 | {PCI_DEVICE(PCI_VENDOR_ID_MARVELL, 0x6081), 0, 0, chip_608x}, | 545 | { PCI_VDEVICE(MARVELL, 0x6081), chip_608x }, |
| 546 | 546 | ||
| 547 | {PCI_DEVICE(PCI_VENDOR_ID_ADAPTEC2, 0x0241), 0, 0, chip_604x}, | 547 | { PCI_VDEVICE(ADAPTEC2, 0x0241), chip_604x }, |
| 548 | {} /* terminate list */ | 548 | |
| 549 | { } /* terminate list */ | ||
| 549 | }; | 550 | }; |
| 550 | 551 | ||
| 551 | static struct pci_driver mv_pci_driver = { | 552 | static struct pci_driver mv_pci_driver = { |
diff --git a/drivers/ata/sata_nv.c b/drivers/ata/sata_nv.c index 8cd730fe5dd3..d09d20a17790 100644 --- a/drivers/ata/sata_nv.c +++ b/drivers/ata/sata_nv.c | |||
| @@ -106,45 +106,32 @@ enum nv_host_type | |||
| 106 | }; | 106 | }; |
| 107 | 107 | ||
| 108 | static const struct pci_device_id nv_pci_tbl[] = { | 108 | static const struct pci_device_id nv_pci_tbl[] = { |
| 109 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA, | 109 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE2S_SATA), NFORCE2 }, |
| 110 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, NFORCE2 }, | 110 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA), NFORCE3 }, |
| 111 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA, | 111 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2), NFORCE3 }, |
| 112 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, NFORCE3 }, | 112 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA), CK804 }, |
| 113 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE3S_SATA2, | 113 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2), CK804 }, |
| 114 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, NFORCE3 }, | 114 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA), CK804 }, |
| 115 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA, | 115 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2), CK804 }, |
| 116 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 }, | 116 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA), GENERIC }, |
| 117 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_CK804_SATA2, | 117 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2), GENERIC }, |
| 118 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 }, | 118 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA), GENERIC }, |
| 119 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA, | 119 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2), GENERIC }, |
| 120 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 }, | 120 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA), GENERIC }, |
| 121 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP04_SATA2, | 121 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2), GENERIC }, |
| 122 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, CK804 }, | 122 | { PCI_VDEVICE(NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3), GENERIC }, |
| 123 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA, | 123 | { PCI_VDEVICE(NVIDIA, 0x045c), GENERIC }, |
| 124 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | 124 | { PCI_VDEVICE(NVIDIA, 0x045d), GENERIC }, |
| 125 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2, | 125 | { PCI_VDEVICE(NVIDIA, 0x045e), GENERIC }, |
| 126 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | 126 | { PCI_VDEVICE(NVIDIA, 0x045f), GENERIC }, |
| 127 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA, | ||
| 128 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 129 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2, | ||
| 130 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 131 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA, | ||
| 132 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 133 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA2, | ||
| 134 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 135 | { PCI_VENDOR_ID_NVIDIA, PCI_DEVICE_ID_NVIDIA_NFORCE_MCP61_SATA3, | ||
| 136 | PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 137 | { PCI_VENDOR_ID_NVIDIA, 0x045c, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 138 | { PCI_VENDOR_ID_NVIDIA, 0x045d, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 139 | { PCI_VENDOR_ID_NVIDIA, 0x045e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 140 | { PCI_VENDOR_ID_NVIDIA, 0x045f, PCI_ANY_ID, PCI_ANY_ID, 0, 0, GENERIC }, | ||
| 141 | { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, | 127 | { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, |
| 142 | PCI_ANY_ID, PCI_ANY_ID, | 128 | PCI_ANY_ID, PCI_ANY_ID, |
| 143 | PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC }, | 129 | PCI_CLASS_STORAGE_IDE<<8, 0xffff00, GENERIC }, |
| 144 | { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, | 130 | { PCI_VENDOR_ID_NVIDIA, PCI_ANY_ID, |
| 145 | PCI_ANY_ID, PCI_ANY_ID, | 131 | PCI_ANY_ID, PCI_ANY_ID, |
| 146 | PCI_CLASS_STORAGE_RAID<<8, 0xffff00, GENERIC }, | 132 | PCI_CLASS_STORAGE_RAID<<8, 0xffff00, GENERIC }, |
| 147 | { 0, } /* terminate list */ | 133 | |
| 134 | { } /* terminate list */ | ||
| 148 | }; | 135 | }; |
| 149 | 136 | ||
| 150 | static struct pci_driver nv_pci_driver = { | 137 | static struct pci_driver nv_pci_driver = { |
diff --git a/drivers/ata/sata_promise.c b/drivers/ata/sata_promise.c index d627812ea73d..15c9437710fc 100644 --- a/drivers/ata/sata_promise.c +++ b/drivers/ata/sata_promise.c | |||
| @@ -234,48 +234,31 @@ static const struct ata_port_info pdc_port_info[] = { | |||
| 234 | }; | 234 | }; |
| 235 | 235 | ||
| 236 | static const struct pci_device_id pdc_ata_pci_tbl[] = { | 236 | static const struct pci_device_id pdc_ata_pci_tbl[] = { |
| 237 | { PCI_VENDOR_ID_PROMISE, 0x3371, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 237 | { PCI_VDEVICE(PROMISE, 0x3371), board_2037x }, |
| 238 | board_2037x }, | 238 | { PCI_VDEVICE(PROMISE, 0x3570), board_2037x }, |
| 239 | { PCI_VENDOR_ID_PROMISE, 0x3570, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 239 | { PCI_VDEVICE(PROMISE, 0x3571), board_2037x }, |
| 240 | board_2037x }, | 240 | { PCI_VDEVICE(PROMISE, 0x3373), board_2037x }, |
| 241 | { PCI_VENDOR_ID_PROMISE, 0x3571, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 241 | { PCI_VDEVICE(PROMISE, 0x3375), board_2037x }, |
| 242 | board_2037x }, | 242 | { PCI_VDEVICE(PROMISE, 0x3376), board_2037x }, |
| 243 | { PCI_VENDOR_ID_PROMISE, 0x3373, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 243 | { PCI_VDEVICE(PROMISE, 0x3574), board_2057x }, |
| 244 | board_2037x }, | 244 | { PCI_VDEVICE(PROMISE, 0x3d75), board_2057x }, |
| 245 | { PCI_VENDOR_ID_PROMISE, 0x3375, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 245 | { PCI_VDEVICE(PROMISE, 0x3d73), board_2037x }, |
| 246 | board_2037x }, | 246 | |
| 247 | { PCI_VENDOR_ID_PROMISE, 0x3376, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 247 | { PCI_VDEVICE(PROMISE, 0x3318), board_20319 }, |
| 248 | board_2037x }, | 248 | { PCI_VDEVICE(PROMISE, 0x3319), board_20319 }, |
| 249 | { PCI_VENDOR_ID_PROMISE, 0x3574, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 249 | { PCI_VDEVICE(PROMISE, 0x3515), board_20319 }, |
| 250 | board_2057x }, | 250 | { PCI_VDEVICE(PROMISE, 0x3519), board_20319 }, |
| 251 | { PCI_VENDOR_ID_PROMISE, 0x3d75, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 251 | { PCI_VDEVICE(PROMISE, 0x3d17), board_20319 }, |
| 252 | board_2057x }, | 252 | { PCI_VDEVICE(PROMISE, 0x3d18), board_40518 }, |
| 253 | { PCI_VENDOR_ID_PROMISE, 0x3d73, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 253 | |
| 254 | board_2037x }, | 254 | { PCI_VDEVICE(PROMISE, 0x6629), board_20619 }, |
| 255 | |||
| 256 | { PCI_VENDOR_ID_PROMISE, 0x3318, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 257 | board_20319 }, | ||
| 258 | { PCI_VENDOR_ID_PROMISE, 0x3319, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 259 | board_20319 }, | ||
| 260 | { PCI_VENDOR_ID_PROMISE, 0x3515, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 261 | board_20319 }, | ||
| 262 | { PCI_VENDOR_ID_PROMISE, 0x3519, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 263 | board_20319 }, | ||
| 264 | { PCI_VENDOR_ID_PROMISE, 0x3d17, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 265 | board_20319 }, | ||
| 266 | { PCI_VENDOR_ID_PROMISE, 0x3d18, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 267 | board_40518 }, | ||
| 268 | |||
| 269 | { PCI_VENDOR_ID_PROMISE, 0x6629, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | ||
| 270 | board_20619 }, | ||
| 271 | 255 | ||
| 272 | /* TODO: remove all associated board_20771 code, as it completely | 256 | /* TODO: remove all associated board_20771 code, as it completely |
| 273 | * duplicates board_2037x code, unless reason for separation can be | 257 | * duplicates board_2037x code, unless reason for separation can be |
| 274 | * divined. | 258 | * divined. |
| 275 | */ | 259 | */ |
| 276 | #if 0 | 260 | #if 0 |
| 277 | { PCI_VENDOR_ID_PROMISE, 0x3570, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 261 | { PCI_VDEVICE(PROMISE, 0x3570), board_20771 }, |
| 278 | board_20771 }, | ||
| 279 | #endif | 262 | #endif |
| 280 | 263 | ||
| 281 | { } /* terminate list */ | 264 | { } /* terminate list */ |
diff --git a/drivers/ata/sata_qstor.c b/drivers/ata/sata_qstor.c index fa29dfe2a7b5..7f6cc3c07de5 100644 --- a/drivers/ata/sata_qstor.c +++ b/drivers/ata/sata_qstor.c | |||
| @@ -185,8 +185,7 @@ static const struct ata_port_info qs_port_info[] = { | |||
| 185 | }; | 185 | }; |
| 186 | 186 | ||
| 187 | static const struct pci_device_id qs_ata_pci_tbl[] = { | 187 | static const struct pci_device_id qs_ata_pci_tbl[] = { |
| 188 | { PCI_VENDOR_ID_PDC, 0x2068, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 188 | { PCI_VDEVICE(PDC, 0x2068), board_2068_idx }, |
| 189 | board_2068_idx }, | ||
| 190 | 189 | ||
| 191 | { } /* terminate list */ | 190 | { } /* terminate list */ |
| 192 | }; | 191 | }; |
diff --git a/drivers/ata/sata_sil.c b/drivers/ata/sata_sil.c index c63dbabc0cd9..3d9fa1cc834d 100644 --- a/drivers/ata/sata_sil.c +++ b/drivers/ata/sata_sil.c | |||
| @@ -123,13 +123,14 @@ static void sil_thaw(struct ata_port *ap); | |||
| 123 | 123 | ||
| 124 | 124 | ||
| 125 | static const struct pci_device_id sil_pci_tbl[] = { | 125 | static const struct pci_device_id sil_pci_tbl[] = { |
| 126 | { 0x1095, 0x3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, | 126 | { PCI_VDEVICE(CMD, 0x3112), sil_3112 }, |
| 127 | { 0x1095, 0x0240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, | 127 | { PCI_VDEVICE(CMD, 0x0240), sil_3112 }, |
| 128 | { 0x1095, 0x3512, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3512 }, | 128 | { PCI_VDEVICE(CMD, 0x3512), sil_3512 }, |
| 129 | { 0x1095, 0x3114, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3114 }, | 129 | { PCI_VDEVICE(CMD, 0x3114), sil_3114 }, |
| 130 | { 0x1002, 0x436e, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 }, | 130 | { PCI_VDEVICE(ATI, 0x436e), sil_3112 }, |
| 131 | { 0x1002, 0x4379, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_no_sata_irq }, | 131 | { PCI_VDEVICE(ATI, 0x4379), sil_3112_no_sata_irq }, |
| 132 | { 0x1002, 0x437a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112_no_sata_irq }, | 132 | { PCI_VDEVICE(ATI, 0x437a), sil_3112_no_sata_irq }, |
| 133 | |||
| 133 | { } /* terminate list */ | 134 | { } /* terminate list */ |
| 134 | }; | 135 | }; |
| 135 | 136 | ||
diff --git a/drivers/ata/sata_sil24.c b/drivers/ata/sata_sil24.c index 39cb07baebae..a951f40c2f21 100644 --- a/drivers/ata/sata_sil24.c +++ b/drivers/ata/sata_sil24.c | |||
| @@ -344,11 +344,12 @@ static int sil24_pci_device_resume(struct pci_dev *pdev); | |||
| 344 | #endif | 344 | #endif |
| 345 | 345 | ||
| 346 | static const struct pci_device_id sil24_pci_tbl[] = { | 346 | static const struct pci_device_id sil24_pci_tbl[] = { |
| 347 | { 0x1095, 0x3124, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BID_SIL3124 }, | 347 | { PCI_VDEVICE(CMD, 0x3124), BID_SIL3124 }, |
| 348 | { 0x8086, 0x3124, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BID_SIL3124 }, | 348 | { PCI_VDEVICE(INTEL, 0x3124), BID_SIL3124 }, |
| 349 | { 0x1095, 0x3132, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BID_SIL3132 }, | 349 | { PCI_VDEVICE(CMD, 0x3132), BID_SIL3132 }, |
| 350 | { 0x1095, 0x3131, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BID_SIL3131 }, | 350 | { PCI_VDEVICE(CMD, 0x3131), BID_SIL3131 }, |
| 351 | { 0x1095, 0x3531, PCI_ANY_ID, PCI_ANY_ID, 0, 0, BID_SIL3131 }, | 351 | { PCI_VDEVICE(CMD, 0x3531), BID_SIL3131 }, |
| 352 | |||
| 352 | { } /* terminate list */ | 353 | { } /* terminate list */ |
| 353 | }; | 354 | }; |
| 354 | 355 | ||
diff --git a/drivers/ata/sata_sis.c b/drivers/ata/sata_sis.c index 18d49fff8dc4..0738f52463a9 100644 --- a/drivers/ata/sata_sis.c +++ b/drivers/ata/sata_sis.c | |||
| @@ -67,13 +67,13 @@ static u32 sis_scr_read (struct ata_port *ap, unsigned int sc_reg); | |||
| 67 | static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | 67 | static void sis_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); |
| 68 | 68 | ||
| 69 | static const struct pci_device_id sis_pci_tbl[] = { | 69 | static const struct pci_device_id sis_pci_tbl[] = { |
| 70 | { PCI_VENDOR_ID_SI, 0x180, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sis_180 }, | 70 | { PCI_VDEVICE(SI, 0x180), sis_180 }, |
| 71 | { PCI_VENDOR_ID_SI, 0x181, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sis_180 }, | 71 | { PCI_VDEVICE(SI, 0x181), sis_180 }, |
| 72 | { PCI_VENDOR_ID_SI, 0x182, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sis_180 }, | 72 | { PCI_VDEVICE(SI, 0x182), sis_180 }, |
| 73 | |||
| 73 | { } /* terminate list */ | 74 | { } /* terminate list */ |
| 74 | }; | 75 | }; |
| 75 | 76 | ||
| 76 | |||
| 77 | static struct pci_driver sis_pci_driver = { | 77 | static struct pci_driver sis_pci_driver = { |
| 78 | .name = DRV_NAME, | 78 | .name = DRV_NAME, |
| 79 | .id_table = sis_pci_tbl, | 79 | .id_table = sis_pci_tbl, |
diff --git a/drivers/ata/sata_svw.c b/drivers/ata/sata_svw.c index d6d6658d8328..84025a2fd5be 100644 --- a/drivers/ata/sata_svw.c +++ b/drivers/ata/sata_svw.c | |||
| @@ -469,15 +469,15 @@ err_out: | |||
| 469 | * controller | 469 | * controller |
| 470 | * */ | 470 | * */ |
| 471 | static const struct pci_device_id k2_sata_pci_tbl[] = { | 471 | static const struct pci_device_id k2_sata_pci_tbl[] = { |
| 472 | { 0x1166, 0x0240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 472 | { PCI_VDEVICE(SERVERWORKS, 0x0240), 4 }, |
| 473 | { 0x1166, 0x0241, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 473 | { PCI_VDEVICE(SERVERWORKS, 0x0241), 4 }, |
| 474 | { 0x1166, 0x0242, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 }, | 474 | { PCI_VDEVICE(SERVERWORKS, 0x0242), 8 }, |
| 475 | { 0x1166, 0x024a, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 475 | { PCI_VDEVICE(SERVERWORKS, 0x024a), 4 }, |
| 476 | { 0x1166, 0x024b, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 4 }, | 476 | { PCI_VDEVICE(SERVERWORKS, 0x024b), 4 }, |
| 477 | |||
| 477 | { } | 478 | { } |
| 478 | }; | 479 | }; |
| 479 | 480 | ||
| 480 | |||
| 481 | static struct pci_driver k2_sata_pci_driver = { | 481 | static struct pci_driver k2_sata_pci_driver = { |
| 482 | .name = DRV_NAME, | 482 | .name = DRV_NAME, |
| 483 | .id_table = k2_sata_pci_tbl, | 483 | .id_table = k2_sata_pci_tbl, |
| @@ -485,19 +485,16 @@ static struct pci_driver k2_sata_pci_driver = { | |||
| 485 | .remove = ata_pci_remove_one, | 485 | .remove = ata_pci_remove_one, |
| 486 | }; | 486 | }; |
| 487 | 487 | ||
| 488 | |||
| 489 | static int __init k2_sata_init(void) | 488 | static int __init k2_sata_init(void) |
| 490 | { | 489 | { |
| 491 | return pci_register_driver(&k2_sata_pci_driver); | 490 | return pci_register_driver(&k2_sata_pci_driver); |
| 492 | } | 491 | } |
| 493 | 492 | ||
| 494 | |||
| 495 | static void __exit k2_sata_exit(void) | 493 | static void __exit k2_sata_exit(void) |
| 496 | { | 494 | { |
| 497 | pci_unregister_driver(&k2_sata_pci_driver); | 495 | pci_unregister_driver(&k2_sata_pci_driver); |
| 498 | } | 496 | } |
| 499 | 497 | ||
| 500 | |||
| 501 | MODULE_AUTHOR("Benjamin Herrenschmidt"); | 498 | MODULE_AUTHOR("Benjamin Herrenschmidt"); |
| 502 | MODULE_DESCRIPTION("low-level driver for K2 SATA controller"); | 499 | MODULE_DESCRIPTION("low-level driver for K2 SATA controller"); |
| 503 | MODULE_LICENSE("GPL"); | 500 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c index 091867e10ea3..8c74f2ff4344 100644 --- a/drivers/ata/sata_sx4.c +++ b/drivers/ata/sata_sx4.c | |||
| @@ -230,12 +230,11 @@ static const struct ata_port_info pdc_port_info[] = { | |||
| 230 | }; | 230 | }; |
| 231 | 231 | ||
| 232 | static const struct pci_device_id pdc_sata_pci_tbl[] = { | 232 | static const struct pci_device_id pdc_sata_pci_tbl[] = { |
| 233 | { PCI_VENDOR_ID_PROMISE, 0x6622, PCI_ANY_ID, PCI_ANY_ID, 0, 0, | 233 | { PCI_VDEVICE(PROMISE, 0x6622), board_20621 }, |
| 234 | board_20621 }, | 234 | |
| 235 | { } /* terminate list */ | 235 | { } /* terminate list */ |
| 236 | }; | 236 | }; |
| 237 | 237 | ||
| 238 | |||
| 239 | static struct pci_driver pdc_sata_pci_driver = { | 238 | static struct pci_driver pdc_sata_pci_driver = { |
| 240 | .name = DRV_NAME, | 239 | .name = DRV_NAME, |
| 241 | .id_table = pdc_sata_pci_tbl, | 240 | .id_table = pdc_sata_pci_tbl, |
diff --git a/drivers/ata/sata_uli.c b/drivers/ata/sata_uli.c index dd76f37be182..5c603ca3a50a 100644 --- a/drivers/ata/sata_uli.c +++ b/drivers/ata/sata_uli.c | |||
| @@ -61,13 +61,13 @@ static u32 uli_scr_read (struct ata_port *ap, unsigned int sc_reg); | |||
| 61 | static void uli_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | 61 | static void uli_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); |
| 62 | 62 | ||
| 63 | static const struct pci_device_id uli_pci_tbl[] = { | 63 | static const struct pci_device_id uli_pci_tbl[] = { |
| 64 | { PCI_VENDOR_ID_AL, 0x5289, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5289 }, | 64 | { PCI_VDEVICE(AL, 0x5289), uli_5289 }, |
| 65 | { PCI_VENDOR_ID_AL, 0x5287, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5287 }, | 65 | { PCI_VDEVICE(AL, 0x5287), uli_5287 }, |
| 66 | { PCI_VENDOR_ID_AL, 0x5281, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5281 }, | 66 | { PCI_VDEVICE(AL, 0x5281), uli_5281 }, |
| 67 | |||
| 67 | { } /* terminate list */ | 68 | { } /* terminate list */ |
| 68 | }; | 69 | }; |
| 69 | 70 | ||
| 70 | |||
| 71 | static struct pci_driver uli_pci_driver = { | 71 | static struct pci_driver uli_pci_driver = { |
| 72 | .name = DRV_NAME, | 72 | .name = DRV_NAME, |
| 73 | .id_table = uli_pci_tbl, | 73 | .id_table = uli_pci_tbl, |
diff --git a/drivers/ata/sata_via.c b/drivers/ata/sata_via.c index a72a2389a11c..f4455a1efe2d 100644 --- a/drivers/ata/sata_via.c +++ b/drivers/ata/sata_via.c | |||
| @@ -77,9 +77,9 @@ static void svia_scr_write (struct ata_port *ap, unsigned int sc_reg, u32 val); | |||
| 77 | static void vt6420_error_handler(struct ata_port *ap); | 77 | static void vt6420_error_handler(struct ata_port *ap); |
| 78 | 78 | ||
| 79 | static const struct pci_device_id svia_pci_tbl[] = { | 79 | static const struct pci_device_id svia_pci_tbl[] = { |
| 80 | { 0x1106, 0x0591, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | 80 | { PCI_VDEVICE(VIA, 0x0591), vt6420 }, |
| 81 | { 0x1106, 0x3149, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6420 }, | 81 | { PCI_VDEVICE(VIA, 0x3149), vt6420 }, |
| 82 | { 0x1106, 0x3249, PCI_ANY_ID, PCI_ANY_ID, 0, 0, vt6421 }, | 82 | { PCI_VDEVICE(VIA, 0x3249), vt6421 }, |
| 83 | 83 | ||
| 84 | { } /* terminate list */ | 84 | { } /* terminate list */ |
| 85 | }; | 85 | }; |
diff --git a/drivers/ata/sata_vsc.c b/drivers/ata/sata_vsc.c index d0d92f33de54..273d88fcf980 100644 --- a/drivers/ata/sata_vsc.c +++ b/drivers/ata/sata_vsc.c | |||
| @@ -442,16 +442,15 @@ err_out: | |||
| 442 | return rc; | 442 | return rc; |
| 443 | } | 443 | } |
| 444 | 444 | ||
| 445 | |||
| 446 | static const struct pci_device_id vsc_sata_pci_tbl[] = { | 445 | static const struct pci_device_id vsc_sata_pci_tbl[] = { |
| 447 | { PCI_VENDOR_ID_VITESSE, 0x7174, | 446 | { PCI_VENDOR_ID_VITESSE, 0x7174, |
| 448 | PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, | 447 | PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, |
| 449 | { PCI_VENDOR_ID_INTEL, 0x3200, | 448 | { PCI_VENDOR_ID_INTEL, 0x3200, |
| 450 | PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, | 449 | PCI_ANY_ID, PCI_ANY_ID, 0x10600, 0xFFFFFF, 0 }, |
| 450 | |||
| 451 | { } /* terminate list */ | 451 | { } /* terminate list */ |
| 452 | }; | 452 | }; |
| 453 | 453 | ||
| 454 | |||
| 455 | static struct pci_driver vsc_sata_pci_driver = { | 454 | static struct pci_driver vsc_sata_pci_driver = { |
| 456 | .name = DRV_NAME, | 455 | .name = DRV_NAME, |
| 457 | .id_table = vsc_sata_pci_tbl, | 456 | .id_table = vsc_sata_pci_tbl, |
| @@ -459,19 +458,16 @@ static struct pci_driver vsc_sata_pci_driver = { | |||
| 459 | .remove = ata_pci_remove_one, | 458 | .remove = ata_pci_remove_one, |
| 460 | }; | 459 | }; |
| 461 | 460 | ||
| 462 | |||
| 463 | static int __init vsc_sata_init(void) | 461 | static int __init vsc_sata_init(void) |
| 464 | { | 462 | { |
| 465 | return pci_register_driver(&vsc_sata_pci_driver); | 463 | return pci_register_driver(&vsc_sata_pci_driver); |
| 466 | } | 464 | } |
| 467 | 465 | ||
| 468 | |||
| 469 | static void __exit vsc_sata_exit(void) | 466 | static void __exit vsc_sata_exit(void) |
| 470 | { | 467 | { |
| 471 | pci_unregister_driver(&vsc_sata_pci_driver); | 468 | pci_unregister_driver(&vsc_sata_pci_driver); |
| 472 | } | 469 | } |
| 473 | 470 | ||
| 474 | |||
| 475 | MODULE_AUTHOR("Jeremy Higdon"); | 471 | MODULE_AUTHOR("Jeremy Higdon"); |
| 476 | MODULE_DESCRIPTION("low-level driver for Vitesse VSC7174 SATA controller"); | 472 | MODULE_DESCRIPTION("low-level driver for Vitesse VSC7174 SATA controller"); |
| 477 | MODULE_LICENSE("GPL"); | 473 | MODULE_LICENSE("GPL"); |
diff --git a/include/linux/libata.h b/include/linux/libata.h index d6a3d4b345fc..d1af1dbeaeb4 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -109,6 +109,10 @@ static inline u32 ata_msg_init(int dval, int default_msg_enable_bits) | |||
| 109 | #define ATA_TAG_POISON 0xfafbfcfdU | 109 | #define ATA_TAG_POISON 0xfafbfcfdU |
| 110 | 110 | ||
| 111 | /* move to PCI layer? */ | 111 | /* move to PCI layer? */ |
| 112 | #define PCI_VDEVICE(vendor, device) \ | ||
| 113 | PCI_VENDOR_ID_##vendor, (device), \ | ||
| 114 | PCI_ANY_ID, PCI_ANY_ID, 0, 0 | ||
| 115 | |||
| 112 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) | 116 | static inline struct device *pci_dev_to_dev(struct pci_dev *pdev) |
| 113 | { | 117 | { |
| 114 | return &pdev->dev; | 118 | return &pdev->dev; |
| @@ -138,8 +142,9 @@ enum { | |||
| 138 | ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ | 142 | ATA_DFLAG_NCQ = (1 << 3), /* device supports NCQ */ |
| 139 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, | 143 | ATA_DFLAG_CFG_MASK = (1 << 8) - 1, |
| 140 | 144 | ||
| 141 | ATA_DFLAG_PIO = (1 << 8), /* device currently in PIO mode */ | 145 | ATA_DFLAG_PIO = (1 << 8), /* device limited to PIO mode */ |
| 142 | ATA_DFLAG_SUSPENDED = (1 << 9), /* device suspended */ | 146 | ATA_DFLAG_NCQ_OFF = (1 << 9), /* devied limited to non-NCQ mode */ |
| 147 | ATA_DFLAG_SUSPENDED = (1 << 10), /* device suspended */ | ||
| 143 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, | 148 | ATA_DFLAG_INIT_MASK = (1 << 16) - 1, |
| 144 | 149 | ||
| 145 | ATA_DFLAG_DETACH = (1 << 16), | 150 | ATA_DFLAG_DETACH = (1 << 16), |
