> > -----Original Message----- > > From: Ricardo Ribalda Delgado [mailto:ricardo.ribalda@xxxxxxxxx] > > Sent: Tuesday, April 21, 2015 1:33 AM > > To: Praveen Murali > > Cc: linux-usb@xxxxxxxxxxxxxxx; balbi@xxxxxx; mina86@xxxxxxxxxx > > Subject: Re: usb: gadget: g_multi does not work with net2280 > > > > Can you try with the latest kernel from linux-next? > Hi Ricardo, I tried this with the kernel from linux-next tree; that did not work for me either. The g_multi driver crashes the kernel on load (stack trace is attached). I was able to use the configfs to export the RNDIS and mass storage functions, but its again either/or (only one of them works). I played around with the endpoint assignments and the pattern I am seeing here is that the interface that gets the first set of endpoints works. That is, even if RNDIS is the first interface but I force it to use the endpoints other than 1, 2, or 3 it will not work. Similarly, with mass storage only function it needs endpoints 1 and 2 or 2 and 3 to work correctly. Now, this is a problem only when the host is Windows, Linux host works either ways. Does windows expect the endpoint numbering to be a certain way? Is this an issue with the usb3380? Or do I need a linux-usbstor .inf similar to the linux.inf for RNDIS? Also, any idea as to how this was tested to originally? > > There are some patches from Mian Yousaf Kaukab > > <yousaf.kaukab@xxxxxxxxx>, that might be related to your problem > > Is it libcomposite where the fixes were made? > This was a silly question, please disregard. > > Regards > > Thanks, Praveen
[ 84.871585] using random self ethernet address [ 84.871595] using random host ethernet address [ 84.877473] Number of LUNs=8 [ 84.877489] Mass Storage Function, version: 2009/09/11 [ 84.877496] LUN: removable file: (no medium) [ 84.877508] Number of LUNs=1 [ 84.877592] LUN: file: /dev/sda [ 84.877597] Number of LUNs=1 [ 84.878125] usb0: HOST MAC 7e:d1:bd:a1:d1:3e [ 84.878206] usb0: MAC e6:59:0c:3e:3d:e1 [ 84.880877] g_multi gadget: unable to autoconfigure all endpoints [ 84.880940] net2280_disable: Invalid ep=ffff8800c88b17e8 or ep->desc [ 84.880989] net2280_disable: Invalid ep=ffff8800c88b13c0 or ep->desc [ 84.881033] net2280_disable: Invalid ep=ffff8800c88b1458 or ep->desc [ 84.881076] net2280_disable: Invalid ep=ffff8800c88b14f0 or ep->desc [ 84.881239] BUG: unable to handle kernel NULL pointer dereference at 0000000000000008 [ 84.881348] IP: [<ffffffffa053f382>] handle_exception+0x17a/0x2d5 [usb_f_mass_storage] [ 84.881441] PGD c8f2b067 PUD c8ae8067 PMD 0 [ 84.881571] Oops: 0002 [#1] SMP [ 84.881670] Modules linked in: usb_f_acm u_serial usb_f_rndis g_multi(+) usb_f_mass_storage libcomposite u_ether xt_multiport iptable_filter ip_tables x_tables hid_generic joydev hid_multitouch padlock_aes padlock_sha iscsi_target_mod target_core_mod configfs usbhid hid uhci_hcd via_cputemp hwmon_vid ib_iser rdma_cm ib_cm iw_cm ib_sa ib_mad ib_core ib_addr iscsi_tcp libiscsi_tcp libiscsi scsi_transport_iscsi cfg80211 rfkill i2c_viapro psmouse ehci_pci i2c_core ehci_hcd serio_raw xhci_pci snd_hda_codec_hdmi xhci_hcd snd_hda_codec_via net2280 snd_hda_codec_generic udc_core usbcore snd_hda_intel snd_hda_controller shpchp usb_common snd_hda_codec snd_hda_core snd_pcm snd_timer snd_hwdep snd soundcore parport_pc ppdev nfsd nfs_acl auth_rpcgss oid_registry evdev nfs fscache lockd acpi_cpufreq sunrpc grace processor thermal_sys lp parport loop ext4 jbd2 mbcache crc16 sd_mod ata_generic firewire_ohci firewire_core crc_itu_t mvsas libsas pata_via libata scsi_transport_sas scsi_mod button [ 84.884026] CPU: 1 PID: 2118 Comm: file-storage Not tainted 4.0.0-3-amd64-next-20150421 #5 [ 84.884026] Hardware name: VIA technology Inc. VX900/EPIA-M860, BIOS 101 07/16/2014 [ 84.884026] task: ffff8800ca2433d0 ti: ffff8800c8b04000 task.ti: ffff8800c8b04000 [ 84.884026] RIP: 0010:[<ffffffffa053f382>] [<ffffffffa053f382>] handle_exception+0x17a/0x2d5 [usb_f_mass_storage] [ 84.884026] RSP: 0018:ffff8800c8b07d78 EFLAGS: 00010046 [ 84.884026] RAX: 0000000000000001 RBX: ffff8800364cd000 RCX: 0000000000000000 [ 84.884026] RDX: 0000000000000000 RSI: 0000000000000286 RDI: ffff8800364cd060 [ 84.884026] RBP: ffff8800ca2433d0 R08: ffff8800c8b04000 R09: ffffffff817de000 [ 84.884026] R10: 0000000000000000 R11: 0000000000000000 R12: ffff8800364cd060 [ 84.884026] R13: 0000000000000000 R14: 0000000000000286 R15: 0000000000000000 [ 84.884026] FS: 0000000000000000(0000) GS:ffff88011fc80000(0000) knlGS:0000000000000000 [ 84.884026] CS: 0010 DS: 0000 ES: 0000 CR0: 000000008005003b [ 84.884026] CR2: 0000000000000008 CR3: 00000000c866c000 CR4: 00000000000006e0 [ 84.884026] Stack: [ 84.884026] ffff8800cb200880 ffffffff8106337e ffff88011fc95228 0000000000000001 [ 84.884026] ffff88011fc951c0 ffff88011fc151c0 ffff8800ca2433d0 ffffffff81063b56 [ 84.884026] 0000000000000001 ffff88011fc151c0 ffff8800ca2433d0 ffffffff81066066 [ 84.884026] Call Trace: [ 84.884026] [<ffffffff8106337e>] ? check_preempt_wakeup+0x103/0x178 [ 84.884026] [<ffffffff81063b56>] ? update_next_balance.constprop.68+0x11/0x3b [ 84.884026] [<ffffffff81066066>] ? pick_next_task_fair+0x1b9/0x313 [ 84.884026] [<ffffffff81049879>] ? kernel_sigaction+0xac/0xb3 [ 84.884026] [<ffffffffa053f4dd>] ? handle_exception+0x2d5/0x2d5 [usb_f_mass_storage] [ 84.884026] [<ffffffffa053f596>] ? fsg_main_thread+0xb9/0x11d1 [usb_f_mass_storage] [ 84.884026] [<ffffffffa053f4dd>] ? handle_exception+0x2d5/0x2d5 [usb_f_mass_storage] [ 84.884026] [<ffffffff81057076>] ? kthread+0xab/0xb3 [ 84.884026] [<ffffffff813bf007>] ? ret_from_fork+0x37/0x70 [ 84.884026] [<ffffffff81056fcb>] ? __kthread_parkme+0x5d/0x5d [ 84.884026] [<ffffffff813bf012>] ? ret_from_fork+0x42/0x70 [ 84.884026] [<ffffffff81056fcb>] ? __kthread_parkme+0x5d/0x5d [ 84.884026] Code: e8 d3 dc ff ff 4c 8d 63 60 4c 89 e7 e8 ba f6 e7 e0 31 c0 3b 83 98 00 00 00 48 8b 93 90 00 00 00 73 13 48 63 c8 ff c0 48 c1 e1 06 <c7> 44 0a 08 00 00 00 00 eb de 8b ab cc 00 00 00 48 89 93 80 00 [ 84.884026] RIP [<ffffffffa053f382>] handle_exception+0x17a/0x2d5 [usb_f_mass_storage] [ 84.884026] RSP <ffff8800c8b07d78> [ 84.884026] CR2: 0000000000000008 [ 84.884026] ---[ end trace df5e645cde8bf80b ]--- [ 99.040068] usb 7-2: reset full-speed USB device number 3 using uhci_hcd [ 125.300063] usb 7-2: reset full-speed USB device number 3 using uhci_hcd