musb kernel crash when plugging usb bluetooth dongle

oups sorry changing the title

I haven't seen this one before. I have some links that might get you
pointed in the right direction.

Bluetooth HID is working for me at the moment (wireless joystick),
using this kernel from Koen:
http://ewi546.ewi.utwente.nl/~koen/uImage-2.6.26+2.6.27-rc7+r9+gite1c49d7d22af768188e2a54c167ed79919361e55-r9-beagleboard.bin
http://ewi546.ewi.utwente.nl/~koen/modules-2.6.26+2.6.27-rc7+r9+gite1c49d7d22af768188e2a54c167ed79919361e55-r9-beagleboard.tgz

Koen has been maintaining his own Beagleboard patch set and kicking
off .27 builds now and then. You can view the IRC archives to see if
he has announced any new ones:
http://www.beagleboard.org/irclogs

I believe Koen is using these USB patches:
Crash on detach: http://marc.info/?l=linux-usb&m=122112415222422&w=2
Iso/cam fix #1: http://marc.info/?l=linux-usb&m=122085130310484&w=2
Iso/cam fix #2: http://marc.info/?l=linux-usb&m=122085145310628&w=2
'Fix something': http://git.mansr.com/?p=linux-omap;a=commitdiff;h=1e5bc41773bb981b3a89bd762becf98c72be5e4c

Your stack trace goes through musb_giveback, which has been the
subject of some recent discussion on the linux-usb list:
http://marc.info/?l=linux-usb&w=2&r=1&s=musb_giveback&q=b

If all of the above fails, you can also try your question on the linux-
omap list:
http://vger.kernel.org/vger-lists.html#linux-omap

Good luck!
- Nathan

> I want to report to the omap kernel maintainers a crash in the musb driver.
> I have already applied the musb patch described by Koen in the usb camera thread.
> Misaligned address in DMA (says the log)
> My beagleboard is connected to an auto power usb hub (keyboard +mouse+usb2ethernet)

I haven't seen this one before. I have some links that might get you
pointed in the right direction.

Bluetooth HID is working for me at the moment (wireless joystick),
using this kernel from Koen:http://ewi546.ewi.utwente.nl/~koen/uImage-2.6.26+2.6.27-rc7+r9+gite1c...http://ewi546.ewi.utwente.nl/~koen/modules-2.6.26+2.6.27-rc7+r9+gite1

Koen has been maintaining his own Beagleboard patch set and kicking
off .27 builds now and then. You can view the IRC archives to see if
he has announced any new ones:http://www.beagleboard.org/irclogs

I believe Koen is using these USB patches:
Crash on detach: http://marc.info/?l=linux-usb&m=122112415222422&w=2
Iso/cam fix #1: http://marc.info/?l=linux-usb&m=122085130310484&w=2
Iso/cam fix #2: http://marc.info/?l=linux-usb&m=122085145310628&w=2
'Fix something': http://git.mansr.com/?p=linux-omap;a=commitdiff;h=1e5bc41773bb981b3a8

The complete list of patches used:

http://gitweb.openembedded.net/?p=org.openembedded.dev.git;a=blob;f=packages/linux/linux-omap_git.bb;hb=HEAD

The patches itself:

http://gitweb.openembedded.net/?p=org.openembedded.dev.git;a=tree;f=packages/linux/linux-omap;h=76d5fa04b9a9e7045e2b207e23088adffbd1c86b;hb=HEAD

regards,

Koen

Hi Nathan and Koen,

Thanks a lot. It tooks me time to read all the related links but it worths
it.
Since the latest official uImage from Angstrom distribution works, it was
clearly a murb patch issue.

The latest info I didn't have is how to get the latest .r27 kernel.
I just get the answer by changing in beagleboard.conf
PREFERRED_PROVIDER_virtual/kernel = "linux-omap2"
to
PREFERRED_PROVIDER_virtual/kernel = "linux-omap"

My bluetooth is alive. I can connect my wiimote. that's cool.
Going to the next step

I also have the kernel hang on usb connect/disconnect. I bought the digikey
7 port hub !
But it's ok, I can survive with it.

Thanks again.

Laurent

Hello,

I have just finished ported a graphic engine using directfb and made some
benchmarks.
As a starting point, this board is quite surprising. One of test is a flash
cartoon modified
for running at 120 fps. It runs !! at 120 fps and only load 45% of the cpu.
This only with the with arm-cortex and without dsp or sgx help.

As a reference, on St microelectronic chipset 7109 (sh4 at 300Mhz + hw
blitter), the test gives 40fps
Believe me, the ST7109 blitter is a good one.

The beagle is not a chihuahua, it is more close to a greyhound. :wink:
The next steps should be interesting for all of us.

But by the way, I also have a question regarding the frame buffer usage.
I don't touch any setting (just compiled the kernel .r27) and i observe that
the frame buffer can be used only in 16 bits per pixel rgb565.

Is it hardcoded in omap fb driver and has to be changed in the kernel code
??

for argb8888 color mode, I try to use :
fbset -depth 32
It changes and returns
mode "1024x768-51"
        # D: 48.001 MHz, H: 40.541 kHz, V: 51.318 Hz
        geometry 1024 768 1024 768 32 <=== OK
        timings 20833 48 80 3 15 32 4
        accel false
        rgba 5/11,6/5,5/0,0/0 <===== KO
endmode

but the frame buffer remains configured for 16bpp

Where is the good door to open ?

Thanks,

Laurent

Earlier today, Ajay posted another patch to fix crashing on plug/
unplug:
http://marc.info/?l=linux-omap&m=122284678326859&w=2

After applying his patch I couldn't reproduce the plug/unplug crashes
anymore.

If you can still reproduce this problem after applying the new patch,
attach your RS232 cable and see if there is a crash dump. If so, the
folks on linux-omap will probably be interested in your stack trace.

- Nathan

Try http://ewi546.ewi.utwente.nl/~koen/uImage-2.6.26+2.6.27-rc7+r10+gite1c49d7d22af768188e2a54c167ed79919361e55-r10-beagleboard.bin
and see it that solves the (dis)connect issues. That has Ajays patch
that Nathan was talking about.

regards,

Koen

Hi,

I just tested your patched kernel.
There is no more hangs in the kernel. I have tested my 2 different usb
bluetooth dongle, works fine.

But (there is always a but), It works once.
I mean :
Step 1 : plugging a usb device in the hub => OK
Step 2 : unplugging and plug again => KO (quiet without crash)

What I observe is that when I remove the usb device the system seems not be
warned by the driver part
The file /proc/bus/usb/devices remains unchanged.
The already plugged usb device like the usb ethernet dongle is broken (ping
www.disney.fr hangs silently)

Good progress but a little job to finish for the TI kernel expert guys.

Thanks,

Laurent

root@beagleboard:~# cat /proc/bus/usb/devices

T: Bus=02 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 3
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 2.06
S: Manufacturer=Linux 2.6.27-rc7-omap1 ehci_hcd
S: Product=OMAP-EHCI Host Controller
S: SerialNumber=ehci-omap.0
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=480 MxCh= 1
B: Alloc= 0/800 us ( 0%), #Int= 0, #Iso= 0
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=00 MxPS=64 #Cfgs= 1
P: Vendor=1d6b ProdID=0002 Rev= 2.06
S: Manufacturer=Linux 2.6.27-rc7-omap1 musb-hcd
S: Product=MUSB HDRC host driver
S: SerialNumber=musb_hdrc
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=256ms

T: Bus=01 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=480 MxCh= 4
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05e3 ProdID=0608 Rev= 7.02
S: Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms

T: Bus=01 Lev=02 Prnt=02 Port=00 Cnt=01 Dev#= 3 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=04fc ProdID=0003 Rev= 9.10
S: Product=USB OpticalWheel Mouse
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=02 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 4 Ivl=10ms

T: Bus=01 Lev=02 Prnt=02 Port=01 Cnt=02 Dev#= 4 Spd=1.5 MxCh= 0
D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1
P: Vendor=0e6a ProdID=6001 Rev= 0.07
S: Product=HID Keyboard Device
C:* #Ifs= 2 Cfg#= 1 Atr=a0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=01 Prot=01 Driver=usbhid
E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=10ms
I:* If#= 1 Alt= 0 #EPs= 1 Cls=03(HID ) Sub=00 Prot=00 Driver=usbhid
E: Ad=82(I) Atr=03(Int.) MxPS= 3 Ivl=10ms

T: Bus=01 Lev=02 Prnt=02 Port=02 Cnt=03 Dev#= 5 Spd=480 MxCh= 0
D: Ver= 2.00 Cls=ff(vend.) Sub=00 Prot=ff MxPS=64 #Cfgs= 1
P: Vendor=9710 ProdID=7830 Rev= 1.00
S: Manufacturer=Moschip Semiconductor
S: Product=USB-MAC Controller
S: SerialNumber=c276b7b3
C:* #Ifs= 1 Cfg#= 1 Atr=a0 MxPwr=500mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=ff(vend.) Sub=00 Prot=ff Driver=MOSCHIP
usb-ethernet driver
E: Ad=81(I) Atr=02(Bulk) MxPS= 512 Ivl=0ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 512 Ivl=31875us
E: Ad=83(I) Atr=03(Int.) MxPS= 16 Ivl=125us

T: Bus=01 Lev=02 Prnt=02 Port=03 Cnt=04 Dev#= 6 Spd=480 MxCh= 4
D: Ver= 2.00 Cls=09(hub ) Sub=00 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=05e3 ProdID=0608 Rev= 7.02
S: Product=USB2.0 Hub
C:* #Ifs= 1 Cfg#= 1 Atr=e0 MxPwr=100mA
I:* If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub
E: Ad=81(I) Atr=03(Int.) MxPS= 1 Ivl=256ms

T: Bus=01 Lev=03 Prnt=06 Port=03 Cnt=01 Dev#= 7 Spd=12 MxCh= 0
D: Ver= 2.00 Cls=e0(unk. ) Sub=01 Prot=01 MxPS=64 #Cfgs= 1
P: Vendor=0a12 ProdID=0001 Rev=19.58
C:* #Ifs= 2 Cfg#= 1 Atr=c0 MxPwr= 0mA
I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=81(I) Atr=03(Int.) MxPS= 16 Ivl=1ms
E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms
E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms
I: If#= 1 Alt= 0 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=03(O) Atr=01(Isoc) MxPS= 0 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 0 Ivl=1ms
I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=03(O) Atr=01(Isoc) MxPS= 9 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 9 Ivl=1ms
I:* If#= 1 Alt= 2 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=03(O) Atr=01(Isoc) MxPS= 17 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 17 Ivl=1ms
I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=03(O) Atr=01(Isoc) MxPS= 25 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 25 Ivl=1ms
I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=03(O) Atr=01(Isoc) MxPS= 33 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 33 Ivl=1ms
I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(unk. ) Sub=01 Prot=01 Driver=hci_usb
E: Ad=03(O) Atr=01(Isoc) MxPS= 49 Ivl=1ms
E: Ad=83(I) Atr=01(Isoc) MxPS= 49 Ivl=1ms

From what I've seen the fb driver still needs a lot of improvement,
and there's actually different implementations for v2.

I wouldn't be surprised if the user-space API's aren't completely
working. For the bpp I think you need to modify the driver in the
kernel right now.

Felipe Contreras wrote:

Hello,

I have just finished ported a graphic engine using directfb and made some
benchmarks.
As a starting point, this board is quite surprising. One of test is a flash
cartoon modified
for running at 120 fps. It runs !! at 120 fps and only load 45% of the cpu.
This only with the with arm-cortex and without dsp or sgx help.

As a reference, on St microelectronic chipset 7109 (sh4 at 300Mhz + hw
blitter), the test gives 40fps
Believe me, the ST7109 blitter is a good one.

The beagle is not a chihuahua, it is more close to a greyhound. :wink:
The next steps should be interesting for all of us.

But by the way, I also have a question regarding the frame buffer usage.
I don't touch any setting (just compiled the kernel .r27) and i observe that
the frame buffer can be used only in 16 bits per pixel rgb565.

Is it hardcoded in omap fb driver and has to be changed in the kernel code
??

for argb8888 color mode, I try to use :
fbset -depth 32
It changes and returns
mode "1024x768-51"
       # D: 48.001 MHz, H: 40.541 kHz, V: 51.318 Hz
       geometry 1024 768 1024 768 32 <=== OK
       timings 20833 48 80 3 15 32 4
       accel false
       rgba 5/11,6/5,5/0,0/0 <===== KO
endmode

but the frame buffer remains configured for 16bpp

Where is the good door to open ?

From what I've seen the fb driver still needs a lot of improvement,
and there's actually different implementations for v2.

I wouldn't be surprised if the user-space API's aren't completely
working. For the bpp I think you need to modify the driver in the
kernel right now.

Current linux-omap (almost) entirely lacks support for 24/32-bit colour.
There is also no support for on the fly mode changes of any kind. These
things would be fairly easy to implement, but I see little point in
spending time on code that is to be replaced in the near future.

Hi Måns

Can you give us more update about the next fb driver features ? previsional
roadmap ?
The 32 color mode is key for me. rgb565 is not enough for photographic image
quality.

Thanks,

Laurent

Hi, Måns

Could you provide me some instructions on where to change to make a
24/32bit frame buffer driver?
RGB888 is very important to us. Actually we are about to replace OMAP
with an FPGA design because of
its lacking of RGB888 support.

Thanks,
Guo