Ricardo, count = 0, req->valid = 1, le32_to_cpu(req->td->dmacount) = 2952791040 Paul. On 25 Nov 2014, at 13:09, Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> wrote: > Could you print > > count, req->valid and le32_to_cpu(req->td->dmacount) just before udelay(1) > > Thanks! > > On Tue, Nov 25, 2014 at 12:05 PM, Paul Jones <p.jones@xxxxxxxxxx> wrote: >> Ricardo, >> >> I added a ep_warn before and after the loop and right after connecting my Mac it passes through that loop many times. >> Even without writing to the device I then get the lockup message while inside the loop (ep->dev = ep-b). >> >> Paul. >> >> On 25 Nov 2014, at 02:06, Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> wrote: >> >>> Hello >>> >>> Could you check if the code is stalled at this loop ? >>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/drivers/usb/gadget/udc/net2280.c#n2594 >>> >>> Regards! >>> >>> On Thu, Nov 13, 2014 at 3:37 PM, Paul Jones <p.jones@xxxxxxxxxx> wrote: >>>> Hi, >>>> >>>> using the latest kernel from https://git.kernel.org/cgit/linux/kernel/git/balbi/usb.git/ with a USB3380 I get a kernel lockup after setting up an emulated drive and start using it. >>>> >>>> In order to reproduce: >>>> dd if=/dev/zero of=<somefile> bs=64k count=102400 >>>> modprobe net2280 >>>> modprobe g_mass_storage file=<somefile> >>>> I then connect the cable to my Mac, quick format the drive (this works), mount the drive (works as well) and then do write a large file: >>>> dd if=/dev/zero of=<mountpoint>/file bs=64k count=10240 >>>> I then almost immediately get: >>>> [ 115.886330] ------------[ cut here ]------------ >>>> [ 115.886335] WARNING: CPU: 3 PID: 0 at kernel/watchdog.c:267 watchdog_overflow_callback+0x9c/0xd0() >>>> [ 115.886336] Watchdog detected hard LOCKUP on cpu 3 >>>> [ 115.886336] Modules linked in: g_mass_storage net2280 usb_f_mass_storage libcomposite udc_core configfs snd_hda_codec_hdmi i915 snd_hda_codec_realtek snd_hda_codec_generic snd_hda_intel snd_hda_controller snd_hda_codec intel_rapl x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm snd_hwdep snd_pcm joydev snd_seq_midi hid_generic crct10dif_pclmul snd_seq_midi_event crc32_pclmul snd_rawmidi ghash_clmulni_intel eeepc_wmi asus_wmi sparse_keymap aesni_intel drm_kms_helper snd_seq drm usbhid hid snd_seq_device aes_x86_64 lrw gf128mul glue_helper snd_timer ablk_helper cryptd snd mei_me mei serio_raw soundcore lpc_ich i2c_algo_bit wmi video mac_hid tpm_infineon rfcomm bnep bluetooth parport_pc ppdev lp parport e1000e psmouse r8169 ptp ahci libahci pps_core mii >>>> [ 115.886361] CPU: 3 PID: 0 Comm: swapper/3 Not tainted 3.17.0-rc5+ #2 >>>> [ 115.886362] Hardware name: ASUS All Series/Q87T, BIOS 0215 09/06/2013 >>>> [ 115.886363] 0000000000000009 ffff88041fb86c10 ffffffff81746707 ffff88041fb86c58 >>>> [ 115.886364] ffff88041fb86c48 ffffffff8106c93d ffff8804097fc000 0000000000000000 >>>> [ 115.886365] ffff88041fb86d70 0000000000000000 ffff88041fb86ef8 ffff88041fb86ca8 >>>> [ 115.886367] Call Trace: >>>> [ 115.886368] <NMI> [<ffffffff81746707>] dump_stack+0x45/0x56 >>>> [ 115.886373] [<ffffffff8106c93d>] warn_slowpath_common+0x7d/0xa0 >>>> [ 115.886374] [<ffffffff8106c9ac>] warn_slowpath_fmt+0x4c/0x50 >>>> [ 115.886376] [<ffffffff8111a23c>] watchdog_overflow_callback+0x9c/0xd0 >>>> [ 115.886379] [<ffffffff811579ed>] __perf_event_overflow+0x8d/0x230 >>>> [ 115.886381] [<ffffffff81029db8>] ? x86_perf_event_set_period+0xe8/0x150 >>>> [ 115.886383] [<ffffffff81158454>] perf_event_overflow+0x14/0x20 >>>> [ 115.886385] [<ffffffff8103136d>] intel_pmu_handle_irq+0x1ed/0x3e0 >>>> [ 115.886386] [<ffffffff81028abb>] perf_event_nmi_handler+0x2b/0x50 >>>> [ 115.886388] [<ffffffff81016fd8>] nmi_handle+0x88/0x120 >>>> [ 115.886389] [<ffffffff810175de>] default_do_nmi+0xde/0x140 >>>> [ 115.886390] [<ffffffff810176c8>] do_nmi+0x88/0xc0 >>>> [ 115.886392] [<ffffffff81751171>] end_repeat_nmi+0x1e/0x2e >>>> [ 115.886394] [<ffffffff8138099a>] ? delay_tsc+0x3a/0x80 >>>> [ 115.886395] [<ffffffff8138099a>] ? delay_tsc+0x3a/0x80 >>>> [ 115.886396] [<ffffffff8138099a>] ? delay_tsc+0x3a/0x80 >>>> [ 115.886397] <<EOE>> <IRQ> [<ffffffff813808dc>] __const_udelay+0x2c/0x30 >>>> [ 115.886400] [<ffffffffa054be3a>] net2280_irq+0x76a/0x15a8 [net2280] >>>> [ 115.886402] [<ffffffff8148df1c>] ? add_interrupt_randomness+0x3c/0x1f0 >>>> [ 115.886405] [<ffffffff810c090e>] handle_irq_event_percpu+0x3e/0x1a0 >>>> [ 115.886407] [<ffffffff810c0aad>] handle_irq_event+0x3d/0x60 >>>> [ 115.886408] [<ffffffff810c3657>] handle_edge_irq+0x77/0x130 >>>> [ 115.886410] [<ffffffff810154ee>] handle_irq+0x1e/0x30 >>>> [ 115.886411] [<ffffffff81751b6f>] do_IRQ+0x4f/0xf0 >>>> [ 115.886412] [<ffffffff8174f9ed>] common_interrupt+0x6d/0x6d >>>> [ 115.886413] <EOI> [<ffffffff815f4490>] ? cpuidle_enter_state+0x70/0x170 >>>> [ 115.886416] [<ffffffff815f4647>] cpuidle_enter+0x17/0x20 >>>> [ 115.886417] [<ffffffff810aad9d>] cpu_startup_entry+0x31d/0x340 >>>> [ 115.886419] [<ffffffff810dde88>] ? clockevents_config_and_register+0x28/0x30 >>>> [ 115.886421] [<ffffffff81045237>] start_secondary+0x1a7/0x250 >>>> [ 115.886422] ---[ end trace e31adb6e2f340f5d ]— >>>> >>>> Output from lspci: >>>> 00:00.0 Host bridge: Intel Corporation 4th Gen Core Processor DRAM Controller (rev 06) >>>> 00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor PCI Express x16 Controller (rev 06) >>>> 00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller (rev 06) >>>> 00:03.0 Audio device: Intel Corporation Xeon E3-1200 v3/4th Gen Core Processor HD Audio Controller (rev 06) >>>> 00:14.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB xHCI (rev 05) >>>> 00:16.0 Communication controller: Intel Corporation 8 Series/C220 Series Chipset Family MEI Controller #1 (rev 04) >>>> 00:16.3 Serial controller: Intel Corporation 8 Series/C220 Series Chipset Family KT Controller (rev 04) >>>> 00:19.0 Ethernet controller: Intel Corporation Ethernet Connection I217-LM (rev 05) >>>> 00:1a.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #2 (rev 05) >>>> 00:1b.0 Audio device: Intel Corporation 8 Series/C220 Series Chipset High Definition Audio Controller (rev 05) >>>> 00:1c.0 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #1 (rev d5) >>>> 00:1c.2 PCI bridge: Intel Corporation 8 Series/C220 Series Chipset Family PCI Express Root Port #3 (rev d5) >>>> 00:1d.0 USB controller: Intel Corporation 8 Series/C220 Series Chipset Family USB EHCI #1 (rev 05) >>>> 00:1f.0 ISA bridge: Intel Corporation Q87 Express LPC Controller (rev 05) >>>> 00:1f.2 SATA controller: Intel Corporation 8 Series/C220 Series Chipset Family 6-port SATA Controller 1 [AHCI mode] (rev 05) >>>> 00:1f.3 SMBus: Intel Corporation 8 Series/C220 Series Chipset Family SMBus Controller (rev 05) >>>> 01:00.0 USB controller: PLX Technology, Inc. Device 3380 (rev ab) >>>> 03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 0c) >>>> >>>> Perhaps I have something incorrectly configured in the kernel so I’ve attached my kernel.config for reference. >>>> The machine seems to be running fine on that kernel for the rest. >>>> Let me know if I can do any other tests to help figure out the problem. >>>> >>>> Paul. >>>> >>> >>> >>> >>> -- >>> Ricardo Ribalda >>> -- >>> 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 >> > > > > -- > Ricardo Ribalda -- 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