Date: Mon, 6 Oct 2003 09:36:58 -0700 (PDT) From: Nate Lawson <nate@root.org> To: Poul-Henning Kamp <phk@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/cam/scsi scsi_cd.c Message-ID: <20031006093515.S3158@root.org> In-Reply-To: <20031006103947.3112D16A55A@hub.freebsd.org> References: <20031006103947.3112D16A55A@hub.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031006093515.S3158>
