From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Schuster Subject: Re: Nokia N800 - USB Host mode issues Date: Wed, 04 Jul 2007 14:52:23 +0200 Message-ID: <468B9807.90707@gmx.net> References: <468535CE.5070401@gmx.net> <20070703092628.GA7062@atomide.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20070703092628.GA7062@atomide.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: linux-omap-open-source-bounces@linux.omap.com Errors-To: linux-omap-open-source-bounces@linux.omap.com To: Tony Lindgren Cc: linux-omap-open-source@linux.omap.com List-Id: linux-omap@vger.kernel.org @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, Hi, > > * Robert Schuster [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 >