From 7d59f34a7e12ec2728bc9fc89da160b2a82bf027 Mon Sep 17 00:00:00 2001 From: Alan Cox Date: Tue, 29 Apr 2008 14:10:57 +0100 Subject: [PATCH] --- yaml --- r: 94978 b: refs/heads/master c: 11f6400e92aa3fc0aa936f20f7cc363674a4e3c4 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/drivers/ata/pata_via.c | 11 ++++++----- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/[refs] b/[refs] index cc149e1cd827..d4c19c188451 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: d7b5a23fc6e85456ed00a997ff2d925fb3f0dc52 +refs/heads/master: 11f6400e92aa3fc0aa936f20f7cc363674a4e3c4 diff --git a/trunk/drivers/ata/pata_via.c b/trunk/drivers/ata/pata_via.c index d4840748fb5c..2fea6cbe7755 100644 --- a/trunk/drivers/ata/pata_via.c +++ b/trunk/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. */