cvs commit: src/sys/cam/scsi scsi_cd.c
Nate Lawson
nate at root.org
Mon Oct 6 09:37:02 PDT 2003
On Mon, 6 Oct 2003, Poul-Henning Kamp wrote:
> Modified files:
> sys/cam/scsi scsi_cd.c
> Log:
> Add disk_destroy() call to detach processing.
>
> Add short tempered TUR to cdsize() as a workaround.
>
> Revision Changes Path
> 1.85 +15 -0 src/sys/cam/scsi/scsi_cd.c
>
> --- src/sys/cam/scsi/scsi_cd.c:1.84 Tue Sep 30 00:52:15 2003
> +++ src/sys/cam/scsi/scsi_cd.c Mon Oct 6 03:39:13 2003
> @@ -2851,6 +2852,20 @@
> softc = (struct cd_softc *)periph->softc;
>
> ccb = cdgetccb(periph, /* priority */ 1);
> +
> + scsi_test_unit_ready(&ccb->csio, 0, cddone,
> + MSG_SIMPLE_Q_TAG, SSD_FULL_SIZE, 1000);
> + ccb->ccb_h.ccb_bp = NULL;
> +
> + error = cam_periph_runccb(ccb, NULL,
> + /*cam_flags*/0,
> + /*sense_flags*/SF_RETRY_UA,
> + softc->disk.d_devstat);
> +
> + if ((ccb->ccb_h.status & CAM_STATUS_MASK) != CAM_REQ_CMP) {
> + xpt_release_ccb(ccb);
> + return (ENXIO);
> + }
>
> rcap_buf = malloc(sizeof(struct scsi_read_capacity_data),
> M_TEMP, M_WAITOK);
Shouldn't the following read capacity command be able to detect the loss
of a drive as well? Did kdm@ review this?
-Nate
More information about the cvs-src
mailing list