* [PATCH] libata: fix revalidation issuing after configuration commands
@ 2007-10-10 6:57 Tejun Heo
2007-10-11 2:55 ` Igor Durdanovic
2007-10-15 19:41 ` Jeff Garzik
0 siblings, 2 replies; 4+ messages in thread
From: Tejun Heo @ 2007-10-10 6:57 UTC (permalink / raw)
To: Jeff Garzik, linux-ide, idurdanovic
After commands which can change device configuration, EH is scheduled
to revalidate and reconfigure the device. Host link was incorrectly
used unconditionally when scheduling EH action. This resulted in
bogus revalidation request and mismatched configuration between device
and driver. Fix it.
This bug was reported by Igor Durdanovic.
Signed-off-by: Tejun Heo <htejun@gmail.com>
Cc: Igor Durdanovic <idurdanovic@comcast.net>
---
drivers/ata/libata-scsi.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index ea53e6a..d63c81e 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -1363,6 +1363,7 @@ nothing_to_do:
static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
{
struct ata_port *ap = qc->ap;
+ struct ata_eh_info *ehi = &qc->dev->link->eh_info;
struct scsi_cmnd *cmd = qc->scsicmd;
u8 *cdb = cmd->cmnd;
int need_sense = (qc->err_mask != 0);
@@ -1376,14 +1377,14 @@ static void ata_scsi_qc_complete(struct ata_queued_cmd *qc)
case ATA_CMD_SET_FEATURES:
if ((qc->tf.feature == SETFEATURES_WC_ON) ||
(qc->tf.feature == SETFEATURES_WC_OFF)) {
- ap->link.eh_info.action |= ATA_EH_REVALIDATE;
+ ehi->action |= ATA_EH_REVALIDATE;
ata_port_schedule_eh(ap);
}
break;
case ATA_CMD_INIT_DEV_PARAMS: /* CHS translation changed */
case ATA_CMD_SET_MULTI: /* multi_count changed */
- ap->link.eh_info.action |= ATA_EH_REVALIDATE;
+ ehi->action |= ATA_EH_REVALIDATE;
ata_port_schedule_eh(ap);
break;
}
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] libata: fix revalidation issuing after configuration commands
2007-10-10 6:57 [PATCH] libata: fix revalidation issuing after configuration commands Tejun Heo
@ 2007-10-11 2:55 ` Igor Durdanovic
2007-10-11 3:23 ` Tejun Heo
2007-10-15 19:41 ` Jeff Garzik
1 sibling, 1 reply; 4+ messages in thread
From: Igor Durdanovic @ 2007-10-11 2:55 UTC (permalink / raw)
To: Tejun Heo; +Cc: Jeff Garzik, linux-ide, idurdanovic
Hi,
The patch works fine! Reset happens only once per disk and works also
when disks are missing, which would result in infinite loop before.
Setting the parameters of a hard-drive works too.
The only thing that is puzzling to me is that I am unable to send more
than 80MB/s through one Express-Card sata port. I am not sure what the
problem is, the bus ought to sustain 300MB/s without the problem, is
this PM limitation (does not seem so from the PR material), or the
sata card? This makes it impossible to create high-speed RAID.
Regards, Igor
Tejun Heo writes:
> After commands which can change device configuration, EH is scheduled
> to revalidate and reconfigure the device. Host link was incorrectly
> used unconditionally when scheduling EH action. This resulted in
> bogus revalidation request and mismatched configuration between device
> and driver. Fix it.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libata: fix revalidation issuing after configuration commands
2007-10-11 2:55 ` Igor Durdanovic
@ 2007-10-11 3:23 ` Tejun Heo
0 siblings, 0 replies; 4+ messages in thread
From: Tejun Heo @ 2007-10-11 3:23 UTC (permalink / raw)
To: idurdanovic; +Cc: Jeff Garzik, linux-ide
Igor Durdanovic wrote:
> Hi,
>
> The patch works fine! Reset happens only once per disk and works also
> when disks are missing, which would result in infinite loop before.
> Setting the parameters of a hard-drive works too.
>
> The only thing that is puzzling to me is that I am unable to send more
> than 80MB/s through one Express-Card sata port. I am not sure what the
> problem is, the bus ought to sustain 300MB/s without the problem, is
> this PM limitation (does not seem so from the PR material), or the
> sata card? This makes it impossible to create high-speed RAID.
There are some performance issues with 3124/3132 family controllers.
I'm not sure whether you're hitting it or 3132 is actually affected by
the problem tho. linux-ide ML archive should have some related messages.
--
tejun
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] libata: fix revalidation issuing after configuration commands
2007-10-10 6:57 [PATCH] libata: fix revalidation issuing after configuration commands Tejun Heo
2007-10-11 2:55 ` Igor Durdanovic
@ 2007-10-15 19:41 ` Jeff Garzik
1 sibling, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2007-10-15 19:41 UTC (permalink / raw)
To: Tejun Heo; +Cc: linux-ide, idurdanovic
Tejun Heo wrote:
> After commands which can change device configuration, EH is scheduled
> to revalidate and reconfigure the device. Host link was incorrectly
> used unconditionally when scheduling EH action. This resulted in
> bogus revalidation request and mismatched configuration between device
> and driver. Fix it.
>
> This bug was reported by Igor Durdanovic.
>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> Cc: Igor Durdanovic <idurdanovic@comcast.net>
> ---
> drivers/ata/libata-scsi.c | 5 +++--
> 1 file changed, 3 insertions(+), 2 deletions(-)
applied
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-10-15 19:41 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-10 6:57 [PATCH] libata: fix revalidation issuing after configuration commands Tejun Heo
2007-10-11 2:55 ` Igor Durdanovic
2007-10-11 3:23 ` Tejun Heo
2007-10-15 19:41 ` Jeff Garzik
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).