linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* How can I compile and install that patched libata-eh.c file?
@ 2012-05-05 18:48 Servet Portakal
  0 siblings, 0 replies; only message in thread
From: Servet Portakal @ 2012-05-05 18:48 UTC (permalink / raw)
  To: linux-kernel

Hello ,

I received a patched file ( /drivers/ata/libata-eh.c ) from a
developer. and now I have to compile and install it. But I'm not an
expert user really. Can anybody explain it simply ?

Note: I'm not subscribed to the list.

Thanks.

patch...

diff --git a/drivers/ata/libata-eh.c b/drivers/ata/libata-eh.c
index c61316e..a92da34 100644
--- a/drivers/ata/libata-eh.c
+++ b/drivers/ata/libata-eh.c
@@ -1279,6 +1279,7 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
       __ata_eh_qc_complete(qc);
 }

+static const char *ata_err_string(unsigned int err_mask);
 /**
 *     ata_eh_qc_retry - Tell midlayer to retry an ATA command after EH
 *     @qc: Command to retry
@@ -1293,6 +1294,40 @@ void ata_eh_qc_complete(struct ata_queued_cmd *qc)
 void ata_eh_qc_retry(struct ata_queued_cmd *qc)
 {
       struct scsi_cmnd *scmd = qc->scsicmd;
+       static int cnt;
+
+       if (cnt < 32) {
+               struct ata_taskfile *cmd = &qc->tf, *res = &qc->result_tf;
+               const u8 *cdb = qc->cdb;
+               char cdb_buf[70] = "";
+
+               snprintf(cdb_buf, sizeof(cdb_buf),
+                        "cdb %02x %02x %02x %02x %02x %02x %02x %02x  "
+                        "%02x %02x %02x %02x %02x %02x %02x %02x\n         ",
+                        cdb[0], cdb[1], cdb[2], cdb[3],
+                        cdb[4], cdb[5], cdb[6], cdb[7],
+                        cdb[8], cdb[9], cdb[10], cdb[11],
+                        cdb[12], cdb[13], cdb[14], cdb[15]);
+               ata_dev_err(qc->dev, "XXX ata_eh_qc_retry:
scmd->retries=%d\n         "
+                           "cmd
%02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x "
+                           "tag %d%s\n         "
+                           "res
%02x/%02x:%02x:%02x:%02x:%02x/%02x:%02x:%02x:%02x:%02x/%02x "
+                           "Emask 0x%x (%s)%s\n",
+                           scmd->retries,
+                           cmd->command, cmd->feature, cmd->nsect,
+                           cmd->lbal, cmd->lbam, cmd->lbah,
+                           cmd->hob_feature, cmd->hob_nsect,
+                           cmd->hob_lbal, cmd->hob_lbam, cmd->hob_lbah,
+                           cmd->device, qc->tag, cdb_buf,
+                           res->command, res->feature, res->nsect,
+                           res->lbal, res->lbam, res->lbah,
+                           res->hob_feature, res->hob_nsect,
+                           res->hob_lbal, res->hob_lbam, res->hob_lbah,
+                           res->device, qc->err_mask,
ata_err_string(qc->err_mask),
+                           qc->err_mask & AC_ERR_NCQ ? " <F>" : "");
+               cnt++;
+       }
+
       if (!qc->err_mask && scmd->retries)
               scmd->retries--;
       __ata_eh_qc_complete(qc);

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-05-05 18:49 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-05 18:48 How can I compile and install that patched libata-eh.c file? Servet Portakal

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).