From 3815fd8b063905fcd02593d88da358871a40dad5 Mon Sep 17 00:00:00 2001 From: Sergei Shtylyov Date: Mon, 5 Feb 2007 21:08:55 +0300 Subject: [PATCH] --- yaml --- r: 47385 b: refs/heads/master c: 92ae78493f5f3de323652f3ea0ec8b7b2839c3d2 h: refs/heads/master i: 47383: 1c4d17b1cbf973cbc1f50f5e03708c75db8a443e v: v3 --- [refs] | 2 +- trunk/drivers/ata/pata_mpiix.c | 13 ++++++------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/[refs] b/[refs] index eed7c3ed3641..33f1573ca005 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 7b4f1a13f708a7b061185d86aae201f3195db47a +refs/heads/master: 92ae78493f5f3de323652f3ea0ec8b7b2839c3d2 diff --git a/trunk/drivers/ata/pata_mpiix.c b/trunk/drivers/ata/pata_mpiix.c index 4e97a7efccef..ca8c965179b1 100644 --- a/trunk/drivers/ata/pata_mpiix.c +++ b/trunk/drivers/ata/pata_mpiix.c @@ -35,7 +35,7 @@ #include #define DRV_NAME "pata_mpiix" -#define DRV_VERSION "0.7.4" +#define DRV_VERSION "0.7.5" enum { IDETIM = 0x6C, /* IDE control register */ @@ -49,12 +49,9 @@ enum { static int mpiix_pre_reset(struct ata_port *ap) { struct pci_dev *pdev = to_pci_dev(ap->host->dev); - static const struct pci_bits mpiix_enable_bits[] = { - { 0x6D, 1, 0x80, 0x80 }, - { 0x6F, 1, 0x80, 0x80 } - }; + static const struct pci_bits mpiix_enable_bits = { 0x6D, 1, 0x80, 0x80 }; - if (!pci_test_config_bits(pdev, &mpiix_enable_bits[ap->port_no])) + if (!pci_test_config_bits(pdev, &mpiix_enable_bits)) return -ENOENT; ap->cbl = ATA_CBL_PATA40; return ata_std_prereset(ap); @@ -219,6 +216,7 @@ static int mpiix_init_one(struct pci_dev *dev, const struct pci_device_id *id) if (!(idetim & ENABLED)) return -ENODEV; + /* See if it's primary or secondary channel... */ if (!(idetim & SECONDARY)) { irq = 14; cmd_addr = devm_ioport_map(&dev->dev, 0x1F0, 8); @@ -243,10 +241,11 @@ static int mpiix_init_one(struct pci_dev *dev, const struct pci_device_id *id) probe.port_ops = &mpiix_port_ops; probe.sht = &mpiix_sht; probe.pio_mask = 0x1F; - probe.irq = irq; probe.irq_flags = SA_SHIRQ; probe.port_flags = ATA_FLAG_SLAVE_POSS | ATA_FLAG_SRST; probe.n_ports = 1; + + probe.irq = irq; probe.port[0].cmd_addr = cmd_addr; probe.port[0].ctl_addr = ctl_addr; probe.port[0].altstatus_addr = ctl_addr;