Re: Bug in DWC2 UDC driver on Raspberry PI [was: g_mass_storage emulation of flash drive - difficulties with passing vendor/product ID]

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

 



On Tue, Jul 11, 2017 at 2:42 PM, Alan Stern <stern@xxxxxxxxxxxxxxxxxxx> wrote:
> On Mon, 10 Jul 2017, Alan Robertson wrote:
>
>> OK have now updated to kernel 4.9.36+, unfortunately g_mass_storage
>> isn't working at all in that!  apt-get upgrade gave me 4.9.35+ then
>> rpi-update got me to 4.9.36+.  Unfortunately getting a kernel panic on
>> boot (even on fresh install) when g_mass_storage trying to load (have
>> posted about it at
>> https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=188046).  It
>> looks like only 4.9.36+ is available on rpi-update, so will need to
>> look into how to compile a newer kernel to see if that helps, although
>> frustrating it's not even working on this version.
>
> Note that you don't have to build the kernel on a Raspberry Pi.  With
> the proper tools installed, you can build it on any Linux computer and
> then write it to the SD card.  That should speed things up quite a bit.

Hi Alan

Yes, have read about that now and certainly external build would
definitely be quicker.

However - GREAT NEWS!!!  The update to 4.9.36+ seems to have done the trick :)

See new dmesg...
[    6.131569] 20980000.usb supply vusb_d not found, using dummy regulator
[    6.131853] 20980000.usb supply vusb_a not found, using dummy regulator
[    6.224457] EXT4-fs (mmcblk0p2): re-mounted. Opts: (null)
[    6.621834] dwc2 20980000.usb: EPs: 8, dedicated fifos, 4080 entries in SPRAM
[    6.624073] dwc2 20980000.usb: DWC OTG Controller
[    6.624161] dwc2 20980000.usb: new USB bus registered, assigned bus number 1
[    6.624238] dwc2 20980000.usb: irq 33, io mem 0x00000000
[    6.624602] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    6.624619] usb usb1: New USB device strings: Mfr=3, Product=2,
SerialNumber=1
[    6.624629] usb usb1: Product: DWC OTG Controller
[    6.624639] usb usb1: Manufacturer: Linux 4.9.36+ dwc2_hsotg
[    6.624648] usb usb1: SerialNumber: 20980000.usb
[    6.625894] hub 1-0:1.0: USB hub found
[    6.625986] hub 1-0:1.0: 1 port detected
[    7.555421] usbcore: registered new interface driver brcmfmac
[    7.838601] brcmfmac: Firmware version = wl0: May 27 2016 00:13:38
version 7.45.41.26 (r640327) FWID 01-df77e4a7
[    8.005836] systemd-journald[113]: Received request to flush
runtime journal from PID 1
[   10.192605] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[   10.192643] brcmfmac: power management disabled
[   11.155348] uart-pl011 20201000.serial: no DMA platform data
[   12.677636] Adding 102396k swap on /var/swap.  Priority:-1
extents:4 across:241660k SSFS
[   13.991319] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[   15.718015] Bluetooth: Core ver 2.22
[   15.718147] NET: Registered protocol family 31
[   15.718154] Bluetooth: HCI device and connection manager initialized
[   15.719660] Bluetooth: HCI socket layer initialized
[   15.719683] Bluetooth: L2CAP socket layer initialized
[   15.719740] Bluetooth: SCO socket layer initialized
[   15.755080] Bluetooth: HCI UART driver ver 2.3
[   15.755097] Bluetooth: HCI UART protocol H4 registered
[   15.755102] Bluetooth: HCI UART protocol Three-wire (H5) registered
[   15.755300] Bluetooth: HCI UART protocol Broadcom registered
[   16.384300] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[   16.384312] Bluetooth: BNEP filters: protocol multicast
[   16.384341] Bluetooth: BNEP socket layer initialized
[   30.810852] Mass Storage Function, version: 2009/09/11
[   30.810882] LUN: removable file: (no medium)
[   30.811154] LUN: removable file: /home/pi/piusb.bin
[   30.811166] Number of LUNs=1
[   30.811433] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[   30.811451] g_mass_storage gadget: g_mass_storage ready
[   30.811468] dwc2 20980000.usb: bound driver g_mass_storage
[  252.357976] dwc2 20980000.usb: new device is full-speed
[  252.418061] dwc2 20980000.usb: new device is full-speed
[  252.439667] dwc2 20980000.usb: new address 1
[  252.538245] dwc2 20980000.usb: new device is full-speed
[  252.598321] dwc2 20980000.usb: new device is full-speed
[  252.619670] dwc2 20980000.usb: new address 2
[  254.059693] g_mass_storage gadget: full-speed config #1: Linux
File-Backed Storage

I've quite happily booted it and moved it between Systems 1-4, it is
read perfectly in each one, saves without a problem.  Work when
directly powered from it too.  No need to plug into Windows laptop or
System 1 first.  I thought it was particularly interesting that it
connected at full-speed when it was low-speed before (that you had
identified as a bug, Alan).

Delighted to finally have it working - thanks for your help.  I had
tried apt-get dist-upgrade previously but always ran into issues, at
least this gave me a drive to try and work out a bit more why it
wasn't working and it was clearly worth it to solve the dwc2 issue!

Cheers

Alan
--
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