2008-11-03 16:22:48

by Norbert Preining

[permalink] [raw]
Subject: usb device not showing up

Hi all,

(please Cc)

I have the following problem with a disappearing or better not appearing
device: My Sony Vaio VGN-Z11 laptop contains a HSDPA modem:
USB: Bus 004 Device 002: ID 0af0:6911 Option
which is very nicely supported by the hso kernel module (when using the
latest hso patches for the BUG).

Interestingly this device does disappear if I cold boot into linux.

So:
- First booting Vista, then RE-booting (not turning it off in the
meantime) into linux gives me that device and everything works.

- Cold-booting into Linux and the device does not show up.


There were some suggestions I found on the internet that I should echo 1
to /sys/devices/platform/sony-acpi/wwanpower, which I could do and the
value could be read from it again, but it didn't make the USB device
show up.

Is there any way to activate this device other than always going into
Vista first?

Is there a way to save some settings of this device after a reboot (so
in a functional state) and restoring that later on?

I am currently running 2.6.28-rc3 with Mattia Dongili's latest sony-acpi
patches sent to the acpi ML, but had the same problems with -rc2 and
2.6.27, without additional patches.

Please let me know if I can provide further information, I will also
happily hack my kernel to get this device working out of the box.

Thanks a lot and all the best

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
WETWANG (n.)
A moist penis.
--- Douglas Adams, The Meaning of Liff


2008-11-03 19:06:18

by Alan Stern

[permalink] [raw]
Subject: Re: usb device not showing up

On Mon, 3 Nov 2008 [email protected] wrote:

> Hi all,
>
> (please Cc)
>
> I have the following problem with a disappearing or better not appearing
> device: My Sony Vaio VGN-Z11 laptop contains a HSDPA modem:
> USB: Bus 004 Device 002: ID 0af0:6911 Option
> which is very nicely supported by the hso kernel module (when using the
> latest hso patches for the BUG).
>
> Interestingly this device does disappear if I cold boot into linux.
>
> So:
> - First booting Vista, then RE-booting (not turning it off in the
> meantime) into linux gives me that device and everything works.
>
> - Cold-booting into Linux and the device does not show up.

What happens if you leave the modem turned off until after Linux is
running? If it does not show up then a usbmon trace would be helpful
(see Documentation/usb/usbmon.txt for instructions).

Alan Stern

2008-11-04 09:37:30

by Norbert Preining

[permalink] [raw]
Subject: Re: usb device not showing up

Hi Alan,

On Mo, 03 Nov 2008, Alan Stern wrote:
> What happens if you leave the modem turned off until after Linux is
> running? If it does not show up then a usbmon trace would be helpful
> (see Documentation/usb/usbmon.txt for instructions).

I can run usbmon, but I am not sure what you mean with "leave the modem
turned off until after Linux is running".

If I start from turned off state of the laptop and boot into linux the
device is not showing up. Is it that state you are interested in getting
the usbmon output?

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
BARSTIBLEY
A humorous device such as a china horse or small naked porcelain
infant which jocular hosts use of piss water into your Scotch with.
--- Douglas Adams, The Meaning of Liff

2008-11-04 15:24:11

by Alan Stern

[permalink] [raw]
Subject: Re: usb device not showing up

On Tue, 4 Nov 2008, Norbert Preining wrote:

> Hi Alan,
>
> On Mo, 03 Nov 2008, Alan Stern wrote:
> > What happens if you leave the modem turned off until after Linux is
> > running? If it does not show up then a usbmon trace would be helpful
> > (see Documentation/usb/usbmon.txt for instructions).
>
> I can run usbmon, but I am not sure what you mean with "leave the modem
> turned off until after Linux is running".

I must have misunderstood your earlier message, where you wrote:

> Interestingly this device does disappear if I cold boot into linux.
>
> So:
> - First booting Vista, then RE-booting (not turning it off in the
> meantime) into linux gives me that device and everything works.

By "it", did you mean the laptop or the modem?

> If I start from turned off state of the laptop and boot into linux the
> device is not showing up. Is it that state you are interested in getting
> the usbmon output?

No. I'm interested in seeing the usbmon output for when the modem is
first detected by the USB subsystem. During a normal boot this will
happen before you can start usbmon.

If you can't boot with the modem off, then try this instead: Unload
ehci-hcd, uhci-hcd, and ohci-hcd, then start up usbmon (copy the 0u
file) and reload whichever driver the modem attaches to.

Alan Stern

2008-11-04 16:17:22

by Norbert Preining

[permalink] [raw]
Subject: Re: usb device not showing up

On Di, 04 Nov 2008, Alan Stern wrote:
> > - First booting Vista, then RE-booting (not turning it off in the
> > meantime) into linux gives me that device and everything works.
>
> By "it", did you mean the laptop or the modem?

I meant:
- first booting vista, then re-booting ... the device shows up (and is
functional)

- booting from off state the device does not show up and cannot be
switched on using /sys/devices/platform/sony-laptop/wwanpower
(although the behaviour that it can be switched on using the above
sysfs file is documented)

> No. I'm interested in seeing the usbmon output for when the modem is
> first detected by the USB subsystem. During a normal boot this will
> happen before you can start usbmon.
>
> If you can't boot with the modem off, then try this instead: Unload
> ehci-hcd, uhci-hcd, and ohci-hcd, then start up usbmon (copy the 0u
> file) and reload whichever driver the modem attaches to.

Ok, I will recompile my kernel with USB as modules and do the above. Is
there a way to tell the kernel not to load any device drivers/modules
(probably overriding modprobe in some way)?

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
OUNDLE (vb.)
To walk along leaning sideways, with one arm hanging limp and dragging
one leg behind the other. Most commonly used by actors in amateur
production of Richard III, or by people carrying a heavy suitcase in
one hand.
--- Douglas Adams, The Meaning of Liff

2008-11-04 16:36:38

by Alan Stern

[permalink] [raw]
Subject: Re: usb device not showing up

On Tue, 4 Nov 2008, Norbert Preining wrote:

> On Di, 04 Nov 2008, Alan Stern wrote:
> > > - First booting Vista, then RE-booting (not turning it off in the
> > > meantime) into linux gives me that device and everything works.
> >
> > By "it", did you mean the laptop or the modem?
>
> I meant:
> - first booting vista, then re-booting ... the device shows up (and is
> functional)
>
> - booting from off state the device does not show up and cannot be
> switched on using /sys/devices/platform/sony-laptop/wwanpower
> (although the behaviour that it can be switched on using the above
> sysfs file is documented)
>
> > No. I'm interested in seeing the usbmon output for when the modem is
> > first detected by the USB subsystem. During a normal boot this will
> > happen before you can start usbmon.
> >
> > If you can't boot with the modem off, then try this instead: Unload
> > ehci-hcd, uhci-hcd, and ohci-hcd, then start up usbmon (copy the 0u
> > file) and reload whichever driver the modem attaches to.
>
> Ok, I will recompile my kernel with USB as modules and do the above. Is
> there a way to tell the kernel not to load any device drivers/modules
> (probably overriding modprobe in some way)?

You can add entries to /etc/modprobe.d/blacklist. But for temporary
testing, it might be easiest simply to rename the module files
themselves (under /lib/modules/.../kernel/drivers/usb/host) so that the
hotplug system can't find them.

Alan Stern

2008-11-04 21:58:48

by Norbert Preining

[permalink] [raw]
Subject: Re: usb device not showing up

On Di, 04 Nov 2008, Alan Stern wrote:
> > > If you can't boot with the modem off, then try this instead: Unload
> > > ehci-hcd, uhci-hcd, and ohci-hcd, then start up usbmon (copy the 0u
> > > file) and reload whichever driver the modem attaches to.

Ok, here it is. Booted with init=/bin/bash, no modules loaded, mounted
/sys and debugfs, cat u0 > usbmon.txt. Then load uhci-hcd, then load hso
modules.

Finally, kill the cat process.

Output is the attached usmon.txt file.

For completeness, it is
Bus 004 Device 002: ID 0af0:6911 Option
we are talking about, or
T: Bus=04 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0
D: Ver= 1.10 Cls=ff(vend.) Sub=ff Prot=ff MxPS=64 #Cfgs= 1
P: Vendor=0af0 ProdID=6911 Rev= 0.00
S: Manufacturer=Option N.V.
S: Product=Globetrotter HSDPA Modem
S: SerialNumber=Serial Number
C:* #Ifs= 3 Cfg#= 1 Atr=c0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
E: Ad=83(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=03(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=85(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
I:* If#= 1 Alt= 0 #EPs= 2 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
E: Ad=84(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=04(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I:* If#= 2 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=ff Prot=ff Driver=hso
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=128ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms

Thanks for any comments and suggestions.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
EPSOM (n.)
An entry in a diary (such as a date or a set of initials) or a name
and address in your address book, which you haven't the faintest idea
what it's doing there.
--- Douglas Adams, The Meaning of Liff


Attachments:
(No filename) (2.06 kB)
usbmon.txt (23.08 kB)
Download all attachments

2008-11-05 16:13:56

by Alan Stern

[permalink] [raw]
Subject: Re: usb device not showing up

On Tue, 4 Nov 2008, Norbert Preining wrote:

> On Di, 04 Nov 2008, Alan Stern wrote:
> > > > If you can't boot with the modem off, then try this instead: Unload
> > > > ehci-hcd, uhci-hcd, and ohci-hcd, then start up usbmon (copy the 0u
> > > > file) and reload whichever driver the modem attaches to.
>
> Ok, here it is. Booted with init=/bin/bash, no modules loaded, mounted
> /sys and debugfs, cat u0 > usbmon.txt. Then load uhci-hcd, then load hso
> modules.
>
> Finally, kill the cat process.
>
> Output is the attached usmon.txt file.

Well, this is a little odd. The trace shows the modem was detected and
enumerated correctly. But there's nothing corresponding to when you
loaded the hso driver. In fact, there's nothing after uhci-hcd
finished starting up and the unconnected root hubs were suspended.

Did you look in /proc/bus/usb/devices at this point? And what about
the files in /sys/bus/usb/drivers/hso/?

This suggests the problem may lie in the hso driver itself, or in a
failure to bind the driver to the device.

Alan Stern

2008-11-06 15:00:46

by Norbert Preining

[permalink] [raw]
Subject: Re: usb device not showing up

Hi Alan,

On Mi, 05 Nov 2008, Alan Stern wrote:
> Well, this is a little odd. The trace shows the modem was detected and
> enumerated correctly. But there's nothing corresponding to when you
> loaded the hso driver. In fact, there's nothing after uhci-hcd
> finished starting up and the unconnected root hubs were suspended.

Strange. I will redo the thing and see if something changes the second
time. I am quite sure I loaded hsom but of course without udev running
(init=/bin/bash) no devices were created.

> Did you look in /proc/bus/usb/devices at this point? And what about
> the files in /sys/bus/usb/drivers/hso/?

I don't remember, will redo it.

> This suggests the problem may lie in the hso driver itself, or in a
> failure to bind the driver to the device.

Well, the point is that under these circumstances, as I explained,
*there*is*no*problem*, I can use the device without any problems.

Only when I turn of the computer and turn it on again the device simply
does not show up in the usb system.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
ADLESTROP (n.)
That part of a suitcase which is designed to get snarled up on
conveyor belts at airports. Some of the more modern adlestrop designs
have a special 'quick release' feature which enables the case to flip
open at this point and fling your underclothes into the conveyor
belt's gearing mechanism.
--- Douglas Adams, The Meaning of Liff

2008-11-06 15:24:09

by Alan Stern

[permalink] [raw]
Subject: Re: usb device not showing up

On Thu, 6 Nov 2008, Norbert Preining wrote:

> Hi Alan,
>
> On Mi, 05 Nov 2008, Alan Stern wrote:
> > Well, this is a little odd. The trace shows the modem was detected and
> > enumerated correctly. But there's nothing corresponding to when you
> > loaded the hso driver. In fact, there's nothing after uhci-hcd
> > finished starting up and the unconnected root hubs were suspended.
>
> Strange. I will redo the thing and see if something changes the second
> time. I am quite sure I loaded hsom but of course without udev running
> (init=/bin/bash) no devices were created.
>
> > Did you look in /proc/bus/usb/devices at this point? And what about
> > the files in /sys/bus/usb/drivers/hso/?
>
> I don't remember, will redo it.
>
> > This suggests the problem may lie in the hso driver itself, or in a
> > failure to bind the driver to the device.
>
> Well, the point is that under these circumstances, as I explained,
> *there*is*no*problem*, I can use the device without any problems.

Oh. Well, you should rerun the test under circumstances in which there
_is_ a problem.

> Only when I turn of the computer and turn it on again the device simply
> does not show up in the usb system.

Okay, then do the test that way.

Alan Stern

2008-11-06 17:20:19

by Norbert Preining

[permalink] [raw]
Subject: Re: usb device not showing up

On Do, 06 Nov 2008, Alan Stern wrote:
> > Well, the point is that under these circumstances, as I explained,
> > *there*is*no*problem*, I can use the device without any problems.
>
> Oh. Well, you should rerun the test under circumstances in which there
> _is_ a problem.

Here it is. Sequence of events:
- turn off the laptop, physically
- turn it on
- boot in to linux with modular usb and init=/bin/bash
- mount /proc, /sys, /sys/kernel/debug
- modprobe usbmon (file /sys/kernel/debug/usbmon/{0s,0u} are present)
- start some getty to have more terminals, mount / rw

- cat /sys/kernel/debug/usbmon/0u > usbmon-bad.txt
- modprobe uhci-hcd
- modprobe hso

The device does not show up in /proc/bus/usb/devices (mounted before
probing and debugging), only bus 4 hub is there.

/sys/bus/usb/drivers/hso/ shows
bind module new_id uevent unbind

- sync
- cat process

Outcome is the attached usbmon-bad.txt

This is the one where the device does not show up.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
VANCOUVER (n.)
The technical name for one of those huge trucks with whirling brushes
on the bottom used to clean streets.
--- Douglas Adams, The Meaning of Liff


Attachments:
(No filename) (1.51 kB)
usbmon-bad.txt (16.02 kB)
Download all attachments

2008-11-06 19:35:06

by Alan Stern

[permalink] [raw]
Subject: Re: usb device not showing up

On Thu, 6 Nov 2008, Norbert Preining wrote:

> Here it is. Sequence of events:
> - turn off the laptop, physically
> - turn it on
> - boot in to linux with modular usb and init=/bin/bash
> - mount /proc, /sys, /sys/kernel/debug
> - modprobe usbmon (file /sys/kernel/debug/usbmon/{0s,0u} are present)
> - start some getty to have more terminals, mount / rw
>
> - cat /sys/kernel/debug/usbmon/0u > usbmon-bad.txt
> - modprobe uhci-hcd
> - modprobe hso
>
> The device does not show up in /proc/bus/usb/devices (mounted before
> probing and debugging), only bus 4 hub is there.

Okay. In the earlier (working) test, the modem showed up on bus 4, not
bus 2. Not that it matters much -- the modem didn't show up at all in
this test, on any bus. Its USB interface seems to be electrically
disconnected or turned off.

Evidently the system needs to do something to tell the modem that it
should start working, but I have no idea what that would be. It's not
a USB issue; as far as USB is concerned the device just isn't there at
all. Maybe the hso developers will have some idea. Or maybe it's
controlled by a setting in your laptop's BIOS.

> /sys/bus/usb/drivers/hso/ shows
> bind module new_id uevent unbind
>
> - sync
> - cat process
>
> Outcome is the attached usbmon-bad.txt
>
> This is the one where the device does not show up.

Interestingly, this trace appears to be missing some events. There's a
gap between timestamps 4284549076 and 4284645743 (the timestamps are in
the second column) where we should see the initialization of bus 5 and
bus 6. Instead there's a 100-ms delay in which nothing happens,
followed later on by the second initialization phase for those two
buses.

I have to wonder... Did you remove any part of the trace? Did usbmon
malfunction? Did parts of the initialization for those two buses
really get skipped (I can't imagine how)?

Pete, any ideas?

Alan Stern

2008-11-06 22:57:37

by Norbert Preining

[permalink] [raw]
Subject: Re: usb device not showing up

Hi Alan,

On Do, 06 Nov 2008, Alan Stern wrote:
> Okay. In the earlier (working) test, the modem showed up on bus 4, not
> bus 2. Not that it matters much -- the modem didn't show up at all in

Sorry, it is always bus 4, i meant interface (or how do you call it) 2,
bus id 004:002

> this test, on any bus. Its USB interface seems to be electrically
> disconnected or turned off.

Right.

> should start working, but I have no idea what that would be. It's not
> a USB issue; as far as USB is concerned the device just isn't there at

Ok, if it is not an usb issue, I guess I have to hope for some fix in
sony-laptop module.

> Interestingly, this trace appears to be missing some events. There's a
> gap between timestamps 4284549076 and 4284645743 (the timestamps are in
> the second column) where we should see the initialization of bus 5 and
> bus 6. Instead there's a 100-ms delay in which nothing happens,
> followed later on by the second initialization phase for those two
> buses.
>
> I have to wonder... Did you remove any part of the trace? Did usbmon

No. I sent you the output as it was saved on my hard disk. No editing
involved.

> malfunction? Did parts of the initialization for those two buses
> really get skipped (I can't imagine how)?

No idea. I can redo any tests you want, but I can guarantee that I
didn't tinker with the usbmon-bad.txt file itself, it was created with
cat .../0u > usbmon-bad.txt

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <[email protected]> Vienna University of Technology
Debian Developer <[email protected]> Debian TeX Group
gpg DSA: 0x09C5B094 fp: 14DF 2E6C 0307 BE6D AD76 A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
Someone down there
is trying to kill us!'
`Terrific,' said Arthur.
`But don't you see what this means?'
`Yes. We are going to die.'
`Yes, but apart from that.'
`APART from that?'
`It means we must be on to something!'
`How soon can we get off it?'
--- Zaphod and Arthur in a certain death situation over
--- Magrathea.
--- Douglas Adams, The Hitchhikers Guide to the Galaxy

2008-11-07 01:55:33

by Pete Zaitcev

[permalink] [raw]
Subject: Re: usb device not showing up

On Thu, 6 Nov 2008 14:34:53 -0500 (EST), Alan Stern <[email protected]> wrote:

> I have to wonder... Did you remove any part of the trace? Did usbmon
> malfunction? Did parts of the initialization for those two buses
> really get skipped (I can't imagine how)?
>
> Pete, any ideas?

It is possible for usbmon to lose events. There's a counter to
monitor it, in 0s file. I do not commonly run across such problems,
but it can happen. If it's a problem, one can try to bump the limits
way higher, if RAM allows.

-- Pete

2008-11-07 03:27:15

by Alan Stern

[permalink] [raw]
Subject: Re: usb device not showing up

On Thu, 6 Nov 2008, Norbert Preining wrote:

> Hi Alan,
>
> On Do, 06 Nov 2008, Alan Stern wrote:
> > Okay. In the earlier (working) test, the modem showed up on bus 4, not
> > bus 2. Not that it matters much -- the modem didn't show up at all in
>
> Sorry, it is always bus 4, i meant interface (or how do you call it) 2,
> bus id 004:002

Yes, okay. That's bus 4, address 2.

> > should start working, but I have no idea what that would be. It's not
> > a USB issue; as far as USB is concerned the device just isn't there at
>
> Ok, if it is not an usb issue, I guess I have to hope for some fix in
> sony-laptop module.

I hope it works out.

> > Interestingly, this trace appears to be missing some events. There's a
> > gap between timestamps 4284549076 and 4284645743 (the timestamps are in
> > the second column) where we should see the initialization of bus 5 and
> > bus 6. Instead there's a 100-ms delay in which nothing happens,
> > followed later on by the second initialization phase for those two
> > buses.
> >
> > I have to wonder... Did you remove any part of the trace? Did usbmon
>
> No. I sent you the output as it was saved on my hard disk. No editing
> involved.

It must be like Pete said: Some events just got lost because not enough
memory was allocated to usbmon. Fortunately those missing events had
nothing to do with the hso problem.

Alan Stern