From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Josua Dietze <digidietze@draisberghof.de>,
Ben Efros <ben@pc-doctor.com>, fangxiaozhi <huananhu@huawei.com>,
Greg KH <greg@kroah.com>,
Kernel development list <linux-kernel@vger.kernel.org>,
USB list <linux-usb@vger.kernel.org>,
Hugh Blemings <hugh@blemings.org>
Subject: Re: USB serial regression 2.6.31.1 -> 2.6.31.2
Date: Sun, 11 Oct 2009 09:17:01 +1100 [thread overview]
Message-ID: <1255213021.2192.9.camel@pasglop> (raw)
In-Reply-To: <1255209617.3387.9.camel@pasglop>
On Sun, 2009-10-11 at 08:20 +1100, Benjamin Herrenschmidt wrote:
> Yes, that works, you can see the ttyUSBx ports showing up. It looks like
> it may just be the resets coming from usb-storage that are breaking
> things.
Ok so I did a quick hack to usb-storage, basically put the block that
tests for the response size and sets USB_FL_SANE_SENSE into an #if 0 :
(This is 2.6.31.2 since that's what I have a built source at hand
right now)
#if 0
/* If the sense data returned is larger than 18-bytes then we
* assume this device supports requesting more in the future.
* The response code must be 70h through 73h inclusive.
*/
if (srb->sense_buffer[7] > (US_SENSE_SIZE - 8) &&
!(us->fflags & US_FL_SANE_SENSE) &&
(srb->sense_buffer[0] & 0x7C) == 0x70) {
US_DEBUGP("-- SANE_SENSE support enabled\n");
us->fflags |= US_FL_SANE_SENSE;
/* Indicate to the user that we truncated their sense
* because we didn't know it supported larger sense.
*/
US_DEBUGP("-- Sense data truncated to %i from %i\n",
US_SENSE_SIZE,
srb->sense_buffer[7] + 8);
srb->sense_buffer[7] = (US_SENSE_SIZE - 8);
}
#endif
Now, the result in the dmesg log is :
Oct 11 09:04:05 pasglop kernel: [ 52.916100] usb 4-1: new full speed USB device using uhci_hcd and address 2
Oct 11 09:04:05 pasglop kernel: [ 53.076402] usb 4-1: configuration #1 chosen from 1 choice
Oct 11 09:04:06 pasglop kernel: [ 53.104090] Initializing USB Mass Storage driver...
Oct 11 09:04:06 pasglop kernel: [ 53.105405] scsi2 : SCSI emulation for USB Mass Storage devices
Oct 11 09:04:06 pasglop kernel: [ 53.105585] usbcore: registered new interface driver usb-storage
Oct 11 09:04:06 pasglop kernel: [ 53.105589] USB Mass Storage support registered.
Oct 11 09:04:06 pasglop kernel: [ 53.107164] usb-storage: device found at 2
Oct 11 09:04:06 pasglop kernel: [ 53.107167] usb-storage: waiting for device to settle before scanning
Oct 11 09:04:06 pasglop kernel: [ 53.224104] usb 4-1: USB disconnect, address 2
Oct 11 09:04:06 pasglop kernel: [ 53.960100] usb 4-1: new full speed USB device using uhci_hcd and address 3
Oct 11 09:04:11 pasglop kernel: [ 54.121941] usb 4-1: configuration #1 chosen from 1 choice
Oct 11 09:04:11 pasglop kernel: [ 54.140861] scsi6 : SCSI emulation for USB Mass Storage devices
Oct 11 09:04:11 pasglop kernel: [ 54.143007] usb-storage: device found at 3
Oct 11 09:04:11 pasglop kernel: [ 54.143010] usb-storage: waiting for device to settle before scanning
Oct 11 09:04:11 pasglop kernel: [ 59.141422] usb-storage: device scan complete
Oct 11 09:04:11 pasglop kernel: [ 59.144370] scsi 6:0:0:0: CD-ROM HUAWEI Mass Storage 2.31 PQ: 0 ANSI: 2
Oct 11 09:04:11 pasglop kernel: [ 59.147379] scsi 6:0:0:1: Direct-Access HUAWEI SD Storage 2.31 PQ: 0 ANSI: 2
Oct 11 09:04:11 pasglop kernel: [ 59.169383] sr1: scsi-1 drive
At which point nothing happens for a while (and no serial stuff shows up).
If I yank the device, I then see:
Oct 11 09:05:28 pasglop kernel: [ 59.169494] sr 6:0:0:0: Attached scsi CD-ROM sr1
Oct 11 09:05:28 pasglop kernel: [ 59.169563] sr 6:0:0:0: Attached scsi generic sg2 type 5
Oct 11 09:05:28 pasglop kernel: [ 59.169668] sd 6:0:0:1: Attached scsi generic sg3 type 0
Oct 11 09:05:28 pasglop kernel: [ 59.227809] sd 6:0:0:1: [sdb] Attached SCSI removable disk
Oct 11 09:05:28 pasglop kernel: [ 71.048322] ISO 9660 Extensions: Microsoft Joliet Level 1
Oct 11 09:05:28 pasglop kernel: [ 71.057316] ISOFS: changing to secondary root
Oct 11 09:05:28 pasglop kernel: [ 128.369159] usb 4-1: USB disconnect, address 3
Oct 11 09:05:28 pasglop kernel: [ 128.429675] scsi 6:0:0:0: rejecting I/O to dead device
However, if I put it back in later on ... it works. The storage shows up
and the modem too.
Weird. I'll have to reboot to try to reproduce with usbmon logging.
Cheers,
Ben.
next prev parent reply other threads:[~2009-10-10 22:18 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-10 0:25 USB serial regression 2.6.31.1 -> 2.6.31.2 Benjamin Herrenschmidt
2009-10-10 0:31 ` USB serial regression 2.6.31.1 -> 2.6.31.2 (and 2.6.32-rc3) Benjamin Herrenschmidt
2009-10-10 0:32 ` Benjamin Herrenschmidt
2009-10-10 1:56 ` Alan Stern
2009-10-10 2:03 ` Alan Stern
2009-10-10 2:48 ` Benjamin Herrenschmidt
2009-10-10 3:11 ` Benjamin Herrenschmidt
2009-10-10 16:20 ` Alan Stern
2009-10-10 2:45 ` Benjamin Herrenschmidt
2009-10-10 7:38 ` USB serial regression 2.6.31.1 -> 2.6.31.2 Josua Dietze
2009-10-10 7:41 ` Benjamin Herrenschmidt
2009-10-10 9:55 ` Oliver Neukum
2009-10-10 15:05 ` Greg KH
2009-10-10 17:05 ` Alan Stern
2009-10-10 17:43 ` Ondrej Zary
2009-10-10 20:41 ` Alan Stern
2009-10-10 21:20 ` Benjamin Herrenschmidt
2009-10-10 22:17 ` Benjamin Herrenschmidt [this message]
2009-10-11 14:45 ` Alan Stern
2009-10-10 21:18 ` Benjamin Herrenschmidt
2009-10-10 21:56 ` Benjamin Herrenschmidt
2009-10-10 22:52 ` Alan Stern
2009-10-10 23:26 ` Benjamin Herrenschmidt
2009-10-10 23:47 ` Benjamin Herrenschmidt
[not found] <11818577.563251255220394815.JavaMail.root@mail.pc-doctor.com>
2009-10-11 0:21 ` Ben Efros
2009-10-11 5:24 ` Benjamin Herrenschmidt
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=1255213021.2192.9.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=ben@pc-doctor.com \
--cc=digidietze@draisberghof.de \
--cc=greg@kroah.com \
--cc=huananhu@huawei.com \
--cc=hugh@blemings.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox