]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/ata/pata_isapnp.c
Merge remote-tracking branch 'ia64/next'
[karo-tx-linux.git] / drivers / ata / pata_isapnp.c
index 15cdb9148aab2500085a664dad6e0c624aa71f4f..b33d1f99b3a44bb40e76a529a8eddbc2268bdc20 100644 (file)
@@ -17,7 +17,7 @@
 #include <linux/libata.h>
 
 #define DRV_NAME "pata_isapnp"
-#define DRV_VERSION "0.2.2"
+#define DRV_VERSION "0.2.5"
 
 static struct scsi_host_template isapnp_sht = {
        ATA_PIO_SHT(DRV_NAME),
@@ -28,6 +28,13 @@ static struct ata_port_operations isapnp_port_ops = {
        .cable_detect   = ata_cable_40wire,
 };
 
+static struct ata_port_operations isapnp_noalt_port_ops = {
+       .inherits       = &ata_sff_port_ops,
+       .cable_detect   = ata_cable_40wire,
+       /* No altstatus so we don't want to use the lost interrupt poll */
+       .lost_interrupt = ATA_OP_NULL,
+};
+
 /**
  *     isapnp_init_one         -       attach an isapnp interface
  *     @idev: PnP device
@@ -65,17 +72,18 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev
 
        ap = host->ports[0];
 
-       ap->ops = &isapnp_port_ops;
-       ap->pio_mask = 1;
+       ap->ops = &isapnp_noalt_port_ops;
+       ap->pio_mask = ATA_PIO0;
        ap->flags |= ATA_FLAG_SLAVE_POSS;
 
        ap->ioaddr.cmd_addr = cmd_addr;
 
-       if (pnp_port_valid(idev, 1) == 0) {
+       if (pnp_port_valid(idev, 1)) {
                ctl_addr = devm_ioport_map(&idev->dev,
                                           pnp_port_start(idev, 1), 1);
                ap->ioaddr.altstatus_addr = ctl_addr;
                ap->ioaddr.ctl_addr = ctl_addr;
+               ap->ops = &isapnp_port_ops;
        }
 
        ata_sff_std_ports(&ap->ioaddr);