aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/ata
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-07-12 16:40:57 -0400
commit21ba0f88ae56da82a3a15fe54d729208b64c4f4b (patch)
tree17ce67f276fe3ea7284c3dc730bdd6a2ec7dfe2f /drivers/ata
parentdc690d8ef842b464f1c429a376ca16cb8dbee6ae (diff)
parent36e235901f90fb83215be43cbd8f1ca14661ea40 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (34 commits) PCI: Only build PCI syscalls on architectures that want them PCI: limit pci_get_bus_and_slot to domain 0 PCI: hotplug: acpiphp: avoid acpiphp "cannot get bridge info" PCI hotplug failure PCI: hotplug: acpiphp: remove hot plug parameter write to PCI host bridge PCI: hotplug: acpiphp: fix slot poweroff problem on systems without _PS3 PCI: hotplug: pciehp: wait for 1 second after power off slot PCI: pci_set_power_state(): check for PM capabilities earlier PCI: cpci_hotplug: Convert to use the kthread API PCI: add pci_try_set_mwi PCI: pcie: remove SPIN_LOCK_UNLOCKED PCI: ROUND_UP macro cleanup in drivers/pci PCI: remove pci_dac_dma_... APIs PCI: pci-x-pci-express-read-control-interfaces cleanups PCI: Fix typo in include/linux/pci.h PCI: pci_ids, remove double or more empty lines PCI: pci_ids, add atheros and 3com_2 vendors PCI: pci_ids, reorder some entries PCI: i386: traps, change VENDOR to DEVICE PCI: ATM: lanai, change VENDOR to DEVICE PCI: Change all drivers to use pci_device->revision ...
Diffstat (limited to 'drivers/ata')
-rw-r--r--drivers/ata/ata_piix.c6
-rw-r--r--drivers/ata/pata_ali.c34
-rw-r--r--drivers/ata/pata_amd.c4
-rw-r--r--drivers/ata/pata_cs5530.c2
-rw-r--r--drivers/ata/pata_it821x.c3
-rw-r--r--drivers/ata/pata_serverworks.c5
-rw-r--r--drivers/ata/pata_sis.c8
-rw-r--r--drivers/ata/pata_sl82c105.c5
-rw-r--r--drivers/ata/pata_via.c6
-rw-r--r--drivers/ata/sata_mv.c20
10 files changed, 32 insertions, 61 deletions
diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 21a7ca4936b4..d9fa329fd157 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -928,20 +928,18 @@ static int __devinit piix_check_450nx_errata(struct pci_dev *ata_dev)
928{ 928{
929 struct pci_dev *pdev = NULL; 929 struct pci_dev *pdev = NULL;
930 u16 cfg; 930 u16 cfg;
931 u8 rev;
932 int no_piix_dma = 0; 931 int no_piix_dma = 0;
933 932
934 while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL) 933 while((pdev = pci_get_device(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_82454NX, pdev)) != NULL)
935 { 934 {
936 /* Look for 450NX PXB. Check for problem configurations 935 /* Look for 450NX PXB. Check for problem configurations
937 A PCI quirk checks bit 6 already */ 936 A PCI quirk checks bit 6 already */
938 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
939 pci_read_config_word(pdev, 0x41, &cfg); 937 pci_read_config_word(pdev, 0x41, &cfg);
940 /* Only on the original revision: IDE DMA can hang */ 938 /* Only on the original revision: IDE DMA can hang */
941 if (rev == 0x00) 939 if (pdev->revision == 0x00)
942 no_piix_dma = 1; 940 no_piix_dma = 1;
943 /* On all revisions below 5 PXB bus lock must be disabled for IDE */ 941 /* On all revisions below 5 PXB bus lock must be disabled for IDE */
944 else if (cfg & (1<<14) && rev < 5) 942 else if (cfg & (1<<14) && pdev->revision < 5)
945 no_piix_dma = 2; 943 no_piix_dma = 2;
946 } 944 }
947 if (no_piix_dma) 945 if (no_piix_dma)
diff --git a/drivers/ata/pata_ali.c b/drivers/ata/pata_ali.c
index 30c4276ec882..010436795d20 100644
--- a/drivers/ata/pata_ali.c
+++ b/drivers/ata/pata_ali.c
@@ -455,23 +455,21 @@ static struct ata_port_operations ali_c5_port_ops = {
455 455
456static void ali_init_chipset(struct pci_dev *pdev) 456static void ali_init_chipset(struct pci_dev *pdev)
457{ 457{
458 u8 rev, tmp; 458 u8 tmp;
459 struct pci_dev *north, *isa_bridge; 459 struct pci_dev *north, *isa_bridge;
460 460
461 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
462
463 /* 461 /*
464 * The chipset revision selects the driver operations and 462 * The chipset revision selects the driver operations and
465 * mode data. 463 * mode data.
466 */ 464 */
467 465
468 if (rev >= 0x20 && rev < 0xC2) { 466 if (pdev->revision >= 0x20 && pdev->revision < 0xC2) {
469 /* 1543-E/F, 1543C-C, 1543C-D, 1543C-E */ 467 /* 1543-E/F, 1543C-C, 1543C-D, 1543C-E */
470 pci_read_config_byte(pdev, 0x4B, &tmp); 468 pci_read_config_byte(pdev, 0x4B, &tmp);
471 /* Clear CD-ROM DMA write bit */ 469 /* Clear CD-ROM DMA write bit */
472 tmp &= 0x7F; 470 tmp &= 0x7F;
473 pci_write_config_byte(pdev, 0x4B, tmp); 471 pci_write_config_byte(pdev, 0x4B, tmp);
474 } else if (rev >= 0xC2) { 472 } else if (pdev->revision >= 0xC2) {
475 /* Enable cable detection logic */ 473 /* Enable cable detection logic */
476 pci_read_config_byte(pdev, 0x4B, &tmp); 474 pci_read_config_byte(pdev, 0x4B, &tmp);
477 pci_write_config_byte(pdev, 0x4B, tmp | 0x08); 475 pci_write_config_byte(pdev, 0x4B, tmp | 0x08);
@@ -483,21 +481,21 @@ static void ali_init_chipset(struct pci_dev *pdev)
483 /* Configure the ALi bridge logic. For non ALi rely on BIOS. 481 /* Configure the ALi bridge logic. For non ALi rely on BIOS.
484 Set the south bridge enable bit */ 482 Set the south bridge enable bit */
485 pci_read_config_byte(isa_bridge, 0x79, &tmp); 483 pci_read_config_byte(isa_bridge, 0x79, &tmp);
486 if (rev == 0xC2) 484 if (pdev->revision == 0xC2)
487 pci_write_config_byte(isa_bridge, 0x79, tmp | 0x04); 485 pci_write_config_byte(isa_bridge, 0x79, tmp | 0x04);
488 else if (rev > 0xC2 && rev < 0xC5) 486 else if (pdev->revision > 0xC2 && pdev->revision < 0xC5)
489 pci_write_config_byte(isa_bridge, 0x79, tmp | 0x02); 487 pci_write_config_byte(isa_bridge, 0x79, tmp | 0x02);
490 } 488 }
491 if (rev >= 0x20) { 489 if (pdev->revision >= 0x20) {
492 /* 490 /*
493 * CD_ROM DMA on (0x53 bit 0). Enable this even if we want 491 * CD_ROM DMA on (0x53 bit 0). Enable this even if we want
494 * to use PIO. 0x53 bit 1 (rev 20 only) - enable FIFO control 492 * to use PIO. 0x53 bit 1 (rev 20 only) - enable FIFO control
495 * via 0x54/55. 493 * via 0x54/55.
496 */ 494 */
497 pci_read_config_byte(pdev, 0x53, &tmp); 495 pci_read_config_byte(pdev, 0x53, &tmp);
498 if (rev <= 0x20) 496 if (pdev->revision <= 0x20)
499 tmp &= ~0x02; 497 tmp &= ~0x02;
500 if (rev >= 0xc7) 498 if (pdev->revision >= 0xc7)
501 tmp |= 0x03; 499 tmp |= 0x03;
502 else 500 else
503 tmp |= 0x01; /* CD_ROM enable for DMA */ 501 tmp |= 0x01; /* CD_ROM enable for DMA */
@@ -579,25 +577,23 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
579 }; 577 };
580 578
581 const struct ata_port_info *ppi[] = { NULL, NULL }; 579 const struct ata_port_info *ppi[] = { NULL, NULL };
582 u8 rev, tmp; 580 u8 tmp;
583 struct pci_dev *isa_bridge; 581 struct pci_dev *isa_bridge;
584 582
585 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
586
587 /* 583 /*
588 * The chipset revision selects the driver operations and 584 * The chipset revision selects the driver operations and
589 * mode data. 585 * mode data.
590 */ 586 */
591 587
592 if (rev < 0x20) { 588 if (pdev->revision < 0x20) {
593 ppi[0] = &info_early; 589 ppi[0] = &info_early;
594 } else if (rev < 0xC2) { 590 } else if (pdev->revision < 0xC2) {
595 ppi[0] = &info_20; 591 ppi[0] = &info_20;
596 } else if (rev == 0xC2) { 592 } else if (pdev->revision == 0xC2) {
597 ppi[0] = &info_c2; 593 ppi[0] = &info_c2;
598 } else if (rev == 0xC3) { 594 } else if (pdev->revision == 0xC3) {
599 ppi[0] = &info_c3; 595 ppi[0] = &info_c3;
600 } else if (rev == 0xC4) { 596 } else if (pdev->revision == 0xC4) {
601 ppi[0] = &info_c4; 597 ppi[0] = &info_c4;
602 } else 598 } else
603 ppi[0] = &info_c5; 599 ppi[0] = &info_c5;
@@ -605,7 +601,7 @@ static int ali_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
605 ali_init_chipset(pdev); 601 ali_init_chipset(pdev);
606 602
607 isa_bridge = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL); 603 isa_bridge = pci_get_device(PCI_VENDOR_ID_AL, PCI_DEVICE_ID_AL_M1533, NULL);
608 if (isa_bridge && rev >= 0x20 && rev < 0xC2) { 604 if (isa_bridge && pdev->revision >= 0x20 && pdev->revision < 0xC2) {
609 /* Are we paired with a UDMA capable chip */ 605 /* Are we paired with a UDMA capable chip */
610 pci_read_config_byte(isa_bridge, 0x5E, &tmp); 606 pci_read_config_byte(isa_bridge, 0x5E, &tmp);
611 if ((tmp & 0x1E) == 0x12) 607 if ((tmp & 0x1E) == 0x12)
diff --git a/drivers/ata/pata_amd.c b/drivers/ata/pata_amd.c
index b9c44c575ce3..b09facad63e1 100644
--- a/drivers/ata/pata_amd.c
+++ b/drivers/ata/pata_amd.c
@@ -623,17 +623,15 @@ static int amd_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
623 const struct ata_port_info *ppi[] = { NULL, NULL }; 623 const struct ata_port_info *ppi[] = { NULL, NULL };
624 static int printed_version; 624 static int printed_version;
625 int type = id->driver_data; 625 int type = id->driver_data;
626 u8 rev;
627 u8 fifo; 626 u8 fifo;
628 627
629 if (!printed_version++) 628 if (!printed_version++)
630 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n"); 629 dev_printk(KERN_DEBUG, &pdev->dev, "version " DRV_VERSION "\n");
631 630
632 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
633 pci_read_config_byte(pdev, 0x41, &fifo); 631 pci_read_config_byte(pdev, 0x41, &fifo);
634 632
635 /* Check for AMD7409 without swdma errata and if found adjust type */ 633 /* Check for AMD7409 without swdma errata and if found adjust type */
636 if (type == 1 && rev > 0x7) 634 if (type == 1 && pdev->revision > 0x7)
637 type = 2; 635 type = 2;
638 636
639 /* Check for AMD7411 */ 637 /* Check for AMD7411 */
diff --git a/drivers/ata/pata_cs5530.c b/drivers/ata/pata_cs5530.c
index 3fca5898642b..68f150a1e2f4 100644
--- a/drivers/ata/pata_cs5530.c
+++ b/drivers/ata/pata_cs5530.c
@@ -266,7 +266,7 @@ static int cs5530_init_chip(void)
266 } 266 }
267 267
268 pci_set_master(cs5530_0); 268 pci_set_master(cs5530_0);
269 pci_set_mwi(cs5530_0); 269 pci_try_set_mwi(cs5530_0);
270 270
271 /* 271 /*
272 * Set PCI CacheLineSize to 16-bytes: 272 * Set PCI CacheLineSize to 16-bytes:
diff --git a/drivers/ata/pata_it821x.c b/drivers/ata/pata_it821x.c
index b67bbf6516ba..430673be1df7 100644
--- a/drivers/ata/pata_it821x.c
+++ b/drivers/ata/pata_it821x.c
@@ -587,8 +587,7 @@ static int it821x_port_start(struct ata_port *ap)
587 itdev->want[1][1] = ATA_ANY; 587 itdev->want[1][1] = ATA_ANY;
588 itdev->last_device = -1; 588 itdev->last_device = -1;
589 589
590 pci_read_config_byte(pdev, PCI_REVISION_ID, &conf); 590 if (pdev->revision == 0x11) {
591 if (conf == 0x10) {
592 itdev->timing10 = 1; 591 itdev->timing10 = 1;
593 /* Need to disable ATAPI DMA for this case */ 592 /* Need to disable ATAPI DMA for this case */
594 if (!itdev->smart) 593 if (!itdev->smart)
diff --git a/drivers/ata/pata_serverworks.c b/drivers/ata/pata_serverworks.c
index 0231aba51ca4..89691541fe59 100644
--- a/drivers/ata/pata_serverworks.c
+++ b/drivers/ata/pata_serverworks.c
@@ -410,11 +410,8 @@ static int serverworks_fixup_osb4(struct pci_dev *pdev)
410 410
411static int serverworks_fixup_csb(struct pci_dev *pdev) 411static int serverworks_fixup_csb(struct pci_dev *pdev)
412{ 412{
413 u8 rev;
414 u8 btr; 413 u8 btr;
415 414
416 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev);
417
418 /* Third Channel Test */ 415 /* Third Channel Test */
419 if (!(PCI_FUNC(pdev->devfn) & 1)) { 416 if (!(PCI_FUNC(pdev->devfn) & 1)) {
420 struct pci_dev * findev = NULL; 417 struct pci_dev * findev = NULL;
@@ -456,7 +453,7 @@ static int serverworks_fixup_csb(struct pci_dev *pdev)
456 if (!(PCI_FUNC(pdev->devfn) & 1)) 453 if (!(PCI_FUNC(pdev->devfn) & 1))
457 btr |= 0x2; 454 btr |= 0x2;
458 else 455 else
459 btr |= (rev >= SVWKS_CSB5_REVISION_NEW) ? 0x3 : 0x2; 456 btr |= (pdev->revision >= SVWKS_CSB5_REVISION_NEW) ? 0x3 : 0x2;
460 pci_write_config_byte(pdev, 0x5A, btr); 457 pci_write_config_byte(pdev, 0x5A, btr);
461 458
462 return btr; 459 return btr;
diff --git a/drivers/ata/pata_sis.c b/drivers/ata/pata_sis.c
index 657b1ee2f5c1..9a829a7cbc60 100644
--- a/drivers/ata/pata_sis.c
+++ b/drivers/ata/pata_sis.c
@@ -931,9 +931,7 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
931 if (host != NULL) { 931 if (host != NULL) {
932 chipset = sets; /* Match found */ 932 chipset = sets; /* Match found */
933 if (sets->device == 0x630) { /* SIS630 */ 933 if (sets->device == 0x630) { /* SIS630 */
934 u8 host_rev; 934 if (host->revision >= 0x30) /* 630 ET */
935 pci_read_config_byte(host, PCI_REVISION_ID, &host_rev);
936 if (host_rev >= 0x30) /* 630 ET */
937 chipset = &sis100_early; 935 chipset = &sis100_early;
938 } 936 }
939 break; 937 break;
@@ -977,7 +975,6 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
977 u16 trueid; 975 u16 trueid;
978 u8 prefctl; 976 u8 prefctl;
979 u8 idecfg; 977 u8 idecfg;
980 u8 sbrev;
981 978
982 /* Try the second unmasking technique */ 979 /* Try the second unmasking technique */
983 pci_read_config_byte(pdev, 0x4a, &idecfg); 980 pci_read_config_byte(pdev, 0x4a, &idecfg);
@@ -990,11 +987,10 @@ static int sis_init_one (struct pci_dev *pdev, const struct pci_device_id *ent)
990 lpc_bridge = pci_get_slot(pdev->bus, 0x10); /* Bus 0 Dev 2 Fn 0 */ 987 lpc_bridge = pci_get_slot(pdev->bus, 0x10); /* Bus 0 Dev 2 Fn 0 */
991 if (lpc_bridge == NULL) 988 if (lpc_bridge == NULL)
992 break; 989 break;
993 pci_read_config_byte(lpc_bridge, PCI_REVISION_ID, &sbrev);
994 pci_read_config_byte(pdev, 0x49, &prefctl); 990 pci_read_config_byte(pdev, 0x49, &prefctl);
995 pci_dev_put(lpc_bridge); 991 pci_dev_put(lpc_bridge);
996 992
997 if (sbrev == 0x10 && (prefctl & 0x80)) { 993 if (lpc_bridge->revision == 0x10 && (prefctl & 0x80)) {
998 chipset = &sis133_early; 994 chipset = &sis133_early;
999 break; 995 break;
1000 } 996 }
diff --git a/drivers/ata/pata_sl82c105.c b/drivers/ata/pata_sl82c105.c
index bde734189623..8c2813aa6cdb 100644
--- a/drivers/ata/pata_sl82c105.c
+++ b/drivers/ata/pata_sl82c105.c
@@ -270,7 +270,6 @@ static struct ata_port_operations sl82c105_port_ops = {
270static int sl82c105_bridge_revision(struct pci_dev *pdev) 270static int sl82c105_bridge_revision(struct pci_dev *pdev)
271{ 271{
272 struct pci_dev *bridge; 272 struct pci_dev *bridge;
273 u8 rev;
274 273
275 /* 274 /*
276 * The bridge should be part of the same device, but function 0. 275 * The bridge should be part of the same device, but function 0.
@@ -292,10 +291,8 @@ static int sl82c105_bridge_revision(struct pci_dev *pdev)
292 /* 291 /*
293 * We need to find function 0's revision, not function 1 292 * We need to find function 0's revision, not function 1
294 */ 293 */
295 pci_read_config_byte(bridge, PCI_REVISION_ID, &rev);
296
297 pci_dev_put(bridge); 294 pci_dev_put(bridge);
298 return rev; 295 return bridge->revision;
299} 296}
300 297
301 298
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c
index f0cadbe6aa11..f645fe22cd1e 100644
--- a/drivers/ata/pata_via.c
+++ b/drivers/ata/pata_via.c
@@ -506,7 +506,6 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
506 struct pci_dev *isa = NULL; 506 struct pci_dev *isa = NULL;
507 const struct via_isa_bridge *config; 507 const struct via_isa_bridge *config;
508 static int printed_version; 508 static int printed_version;
509 u8 t;
510 u8 enable; 509 u8 enable;
511 u32 timing; 510 u32 timing;
512 511
@@ -520,9 +519,8 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id)
520 !!(config->flags & VIA_BAD_ID), 519 !!(config->flags & VIA_BAD_ID),
521 config->id, NULL))) { 520 config->id, NULL))) {
522 521
523 pci_read_config_byte(isa, PCI_REVISION_ID, &t); 522 if (isa->revision >= config->rev_min &&
524 if (t >= config->rev_min && 523 isa->revision <= config->rev_max)
525 t <= config->rev_max)
526 break; 524 break;
527 pci_dev_put(isa); 525 pci_dev_put(isa);
528 } 526 }
diff --git a/drivers/ata/sata_mv.c b/drivers/ata/sata_mv.c
index 8a77a0ae83ad..5d576435fccc 100644
--- a/drivers/ata/sata_mv.c
+++ b/drivers/ata/sata_mv.c
@@ -1765,12 +1765,9 @@ static void mv5_scr_write(struct ata_port *ap, unsigned int sc_reg_in, u32 val)
1765 1765
1766static void mv5_reset_bus(struct pci_dev *pdev, void __iomem *mmio) 1766static void mv5_reset_bus(struct pci_dev *pdev, void __iomem *mmio)
1767{ 1767{
1768 u8 rev_id;
1769 int early_5080; 1768 int early_5080;
1770 1769
1771 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id); 1770 early_5080 = (pdev->device == 0x5080) && (pdev->revision == 0);
1772
1773 early_5080 = (pdev->device == 0x5080) && (rev_id == 0);
1774 1771
1775 if (!early_5080) { 1772 if (!early_5080) {
1776 u32 tmp = readl(mmio + MV_PCI_EXP_ROM_BAR_CTL); 1773 u32 tmp = readl(mmio + MV_PCI_EXP_ROM_BAR_CTL);
@@ -2387,17 +2384,14 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
2387{ 2384{
2388 struct pci_dev *pdev = to_pci_dev(host->dev); 2385 struct pci_dev *pdev = to_pci_dev(host->dev);
2389 struct mv_host_priv *hpriv = host->private_data; 2386 struct mv_host_priv *hpriv = host->private_data;
2390 u8 rev_id;
2391 u32 hp_flags = hpriv->hp_flags; 2387 u32 hp_flags = hpriv->hp_flags;
2392 2388
2393 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
2394
2395 switch(board_idx) { 2389 switch(board_idx) {
2396 case chip_5080: 2390 case chip_5080:
2397 hpriv->ops = &mv5xxx_ops; 2391 hpriv->ops = &mv5xxx_ops;
2398 hp_flags |= MV_HP_GEN_I; 2392 hp_flags |= MV_HP_GEN_I;
2399 2393
2400 switch (rev_id) { 2394 switch (pdev->revision) {
2401 case 0x1: 2395 case 0x1:
2402 hp_flags |= MV_HP_ERRATA_50XXB0; 2396 hp_flags |= MV_HP_ERRATA_50XXB0;
2403 break; 2397 break;
@@ -2417,7 +2411,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
2417 hpriv->ops = &mv5xxx_ops; 2411 hpriv->ops = &mv5xxx_ops;
2418 hp_flags |= MV_HP_GEN_I; 2412 hp_flags |= MV_HP_GEN_I;
2419 2413
2420 switch (rev_id) { 2414 switch (pdev->revision) {
2421 case 0x0: 2415 case 0x0:
2422 hp_flags |= MV_HP_ERRATA_50XXB0; 2416 hp_flags |= MV_HP_ERRATA_50XXB0;
2423 break; 2417 break;
@@ -2437,7 +2431,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
2437 hpriv->ops = &mv6xxx_ops; 2431 hpriv->ops = &mv6xxx_ops;
2438 hp_flags |= MV_HP_GEN_II; 2432 hp_flags |= MV_HP_GEN_II;
2439 2433
2440 switch (rev_id) { 2434 switch (pdev->revision) {
2441 case 0x7: 2435 case 0x7:
2442 hp_flags |= MV_HP_ERRATA_60X1B2; 2436 hp_flags |= MV_HP_ERRATA_60X1B2;
2443 break; 2437 break;
@@ -2457,7 +2451,7 @@ static int mv_chip_id(struct ata_host *host, unsigned int board_idx)
2457 hpriv->ops = &mv6xxx_ops; 2451 hpriv->ops = &mv6xxx_ops;
2458 hp_flags |= MV_HP_GEN_IIE; 2452 hp_flags |= MV_HP_GEN_IIE;
2459 2453
2460 switch (rev_id) { 2454 switch (pdev->revision) {
2461 case 0x0: 2455 case 0x0:
2462 hp_flags |= MV_HP_ERRATA_XX42A0; 2456 hp_flags |= MV_HP_ERRATA_XX42A0;
2463 break; 2457 break;
@@ -2585,14 +2579,12 @@ static void mv_print_info(struct ata_host *host)
2585{ 2579{
2586 struct pci_dev *pdev = to_pci_dev(host->dev); 2580 struct pci_dev *pdev = to_pci_dev(host->dev);
2587 struct mv_host_priv *hpriv = host->private_data; 2581 struct mv_host_priv *hpriv = host->private_data;
2588 u8 rev_id, scc; 2582 u8 scc;
2589 const char *scc_s, *gen; 2583 const char *scc_s, *gen;
2590 2584
2591 /* Use this to determine the HW stepping of the chip so we know 2585 /* Use this to determine the HW stepping of the chip so we know
2592 * what errata to workaround 2586 * what errata to workaround
2593 */ 2587 */
2594 pci_read_config_byte(pdev, PCI_REVISION_ID, &rev_id);
2595
2596 pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &scc); 2588 pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &scc);
2597 if (scc == 0) 2589 if (scc == 0)
2598 scc_s = "SCSI"; 2590 scc_s = "SCSI";