diff options
author | Alan Cox <alan@lxorguk.ukuu.org.uk> | 2008-04-29 09:10:57 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-29 17:41:10 -0400 |
commit | 11f6400e92aa3fc0aa936f20f7cc363674a4e3c4 (patch) | |
tree | 4e433acc2a960ef908370dd10a59c85b80a1e242 /drivers/ata/pata_via.c | |
parent | d7b5a23fc6e85456ed00a997ff2d925fb3f0dc52 (diff) |
pata_via: Fix 6410 misdetect
The discrete VIA ATA chips don't have 0x40 enable bits. We check that
properly in one location but not another. This causes some users 6410
RAID cards to be incorrectly skipped.
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_via.c')
-rw-r--r-- | drivers/ata/pata_via.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index d4840748fb5c..2fea6cbe7755 100644 --- a/drivers/ata/pata_via.c +++ b/drivers/ata/pata_via.c | |||
@@ -464,11 +464,12 @@ static int via_init_one(struct pci_dev *pdev, const struct pci_device_id *id) | |||
464 | } | 464 | } |
465 | pci_dev_put(isa); | 465 | pci_dev_put(isa); |
466 | 466 | ||
467 | /* 0x40 low bits indicate enabled channels */ | 467 | if (!(config->flags & VIA_NO_ENABLES)) { |
468 | pci_read_config_byte(pdev, 0x40 , &enable); | 468 | /* 0x40 low bits indicate enabled channels */ |
469 | enable &= 3; | 469 | pci_read_config_byte(pdev, 0x40 , &enable); |
470 | if (enable == 0) { | 470 | enable &= 3; |
471 | return -ENODEV; | 471 | if (enable == 0) |
472 | return -ENODEV; | ||
472 | } | 473 | } |
473 | 474 | ||
474 | /* Initialise the FIFO for the enabled channels. */ | 475 | /* Initialise the FIFO for the enabled channels. */ |