From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1OJYn0-0005rM-NT for mharc-grub-devel@gnu.org; Tue, 01 Jun 2010 17:14:22 -0400 Received: from [140.186.70.92] (port=57010 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OJYmw-0005nx-SZ for grub-devel@gnu.org; Tue, 01 Jun 2010 17:14:19 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OJYmv-0007pG-PN for grub-devel@gnu.org; Tue, 01 Jun 2010 17:14:18 -0400 Received: from smtp-out4.iol.cz ([194.228.2.92]:44644) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OJYmv-0007ou-FO for grub-devel@gnu.org; Tue, 01 Jun 2010 17:14:17 -0400 Received: from antivir6.iol.cz (unknown [192.168.30.215]) by smtp-out4.iol.cz (Postfix) with ESMTP id 900D2CE4442 for ; Tue, 1 Jun 2010 21:14:15 +0000 (UTC) Received: from localhost (antivir6.iol.cz [127.0.0.1]) by antivir6.iol.cz (Postfix) with ESMTP id 7CA5A720057 for ; Tue, 1 Jun 2010 23:14:15 +0200 (CEST) X-Virus-Scanned: amavisd-new at iol.cz Received: from antivir6.iol.cz ([127.0.0.1]) by localhost (antivir6.iol.cz [127.0.0.1]) (amavisd-new, port 10224) with LMTP id 7nnIebjsma4C for ; Tue, 1 Jun 2010 23:14:15 +0200 (CEST) Received: from port1.iol.cz (unknown [192.168.30.91]) by antivir6.iol.cz (Postfix) with ESMTP id 4BD4F720055 for ; Tue, 1 Jun 2010 23:14:15 +0200 (CEST) X-SBRS: None X-SBRS-none: None X-RECVLIST: MTA-OUT-IOL X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvMBAMcUBUxVRnXk/2dsb2JhbAAHgxKBAcwxkRCBJoMFawQ Received: from 228.117.broadband3.iol.cz (HELO [192.168.6.160]) ([85.70.117.228]) by port1.iol.cz with ESMTP; 01 Jun 2010 23:14:14 +0200 From: =?UTF-8?Q?Ale=C5=A1?= Nesrsta To: The development of GNU GRUB In-Reply-To: <4C0451C4.90409@gmail.com> References: <1268605383.2839.26.camel@homenes1> <4BB657BB.60801@gmail.com> <1270669741.2732.129.camel@homenes1> <4BBCED68.3080900@gmail.com> <1270762038.2730.37.camel@homenes1> <4BC892C3.3090507@gmail.com> <1271794445.4221.93.camel@pracovna> <1274485618.18038.56.camel@pracovna> <4BF86523.4090509@gmail.com> <1274610426.5231.67.camel@pracovna> <4BF93F58.3080307@gmail.com> <1274634978.6742.13.camel@pracovna> <4BF9839A.2030704@gmail.com> <1274813892.18826.36.camel@pracovna> <1275238274.6704.21.camel@pracovna> <4C02E60A.3060407@gmail.com> <4C03AA29.2020807@gmail.com> <1275342853.4170.133.camel@pracovna> <4C0451C4.90409@gmail.com> Content-Type: text/plain; charset=utf-8 Date: Tue, 01 Jun 2010 23:14:13 +0200 Message-Id: <1275426853.4968.64.camel@pracovna> Mime-Version: 1.0 X-Mailer: Evolution 2.22.3.1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) Subject: Re: [RFT] Re: [Patch] [bug #26237] multiple problems with usb devices X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 01 Jun 2010 21:14:20 -0000 Hi Vladimir, even I am too busy to do any development or "research", I tried at least to shortly test the usb branch code, as you wrote here: Vladimir '=CF=86-coder/phcoder' Serbinenko wrote: > I've merged your latest patch into usb branch too, fixing some > problems > it would have on yeeloong. Compile tested only. > Can someone give it a good test? If it works on both yeeloong and pc, > I'll merge it into mainline ASAP. I tested 9 devices which all were working on both HCs before. Result of my testing: UHCI - 7 devices from 9 are working OHCI - 7 devices from 9 are working, some of them were very slow, probably lot of timeouts happened So some mistakes are somewhere... On both HCs was not working device which has max. packet length for control endpoint lower than 64. As I remember that this patch was relative simple, I shortly looked into usb.c and usbtrans.c and there is mistake: --- usbtrans.c +++ usbtrans_corrected.c=09 @@ -76,7 +76,7 @@ setupdata_addr =3D grub_dma_get_phys (setupdata_chunk); =20 /* Determine the maximum packet size. */ - if (dev->initialized && dev->descdev.maxsize0) + if (dev->descdev.maxsize0) max =3D dev->descdev.maxsize0; else max =3D 64; Why: dev->initialized is set to TRUE too late (after address setting transaction) so we have to ignore it in control transfers - we must use value from dev->descdev.maxsize0 immediately after successful reading of first 8 bytes of device descriptor (where is this value included) - as is (probably not clearly, sorry) described by me in this part of usb.c code: /* First we have to read first 8 bytes only and determine * max. size of packet */ dev->descdev.maxsize0 =3D 0; /* invalidating, for safety only, can be removed if it is sure it is zero here */ err =3D grub_usb_get_descriptor (dev, GRUB_USB_DESCRIPTOR_DEVICE, 0, 8, (char *) &dev->descdev); if (err) return err; /* Now we have valid value in dev->descdev.maxsize0, * so we can read whole device descriptor */ err =3D grub_usb_get_descriptor (dev, GRUB_USB_DESCRIPTOR_DEVICE, 0, sizeof (struct grub_usb_desc_device), (char *) &dev->descdev); There is probably some new problem in OHCI because some devices are now very slow on this controller. Unfortunately I currently have no time to discover why - I am expecting some mistake probably in "toggling" and related code in ohci.c. On UHCI does not work my mobile phone. But I am not 100% sure if it worked before on UHCI and I have no time to try it now. I am 100% sure it worked on OHCI - so maybe it is similar problem as with my card reader. And some old (but probably not critical) problem remains in UHCI - there is still not properly working sequence: rmmod usbms, rmmod uhci, , insmod uhci, insmod usbms - it works on OHCI but on UHCI it does not work - for first look it is working (for example commands "ls" and "ls (usb0,1)" are working if these commands are used as first commands after device change) but for second look does not (for example command "ls (usb0,1)/" reports USB mass storage stalled). Best regards Ales