Re: JMicron 20337 (152d:2338) and 3TB

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

 



On Tue, 8 May 2012, Norman Diamond wrote:

> In my case there is no other way that a host (PC or other, any OS or
> driver) could obtain a reported capacity past the 2.2TB mark.  
> Sometimes I guess a USB-to-[S]ATA bridge might obey ATA passthru of
> an ATA Identify command though I haven't seen one.

There definitely are some bridges which handle ATA passthru correctly.

> >> I have a feeling we have to do both READ CAPACITY(10) and READ
> >> CAPACITY(16), and if we see wraparound then we should either truncate
> >> the drive to 2.2TB or avoid the drive entirely.� I think truncation
> >> is safe enough at this point -- if a partition gets truncated then
> >> subsequent attempts to mount will fail, so any existing but
> >> inaccessible data will be safe from harm, while accessible data will
> >> be read and written correctly.
> > 
> > That sounds like the best approach.� You would want to do this for all 
> > USB drives?� Or only those known to be (S)ATA bridges?
> 
> I think it's needed with [S]ATA bridges, whether or not we know that
> they're bridges.  I think it's probably not needed with anything
> else, but it probably doesn't hurt to do it with anything else.  
> Therefore it's probably safest to do it with all USB drives.

Except that READ CAPACITY(16) might cause some buggy devices to crash.  
I guess there wasn't much point in asking the question...

Putting everything together, it looks like you're asking for three new 
flags:

	CAPACITY_10_AND_16: Issue both READ CAPACITY and READ 
	CAPACITY(16), and if READ CAPACITY(16) gives a result > 2 TB 
	and READ CAPACITY doesn't give 0xffffffff, truncate the size to 
	2 TB;

	CAPACITY_HEURISTICS_63: Don't decrement the capacity if
	the reported capacity is a multiple of 63, but otherwise behave
	like CAPACITY_HEURISTICS;

	TEST_CAPACITY: Try to do a single-block read of the last 
	reported block.

Right?

Alan Stern

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