PERFORCE change 173571 for review
    Hans Petter Selasky 
    hselasky at FreeBSD.org
       
    Sat Jan 23 11:09:40 UTC 2010
    
    
  
http://p4web.freebsd.org/chv.cgi?CH=173571
Change 173571 by hselasky at 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;
 	}
    
    
More information about the p4-projects
mailing list