Enabling PIO_ONLY (i.e. Disabling DMA in USB) for arm based ASIC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

          Is there a way to disable DMA in Linux Kernel USB subsystem
for generic SoC ?

I found a way to disable DMA called 'musb' (MUSB_PIO_ONLY), but it is
only available for ti / mentor graphics SoC's.

    I am using linux 3.3 kernel. on arm based ASIC.. I am currently
enabling support for USB Host in arm based ASIC. While testing USB
WiFi, USB Host and wifi driver works fine. I got wlan0 interface. but
when I perform
            'ifconfig wlan0 up'
I see kernel crash: (added in the end of mail)

Observations:-
kernel crashes in function 'usb_hcd_map_urb_for_dma' according to
which we should have *_dma function or PIO

        /* Map the URB's buffers for DMA access.
         * Lower level HCD code should use *_dma exclusively,
         * unless it uses pio or talks to another transport,
         * or uses the provided scatter gather list for bulk.
         */

Help:

1. How to avoid kernel to call 'usb_hcd_map_urb_for_dma' .
2. Any Document explaining how to disable DMA in Linux
3. Is it a good idea to add support for ASIC in musb, to be able to
enable MUSB_PIO_ONLY ?
4. Can I change endpoint parameter runtime using sysfs to disable dma.
5. Or any way to achieve this.




Kernel crash dump is


kernel BUG at /home/Devidas/Linux/arch/arm/include/asm/dma-mapping.h:321!
Internal error: Oops - BUG: 0 [#2]
Modules linked in:
CPU: 0    Tainted: G      D       (3.3.0 #12)
PC is at usb_hcd_map_urb_for_dma+0x210/0x324
LR is at dma_cache_maint_page+0x3c/0x48
pc : [<c01fa098>]    lr : [<c000d43c>]    psr: 20000013
sp : de8a7c60  ip : 00000000  fp : 00000040
r10: 000dedee  r9 : c04c58d0  r8 : c04525d8
r7 : 00000010  r6 : dfaa6800  r5 : 00000000  r4 : ded97260
r3 : 00000001  r2 : 000000ea  r1 : ffdfc000  r0 : e0000000
Flags: nzCv  IRQs on  FIQs on  Mode SVC_32  ISA ARM  Segment user
Control: 0005317f  Table: de100000  DAC: 00000015
Process ifconfig (pid: 579, stack limit = 0xde8a6270)
Stack: (0xde8a7c60 to 0xde8a8000)
7c60: dfaa6800 ded97260 ded97260 dfaa6800 00000010 de8a7d1c 00000032 dfad8800
7c80: 80000200 c01fade4 fa850000 de8a7cfc 00000020 c0460e10 de8a7d20 c0047e3c
7ca0: c045b834 c004a0dc 0000003e 00000000 fa850000 f0af1f77 c000d6f4 ded97260
7cc0: 00000000 de8a7cf0 de8a7d1c 00000032 dfad8800 80000200 00000040 c01fcb14
7ce0: 80000013 de8a7d64 00000020 c0460e10 00000000 de8a7cf4 de8a7cf4 dedee8a0
7d00: dedee8a0 000000ea 00000000 00000000 00000010 c01fcda4 dfad8800 80000200
7d20: 00000005 000000ea dfad8800 ffdfc000 00001000 00000002 e0a15020 e0a16020
7d40: 00000003 c01dae70 00001000 00000000 ffdfc000 000000ea 00000032 c01db0a0
7d60: df8e0f80 def8a000 00001000 df8e0f80 00000001 e0a16020 00001000 00000076
7d80: 00000011 c0300814 df8e0f80 df8e0300 00000000 00000010 e0a16020 00000003
7da0: 00000e6e c01dedb0 df8e0300 df8e0f80 df8e0f80 df8e0300 df8e0f80 df8e0f80
7dc0: 00000002 00000000 df8e0f80 c01e7b68 00000003 00000003 00000003 dedd7314
7de0: 00000028 00000001 00000009 00000000 00000002 000000e7 000005b7 df8e0f80
7e00: df8e0300 df8e0300 00001002 dfba9000 00000000 00000001 00008914 c01da83c
7e20: df8e0300 00000001 df8e0f80 00000001 df8e0300 00001002 dfba9000 00000000
7e40: 00000001 c01d5be4 df8e0300 dfba9000 00000001 c02e86d0 df8e0924 dfba9000
7e60: c032ccf8 00000001 00001002 dfba9000 be814b80 c0243404 c0243388 dfba9000
7e80: 00001043 c024364c 00008914 dfba9000 00001002 dfbc2c00 00000001 c024374c
7ea0: 00000000 dfbc2c0c dfbc2c00 c0284358 00000020 6e616c77 00000030 00000000
7ec0: 00000000 00001043 b6e2cba0 00000001 be814d64 f0af1f77 00000000 00008914
7ee0: de9b9da0 be814b80 c04caf0c c0009464 de8a6000 be814b80 df53c4a0 c02309cc
7f00: c02307c0 be814b80 de9b9da0 00008914 00000003 c008b070 df642598 c008baac
7f20: df53c480 00000003 c0329220 de8a7f84 00000000 c007ee08 00000020 00000003
7f40: df53c480 00000000 c0450c48 c0230ef8 c04caf0c df80d590 df642598 00000000
7f60: 00000000 be814b80 de9b9da0 00008914 00000003 c0009464 de8a6000 00000000
7f80: be814d6c c008bb44 00000003 00000000 be814b80 000a69db be814b80 be814d6c
7fa0: 00000036 c00092c0 000a69db be814b80 00000003 00008914 be814b80 000a69db
7fc0: 000a69db be814b80 be814d6c 00000036 00000003 000931c0 be814d68 be814d6c
7fe0: 000bc2f8 be814b1c 0000e660 b6ec59ac 20000010 00000003 dfffe831 dfffec31
[<c01fa098>] (usb_hcd_map_urb_for_dma+0x210/0x324) from [<c01fade4>]
(usb_hcd_submit_urb+0x5c8/0x710)
[<c01fade4>] (usb_hcd_submit_urb+0x5c8/0x710) from [<c01fcb14>]
(usb_start_wait_urb+0x44/0x128)
[<c01fcb14>] (usb_start_wait_urb+0x44/0x128) from [<c01fcda4>]
(usb_control_msg+0xac/0xdc)
[<c01fcda4>] (usb_control_msg+0xac/0xdc) from [<c01dae70>]
(_usb_writeN_sync+0x80/0x9c)
[<c01dae70>] (_usb_writeN_sync+0x80/0x9c) from [<c0300814>]
(_rtl92c_fw_block_write+0x68/0x134)
[<c0300814>] (_rtl92c_fw_block_write+0x68/0x134) from [<c01dedb0>]
(rtl92c_download_fw+0x23c/0x64c)
[<c01dedb0>] (rtl92c_download_fw+0x23c/0x64c) from [<c01e7b68>]
(rtl92cu_hw_init+0xbfc/0x1540)
[<c01e7b68>] (rtl92cu_hw_init+0xbfc/0x1540) from [<c01da83c>]
(rtl_usb_start+0x20/0x1f0)
[<c01da83c>] (rtl_usb_start+0x20/0x1f0) from [<c01d5be4>]
(rtl_op_start+0x48/0x74)
[<c01d5be4>] (rtl_op_start+0x48/0x74) from [<c02e86d0>]
(ieee80211_do_open+0x114/0x6e8)
[<c02e86d0>] (ieee80211_do_open+0x114/0x6e8) from [<c0243404>]
(__dev_open+0x7c/0x108)
[<c0243404>] (__dev_open+0x7c/0x108) from [<c024364c>]
(__dev_change_flags+0x8c/0x120)
[<c024364c>] (__dev_change_flags+0x8c/0x120) from [<c024374c>]
(dev_change_flags+0x10/0x44)
[<c024374c>] (dev_change_flags+0x10/0x44) from [<c0284358>]
(devinet_ioctl+0x2a0/0x6c8)
[<c0284358>] (devinet_ioctl+0x2a0/0x6c8) from [<c02309cc>]
(sock_ioctl+0x20c/0x264)
[<c02309cc>] (sock_ioctl+0x20c/0x264) from [<c008b070>] (vfs_ioctl+0x28/0x3c)
[<c008b070>] (vfs_ioctl+0x28/0x3c) from [<c008baac>] (do_vfs_ioctl+0x488/0x4f0)
[<c008baac>] (do_vfs_ioctl+0x488/0x4f0) from [<c008bb44>] (sys_ioctl+0x30/0x58)
[<c008bb44>] (sys_ioctl+0x30/0x58) from [<c00092c0>] (ret_fast_syscall+0x0/0x2c)
Code: e59f0110 e5900000 e1510000 3a000000 (e7f001f2)

Regards
Devidas Jadhav

Senior Software Engineer,
L&T Technology services
Bangalore India.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux