Message ID | 1249579547-21091-1-git-send-email-gwendal@google.com |
---|---|
State | Not Applicable |
Delegated to: | David Miller |
Headers | show |
The explanation did not go through git-send-email: Without this fix, ATA passthrough commands are not resend to the drive, and no error is signalled to the caller because: - allowed retry count is 1 - ata_eh_qc_complete fill the sense data, so result is valid - sense data is filled with untouched ATA registers. Gwendal. On Thu, Aug 6, 2009 at 10:25 AM, Gwendal Grignou<gwendal@google.com> wrote: > > Signed-off-by: Gwendal Grignou <gwendal@google.com> > --- > drivers/ata/libata-core.c | 2 ++ > 1 files changed, 2 insertions(+), 0 deletions(-) > > diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c > index 8ac98ff..5b7616d 100644 > --- a/drivers/ata/libata-core.c > +++ b/drivers/ata/libata-core.c > @@ -5145,6 +5145,8 @@ void ata_qc_issue(struct ata_queued_cmd *qc) > /* if device is sleeping, schedule reset and abort the link */ > if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) { > link->eh_info.action |= ATA_EH_RESET; > + if (qc->scsicmd) > + qc->scsicmd->allowed++; > ata_ehi_push_desc(&link->eh_info, "waking up from sleep"); > ata_link_abort(link); > return; > -- > 1.5.4.3 > > -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Gwendal Grignou wrote: > The explanation did not go through git-send-email: > > Without this fix, ATA passthrough commands are not resend to the > drive, and no error is > signalled to the caller because: > - allowed retry count is 1 > - ata_eh_qc_complete fill the sense data, so result is valid > - sense data is filled with untouched ATA registers. Would setting ATA_QCFLAG_RETRY achieve the same result? Thanks.
ATA_QCFLAG_RETRY is already set [by _autopsy()], ata_eh_qc_retry() was already called, but given retries is 0, we can not reduce it. However, I will submit a better patch, in ata_eh_qc_retry(). Gwendal. On Fri, Aug 7, 2009 at 1:34 AM, Tejun Heo<tj@kernel.org> wrote: > Gwendal Grignou wrote: >> The explanation did not go through git-send-email: >> >> Without this fix, ATA passthrough commands are not resend to the >> drive, and no error is >> signalled to the caller because: >> - allowed retry count is 1 >> - ata_eh_qc_complete fill the sense data, so result is valid My mistake: __ata_eh_qc_complete() instead of ata_eh_qc_complete(). >> - sense data is filled with untouched ATA registers. > > Would setting ATA_QCFLAG_RETRY achieve the same result? > > Thanks. > > -- > tejun > -- To unsubscribe from this list: send the line "unsubscribe linux-ide" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/ata/libata-core.c b/drivers/ata/libata-core.c index 8ac98ff..5b7616d 100644 --- a/drivers/ata/libata-core.c +++ b/drivers/ata/libata-core.c @@ -5145,6 +5145,8 @@ void ata_qc_issue(struct ata_queued_cmd *qc) /* if device is sleeping, schedule reset and abort the link */ if (unlikely(qc->dev->flags & ATA_DFLAG_SLEEPING)) { link->eh_info.action |= ATA_EH_RESET; + if (qc->scsicmd) + qc->scsicmd->allowed++; ata_ehi_push_desc(&link->eh_info, "waking up from sleep"); ata_link_abort(link); return;
Signed-off-by: Gwendal Grignou <gwendal@google.com> --- drivers/ata/libata-core.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-)