From owner-cvs-all@FreeBSD.ORG Mon Oct 6 09:37:02 2003 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 47F4F16A4B3 for ; Mon, 6 Oct 2003 09:37:02 -0700 (PDT) Received: from rootlabs.com (root.org [67.118.192.226]) by mx1.FreeBSD.org (Postfix) with SMTP id 4D1A243F75 for ; Mon, 6 Oct 2003 09:37:00 -0700 (PDT) (envelope-from nate@rootlabs.com) Received: (qmail 3190 invoked by uid 1000); 6 Oct 2003 16:36:58 -0000 Date: Mon, 6 Oct 2003 09:36:58 -0700 (PDT) From: Nate Lawson To: Poul-Henning Kamp In-Reply-To: <20031006103947.3112D16A55A@hub.freebsd.org> Message-ID: <20031006093515.S3158@root.org> References: <20031006103947.3112D16A55A@hub.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/cam/scsi scsi_cd.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2003 16:37:02 -0000 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