Subject: datalen in scsi cmds
To: None <tech-kern@netbsd.org>
From: Manuel Bouyer <bouyer@antioche.lip6.fr>
List: tech-kern
Date: 08/05/1998 18:57:26
Hi,

While working on DMA for atapi devices, I  noticed that some scsi
drivers actually uses unions for data returned by these commands.
The result is that the datalen passed may be greater than the real
size of the transfert (some audio CD commands do this).
Could't this break with some SCSI adapters drivers ? This is also the
reason of the "wdc_atapi_intr warning: bcount value is %d after io" messages
you can see with a DIAGNOSTIC kernel.

Actually, as a sanity check I check that DMA transfered the expected
number of bytes. But of course this break if the upper level gave us the
wrong data size.

Should I fix the scsi driver, or remove my check from the IDE/ATAPI driver ?

--
Manuel Bouyer, LIP6, Universite Paris VI.               Manuel.Bouyer@lip6.fr
--