Ricardo, it no longer locks up but if I try to write to the drive, I get cycles of: [ 2334.127653] ------------[ cut here ]------------ [ 2334.128318] WARNING: CPU: 0 PID: 2140 at drivers/usb/gadget/udc/net2280.c:816 start_dma+0x153/0x160 [net2280]() [ 2334.129105] Modules linked in: g_mass_storage usb_f_mass_storage libcomposite configfs net2280 udc_core snd_hda_codec_hdmi i915 rfcomm bnep bluetooth snd_hda_codec_realtek snd_hda_codec_generic intel_rapl x86_pkg_temp_thermal snd_hda_intel intel_powerclamp coretemp snd_hda_controller kvm_intel snd_hda_codec kvm drm_kms_helper snd_hwdep snd_pcm drm snd_seq_midi joydev snd_seq_midi_event snd_rawmidi hid_generic snd_seq eeepc_wmi asus_wmi sparse_keymap crct10dif_pclmul usbhid crc32_pclmul ghash_clmulni_intel aesni_intel snd_seq_device snd_timer aes_x86_64 hid lrw gf128mul glue_helper snd ablk_helper mei_me mei cryptd serio_raw lpc_ich i2c_algo_bit wmi soundcore video tpm_infineon mac_hid parport_pc ppdev lp parport e1000e psmouse r8169 ahci ptp libahci mii pps_core [ 2334.132731] CPU: 0 PID: 2140 Comm: file-storage Tainted: G W 3.17.0-rc5+ #2 [ 2334.133438] Hardware name: ASUS All Series/Q87T, BIOS 0215 09/06/2013 [ 2334.134146] 0000000000000009 ffff8804087a3d28 ffffffff81746707 0000000000000000 [ 2334.134863] ffff8804087a3d60 ffffffff8106c93d ffff88002e693478 ffff8803efd14480 [ 2334.135583] ffffc900018fc1a0 ffff8803efd144e8 ffff88002e693320 ffff8804087a3d70 [ 2334.136299] Call Trace: [ 2334.137023] [<ffffffff81746707>] dump_stack+0x45/0x56 [ 2334.137734] [<ffffffff8106c93d>] warn_slowpath_common+0x7d/0xa0 [ 2334.138433] [<ffffffff8106ca1a>] warn_slowpath_null+0x1a/0x20 [ 2334.139109] [<ffffffffa0372103>] start_dma+0x153/0x160 [net2280] [ 2334.139795] [<ffffffffa0373b1b>] net2280_queue+0x2db/0x480 [net2280] [ 2334.140449] [<ffffffffa03b94f1>] start_transfer.isra.32+0x71/0xe0 [usb_f_mass_storage] [ 2334.141128] [<ffffffffa03b959e>] start_out_transfer+0x3e/0x80 [usb_f_mass_storage] [ 2334.141772] [<ffffffffa03ba967>] fsg_main_thread+0x207/0x17f0 [usb_f_mass_storage] [ 2334.142374] [<ffffffff81749eda>] ? __schedule+0x37a/0x830 [ 2334.142950] [<ffffffffa03ba760>] ? handle_exception+0x460/0x460 [usb_f_mass_storage] [ 2334.143534] [<ffffffff8108a3e2>] kthread+0xd2/0xf0 [ 2334.144054] [<ffffffff8108a310>] ? kthread_create_on_node+0x180/0x180 [ 2334.144595] [<ffffffff8174ecbc>] ret_from_fork+0x7c/0xb0 [ 2334.145155] [<ffffffff8108a310>] ? kthread_create_on_node+0x180/0x180 [ 2334.145699] ---[ end trace 4ded8927b95f4eec ]--- followed by: [ 2396.154501] net2280 0000:01:00.0: The dmastat return = 5002!! [ 2396.253653] g_mass_storage gadget: super-speed config #1: Linux File-Backed Storage Unplugging and re-plugging the USB cable does allow me to remount the volume. Paul. On 25 Nov 2014, at 15:24, Ricardo Ribalda Delgado <ricardo.ribalda@xxxxxxxxx> wrote: > Could you try > if (likely(t & (BIT(FIFO_EMPTY) | BIT(NAK_OUT_PACKETS)))){ > > instead of > > if (likely(t & BIT(FIFO_EMPTY))) > > > And tell if it works better -- 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