Date: Mon, 25 Jun 2001 13:52:28 +0100 (BST) From: <n_hibma@FreeBSD.ORG> To: Matthew Jacob <mjacob@feral.com> Cc: <bishop@rr.iij4u.or.jp>, <scsi@FreeBSD.ORG> Subject: Re: umass changes for CAM_NEW_TRAN_CODE Message-ID: <20010625135102.P53103-100000@bluebottle> In-Reply-To: <Pine.BSF.4.21.0106242047580.82710-100000@beppo.feral.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010625135102.P53103-100000>