public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pat LaVarre <p.lavarre@ieee.org>
To: usb-storage@one-eyed-alien.net
Cc: linux-scsi@vger.kernel.org
Subject: unsolicited sense in 2.6.0-test5 usb-storage.ko
Date: 10 Sep 2003 14:51:08 -0600	[thread overview]
Message-ID: <1063227068.3669.129.camel@patehci2> (raw)
In-Reply-To: <1063217791.3669.43.camel@patehci2>


In linux-2.6.0-test5, I see sg3_utils-1.05/sg_dd plugs 'n play more than
does sgp_dd.

A contributing factor seems to be usb/storage injecting an unsolicited
request sense injected as if it were an auto sense, despite bCSWStatus =
x00 Passed.

Specifically I tried the following, except where you see ^D in my
terminal log I actually pressed Ctrl+D:

$
$ sudo ./sg_dd of=/dev/sg1 bs=2k bpt=512
^D
0+0 records in
0+0 records out
$
$ sudo ./sgp_dd of=/dev/sg1 bs=2k bpt=512
read capacity: Driver_status=0x08 (DRIVER_SENSE,SUGGEST_OK)
Current, Sense key: No Sense
[valid=0] Info fld=0x0, Raw sense data (in hex):
  70 00 00 00 00 00 00 18 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  00 00 00 00 00 00 00 00
Unable to read capacity on /dev/sg1
Couldn't calculate count, please give one
$

CONFIG_USB_STORAGE_DEBUG=y gives contrasting dmesg traces.

For the unhappy sgp_dd we have 8 = Di < Hi = x40 = 64:

> usb-storage: queuecommand called
> usb-storage: *** thread awakened.
> usb-storage: Command READ_CAPACITY (10 bytes)
> usb-storage:  25 00 00 00 00 00 00 00 00 00
> usb-storage: Bulk Command S 0x43425355 T 0x2539c L 64 F 128 Trg 0 LUN 0 CL 10
> usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
> usb-storage: Status code 0; transferred 31/31
> usb-storage: -- transfer complete
> usb-storage: Bulk command transfer result=0
> usb-storage: usb_stor_bulk_transfer_buf: xfer 64 bytes
> usb-storage: Status code 0; transferred 8/64
> usb-storage: -- short transfer
> usb-storage: Bulk data transfer result 0x1
> usb-storage: Attempting to get CSW...
> usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> usb-storage: Status code -32; transferred 0/13
> usb-storage: clearing endpoint halt for pipe 0xc0010280
> usb-storage: usb_stor_control_msg: rq=01 rqtype=02 value=0000 index=82 len=0
> usb-storage: usb_stor_clear_halt: result = 0
> usb-storage: Attempting to get CSW (2nd try)...
> usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> usb-storage: Status code 0; transferred 13/13
> usb-storage: -- transfer complete
> usb-storage: Bulk status result = 0
> usb-storage: Bulk Status S 0x53425355 T 0x2539c R 56 Stat 0x0
> usb-storage: -- unexpectedly short transfer
> usb-storage: Issuing auto-REQUEST_SENSE
> usb-storage: Bulk Command S 0x43425355 T 0x8002539c L 18 F 128 Trg 0 LUN 0 CL 6
> usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
> usb-storage: Status code 0; transferred 31/31
> usb-storage: -- transfer complete
> usb-storage: Bulk command transfer result=0
> usb-storage: usb_stor_bulk_transfer_buf: xfer 18 bytes
> usb-storage: Status code 0; transferred 18/18
> usb-storage: -- transfer complete
> usb-storage: Bulk data transfer result 0x0
> usb-storage: Attempting to get CSW...
> usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> usb-storage: Status code 0; transferred 13/13
> usb-storage: -- transfer complete
> usb-storage: Bulk status result = 0
> usb-storage: Bulk Status S 0x53425355 T 0x8002539c R 0 Stat 0x0
> usb-storage: -- Result from auto-sense is 0
> usb-storage: -- code: 0x70, key: 0x0, ASC: 0x0, ASCQ: 0x0
> usb-storage: (Unknown Key): (unknown ASC/ASCQ)
> usb-storage: scsi cmd done, result=0x0
> usb-storage: *** thread sleeping.

For the happy sg_dd we have Di = Hi = 8:

> usb-storage: queuecommand called
> usb-storage: *** thread awakened.
> usb-storage: Command READ_CAPACITY (10 bytes)
> usb-storage:  25 00 00 00 00 00 00 00 00 00
> usb-storage: Bulk Command S 0x43425355 T 0x2539a L 8 F 128 Trg 0 LUN 0 CL 10
> usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
> usb-storage: Status code 0; transferred 31/31
> usb-storage: -- transfer complete
> usb-storage: Bulk command transfer result=0
> usb-storage: usb_stor_bulk_transfer_buf: xfer 8 bytes
> usb-storage: Status code 0; transferred 8/8
> usb-storage: -- transfer complete
> usb-storage: Bulk data transfer result 0x0
> usb-storage: Attempting to get CSW...
> usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> usb-storage: Status code 0; transferred 13/13
> usb-storage: -- transfer complete
> usb-storage: Bulk status result = 0
> usb-storage: Bulk Status S 0x53425355 T 0x2539a R 0 Stat 0x0
> usb-storage: scsi cmd done, result=0x0
> usb-storage: *** thread sleeping.
> usb-storage: queuecommand called
> usb-storage: *** thread awakened.
> usb-storage: Command WRITE_10 (10 bytes)
> usb-storage:  2a 00 00 00 00 00 00 00 00 00
> usb-storage: Bulk Command S 0x43425355 T 0x2539b L 0 F 0 Trg 0 LUN 0 CL 10
> usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
> usb-storage: Status code 0; transferred 31/31
> usb-storage: -- transfer complete
> usb-storage: Bulk command transfer result=0
> usb-storage: Attempting to get CSW...
> usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
> usb-storage: Status code 0; transferred 13/13
> usb-storage: -- transfer complete
> usb-storage: Bulk status result = 0
> usb-storage: Bulk Status S 0x53425355 T 0x2539b R 0 Stat 0x0
> usb-storage: scsi cmd done, result=0x0
> usb-storage: *** thread sleeping.

Pat LaVarre




  parent reply	other threads:[~2003-09-10 20:50 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <3F5E434D.6080801@unixsol.org>
2003-09-10 16:23 ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Alan Stern
2003-09-10 18:16   ` [usb-storage] " Pat LaVarre
2003-09-10 18:49     ` sg MiB writes scheduling while atomic Pat LaVarre
2003-09-10 19:30       ` Pat LaVarre
2003-09-16  6:35         ` Douglas Gilbert
2003-09-16 11:42           ` Matthew Wilcox
2003-09-16 12:58             ` Christoph Hellwig
2003-10-14 23:36             ` Pat LaVarre
2003-09-10 20:08       ` [PATCH] mount -w of dvd+rw etc. in vanilla 2.6 Pat LaVarre
2003-09-10 22:49         ` Patrick Mansfield
2003-09-22 14:52       ` max GiB written per boot Pat LaVarre
2003-09-10 20:51     ` Pat LaVarre [this message]
2003-09-10 21:03       ` [usb-storage] unsolicited sense in 2.6.0-test5 usb-storage.ko Alan Stern
2003-09-10 21:24         ` Pat LaVarre
2003-09-10 21:52           ` Matthew Dharm
2003-09-10 22:08             ` Pat LaVarre
2003-09-12  0:21               ` Pat LaVarre
2003-09-12  0:29                 ` Pat LaVarre
2003-09-16 11:28             ` Douglas Gilbert
2003-09-11  0:02   ` [linux-usb-devel] [2.6-test] Bug in usb-storage or scsi? Patrick Mansfield
2003-09-11 20:04     ` [usb-storage] " Pat LaVarre
2003-09-11 20:05     ` Alan Stern
2003-09-11 20:19       ` James Bottomley
2003-09-12 21:17         ` Alan Stern
2003-09-11 20:42       ` Pat LaVarre
2003-09-12 19:59         ` Alan Stern
2003-09-12 19:18       ` Pat LaVarre
2003-09-12 18:43     ` Pat LaVarre
2003-09-12 20:56       ` Patrick Mansfield
2003-09-12 21:53         ` Pat LaVarre

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=1063227068.3669.129.camel@patehci2 \
    --to=p.lavarre@ieee.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=usb-storage@one-eyed-alien.net \
    /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