Re: System hangs when using USB 3.0 HD with on Ubuntu

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

 



Alan Stern wrote:
> On Wed, 21 Apr 2010, James Bottomley wrote:
[Mark Lord wrote]
>> > That said.. what would you recommend as a way for a userspace
>> > program to figure out whether to use ATA_12 or ATA_16 to talk
>> > to a given arbitrary device name ?
>> 
>> To be honest, no.  For USB, All USB is SCSI or RBC command based. You
>> don't have any idea whether it's a real SCSI device or an ATA device
>> behind a SAT  ... the only reason you assume it's ATA is because USB
>> gadget builders tend to be cheapskates.
>> 
>> > I guess the info is in sysfs somewhere.
>> 
>> Only for direct interconnects.  For USB most bets are off.
> 
> You can find out whether the device might be MMC by sending an ordinary
> SCSI INQUIRY command.  (Or you can get the device type from the
> "modalias" attribute file in the device's sysfs directory, which just
> shows the information the kernel got when _it_ sent an INQUIRY
> command.)

Some firmwares start behaving irregularly if they get INQUIRY in an
order that the firmware author did not expect.  (I.e. not as the very
first request.)  Hence use the kernel's inquiry data from sysfs whenever
possible, instead of an own INQUIRY.
-- 
Stefan Richter
-=====-==-=- -=-- =-==-
http://arcgraph.de/sr/
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux