diff options
author | Alan Cox <alan@redhat.com> | 2009-03-24 06:23:46 -0400 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2009-03-24 22:52:39 -0400 |
commit | c96f1732e25362d10ee7bcac1df8412a2e6b7d23 (patch) | |
tree | 66e24eddb174d6751579ec5952f72cbbac0fb038 /drivers/ata/pata_isapnp.c | |
parent | 3d47aa8e7e7b2aa09256590388aa8dddc79280f9 (diff) |
[libata] Improve timeout handling
On a timeout call a device specific handler early in the recovery so that
we can complete and process successful commands which timed out due to IRQ
loss or the like rather more elegantly.
[Revised to exclude the timeout handling on a few devices that inherit from
SFF but are not SFF enough to use the default timeout handler]
Signed-off-by: Alan Cox <alan@redhat.com>
Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/ata/pata_isapnp.c')
-rw-r--r-- | drivers/ata/pata_isapnp.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/drivers/ata/pata_isapnp.c b/drivers/ata/pata_isapnp.c index afa8f704271e..4bceb8803a10 100644 --- a/drivers/ata/pata_isapnp.c +++ b/drivers/ata/pata_isapnp.c | |||
@@ -17,7 +17,7 @@ | |||
17 | #include <linux/libata.h> | 17 | #include <linux/libata.h> |
18 | 18 | ||
19 | #define DRV_NAME "pata_isapnp" | 19 | #define DRV_NAME "pata_isapnp" |
20 | #define DRV_VERSION "0.2.2" | 20 | #define DRV_VERSION "0.2.5" |
21 | 21 | ||
22 | static struct scsi_host_template isapnp_sht = { | 22 | static struct scsi_host_template isapnp_sht = { |
23 | ATA_PIO_SHT(DRV_NAME), | 23 | ATA_PIO_SHT(DRV_NAME), |
@@ -28,6 +28,13 @@ static struct ata_port_operations isapnp_port_ops = { | |||
28 | .cable_detect = ata_cable_40wire, | 28 | .cable_detect = ata_cable_40wire, |
29 | }; | 29 | }; |
30 | 30 | ||
31 | static struct ata_port_operations isapnp_noalt_port_ops = { | ||
32 | .inherits = &ata_sff_port_ops, | ||
33 | .cable_detect = ata_cable_40wire, | ||
34 | /* No altstatus so we don't want to use the lost interrupt poll */ | ||
35 | .lost_interrupt = ATA_OP_NULL, | ||
36 | }; | ||
37 | |||
31 | /** | 38 | /** |
32 | * isapnp_init_one - attach an isapnp interface | 39 | * isapnp_init_one - attach an isapnp interface |
33 | * @idev: PnP device | 40 | * @idev: PnP device |
@@ -65,7 +72,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev | |||
65 | 72 | ||
66 | ap = host->ports[0]; | 73 | ap = host->ports[0]; |
67 | 74 | ||
68 | ap->ops = &isapnp_port_ops; | 75 | ap->ops = &isapnp_noalt_port_ops; |
69 | ap->pio_mask = ATA_PIO0; | 76 | ap->pio_mask = ATA_PIO0; |
70 | ap->flags |= ATA_FLAG_SLAVE_POSS; | 77 | ap->flags |= ATA_FLAG_SLAVE_POSS; |
71 | 78 | ||
@@ -76,6 +83,7 @@ static int isapnp_init_one(struct pnp_dev *idev, const struct pnp_device_id *dev | |||
76 | pnp_port_start(idev, 1), 1); | 83 | pnp_port_start(idev, 1), 1); |
77 | ap->ioaddr.altstatus_addr = ctl_addr; | 84 | ap->ioaddr.altstatus_addr = ctl_addr; |
78 | ap->ioaddr.ctl_addr = ctl_addr; | 85 | ap->ioaddr.ctl_addr = ctl_addr; |
86 | ap->ops = &isapnp_port_ops; | ||
79 | } | 87 | } |
80 | 88 | ||
81 | ata_sff_std_ports(&ap->ioaddr); | 89 | ata_sff_std_ports(&ap->ioaddr); |