Re: [PATCH] Improve code for detecting errors near the end of a CD

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

 



On Thu, 20 Oct 2005, Douglas Gilbert wrote:

> Alan,
> Ouch.
> Here is the linux kernel version (scsi_error.c):
> 
>     case 0x70:
>     case 0x71:
>         if (sense_buffer[0] & 0x80) {
>             *info_out = (sense_buffer[3] << 24) +
>                         (sense_buffer[4] << 16) +
>                         (sense_buffer[5] << 8) +
>                         sense_buffer[6];
>             return 1;
>         } else
>             return 0;
> 
> and here is the sg3_utils version (sg_lib.c):
> 
>     case 0x70:
>     case 0x71:
>         if (info_outp)
>             *info_outp = (sensep[3] << 24) + (sensep[4] << 16) +
>                          (sensep[5] << 8) + sensep[6];
>         return (sensep[0] & 0x80) ? 1 : 0;
> 
> The latter implementation takes account of MMC devices.
> So I probably need to send a patch.

I can see that the newer version always stores an information value.  Are 
you suggesting that sr.c should ignore the return value and try to use 
info whenever it is nonzero and within the appropriate range?  Or should 
the decision to use info when the return value is 0 be based somehow on 
other information about the device?

Alan Stern

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