Re: request for test with your quirky drive enclosure

Alan Stern <[email protected]>
Newsgroups gmane.linux.usb.devel
Message-ID <[email protected]>
On Wed, 31 Jan 2007, Oliver Neukum wrote:

> Hi,
> 
> could you please test this with your storage device. It tries to implement
> a heuristics which will work with both versions of the firmware.
> 
> 	Regards
> 		Oliver

If some other device ends up needing this in the future, what makes you 
think the heuristic you have chosen will be appropriate?

> +	/* Some devices have version which report the correct sizes
> +	 * and others which do not. We guess size according toa heuristic
> +	 * and err on the side of lowering the capacity. */
> +	if (sdp->guess_capacity)

The patch doesn't define sdp->guess_capacity anywhere.

> +		if (sdkp->capacity % 63 || sdkp->capacity % 255)
> +			--sdkp->capacity;

This is a strange computation.  You avoid decrementing the capacity iff it
is already divisible both by 63 and by 255.  Maybe you really want to use
&& rather than || ?  The idea being, I presume, that the last partition
will extend only as far as a pseudo-cylinder boundary.

Alan Stern


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
[email protected]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.