All of lore.kernel.org
 help / color / mirror / Atom feed
From: Darsen <darsen@micro.ee.nthu.edu.tw>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Eero Volotinen <eero@ping-viini.org>,
	Adriaan Penning <a.penning@luon.net>,
	Andries Brouwer <aebr@win.tue.nl>,
	Luben Tuikov <luben_tuikov@adaptec.com>,
	SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: Handling erroneous READ CAPACITY response in sd.c
Date: Fri, 29 Oct 2004 22:22:03 +0800	[thread overview]
Message-ID: <4182520B.3060701@micro.ee.nthu.edu.tw> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0410271507560.783-100000@ida.rowland.org>

I tested the patch on 2.6.9 and everything works fine.
There are some error messages, but I believe they already existed before 
the patch was applied :)

-------------<dmsg part 1>-----------

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 0x12f R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
sda : odd number of sectors reported, decreasing by one.
SCSI device sda: 251904 512-byte hdwr sectors (129 MB)
sda: assuming Write Enabled
sda: assuming drive cache: write through
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)

---------------<dmsg part 2>--------------

Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0
Attached scsi generic sg0 at scsi1, channel 0, id 0, lun 0, type 0
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad LUN (0:1)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (1:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (2:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (3:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (4:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (5:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (6:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Bad target number (7:0)
usb-storage: scsi cmd done, result=0x40000
usb-storage: *** thread sleeping.
USB Mass Storage device found at 4

(end of log)

Alan Stern wrote:

>On Wed, 27 Oct 2004, Darsen wrote:
>
>  
>
>>I applied this patch but failed in many places.
>>neither kernel 2.6.8.1 nor 2.6.9 works.
>>
>>Could you tell me what version it should be applied on?
>>
>>Thanks
>>    
>>
>
>Sorry, that patch was meant for 2.6.10-rc1 (and a development version, not 
>the standard version at that).  Below is the equivalent patch for vanilla 
>2.6.9.  Thanks for testing it.
>
>Alan Stern
>
>
>
>diff -ur linux-2.6.9/drivers/scsi/sd.c linux-2.6.9-new/drivers/scsi/sd.c
>--- linux-2.6.9/drivers/scsi/sd.c	2004-10-27 14:55:30.000000000 -0400
>+++ linux-2.6.9-new/drivers/scsi/sd.c	2004-10-27 14:57:17.000000000 -0400
>@@ -1129,6 +1129,16 @@
> 		 */
> 		sdkp->capacity = 0;
> 	}
>+
>+	/* Handle broken devices that return the total number of sectors
>  
>


  reply	other threads:[~2004-10-29 14:26 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <417F6412.90000@micro.ee.nthu.edu.tw>
2004-10-27 19:11 ` Handling erroneous READ CAPACITY response in sd.c Alan Stern
2004-10-29 14:22   ` Darsen [this message]
2004-10-29 16:46     ` Alan Stern
     [not found] <417AFDA5.5080806@micro.ee.nthu.edu.tw>
2004-10-24 17:11 ` Alan Stern
2004-10-25 21:54   ` Darsen
2004-10-26 14:43     ` Alan Stern
2004-10-15 19:19 Alan Stern
2004-10-19 20:58 ` Luben Tuikov
2004-10-19 21:52   ` Alan Stern
2004-10-20 12:40     ` Luben Tuikov
2004-10-20 15:48       ` Alan Stern
2004-10-24 12:34         ` Eero Volotinen
2004-10-25 19:41           ` Alan Stern
2004-10-25 20:27             ` Luben Tuikov
2004-10-25 20:08           ` Luben Tuikov
     [not found]             ` <417D6123.4060902@ping-viini.org>
2004-10-25 20:55               ` Luben Tuikov
2004-11-05 16:18       ` Alan Stern
2004-11-05 18:06         ` Matthew Dharm
2004-11-05 18:34           ` Alan Stern
2004-11-08 18:55         ` Luben Tuikov
2004-11-08 21:03           ` Alan Stern
2004-11-08 21:35             ` Luben Tuikov
2004-11-08 22:04             ` Matthew Dharm
2004-11-08 22:08               ` Alan Stern
2004-10-20 13:28     ` Luben Tuikov

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=4182520B.3060701@micro.ee.nthu.edu.tw \
    --to=darsen@micro.ee.nthu.edu.tw \
    --cc=a.penning@luon.net \
    --cc=aebr@win.tue.nl \
    --cc=eero@ping-viini.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=luben_tuikov@adaptec.com \
    --cc=stern@rowland.harvard.edu \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.