Ugh, I'm stupid.  I sent the last two emails to linux-usb-owner by mistake
(that's what I get for blindly copy-n-pasting from Alan's email's headers).  So
here's my last mail again:

Start weitergeleitete Nachricht:

Datum: Mon, 23 Mar 2015 11:13:25 +0100
Von: Marc Joliet <mar...@gmx.de>
An: linux-usb-ow...@vger.kernel.org
Cc: st...@rowland.harvard.edu
Betreff: Re: External USB3 HDD: logical sector size incorrectly detected on
first connect


(CC-ing Alan this time because my original message still hasn't shown up on the
list.)

Am Mon, 23 Mar 2015 09:45:07 +0100
schrieb Marc Joliet <mar...@gmx.de>:

> Am Sun, 22 Mar 2015 15:55:21 -0400 (EDT)
> schrieb Alan Stern <st...@rowland.harvard.edu>:
> 
> [...]
> > It does not sound like a driver problem.
> >
> > Please capture a couple of usbmon traces showing what happens during a 
> > connect when the wrong sector size is detected and a connect when the 
> > right sector size is detected.  You can post the traces here (if there 
> > is a lot of repetitious stuff after the beginning, you can trim it out) 
> > or post them somewhere for people to see.
> 
> I'm still in the process of doing this, it turns out it's not so easy:
> 
> - If I try to run usbmon as early as possible (as a systemd unit, but maybe
>   there's a better way?) to catch the drive when the wrong sector size is
>   detected, I have a lot of stuff to trim from the logs, such as keyboard 
> input
>   and mouse movement (which I'm doing now).  Do the logs give information 
> about
>   which keys are pressed?

Looks like I can answer my own question: yes, at least each key is easily
differentiated by what is IIUC its data stream.

> - If I leave the drive unplugged during boot and plug it in without manually
>   loading any modules, nothing happens.  That is, the kernel does not log
>   anything about the device being attached, and neither the uas nor the
>   usb-storage modules are loaded (I did see something happen with usbmon, but 
> I
>   accidentally clobbered the file, so I'll have to recapture that).

Here it is, the entirety of what usbmon captures in this case:

d24a0240 0.209658 C Ii:2:003:3 0:2 15 =
    20010100 00000000 00000000 000000
       . . .  . . . .  . . . .  . . .
d24a0240 0.209727 S Ii:2:003:3 -:2 32 <
b752f480 7.241479 S Ci:3:001:0 s a3 00 0000 0001 0004 4 <
b752f480 7.241507 C Ci:3:001:0 0 4 =
    00010000
b752f480 7.241516 S Ci:3:001:0 s a3 00 0000 0002 0004 4 <
b752f480 7.241525 C Ci:3:001:0 0 4 =
    00010100
b752f480 7.241532 S Co:3:001:0 s 23 01 0010 0002 0000 0
b752f480 7.241543 C Co:3:001:0 0 0
dd776540 7.341741 S Ii:3:001:1 -:2048 4 <
dd776540 7.341768 C Ii:3:001:1 -2:2048 0

I also forgot to mention: unplugging the drive and plugging it back in works as
in the original problem description.  So again: the first connect fails to do
anything, but the second works.

> - Same as above, but this time I load the uas module before plugging in the
>   drive (I could have used usb-storage, but didn't out of mental habit).  This
>   time the sector size is detected correctly.  There are almost 16000 lines of
>   usbmon output from this, which is... a lot to look through for stuff to 
> trim.
> 
> So in summary, I'm confused.  Why would the drive work correctly when I plug 
> it
> in after the fact, but not when it is plugged in before the system boots?
> 
> Greetings

-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup


-- 
Marc Joliet
--
"People who think they know everything really annoy those of us who know we
don't" - Bjarne Stroustrup

Attachment: pgpb8qJZh39TS.pgp
Description: Digitale Signatur von OpenPGP

Reply via email to