Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Alan Cox and committed by
Jeff Garzik
11f6400e d7b5a23f

+6 -5
+6 -5
drivers/ata/pata_via.c
··· 464 464 } 465 465 pci_dev_put(isa); 466 466 467 - /* 0x40 low bits indicate enabled channels */ 468 - pci_read_config_byte(pdev, 0x40 , &enable); 469 - enable &= 3; 470 - if (enable == 0) { 471 - return -ENODEV; 467 + if (!(config->flags & VIA_NO_ENABLES)) { 468 + /* 0x40 low bits indicate enabled channels */ 469 + pci_read_config_byte(pdev, 0x40 , &enable); 470 + enable &= 3; 471 + if (enable == 0) 472 + return -ENODEV; 472 473 } 473 474 474 475 /* Initialise the FIFO for the enabled channels. */