All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Aleš Nesrsta" <starous@volny.cz>
To: The development of GNU GRUB <grub-devel@gnu.org>
Subject: Re: [RFT] Re: [Patch] [bug #26237] multiple problems with usb devices
Date: Tue, 01 Jun 2010 23:14:13 +0200	[thread overview]
Message-ID: <1275426853.4968.64.camel@pracovna> (raw)
In-Reply-To: <4C0451C4.90409@gmail.com>

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 'φ-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	
@@ -76,7 +76,7 @@
   setupdata_addr = grub_dma_get_phys (setupdata_chunk);
 
   /* Determine the maximum packet size.  */
-  if (dev->initialized && dev->descdev.maxsize0)
+  if (dev->descdev.maxsize0)
     max = dev->descdev.maxsize0;
   else
     max = 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 = 0; /* invalidating, for safety only, can be
removed if it is sure it is zero here */
  err = 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 = 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, <removing of old device and connecting of new
device>, 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)/<some directory>"
reports USB mass storage stalled).

Best regards
Ales



  reply	other threads:[~2010-06-01 21:14 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-03-14 22:23 [Patch] [bug #26237] multiple problems with usb devices Aleš Nesrsta
2010-04-02 20:46 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-07 19:49   ` Aleš Nesrsta
2010-04-07 20:39     ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-08 21:27       ` Aleš Nesrsta
2010-04-16 16:39         ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-20 20:14           ` Aleš Nesrsta
2010-04-24 19:50             ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-04-28  8:20               ` Aleš Nesrsta
2010-05-09 13:50                 ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-21 23:46             ` Aleš Nesrsta
2010-05-22  1:20               ` Grégoire Sutre
2010-05-22  9:35               ` Colin Watson
2010-05-22 23:13               ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-23 10:27                 ` Aleš Nesrsta
2010-05-23 14:41                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-23 17:42                     ` Aleš Nesrsta
2010-05-23 18:40                       ` Thomas Schmitt
2010-05-23 17:51                     ` [Patch] [bug #26237] " Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-23 14:44                   ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-23 17:16                     ` Aleš Nesrsta
2010-05-23 19:35                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-23 20:41                         ` seth.goldberg
2010-05-25 18:58                         ` Aleš Nesrsta
2010-05-30 16:51                           ` Aleš Nesrsta
2010-05-30 22:26                             ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-31  4:16                               ` Seth Goldberg
2010-05-31 12:23                               ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-05-31 21:54                                 ` Aleš Nesrsta
2010-06-01  0:18                                   ` [RFT] " Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-01 21:14                                     ` Aleš Nesrsta [this message]
2010-06-02  0:27                                       ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-02  3:02                                         ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-02 19:39                                           ` Aleš Nesrsta
2010-06-02 20:14                                             ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-06-03 11:47                                               ` Aleš Nesrsta
2010-06-12 17:05                                               ` [RFT] Re: [Patch] [bug #26237] multiple problems with usb devices - faster OHCI Aleš Nesrsta
2010-06-12 18:59                                                 ` Aleš Nesrsta
2010-06-13 17:47                                               ` [RFT] Re: [Patch] [bug #26237] multiple problems with usb devices Aleš Nesrsta
2010-06-21 20:24                                                 ` Aleš Nesrsta
2010-06-25 18:10                                                   ` Vladimir 'φ-coder/phcoder' Serbinenko

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=1275426853.4968.64.camel@pracovna \
    --to=starous@volny.cz \
    --cc=grub-devel@gnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.