Re: Regression - Linux 4.9: ums_eneub6250 broken: transfer buffer not dma capable - Trace

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

 



Am 21.04.2017 um 20:53 schrieb Alan Stern:
On Fri, 21 Apr 2017, Andreas Hartmann wrote:

Same here.  So the reason usb_stor_set_xfer_buf() wasn't working is
because it never got called!

Knowing that, it's easy to see where the bug is.  It's a completely
different issue from the bad DMA problem.  In fact, I'm surprised that
this driver ever worked at all.

Please try the patch below.  (You can remove the usb_stor_set_xfer_buf
patch.)


Sadly it doesn't work at all (I removed the SD-Card to stop the log entries ...):


Apr 21 19:35:23 notebook2 kernel: usb 1-1.1: new high-speed USB device number 4 using ehci-pci
Apr 21 19:35:23 notebook2 kernel: usb 1-1.1: New USB device found, idVendor=0cf2, idProduct=6250
Apr 21 19:35:23 notebook2 kernel: usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=4
Apr 21 19:35:23 notebook2 kernel: usb 1-1.1: Product: UB6250
Apr 21 19:35:23 notebook2 kernel: usb 1-1.1: Manufacturer: ENE Flash
Apr 21 19:35:23 notebook2 kernel: usb 1-1.1: SerialNumber: 606569746801
Apr 21 19:35:23 notebook2 kernel: ums_eneub6250 1-1.1:1.0: USB Mass Storage device detected
Apr 21 19:35:23 notebook2 kernel: scsi host6: usb-storage 1-1.1:1.0
Apr 21 19:35:23 notebook2 mtp-probe[2349]: checking bus 1, device 4: "/sys/devices/pci0000:00/0000:00:1a.0/usb1/1-1/1-1.1"
Apr 21 19:35:23 notebook2 mtp-probe[2349]: bus: 1, device: 4 was not an MTP device
Apr 21 19:35:24 notebook2 kernel: usb 1-1.1: direct-loading ene-ub6250/sd_init1.bin
Apr 21 19:35:24 notebook2 kernel: usb 1-1.1: direct-loading ene-ub6250/sd_init2.bin
Apr 21 19:35:24 notebook2 kernel: scsi 6:0:0:0: Direct-Access     USB2.0   CardReader       0100 PQ: 0 ANSI: 2

At least the INQUIRY data is now correct.  The patch is partially
working.

Apr 21 19:35:24 notebook2 kernel: sd 6:0:0:0: [sdb] 3985408 512-byte logical blocks: (2.04 GB/1.90 GiB)
Apr 21 19:35:24 notebook2 kernel: sd 6:0:0:0: Attached scsi generic sg2 type 0
Apr 21 19:35:24 notebook2 kernel: sd 6:0:0:0: [sdb] Write Protect is off
Apr 21 19:35:24 notebook2 kernel: sd 6:0:0:0: [sdb] Mode Sense: 0b 00 00 08
Apr 21 19:35:24 notebook2 kernel: sd 6:0:0:0: [sdb] No Caching mode page found
Apr 21 19:35:24 notebook2 kernel: sd 6:0:0:0: [sdb] Assuming drive cache: write through
Apr 21 19:35:24 notebook2 kernel: usb 1-1.1: reset high-speed USB device number 4 using ehci-pci
Apr 21 19:35:24 notebook2 kernel: usb 1-1.1: reset high-speed USB device number 4 using ehci-pci
Apr 21 19:35:25 notebook2 kernel: usb 1-1.1: reset high-speed USB device number 4 using ehci-pci
Apr 21 19:35:25 notebook2 kernel: usb 1-1.1: reset high-speed USB device number 4 using ehci-pci

It's hard to see why all those resets are occurring.

Can you run this test again and capture a usbmon trace?  Just one will
be enough.

And at the same time, please enable kernel debugging for the driver.
Before starting the test, do:

	modprobe ums_eneub6250
	echo 'module ums_eneub6250 =p' >/sys/kernel/debug/dynamic_debug/control
	dmesg -C


Alan got a usbmon-trace, too.

Here it goes:

[  337.698916] usb 1-1.1: new high-speed USB device number 3 using ehci-pci
[  337.808695] usb 1-1.1: New USB device found, idVendor=0cf2, idProduct=6250
[  337.808702] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=4
[  337.808706] usb 1-1.1: Product: UB6250
[  337.808709] usb 1-1.1: Manufacturer: ENE Flash
[  337.808713] usb 1-1.1: SerialNumber: 606569746801
[  337.809148] ums_eneub6250 1-1.1:1.0: USB Mass Storage device detected
[  337.810232] scsi host6: usb-storage 1-1.1:1.0
[  338.838194] usb 1-1.1: direct-loading ene-ub6250/sd_init1.bin
[  339.021724] usb 1-1.1: direct-loading ene-ub6250/sd_init2.bin
[  339.032399] scsi 6:0:0:0: Direct-Access     USB2.0   CardReader       0100 PQ: 0 ANSI: 2
[  339.032654] sd 6:0:0:0: [sdb] 3985408 512-byte logical blocks: (2.04 GB/1.90 GiB)
[  339.032697] sd 6:0:0:0: [sdb] Write Protect is off
[  339.032698] sd 6:0:0:0: Attached scsi generic sg2 type 0
[  339.032704] sd 6:0:0:0: [sdb] Mode Sense: 0b 00 00 08
[  339.032736] sd 6:0:0:0: [sdb] No Caching mode page found
[  339.032744] sd 6:0:0:0: [sdb] Assuming drive cache: write through
[  339.118833] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  339.322803] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  339.526902] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  339.730932] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  339.934901] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  340.138893] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  340.252054] usb 1-1.1: direct-loading ene-ub6250/sd_rdwr.bin
[  340.346855] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  340.550925] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  340.754885] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  340.958881] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  341.162916] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  341.366887] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  341.476078] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_ERROR driverbyte=DRIVER_OK
[  341.476084] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  341.476087] blk_update_request: I/O error, dev sdb, sector 0
[  341.476098] Buffer I/O error on dev sdb, logical block 0, async page read
[  341.562891] usb 1-1.1: reset high-speed USB device number 3 using ehci-pci
[  342.066836] usb 1-1.1: device not accepting address 3, error -71
[  342.087766] usb 1-1.1: USB disconnect, device number 3
[  342.102841] sd 6:0:0:0: [sdb] tag#0 FAILED Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[  342.102847] sd 6:0:0:0: [sdb] tag#0 CDB: Read(10) 28 00 00 00 00 00 00 00 08 00
[  342.102850] blk_update_request: I/O error, dev sdb, sector 0
[  342.102858] Buffer I/O error on dev sdb, logical block 0, async page read
[  342.102932] ldm_validate_partition_table(): Disk read failed.
[  342.103002]  sdb: unable to read partition table
[  342.103283] sd 6:0:0:0: [sdb] Read Capacity(10) failed: Result: hostbyte=DID_NO_CONNECT driverbyte=DRIVER_OK
[  342.103286] sd 6:0:0:0: [sdb] Sense not available.
[  342.103310] sd 6:0:0:0: [sdb] Attached SCSI removable disk


Hope this helps!


Thanks,
Andreas

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