Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Dec 2003 16:32:06 -0800 (PST)
From:      Dan Strick <strick@covad.net>
To:        freebsd-scsi@freebsd.org
Cc:        dan@mist.nodomain
Subject:   atapicam and residual byte counts
Message-ID:  <200312160032.hBG0W6TN000505@mist.nodomain>

next in thread | raw e-mail | index | archive | help
While hacking on an ATAPI CD-drive via atapicam, I noticed that the
returned data transfer counts for all data input operations (e.g.
mode sense) were too high.  In fact, they were all equal to the
input buffer sizes.  A little hacking revealed that the residual
byte counts in the CAM CCB for scsi i/o operations were always coming
back zero.  I did a little test by placing known data in the back
end of the input buffer before the input operation and observed that
it wasn't being overwritten even though the CAM system claimed the
entire buffer was being filled.

Then I repeated the tests on a real SCSI drive on a real SCSI host
adapter and observed that the residual byte counts in the CAM CCBs
were coming back nonzero when this was appropriate.

Not knowing the actual transfer length for a data transfer presents
a little bit of a challenge.  Is atapicam broken?  I am running
FreeBSD 4.9-Release.

Dan Strick
strick@covad.net



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200312160032.hBG0W6TN000505>