public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* OTG MUSB driver issue?
@ 2009-02-27 17:52 Frans Meulenbroeks
  2009-02-27 17:56 ` Felipe Balbi
  0 siblings, 1 reply; 5+ messages in thread
From: Frans Meulenbroeks @ 2009-02-27 17:52 UTC (permalink / raw)
  To: linux-omap, beagleboard

Hi,

Several times I encountered issues with devices connected to the
beagle board's OTG port (through a powered hub).
(kernel 2.6.28-omap1).
Today this happened again and I was lucky enough to be able to find
the symptoms.

Scenario: I had a file on a USB hard disk. This file was copied to an
SD card. After copying the file was corrupted.
Removing the card and hard disk and connecting them to my linux box
allowed me to compare the SD and hard disk version (using cmp -l).
There were differences on four places. Each difference was 4 bytes (32
bits) and occurred on a 4 byte boundary.

I have no idea what causes it, but I strongly suspect the MUSB driver.
A hauppauge usb tv card also does not work when connected to the hub,
whereas the same card works without problem on a linksys NSLU2 (which
also has an arm processor).

Anyone suggestions? Patches ??

Frans.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OTG MUSB driver issue?
  2009-02-27 17:52 OTG MUSB driver issue? Frans Meulenbroeks
@ 2009-02-27 17:56 ` Felipe Balbi
  2009-02-28 10:46   ` Frans Meulenbroeks
  0 siblings, 1 reply; 5+ messages in thread
From: Felipe Balbi @ 2009-02-27 17:56 UTC (permalink / raw)
  To: Frans Meulenbroeks; +Cc: linux-omap, beagleboard

On Fri, Feb 27, 2009 at 06:52:38PM +0100, Frans Meulenbroeks wrote:
> Hi,
> 
> Several times I encountered issues with devices connected to the
> beagle board's OTG port (through a powered hub).
> (kernel 2.6.28-omap1).
> Today this happened again and I was lucky enough to be able to find
> the symptoms.
> 
> Scenario: I had a file on a USB hard disk. This file was copied to an
> SD card. After copying the file was corrupted.
> Removing the card and hard disk and connecting them to my linux box
> allowed me to compare the SD and hard disk version (using cmp -l).
> There were differences on four places. Each difference was 4 bytes (32
> bits) and occurred on a 4 byte boundary.
> 
> I have no idea what causes it, but I strongly suspect the MUSB driver.
> A hauppauge usb tv card also does not work when connected to the hub,
> whereas the same card works without problem on a linksys NSLU2 (which
> also has an arm processor).
> 
> Anyone suggestions? Patches ??

I guess that should be already fixed with patches queued up in Greg's
queue, but then again, let me check more. Could you:

# echo 5 > /sys/modules/musb_hdrc/parameters/debug
# echo 8 > /proc/sysrq-trigger

then connect device and send me log output ?

-- 
balbi

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OTG MUSB driver issue?
  2009-02-27 17:56 ` Felipe Balbi
@ 2009-02-28 10:46   ` Frans Meulenbroeks
  2009-03-02  8:34     ` Gadiyar, Anand
  0 siblings, 1 reply; 5+ messages in thread
From: Frans Meulenbroeks @ 2009-02-28 10:46 UTC (permalink / raw)
  To: me; +Cc: linux-omap, beagleboard

[-- Attachment #1: Type: text/plain, Size: 2124 bytes --]

2009/2/27 Felipe Balbi <me@felipebalbi.com>:
> On Fri, Feb 27, 2009 at 06:52:38PM +0100, Frans Meulenbroeks wrote:
>> Hi,
>>
>> Several times I encountered issues with devices connected to the
>> beagle board's OTG port (through a powered hub).
>> (kernel 2.6.28-omap1).
>> Today this happened again and I was lucky enough to be able to find
>> the symptoms.
>>
>> Scenario: I had a file on a USB hard disk. This file was copied to an
>> SD card. After copying the file was corrupted.
>> Removing the card and hard disk and connecting them to my linux box
>> allowed me to compare the SD and hard disk version (using cmp -l).
>> There were differences on four places. Each difference was 4 bytes (32
>> bits) and occurred on a 4 byte boundary.
>>
>> I have no idea what causes it, but I strongly suspect the MUSB driver.
>> A hauppauge usb tv card also does not work when connected to the hub,
>> whereas the same card works without problem on a linksys NSLU2 (which
>> also has an arm processor).
>>
>> Anyone suggestions? Patches ??
>
> I guess that should be already fixed with patches queued up in Greg's
> queue, but then again, let me check more. Could you:
>
> # echo 5 > /sys/modules/musb_hdrc/parameters/debug
> # echo 8 > /proc/sysrq-trigger
>
> then connect device and send me log output ?
>
> --
> balbi
>

Hi Balbi,

Thanks for your help.
It was echo 5 > /sys/module/musb_hdrc/parameters/musb_debug

Also beforestarting the system I removed all other usb devices from
the hub (I have to use a hub to get enough power for the hard disk).

After connecting the disk it took about two seconds before the system
started to generate log data.
The system kept on generating debug info so after about two minutes I
decided that it was enough and switched off the beagle and saved the
log file. If  this is too short let me know and I'll repeat the
experiment.
The last 30 lines or so are probably caused by the device loosing
power. At that point it was still very busy generating messages

The log file is attached: 54 k gizpped 1.2M unzipped.

If you happen to have a patch that would be great.

Best regards, Frans

[-- Attachment #2: minicom.cap.gz --]
[-- Type: application/x-gzip, Size: 54924 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* RE: OTG MUSB driver issue?
  2009-02-28 10:46   ` Frans Meulenbroeks
@ 2009-03-02  8:34     ` Gadiyar, Anand
  2009-03-02 21:10       ` Frans Meulenbroeks
  0 siblings, 1 reply; 5+ messages in thread
From: Gadiyar, Anand @ 2009-03-02  8:34 UTC (permalink / raw)
  To: Frans Meulenbroeks, me@felipebalbi.com
  Cc: linux-omap@vger.kernel.org, beagleboard@googlegroups.com

> 2009/2/27 Felipe Balbi <me@felipebalbi.com>:
> > On Fri, Feb 27, 2009 at 06:52:38PM +0100, Frans Meulenbroeks wrote:
> >> Hi,
> >>
> >> Several times I encountered issues with devices connected to the
> >> beagle board's OTG port (through a powered hub). (kernel 2.6.28-omap1).
> >> Today this happened again and I was lucky enough to be able to find
> >> the symptoms.
> >>
> >> Scenario: I had a file on a USB hard disk. This file was copied to an
> >> SD card. After copying the file was corrupted.
> >> Removing the card and hard disk and connecting them to my linux box
> >> allowed me to compare the SD and hard disk version (using cmp -l).
> >> There were differences on four places. Each difference was 4 bytes (32
> >> bits) and occurred on a 4 byte boundary.
> >>
> >> I have no idea what causes it, but I strongly suspect the MUSB driver.
> >> A hauppauge usb tv card also does not work when connected to the hub,
> >> whereas the same card works without problem on a linksys NSLU2 (which
> >> also has an arm processor).
> >>
> >> Anyone suggestions? Patches ??
> >
> > I guess that should be already fixed with patches queued up in Greg's
> > queue, but then again, let me check more. Could you:
> >
> > # echo 5 > /sys/modules/musb_hdrc/parameters/debug
> > # echo 8 > /proc/sysrq-trigger
> >
> > then connect device and send me log output ?
> >
> > --
> > balbi
> >
> 
> Hi Balbi,
> 
> Thanks for your help.
> It was echo 5 > /sys/module/musb_hdrc/parameters/musb_debug
> 
> Also beforestarting the system I removed all other usb devices from
> the hub (I have to use a hub to get enough power for the hard disk).
> 
> After connecting the disk it took about two seconds before the system
> started to generate log data.
> The system kept on generating debug info so after about two minutes I
> decided that it was enough and switched off the beagle and saved the
> log file. If  this is too short let me know and I'll repeat the
> experiment.
> The last 30 lines or so are probably caused by the device loosing
> power. At that point it was still very busy generating messages
> 
> The log file is attached: 54 k gizpped 1.2M unzipped.
> 
> If you happen to have a patch that would be great.
> 
> Best regards, Frans


I tried this on the current linux-omap codebase (as of today). I
transferred a 1 GB file back-and-forth a couple of times between
a flash drive and an SD card on a USB card reader (both connected
through a USB hub to the MUSB port). There was no data corruption.

How big was your file? Any chance the card reader or the hard drive
is bad?

What kind of corruption do you see? (You mentioned 4 bytes were different
in 4 places. How different?)

- Anand

P.S. I tested this on the 3430 SDP. Only changes I made from the
defconfig were to remove CONFIG_USB_STORAGE_DEBUG and CONFIG_DEBUG_LL.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: OTG MUSB driver issue?
  2009-03-02  8:34     ` Gadiyar, Anand
@ 2009-03-02 21:10       ` Frans Meulenbroeks
  0 siblings, 0 replies; 5+ messages in thread
From: Frans Meulenbroeks @ 2009-03-02 21:10 UTC (permalink / raw)
  To: Gadiyar, Anand
  Cc: me@felipebalbi.com, linux-omap@vger.kernel.org,
	beagleboard@googlegroups.com

[-- Attachment #1: Type: text/plain, Size: 3826 bytes --]

Anand, Felipe, thanks for the feedback.

I did a short test. I copied the the musb driver source dir from the
linux-omap git to the angstrom 2.6.28.12 kernel, compiled it and
tested it.
Same problem. I verified that the driver code indeed got recompiled
(threw away the .o files and uimage)
Attached is a picture from my webcam. The colored stripes are always
on different locations.

Also the diffs between the 2 pictures that I reported before:
ce_blank.png  ce_blank.png-
frans@linux-suse:~> cmp -l ce*
 12709 161   0
 12710 303  60
 12711 125 120
 12712 356   1
 12761 237  10
 12762 247   0
 12763 246 105
 12764  51  20
 12797 156 100
 12798 332   0
 12799 347 100
 12800 146   6
 13713 335  24
 13714 153 307
 13715  20 326
 13716 106 114

Best regards, Frans.

2009/3/2 Gadiyar, Anand <gadiyar@ti.com>:
>> 2009/2/27 Felipe Balbi <me@felipebalbi.com>:
>> > On Fri, Feb 27, 2009 at 06:52:38PM +0100, Frans Meulenbroeks wrote:
>> >> Hi,
>> >>
>> >> Several times I encountered issues with devices connected to the
>> >> beagle board's OTG port (through a powered hub). (kernel 2.6.28-omap1).
>> >> Today this happened again and I was lucky enough to be able to find
>> >> the symptoms.
>> >>
>> >> Scenario: I had a file on a USB hard disk. This file was copied to an
>> >> SD card. After copying the file was corrupted.
>> >> Removing the card and hard disk and connecting them to my linux box
>> >> allowed me to compare the SD and hard disk version (using cmp -l).
>> >> There were differences on four places. Each difference was 4 bytes (32
>> >> bits) and occurred on a 4 byte boundary.
>> >>
>> >> I have no idea what causes it, but I strongly suspect the MUSB driver.
>> >> A hauppauge usb tv card also does not work when connected to the hub,
>> >> whereas the same card works without problem on a linksys NSLU2 (which
>> >> also has an arm processor).
>> >>
>> >> Anyone suggestions? Patches ??
>> >
>> > I guess that should be already fixed with patches queued up in Greg's
>> > queue, but then again, let me check more. Could you:
>> >
>> > # echo 5 > /sys/modules/musb_hdrc/parameters/debug
>> > # echo 8 > /proc/sysrq-trigger
>> >
>> > then connect device and send me log output ?
>> >
>> > --
>> > balbi
>> >
>>
>> Hi Balbi,
>>
>> Thanks for your help.
>> It was echo 5 > /sys/module/musb_hdrc/parameters/musb_debug
>>
>> Also beforestarting the system I removed all other usb devices from
>> the hub (I have to use a hub to get enough power for the hard disk).
>>
>> After connecting the disk it took about two seconds before the system
>> started to generate log data.
>> The system kept on generating debug info so after about two minutes I
>> decided that it was enough and switched off the beagle and saved the
>> log file. If  this is too short let me know and I'll repeat the
>> experiment.
>> The last 30 lines or so are probably caused by the device loosing
>> power. At that point it was still very busy generating messages
>>
>> The log file is attached: 54 k gizpped 1.2M unzipped.
>>
>> If you happen to have a patch that would be great.
>>
>> Best regards, Frans
>
>
> I tried this on the current linux-omap codebase (as of today). I
> transferred a 1 GB file back-and-forth a couple of times between
> a flash drive and an SD card on a USB card reader (both connected
> through a USB hub to the MUSB port). There was no data corruption.
>
> How big was your file? Any chance the card reader or the hard drive
> is bad?
>
> What kind of corruption do you see? (You mentioned 4 bytes were different
> in 4 places. How different?)
>
> - Anand
>
> P.S. I tested this on the 3430 SDP. Only changes I made from the
> defconfig were to remove CONFIG_USB_STORAGE_DEBUG and CONFIG_DEBUG_LL.
>

[-- Attachment #2: test.jpg --]
[-- Type: image/jpeg, Size: 19501 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-03-02 21:11 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-02-27 17:52 OTG MUSB driver issue? Frans Meulenbroeks
2009-02-27 17:56 ` Felipe Balbi
2009-02-28 10:46   ` Frans Meulenbroeks
2009-03-02  8:34     ` Gadiyar, Anand
2009-03-02 21:10       ` Frans Meulenbroeks

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox