Date: Sat, 19 Feb 2005 04:17:32 GMT From: Scott Long <scottl@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 71289 for review Message-ID: <200502190417.j1J4HWlg076343@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=71289 Change 71289 by scottl@scottl-junior on 2005/02/19 04:17:00 Finish integrating cam_xpt.c rev 1.144 and 1.145 Affected files ... .. //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_probe.c#4 edit Differences ... ==== //depot/projects/scottl-camlock/src/sys/cam/scsi/scsi_probe.c#4 (text+ko) ==== @@ -376,7 +376,18 @@ if (softc->action == PROBE_INQUIRY) inquiry_len = SHORT_INQUIRY_LENGTH; else - inquiry_len = inq_buf->additional_length + 4; + inquiry_len = inq_buf->additional_length + + offsetof(struct scsi_inquiry_data, + additional_length) + 1; + + /* + * Some parallel SCSI devices fail to send an + * ignore wide residue message when dealing with + * odd length inquiry requests. Round up to be + * safe. + */ + inquiry_len = roundup2(inquiry_len, 2); + scsi_inquiry(csio, /*retries*/4, @@ -529,7 +540,7 @@ switch(periph_qual) { case SID_QUAL_LU_CONNECTED: { - u_int8_t alen; + u_int8_t len; /* * We conservatively request only @@ -541,9 +552,11 @@ * the amount of information the device * is willing to give. */ - alen = inq_buf->additional_length; + len = inq_buf->additional_length + + offsetof(struct scsi_inquiry_data, + additional_length) + 1; if (softc->action == PROBE_INQUIRY - && alen > (SHORT_INQUIRY_LENGTH - 4)) { + && len > SHORT_INQUIRY_LENGTH) { softc->action = PROBE_FULL_INQUIRY; xpt_release_ccb(done_ccb); probereschedule(periph, priority);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200502190417.j1J4HWlg076343>