Re: "Fix ATAPI transfer lengths" causes CD writing regression

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

 



> "one size" that you can supply to the SG_IO command (unless you want to 
> use a stupidly large buffer) to retrieve all the data at once. Instead, 
> as Tejun describes, you put a short read request in first, look at byte 
> 1 of the page which tells you the length, and then read the whole lot.

ATAPI effectively requires you supply a stupidly large buffer. In theory
you set the transfer size in the lba registers and it all works. In
practice some drives ignore this and there isn't a nice reliable way to
clean up.

Old IDE tries to pio the extra out but that won't work on all controllers
so the wrong combination will still blow up on you.

> Again, ignore me if I'm not contributing anything useful, but I'm 
> increasingly thinking that the SG_IO command block in question is 
> perfectly valid, and doing a short read of the mode page in question 
> (and probably others too) is in fact required before you can know its 
> true size to do a full read anyway.

Welcome to the wonderful world of IDE, where the spec sucks and the
drives manage to do even worse things.

We can try and clean up better in these cases at least for PIO transfers
by trying to drain the data beyond this point, on the controllers that
cope with this but really - fix the app to reflect reality: ATAPI is SCSI
as spoken by yokels

Alan
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux