diff options
| author | Dave Hylands | 2014-09-29 20:12:01 -0700 |
|---|---|---|
| committer | Damien George | 2014-10-01 22:52:02 +0100 |
| commit | d368611ea6bd4584b3492b18b179edbb9bb8b07b (patch) | |
| tree | 95a9a24a00c6ff1d5492f17aefe4c0e1cb6fb053 /stmhal/usbdev/class/cdc_msc_hid/src | |
| parent | c737086e1c42f15addefc0c6c8b5c4ddcca97907 (diff) | |
Proposed fix for USB Mass Storage.
Diffstat (limited to 'stmhal/usbdev/class/cdc_msc_hid/src')
| -rw-r--r-- | stmhal/usbdev/class/cdc_msc_hid/src/usbd_msc_scsi.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/stmhal/usbdev/class/cdc_msc_hid/src/usbd_msc_scsi.c b/stmhal/usbdev/class/cdc_msc_hid/src/usbd_msc_scsi.c index 894812c18..366f1f00e 100644 --- a/stmhal/usbdev/class/cdc_msc_hid/src/usbd_msc_scsi.c +++ b/stmhal/usbdev/class/cdc_msc_hid/src/usbd_msc_scsi.c @@ -450,13 +450,10 @@ static int8_t SCSI_StartStopUnit(USBD_HandleTypeDef *pdev, uint8_t lun, uint8_t hmsc->bot_data_length = 0;
// On Mac OS X, when the device is ejected a SCSI_START_STOP_UNIT command is sent.
- // params[1]==0 means stop, param[1]==1 seems to be something else (happens after the
- // device is plugged in and mounted for some time, probably a keep alive).
+ // Bit 0 of params[4] is the START bit.
// If we get a stop, we must really stop the device so that the Mac does not
// automatically remount it.
- if (params[1] == 0) {
- ((USBD_StorageTypeDef *)pdev->pUserData)->StopUnit(lun);
- }
+ ((USBD_StorageTypeDef *)pdev->pUserData)->StartStopUnit(lun, params[4] & 1);
return 0;
}
|
