From owner-freebsd-scsi Mon Jun 25 5:52:36 2001 Delivered-To: freebsd-scsi@freebsd.org Received: from gate.qubesoft.com (gate.qubesoft.com [212.113.16.243]) by hub.freebsd.org (Postfix) with ESMTP id D36E437B405 for ; Mon, 25 Jun 2001 05:52:31 -0700 (PDT) (envelope-from n_hibma@FreeBSD.ORG) Received: from bluebottle.qubesoft.com (bluebottle [192.168.1.2]) by gate.qubesoft.com (8.11.3/8.11.3) with ESMTP id f5PCqTl91935; Mon, 25 Jun 2001 13:52:30 +0100 (BST) (envelope-from n_hibma@FreeBSD.ORG) Received: from localhost (localhost [127.0.0.1]) by bluebottle.qubesoft.com (8.11.4/8.11.4) with ESMTP id f5PCqSW36781; Mon, 25 Jun 2001 13:52:28 +0100 (BST) (envelope-from n_hibma@FreeBSD.ORG) Date: Mon, 25 Jun 2001 13:52:28 +0100 (BST) From: X-X-Sender: To: Matthew Jacob Cc: , Subject: Re: umass changes for CAM_NEW_TRAN_CODE In-Reply-To: Message-ID: <20010625135102.P53103-100000@bluebottle> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org cts->protocol_version should be SCSI_REV_0 or something along those lines. The implementation of the *_transform functions and the implementations of the hardware don't allow for much else. Why doesn't CAM fish those values out of the Inquiry data like it does now (or doesn't it, if SCSI level is 0)? Feel free to commit. Nick > FWIW... I can't test it (no h/w). > > Index: umass.c > =================================================================== > RCS file: /home/ncvs/src/sys/dev/usb/umass.c,v > retrieving revision 1.41 > diff -u -r1.41 umass.c > --- umass.c 2001/01/08 00:25:52 1.41 > +++ umass.c 2001/06/25 03:47:54 > @@ -2328,7 +2328,10 @@ > cpi->bus_id = UMASS_SCSI_BUS; > if (sc) > cpi->base_transfer_speed = sc->transfer_speed; > - > +#ifdef CAM_NEW_TRAN_CODE > + cpi->transport = XPORT_SPI; > + cpi->transport_version = 2; > +#endif > cpi->ccb_h.status = CAM_REQ_CMP; > xpt_done(ccb); > break; > @@ -2347,13 +2350,22 @@ > { > struct ccb_trans_settings *cts = &ccb->cts; > > - DPRINTF(UDMASS_SCSI, ("%s:%d:%d:%d:XPT_GET_TRAN_SETTINGS:.\n", > - USBDEVNAME(sc->sc_dev), cam_sim_path(umass_sim), > - ccb->ccb_h.target_id, ccb->ccb_h.target_lun)); > +#ifdef CAM_NEW_TRAN_CODE > + cts->protocol = PROTO_SCSI; > + cts->protocol_version = SCSI_REV_2; > + cts->transport = XPORT_SPI; > + cts->transport_version = 2; > > + cts->proto_specific.scsi.valid = 0; > + cts->xport_specific.spi.valid = 0; > +#else > cts->valid = 0; > cts->flags = 0; /* no disconnection, tagging */ > +#endif > > + DPRINTF(UDMASS_SCSI, ("%s:%d:%d:%d:XPT_GET_TRAN_SETTINGS:.\n", > + USBDEVNAME(sc->sc_dev), cam_sim_path(umass_sim), > + ccb->ccb_h.target_id, ccb->ccb_h.target_lun)); > ccb->ccb_h.status = CAM_REQ_CMP; > xpt_done(ccb); > break; > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message