diff options
Diffstat (limited to 'drivers/ide/pci/cmd64x.c')
-rw-r--r-- | drivers/ide/pci/cmd64x.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/ide/pci/cmd64x.c b/drivers/ide/pci/cmd64x.c index 8631b6c8aa15..1e89dd6e5bbf 100644 --- a/drivers/ide/pci/cmd64x.c +++ b/drivers/ide/pci/cmd64x.c | |||
@@ -88,7 +88,6 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index) | |||
88 | u8 reg72 = 0, reg73 = 0; /* primary */ | 88 | u8 reg72 = 0, reg73 = 0; /* primary */ |
89 | u8 reg7a = 0, reg7b = 0; /* secondary */ | 89 | u8 reg7a = 0, reg7b = 0; /* secondary */ |
90 | u8 reg50 = 1, reg51 = 1, reg57 = 0, reg71 = 0; /* extra */ | 90 | u8 reg50 = 1, reg51 = 1, reg57 = 0, reg71 = 0; /* extra */ |
91 | u8 rev = 0; | ||
92 | 91 | ||
93 | p += sprintf(p, "\nController: %d\n", index); | 92 | p += sprintf(p, "\nController: %d\n", index); |
94 | p += sprintf(p, "PCI-%x Chipset.\n", dev->device); | 93 | p += sprintf(p, "PCI-%x Chipset.\n", dev->device); |
@@ -103,9 +102,8 @@ static char * print_cmd64x_get_info (char *buf, struct pci_dev *dev, int index) | |||
103 | (void) pci_read_config_byte(dev, UDIDETCR1, ®7b); | 102 | (void) pci_read_config_byte(dev, UDIDETCR1, ®7b); |
104 | 103 | ||
105 | /* PCI0643/6 originally didn't have the primary channel enable bit */ | 104 | /* PCI0643/6 originally didn't have the primary channel enable bit */ |
106 | (void) pci_read_config_byte(dev, PCI_REVISION_ID, &rev); | ||
107 | if ((dev->device == PCI_DEVICE_ID_CMD_643) || | 105 | if ((dev->device == PCI_DEVICE_ID_CMD_643) || |
108 | (dev->device == PCI_DEVICE_ID_CMD_646 && rev < 3)) | 106 | (dev->device == PCI_DEVICE_ID_CMD_646 && dev->revision < 3)) |
109 | reg51 |= CNTRL_ENA_1ST; | 107 | reg51 |= CNTRL_ENA_1ST; |
110 | 108 | ||
111 | p += sprintf(p, "---------------- Primary Channel " | 109 | p += sprintf(p, "---------------- Primary Channel " |
@@ -604,14 +602,11 @@ static int __devinit init_setup_cmd64x(struct pci_dev *dev, ide_pci_device_t *d) | |||
604 | 602 | ||
605 | static int __devinit init_setup_cmd646(struct pci_dev *dev, ide_pci_device_t *d) | 603 | static int __devinit init_setup_cmd646(struct pci_dev *dev, ide_pci_device_t *d) |
606 | { | 604 | { |
607 | u8 rev = 0; | ||
608 | |||
609 | /* | 605 | /* |
610 | * The original PCI0646 didn't have the primary channel enable bit, | 606 | * The original PCI0646 didn't have the primary channel enable bit, |
611 | * it appeared starting with PCI0646U (i.e. revision ID 3). | 607 | * it appeared starting with PCI0646U (i.e. revision ID 3). |
612 | */ | 608 | */ |
613 | pci_read_config_byte(dev, PCI_REVISION_ID, &rev); | 609 | if (dev->revision < 3) |
614 | if (rev < 3) | ||
615 | d->enablebits[0].reg = 0; | 610 | d->enablebits[0].reg = 0; |
616 | 611 | ||
617 | return ide_setup_pci_device(dev, d); | 612 | return ide_setup_pci_device(dev, d); |