Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 23 Jan 2010 11:09:39 GMT
From:      Hans Petter Selasky <hselasky@FreeBSD.org>
To:        Perforce Change Reviews <perforce@FreeBSD.org>
Subject:   PERFORCE change 173571 for review
Message-ID:  <201001231109.o0NB9dlO035703@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://p4web.freebsd.org/chv.cgi?CH=173571

Change 173571 by hselasky@hselasky_laptop001 on 2010/01/23 11:09:05

	
	USB storage:
		- patch from mav @ to fix Mitsumi floppy drives.

Affected files ...

.. //depot/projects/usb/src/sys/dev/usb/quirk/usb_quirk.c#21 edit
.. //depot/projects/usb/src/sys/dev/usb/storage/umass.c#46 edit

Differences ...

==== //depot/projects/usb/src/sys/dev/usb/quirk/usb_quirk.c#21 (text+ko) ====

@@ -260,7 +260,6 @@
 	    UQ_MSC_FORCE_PROTO_SCSI),
 	USB_QUIRK(MITSUMI, CDRRW, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_CBI |
 	    UQ_MSC_FORCE_PROTO_ATAPI),
-	USB_QUIRK(MITSUMI, FDD, 0x0000, 0xffff, UQ_MSC_NO_GETMAXLUN),
 	USB_QUIRK(MOTOROLA2, E398, 0x0000, 0xffff, UQ_MSC_FORCE_WIRE_BBB,
 	    UQ_MSC_FORCE_PROTO_SCSI, UQ_MSC_FORCE_SHORT_INQ,
 	    UQ_MSC_NO_INQUIRY_EVPD, UQ_MSC_NO_GETMAXLUN),

==== //depot/projects/usb/src/sys/dev/usb/storage/umass.c#46 (text+ko) ====

@@ -2671,11 +2671,19 @@
 
 	default:
 		/*
-		 * the wire protocol failed and will have recovered
-		 * (hopefully).  We return an error to CAM and let CAM retry
-		 * the command if necessary.
+		 * The wire protocol failed and will hopefully have
+		 * recovered. We return an error to CAM and let CAM
+		 * retry the command if necessary. In case of SCSI IO
+		 * commands we ask the CAM layer to check the
+		 * condition first. This is a quick hack to make
+		 * certain devices work.
 		 */
-		ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+		if (ccb->ccb_h.func_code == XPT_SCSI_IO) {
+			ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR;
+			ccb->csio.scsi_status = SCSI_STATUS_CHECK_COND;
+		} else {
+			ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+		}
 		xpt_done(ccb);
 		break;
 	}



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201001231109.o0NB9dlO035703>