Skip to content

Commit

Permalink
samples: usb: mass: Set next stack max LUNs to 3
Browse files Browse the repository at this point in the history
Mass storage sample contains separate Kconfig options for RAM, Flash and
SDMMC disk drivers. All disk drivers can be enabled simultaneously and
therefore the maximum number of concurrent LUNs is 3.

Configure Mass Storage class maximum LUNs to 3 to solve initialization
failures on targets that enable more than one disk driver at a time.
Each additional supported LUN increases the Mass Storage class memory
usage by 48 bytes (struct scsi_ctx) on 32-bit targets. Allocating 3 SCSI
context structures allows the sample to work regardless what disk
drivers are concurrently enabled.

Fixes: #57657

Signed-off-by: Tomasz Moń <[email protected]>
  • Loading branch information
tmon-nordic authored and nashif committed Jun 6, 2023
1 parent 7deabaa commit 5d87abc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions samples/subsys/usb/mass/usbd_next_prj.conf
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ CONFIG_STDOUT_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_UART_LINE_CTRL=y
CONFIG_USBD_MSC_CLASS=y
CONFIG_USBD_MSC_LUNS_PER_INSTANCE=3

CONFIG_LOG=y
CONFIG_USBD_LOG_LEVEL_WRN=y
Expand Down

0 comments on commit 5d87abc

Please sign in to comment.