From: Robert Schuster <theBohemian@gmx.net>
To: Tony Lindgren <tony@atomide.com>
Cc: linux-omap-open-source@linux.omap.com
Subject: Re: Nokia N800 - USB Host mode issues
Date: Wed, 04 Jul 2007 14:52:23 +0200 [thread overview]
Message-ID: <468B9807.90707@gmx.net> (raw)
In-Reply-To: <20070703092628.GA7062@atomide.com>
@Tony: Sorry have to send this again. The list does not like signed mails ..
Hi Tony,
thanks preparing the 2.6.18 backport. I tried those patches and it works
better generally. Throughput seems to be a bit higher now (tested with a
USB Ethernet adapter) and device removal/attachment is solid.
Still I have some problems but I probably need to tell you how I have
modified my N800. The boot process of the N770s detected whether they
should set the USB chip to host or client via a configuration variable
and loaded a bunch of drivers (usbnet, usbserial, pl2303, asix, usbhid
...). What I basically did is porting this behavior to the N800's
linuxrc. So pegasus et al gets loaded when USB host mode is requested
furthermore the musb driver is properly initialized (cat 'host' >
/sys/.../mode).
All connections as host are made with a Mini-B to A cable at whose end a
type A gender changer is connected. I use the same cable without the
gender changer for connections made as client.
So here comes the problems:
1) USB Hostmode is not activated when there was no client-connection
first. That means I have to power on the N800 with the cable connected
to a host. When the OS' desktop is visible I disconnect the cable and
can connect it to the host side of a hub. Everything works fine.
Here is how the contents of 'mode' and 'cable' behave during those
activities:
- N800 boots, echo "host" > ... happens, cable is connected to a host
mode: a_wait_bcon
cable: Mini-B
- cable is unplugged:
mode: a_wait_bcon
cable: Mini-A
- cable is plugged to a hub (as host, of course)
mode: a_host
cable: Mini-A
(the following is just for testing purposes)
- cable is unplugged:
mode: a_wait_bcon
cable: Mini-A
- cable is connected to a host
mode: a_wait_bcon
cable: Mini-A
So cable does not change back to Mini-B. My guess is that there is some
event missing in the driver's state machine that lets it switch to a
'wait for a connection with cable type Mini-A' state.
2) Attaching a USB Keyboard which has two USB 1.1 ports built-in fails.
First case is that I try to connect it directly (without a hub in
between). dmesg gives this:
[ 647.438598] usb 1-1: new full speed USB device using musb_hdrc and
address 8
[ 647.587036] usb 1-1: ep0 maxpacket = 8
[ 647.587829] usb 1-1: default language 0x0409
[ 647.588317] usb 1-1: new device strings: Mfr=1, Product=2, SerialNumber=0
[ 647.588348] usb 1-1: Product: USB Keyboard + 2P Hub
[ 647.588592] usb 1-1: uevent
[ 647.589050] usb 1-1: configuration #1 chosen from 1 choice
[ 647.589508] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[ 647.589660] usb 1-1:1.0: uevent
[ 647.589813] hub 1-1:1.0: usb_probe_interface
[ 647.589843] hub 1-1:1.0: usb_probe_interface - got id
[ 647.589874] hub 1-1:1.0: USB hub found
[ 647.590118] hub 1-1:1.0: 3 ports detected
[ 647.590179] hub 1-1:1.0: compound device; port removable status: FRR
[ 647.590209] hub 1-1:1.0: individual port power switching
[ 647.590240] hub 1-1:1.0: individual port over-current protection
[ 647.590270] hub 1-1:1.0: power on to power good time: 44ms
[ 647.590454] hub 1-1:1.0: hub controller current requirement: 100mA
[ 647.590484] hub 1-1:1.0: 100mA bus power budget for each child
[ 647.590637] hub 1-1:1.0: enabling power on all ports
[ 647.591613] musb_stage0_irq 537: VBUS_ERROR in a_host (91,
<VBusValid), retry #1, port1 00020103
[ 647.786224] musb_stage0_irq 598: CONNECT (a_host) devctl 5d
[ 652.696411] usb 1-1: khubd timed out on ep0in len=0/255
After the timeout the driver tries it over and over again.
If I connect the keyboard through a USB 2.0 hub it shows:
[ 252.340789] usb 1-1.1.1: new full speed USB device using musb_hdrc
and address 7
[ 252.426483] usb 1-1.1.1: device descriptor read/64, error -71
[ 252.621673] usb 1-1.1.1: device descriptor read/64, error -71
[ 252.817535] usb 1-1.1.1: new full speed USB device using musb_hdrc
and address 8
[ 252.903167] usb 1-1.1.1: device descriptor read/64, error -71
[ 253.098937] usb 1-1.1.1: device descriptor read/64, error -71
[ 253.294067] usb 1-1.1.1: new full speed USB device using musb_hdrc
and address 9
[ 253.715484] usb 1-1.1.1: device not accepting address 9, error -71
[ 253.801910] usb 1-1.1.1: new full speed USB device using musb_hdrc
and address 10
[ 254.223297] usb 1-1.1.1: device not accepting address 10, error -71
[ 254.223968] hub 1-1.1:1.0: state 7 ports 3 chg 0000 evt 0002
After that:
[ 267.701049] musb_stage0_irq 621: BUS RESET
[ 267.701110] musb_stage2_irq 695: DISCONNECT (a_peripheral) as
Peripheral, devctl 19
... (all devices disconnecting) ...
[ 267.854461] musb_stage0_irq 537: VBUS_ERROR in a_wait_vfall (98,
VALID), retry #0, port1 00000100
[ 267.854522] tusb_source_power 544: VBUS b_idle, devctl 98 otg 171
conf c0000001 prcm 00a80500
After that I cannot get the driver to enter "a_host" again: Switching to
"peripheral" and connecting as client is ok. But if I try "host" cable
will show "disconnected" when it is really disconnected but also when it
is plugged into the hub (mode contains "a_wait_bcon" all the time).
This was a lot of text. I will try to understand the behavior from the
sources but I hope that someone with better knowledge about the driver
may get a clue faster.
Regards
Robert
Tony Lindgren schrieb:
> Hi,
>
> * Robert Schuster <theBohemian@gmx.net> [070629 09:41]:
>> Hi,
>> I am using the patches available from
>> http://www.muru.com/linux/n800-usb-host/
>>
>> to enable the USB Host mode capability of the N800 device
>>
>> .. and have some questions:
>>
>> I connected an external powered USB Hub to it and tried a few devices.
>>
>> a)
>> First of all: It works fine and I can for instance transmit big amount
>> of data through a USB ethernet device (using the pegasus.ko driver).
>> However it does not seem to like plugging devices of. Because after
>> doing so (in case of the ethernet device I did ifconfig eth0 down first)
>> the host will not accept the device anymore. It also seems to have
>> trouble communicating to the hub at all.
>
> Thanks for the info. Sounds like some of the issues have been
> fixed already.
>
>> b)
>> The host did not accept an USB keyboard of mine which has two built-in
>> USB 1.1 ports (the real HUB is an USB 2.0 one).
>
> Turns out it's because the babble interrupts are fatal for HS
> devices, but must be ignored for LS/FS devices... This is already fixed
> in the linux-omap git tree.
>
>> Has any development happened on the USB Hostdriver for the N800 after
>> the release of the above mentioned patches?
>
> Yes, but the changes have been only in the linux-omap git tree. I've
> just refreshed the N800 usb host patches [1] to be in sync with linux-omap
> tree. Can you please see if these work better for you?
>
>> Is there any interest to debug the problems a) and b) further? If so,
>> what info should I provide?
>
> Yes, musb chips are integrated in 2430 and 3430, and tusb uses this chip
> too. So development is going on, please post any patches you may have
> to this mailing list :)
>
> For the information to provide, knowing what kind of devices don't
> work after updating to the latest series of patches would be nice.
>
> Regards,
>
> Tony
>
> [1] http://www.muru.com/linux/n800-usb-host/
> _______________________________________________
> Linux-omap-open-source mailing list
> Linux-omap-open-source@linux.omap.com
> http://linux.omap.com/mailman/listinfo/linux-omap-open-source
>
next prev parent reply other threads:[~2007-07-04 12:52 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-06-29 16:39 Nokia N800 - USB Host mode issues Robert Schuster
2007-07-03 9:26 ` Tony Lindgren
2007-07-04 0:20 ` robert.vogt
2007-07-11 11:03 ` Tony Lindgren
2007-07-04 12:52 ` Robert Schuster [this message]
2007-07-11 11:14 ` Tony Lindgren
2007-07-11 13:45 ` Felipe Balbi
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=468B9807.90707@gmx.net \
--to=thebohemian@gmx.net \
--cc=linux-omap-open-source@linux.omap.com \
--cc=tony@atomide.com \
/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