On Wed, 7 Feb 2007, Oliver Neukum wrote:

> --- a/drivers/scsi/sd.c       2007-02-06 14:14:48.000000000 +0100
> +++ b/drivers/scsi/sd.c       2007-02-07 15:14:01.000000000 +0100
> @@ -1273,6 +1273,13 @@
>       if (sdp->fix_capacity)
>               --sdkp->capacity;
>  
> +     /* Some devices have version which report the correct sizes
> +      * and others which do not. We guess size according to a heuristic
> +      * and err on the side of lowering the capacity. */
> +     if (sdp->guess_capacity)
> +             if (sdkp->capacity & 0x01) /* odd sizes are odd */
> +                     --sdkp->capacity;

Please make this "else if ...".  Just in case somebody ever manages to set 
both sdp->fix_capacity and sdp->guess_capacity.

Otherwise it looks reasonable to me.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to