-
Notifications
You must be signed in to change notification settings - Fork 7
Closed as not planned
Labels
enhancementNew feature or requestNew feature or requestinternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemmwMW-related issue or pull-requestMW-related issue or pull-requestspotted before customerSpotted internally before being pointed out by the user but not yet fixed or publishedSpotted internally before being pointed out by the user but not yet fixed or publishedusbUniversal Serial BusUniversal Serial BuswontfixThis will not be worked onThis will not be worked on
Description
Hello,
In the function MSC_BOT_CBW_Decode() of the file usbd_msc_bot.c, there is the following judgment:
if ((USBD_LL_GetRxDataSize(pdev, MSCOutEpAdd) != USBD_BOT_CBW_LENGTH) ||
(hmsc->cbw.dSignature != USBD_BOT_CBW_SIGNATURE) ||
(hmsc->cbw.bLUN > 1U) || (hmsc->cbw.bCBLength < 1U) ||
(hmsc->cbw.bCBLength > 16U))
{
SCSI_SenseCode(pdev, hmsc->cbw.bLUN, ILLEGAL_REQUEST, INVALID_CDB);
hmsc->bot_status = USBD_BOT_STATUS_ERROR;
MSC_BOT_Abort(pdev);
}
else
{
/* ... */
}As shown in the above code, when (hmsc->cbw.bLUN > 1U) is established, it will be judged as an illegal request. Therefore, the legal value of hmsc->cbw.bLUN can only be 0 or 1. For this reason, USBD MSC can only support a maximum of 2 luns.
Why not add a MSC configuration macro definition in the file usbd_conf_template.h to configure the maximum number of luns supported?
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requestinternal bug trackerIssue confirmed and logged into the internal bug tracking systemIssue confirmed and logged into the internal bug tracking systemmwMW-related issue or pull-requestMW-related issue or pull-requestspotted before customerSpotted internally before being pointed out by the user but not yet fixed or publishedSpotted internally before being pointed out by the user but not yet fixed or publishedusbUniversal Serial BusUniversal Serial BuswontfixThis will not be worked onThis will not be worked on
Type
Projects
Status
Done