JMicron USB bridges may return empty sense data on error
I noticed that when an incorrect pass-through command (or command data) is sent over a JMicron USB, usbjmicron_device::ata_pass_through returns true, indicating success.
If I use a different USB, the call is routed to sat_device::ata_pass_through instead. That method correctly returns false with the same incorrect command/data because you parse the sense data extensively and check for various errors.
When debugging and breaking at this spot, I noticed there is indeed an indication the command failed (io_hdr.scsi_status == 2 (CHECK CONDITION)), but you aren't checking it. There's barely any error checking at all compared to sat_device::ata_pass_through.
Is this an oversight with the JMicron support? I noticed with Cypress support, you do a basic check here. This doesn't appear to be the case with Prolific support though, where you also don't check the sense.
Let me know what you think. Maybe consider copying all the error checking code over from sat_device::ata_pass_through.
Change History (6)
comment:1 by , 22 months ago
|smartctl → all
comment:5 by , 22 months ago
|JMicron pass-through does not check returned sense data → JMicron USB bridges may return empty sense data on error
|defect → enhancement