From: "Cédric Godin" <cedric@belbone.be>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
SCSI Kernel <linux-scsi@vger.kernel.org>
Subject: Re: [SCSI] can't plug Nokia 5300 anymore (bisected)
Date: Mon, 28 Jul 2008 22:19:41 +0200 [thread overview]
Message-ID: <488E29DD.4050303@belbone.be> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0807281054060.2296-100000@iolanthe.rowland.org>
Alan Stern wrote:
> On Mon, 28 Jul 2008, Cédric Godin wrote:
>
>
>>>>>> Hello,
>>>>>>
>>>>>> since 2 or 3 -git kernels (Linus tree) I have a problem with my laptop
>>>>>> and its connection through USB to a nokia 5300 gsm.
>>>>>>
>>>>>> The logs show me a endless loop (until i unplug my USB cable) of
>>>>>> following messages :
>>>>>>
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>>
>>>>>> I bisected the kernel and found the following commit as result :
>>>>>>
>>>>>> 427e59f09fdba387547106de7bab980b7fff77be is first bad commit
>>>>>> commit 427e59f09fdba387547106de7bab980b7fff77be
>>>>>> Author: James Bottomley <James.Bottomley@HansenPartnership.com>
>>>>>> Date: Sat Mar 8 18:24:17 2008 -0600
>>>>>>
>>>>>> [SCSI] make use of the residue value
>>>>>>
>>>>>> USB sometimes doesn't return an error but instead returns a residue
>>>>>> value indicating part (or all) of the command wasn't completed. So if
>>>>>> the driver _done() error processing indicates the command was fully
>>>>>> processed, subtract off the residue so that this USB error gets
>>>>>> propagated.
>>>>>>
>
>
>> That's me sending the wrong dmesg, sorry :-$
>>
>> Attached is the "good" one.
>>
>>
>>> see only one error, and the commit you found wouldn't have affected
>>> that error. More accurately, if the commit magnified the error into an
>>> endless loop, then without the commit the error would still have been
>>> present and would have caused data corruption.
>>>
>>> Anyway, it would be interesting to see what happens with the commit in
>>> place and the following patch applied. (The first part of the patch
>>> has already been accepted by James.)
>>>
>>>
>> Same problem.
>>
>
> Okay. The problem is one we've seen many times in the past: The device
> reports that it contains one sector more than it really does contain.
> When the system tries to access the non-existent "last" sector, all
> sorts of problems occur. In your case the device returned no data,
> together with an indication that a problem existed (Check Condition
> status) and no indication of what the problem actually was (no Sense
> data).
>
> The patch below should fix the problem.
>
> Alan Stern
>
>
>
> Index: usb-2.6/drivers/usb/storage/unusual_devs.h
> ===================================================================
> --- usb-2.6.orig/drivers/usb/storage/unusual_devs.h
> +++ usb-2.6/drivers/usb/storage/unusual_devs.h
> @@ -225,6 +225,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x
> US_SC_DEVICE, US_PR_DEVICE, NULL,
> US_FL_MAX_SECTORS_64 ),
>
> +/* Reported by Cedric Godin <cedric@belbone.be> */
> +UNUSUAL_DEV( 0x0421, 0x04b9, 0x0551, 0x0551,
> + "Nokia",
> + "5300",
> + US_SC_DEVICE, US_PR_DEVICE, NULL,
> + US_FL_FIX_CAPACITY ),
> +
> /* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
> UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210,
> "SMSC",
>
>
it works, thanks !
Tested-by: Cedric Godin <cedric@belbone.be>
--
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
WARNING: multiple messages have this Message-ID (diff)
From: "Cédric Godin" <cedric@belbone.be>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: James Bottomley <James.Bottomley@HansenPartnership.com>,
Linux Kernel <linux-kernel@vger.kernel.org>,
SCSI Kernel <linux-scsi@vger.kernel.org>
Subject: Re: [SCSI] can't plug Nokia 5300 anymore (bisected)
Date: Mon, 28 Jul 2008 22:19:41 +0200 [thread overview]
Message-ID: <488E29DD.4050303@belbone.be> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0807281054060.2296-100000@iolanthe.rowland.org>
Alan Stern wrote:
> On Mon, 28 Jul 2008, Cédric Godin wrote:
>
>
>>>>>> Hello,
>>>>>>
>>>>>> since 2 or 3 -git kernels (Linus tree) I have a problem with my laptop
>>>>>> and its connection through USB to a nokia 5300 gsm.
>>>>>>
>>>>>> The logs show me a endless loop (until i unplug my USB cable) of
>>>>>> following messages :
>>>>>>
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] ASC=0x0 ASCQ=0x0
>>>>>> Jul 25 15:19:14 enea sd 2:0:0:0: [sdb] Sense Key : 0x0 [current]
>>>>>>
>>>>>> I bisected the kernel and found the following commit as result :
>>>>>>
>>>>>> 427e59f09fdba387547106de7bab980b7fff77be is first bad commit
>>>>>> commit 427e59f09fdba387547106de7bab980b7fff77be
>>>>>> Author: James Bottomley <James.Bottomley@HansenPartnership.com>
>>>>>> Date: Sat Mar 8 18:24:17 2008 -0600
>>>>>>
>>>>>> [SCSI] make use of the residue value
>>>>>>
>>>>>> USB sometimes doesn't return an error but instead returns a residue
>>>>>> value indicating part (or all) of the command wasn't completed. So if
>>>>>> the driver _done() error processing indicates the command was fully
>>>>>> processed, subtract off the residue so that this USB error gets
>>>>>> propagated.
>>>>>>
>
>
>> That's me sending the wrong dmesg, sorry :-$
>>
>> Attached is the "good" one.
>>
>>
>>> see only one error, and the commit you found wouldn't have affected
>>> that error. More accurately, if the commit magnified the error into an
>>> endless loop, then without the commit the error would still have been
>>> present and would have caused data corruption.
>>>
>>> Anyway, it would be interesting to see what happens with the commit in
>>> place and the following patch applied. (The first part of the patch
>>> has already been accepted by James.)
>>>
>>>
>> Same problem.
>>
>
> Okay. The problem is one we've seen many times in the past: The device
> reports that it contains one sector more than it really does contain.
> When the system tries to access the non-existent "last" sector, all
> sorts of problems occur. In your case the device returned no data,
> together with an indication that a problem existed (Check Condition
> status) and no indication of what the problem actually was (no Sense
> data).
>
> The patch below should fix the problem.
>
> Alan Stern
>
>
>
> Index: usb-2.6/drivers/usb/storage/unusual_devs.h
> ===================================================================
> --- usb-2.6.orig/drivers/usb/storage/unusual_devs.h
> +++ usb-2.6/drivers/usb/storage/unusual_devs.h
> @@ -225,6 +225,13 @@ UNUSUAL_DEV( 0x0421, 0x0495, 0x0370, 0x
> US_SC_DEVICE, US_PR_DEVICE, NULL,
> US_FL_MAX_SECTORS_64 ),
>
> +/* Reported by Cedric Godin <cedric@belbone.be> */
> +UNUSUAL_DEV( 0x0421, 0x04b9, 0x0551, 0x0551,
> + "Nokia",
> + "5300",
> + US_SC_DEVICE, US_PR_DEVICE, NULL,
> + US_FL_FIX_CAPACITY ),
> +
> /* Reported by Olaf Hering <olh@suse.de> from novell bug #105878 */
> UNUSUAL_DEV( 0x0424, 0x0fdc, 0x0210, 0x0210,
> "SMSC",
>
>
it works, thanks !
Tested-by: Cedric Godin <cedric@belbone.be>
next prev parent reply other threads:[~2008-07-28 20:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-25 20:41 [SCSI] can't plug Nokia 5300 anymore (bisected) Cédric Godin
2008-07-26 3:43 ` Alan Stern
2008-07-26 3:43 ` Alan Stern
2008-07-26 9:34 ` Cédric Godin
2008-07-26 22:46 ` Alan Stern
2008-07-26 22:46 ` Alan Stern
2008-07-28 8:29 ` Cédric Godin
2008-07-28 15:19 ` Alan Stern
2008-07-28 20:19 ` Cédric Godin [this message]
2008-07-28 20:19 ` Cédric Godin
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=488E29DD.4050303@belbone.be \
--to=cedric@belbone.be \
--cc=James.Bottomley@HansenPartnership.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--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.