Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=e027bd36c146582cef382364e5c826db93d4427b
Commit:     e027bd36c146582cef382364e5c826db93d4427b
Parent:     f90f0828e57e97cb1ff19520d252882cfc6fb3c0
Author:     Tejun Heo <[EMAIL PROTECTED]>
AuthorDate: Fri Oct 26 16:19:26 2007 +0900
Committer:  Jeff Garzik <[EMAIL PROTECTED]>
CommitDate: Tue Oct 30 09:59:43 2007 -0400

    libata: implement and use ATA_QCFLAG_QUIET
    
    Implement ATA_QCFLAG_QUIET which indicates that there's no need to
    report if the command fails with AC_ERR_DEV and set it for passthrough
    commands.
    
    Combined with previous changes, this now makes device errors for all
    direct commands reported directly to the issuer without going through
    EH actions and reporting.
    
    Note that EH is still invoked after non-IO device errors to determine
    the nature of the error and resume command execution (some controller
    requires special care after error to continue).  It just performs
    default maintenance after error, examines what's going on, realizes
    that it's none of its business and reports the command failure without
    logging any error messages.
    
    Signed-off-by: Tejun Heo <[EMAIL PROTECTED]>
    Signed-off-by: Jeff Garzik <[EMAIL PROTECTED]>
---
 drivers/ata/libata-eh.c   |    4 +++-
 drivers/ata/libata-scsi.c |    4 ++--
 include/linux/libata.h    |    1 +
 3 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index 3c6ad7d..8d64f8f 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1878,7 +1878,9 @@ static void ata_eh_link_report(struct ata_link *link)
        for (tag = 0; tag < ATA_MAX_QUEUE; tag++) {
                struct ata_queued_cmd *qc = __ata_qc_from_tag(ap, tag);
 
-               if (!(qc->flags & ATA_QCFLAG_FAILED) || qc->dev->link != link)
+               if (!(qc->flags & ATA_QCFLAG_FAILED) || qc->dev->link != link ||
+                   ((qc->flags & ATA_QCFLAG_QUIET) &&
+                    qc->err_mask == AC_ERR_DEV))
                        continue;
                if (qc->flags & ATA_QCFLAG_SENSE_VALID && !qc->err_mask)
                        continue;
diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c
index 6ef5ecb..fc89590 100644
--- a/drivers/ata/libata-scsi.c
+++ b/drivers/ata/libata-scsi.c
@@ -2767,8 +2767,8 @@ static unsigned int ata_scsi_pass_thru(struct 
ata_queued_cmd *qc)
         */
        qc->nbytes = scsi_bufflen(scmd);
 
-       /* request result TF */
-       qc->flags |= ATA_QCFLAG_RESULT_TF;
+       /* request result TF and be quiet about device error */
+       qc->flags |= ATA_QCFLAG_RESULT_TF | ATA_QCFLAG_QUIET;
 
        return 0;
 
diff --git a/include/linux/libata.h b/include/linux/libata.h
index 147ccc4..1e27785 100644
--- a/include/linux/libata.h
+++ b/include/linux/libata.h
@@ -221,6 +221,7 @@ enum {
        ATA_QCFLAG_IO           = (1 << 3), /* standard IO command */
        ATA_QCFLAG_RESULT_TF    = (1 << 4), /* result TF requested */
        ATA_QCFLAG_CLEAR_EXCL   = (1 << 5), /* clear excl_link on completion */
+       ATA_QCFLAG_QUIET        = (1 << 6), /* don't report device error */
 
        ATA_QCFLAG_FAILED       = (1 << 16), /* cmd failed and is owned by EH */
        ATA_QCFLAG_SENSE_VALID  = (1 << 17), /* sense data valid */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to