Re: [BUG] USB mass storage device incomplete read command sequence

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

 



The TUR commands come from the sd_mod (I think).  Definitely not from
usb-storage.  So I would take it up at that level.

Matt

On Wed, Jan 3, 2018 at 4:25 PM, Eduardo Trápani <etrapani@xxxxxxxxx> wrote:
> Usually the kernel reads the pendrive like this:
>
> TEST UNIT READY
> READ(10)
> ...
> READ(10)
> TEST UNIT READY
>
> But under some conditions, the last TEST UNIT READY is not being sent
> and because of that, on this device: Kingston DT 101 G2, the drive's
> activity light keeps on blinking even though nothing is being done (no
> read/writes/inquiries).
>
> When that happens, manually sending a TEST UNIT READY stops the blinking
> and turns off the light.
>
> # sg_turs /dev/sdc
>
> For example this works alright (light blinks for a moment and then it's
> off):
>
> # dd if=/dev/sdc of=/dev/null bs=512 count=96
>
> But this doesn't (the light keeps on blinking forever)
>
> # dd if=/dev/sdb of=/dev/null bs=512 count=97
>
> I checked with usbmon and I noticed the lack of the final TEST UNIT
> READY in the cases where the light keeps on blinking.
>
> For the tests the drive was unmounted. As soon as I mount it and start
> working on it, the light will blink non-stop.
>
> I also tested this with a Raspberry (Linux frambo 4.1.17+ #838 Tue Feb 9
> 12:57:10 GMT 2016 armv6l GNU/Linux), and the device behaves normally,
> that is, blinking stops as soon as traffic stops.
>
>
> Find attached the pcap file for both cases and part of the kernel dmesg.
> This is the kernel with the problem: Linux arbo 4.9.0-4-amd64 #1 SMP
> Debian 4.9.65-3+deb9u1 (2017-12-23) x86_64 GNU/Linux
>
> Eduardo.
>



-- 
Matthew Dharm
Former Maintainer, USB Mass Storage driver for Linux
--
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