public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@SteelEye.com>
To: "Gustavo Guillermo Pérez" <gustavo@compunauta.com>
Cc: Andrew Morton <akpm@osdl.org>, linux-scsi@vger.kernel.org
Subject: Re: SCSI trow USB-STORAGE or SBP2 Debug for buggy device Kernels 2.6.X
Date: Mon, 24 Apr 2006 13:38:08 -0500	[thread overview]
Message-ID: <1145903888.3528.21.camel@mulgrave.il.steeleye.com> (raw)
In-Reply-To: <200604241029.14932.gustavo@compunauta.com>

On Mon, 2006-04-24 at 10:29 -0500, Gustavo Guillermo Pérez wrote:
> Then I have an Idea, what happen if on scsi_lib.c where resides the faulty 
> code:
> if (!(req->flags & REQ_QUIET))
>               dev_printk(KERN_INFO,
>               &cmd->device->sdev_gendev,
>               "Device not ready.\n");
>               scsi_end_request(cmd, 0, this_count, 1);
>               return;
> I change scsi_end_request(cmd, 0, this_count, 1);
> by a comparison about vendor ID and Model
> and then if is a buggy one executes scsi_requeue_command(q, cmd); instead of 
> scsi_end_request(cmd, 0, this_count, 1);

Let's actually debug the problem before trying to fix it.  It would be
helpful to know what type of not-ready this is (and whether it's
internally generated in usb or firewire, but that comes later).

Try this addition and see what it tells us.

James

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 7b0f9a3..cd9df1b 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -1074,9 +1074,12 @@ void scsi_io_completion(struct scsi_cmnd
 				scsi_requeue_command(q, cmd);
 				return;
 			}
-			if (!(req->flags & REQ_QUIET))
+			if (!(req->flags & REQ_QUIET)) {
 				scmd_printk(KERN_INFO, cmd,
-					   "Device not ready.\n");
+					   "Device not ready: ");
+				scsi_print_sense_hdr("", &sshdr);
+			}
+				
 			scsi_end_request(cmd, 0, this_count, 1);
 			return;
 		case VOLUME_OVERFLOW:


-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2006-04-24 18:38 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-04-24 15:29 SCSI trow USB-STORAGE or SBP2 Debug for buggy device Kernels 2.6.X Gustavo Guillermo Pérez
2006-04-24 18:38 ` James Bottomley [this message]
2006-04-24 21:30   ` Gustavo Guillermo Pérez
2006-04-24 22:02     ` James Bottomley
2006-04-24 22:12       ` Gustavo Guillermo Pérez
2006-04-25  6:09         ` Stefan Richter
2006-04-25 21:41           ` Gustavo Guillermo Pérez
2006-04-25 21:48             ` James Bottomley
2006-04-27 17:40               ` Gustavo Guillermo Pérez

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1145903888.3528.21.camel@mulgrave.il.steeleye.com \
    --to=james.bottomley@steeleye.com \
    --cc=akpm@osdl.org \
    --cc=gustavo@compunauta.com \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox