Skip to content

Commit 3f6d3cc

Browse files
committed
stm32/usbdev: Pass thru correct val for SCSI PreventAllowMediumRemoval.
This value is "1" when the medium should not be removed, "0" otherwise.
1 parent 8462f16 commit 3f6d3cc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ports/stm32/usbdev/class/src/usbd_msc_scsi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ static int8_t SCSI_AllowMediumRemoval(USBD_HandleTypeDef *pdev, uint8_t lun, ui
481481
{
482482
USBD_MSC_BOT_HandleTypeDef *hmsc = &((usbd_cdc_msc_hid_state_t*)pdev->pClassData)->MSC_BOT_ClassData;
483483
hmsc->bot_data_length = 0;
484-
hmsc->bdev_ops->PreventAllowMediumRemoval(lun, params[0]);
484+
hmsc->bdev_ops->PreventAllowMediumRemoval(lun, params[4]);
485485
return 0;
486486
}
487487

0 commit comments

Comments
 (0)