f8e8703b5e
By code inspection I found 2 bugs in the ATAPI code, one may be the cause of your problem: A counter is not reset when issuing the request_sense command. This is c_skip, the counter used to track the offset in the data buffer when a data tranfer needs multiple phases. The effect of this is that the sense data transfered may be stored outside the sense buffer (sense buffer + some, potentially several KB, offset). This can only occur in PIO mode, DMA is not affected. This doesn't occur in "normal" use because when reading a data CD, either the sense is issued for a non-data command (in which case c_skip stays to 0), or an error occured and no data has been transfered, and c_skip is still 0. I can't see a case where a data READ/WRITE could cause a sense tranfer without error. The second problem is that b_resid can be set to a false value (resulting of the sense tranfer and not the data transfer). Again this is not a problem with usual data tranfers because both values ends up being 0 when no error occurs. |
||
---|---|---|
.. | ||
atapi_all.h | ||
atapi_base.c | ||
atapi_cd.h | ||
atapi_disk.h | ||
atapi_wdc.c | ||
atapiconf.c | ||
atapiconf.h | ||
cd_atapi.c | ||
cd_scsi.c | ||
cd.c | ||
cdvar.h | ||
ch.c | ||
files.scsipi | ||
if_se.c | ||
Makefile | ||
scsi_all.h | ||
scsi_base.c | ||
scsi_cd.h | ||
scsi_changer.h | ||
scsi_ctron_ether.h | ||
scsi_disk.h | ||
scsi_message.h | ||
scsi_scanner.h | ||
scsi_tape.h | ||
scsiconf.c | ||
scsiconf.h | ||
scsipi_all.h | ||
scsipi_base.c | ||
scsipi_base.h | ||
scsipi_cd.h | ||
scsipi_debug.h | ||
scsipi_disk.h | ||
scsipi_ioctl.c | ||
scsipi_verbose.c | ||
scsipiconf.c | ||
scsipiconf.h | ||
sd_atapi.c | ||
sd_scsi.c | ||
sd.c | ||
sdvar.h | ||
ss_mustek.c | ||
ss_mustek.h | ||
ss_scanjet.c | ||
ss.c | ||
ssvar.h | ||
st.c | ||
su.c | ||
uk.c |