From: Alan Cox Date: Wed, 7 Mar 2007 16:13:07 +0000 (+0000) Subject: ata_piix: Remove ugly layering violation X-Git-Tag: v2.6.21-rc4~75 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=9a2eb709256cd591119edc2809b4fcac7cb8eb6c;p=linux-2.6-omap-h63xx.git ata_piix: Remove ugly layering violation A while ago I modified the libata code so that drivers can return -ENOENT for unknown ports not fiddle with the EH flags and print stuff directly. Somewhere along the line ata_piix didn't get fully converted. Signed-off-by: Alan Cox Signed-off-by: Jeff Garzik --- diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c index dc42ba1b46f..b952c584338 100644 --- a/drivers/ata/ata_piix.c +++ b/drivers/ata/ata_piix.c @@ -93,7 +93,7 @@ #include #define DRV_NAME "ata_piix" -#define DRV_VERSION "2.10" +#define DRV_VERSION "2.10ac1" enum { PIIX_IOCFG = 0x54, /* IDE I/O configuration register */ @@ -667,14 +667,9 @@ static int ich_pata_prereset(struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); - if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) { - ata_port_printk(ap, KERN_INFO, "port disabled. ignoring.\n"); - ap->eh_context.i.action &= ~ATA_EH_RESET_MASK; - return 0; - } - + if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->port_no])) + return -ENOENT; ich_pata_cbl_detect(ap); - return ata_std_prereset(ap); }