From: Alan Cox Date: Tue, 29 Apr 2008 13:10:57 +0000 (+0100) Subject: pata_via: Fix 6410 misdetect X-Git-Tag: v2.6.26-rc1~350^2~3 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=11f6400e92aa3fc0aa936f20f7cc363674a4e3c4;p=linux-2.6 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 Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/pata_via.c b/drivers/ata/pata_via.c index d4840748fb..2fea6cbe77 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) } pci_dev_put(isa); - /* 0x40 low bits indicate enabled channels */ - pci_read_config_byte(pdev, 0x40 , &enable); - enable &= 3; - if (enable == 0) { - return -ENODEV; + if (!(config->flags & VIA_NO_ENABLES)) { + /* 0x40 low bits indicate enabled channels */ + pci_read_config_byte(pdev, 0x40 , &enable); + enable &= 3; + if (enable == 0) + return -ENODEV; } /* Initialise the FIFO for the enabled channels. */