Subject: CVS commit: [netbsd-4] src/sys/dev/scsipi
To: None <source-changes@NetBSD.org>
From: Rui Paulo <rpaulo@netbsd.org>
List: source-changes
Date: 09/08/2006 18:41:21
Module Name: src
Committed By: rpaulo
Date: Fri Sep 8 18:41:21 UTC 2006
Modified Files:
src/sys/dev/scsipi [netbsd-4]: cd.c
Log Message:
Pull up following revision(s) (requested by reinoud in ticket #124):
sys/dev/scsipi/cd.c: revision 1.245
sys/dev/scsipi/cd.c: revision 1.246
sys/dev/scsipi/cd.c: revision 1.247
Fix fencing bug on CD disk size; the comment was wrong, its the *length* of
the device and since we count from zero its equal to the number of sectors
and thus one higher than the last sector.
This fixes the read/write problems on the (raw) device where the last
sector was not readable/writable.
Remove two spurious empty lines in functions
Fix panic on reading/writing to a (raw) CD device and encountering an
error. It now correctly sets bp->b_resid to the full size of the buffer.
The failed SCSI read/write command allways contains the complete buffer.
When encountering a read (or write) error, the scsipi stack sets the
xs->resid to zero since the command has been accepted by the drive. The
scsi command set does not allow a partial read or write to be performed and
will signal a success or an error.
To generate a diff of this commit:
cvs rdiff -r1.242.6.1 -r1.242.6.2 src/sys/dev/scsipi/cd.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.