Skip to content

Commit

Permalink
ata_piix: Remove ugly layering violation
Browse files Browse the repository at this point in the history
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 <alan@redhat.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
  • Loading branch information
Alan Cox authored and Jeff Garzik committed Mar 9, 2007
1 parent d0035ae commit 9a2eb70
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions drivers/ata/ata_piix.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
#include <linux/libata.h>

#define DRV_NAME "ata_piix"
#define DRV_VERSION "2.10"
#define DRV_VERSION "2.10ac1"

enum {
PIIX_IOCFG = 0x54, /* IDE I/O configuration register */
Expand Down Expand Up @@ -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);
}

Expand Down

0 comments on commit 9a2eb70

Please sign in to comment.