diff options
| author | Dingyan Li <18500469033@163.com> | 2024-10-30 11:38:58 +0300 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2024-12-04 18:33:54 +0300 |
| commit | d8d936c51388442f769a81e512b505dcf87c6a51 (patch) | |
| tree | 89f7d2226ef9cc65624c52c8edff27076a30fad6 /include/linux/usb | |
| parent | 3b56774fa25d46bd2ff3707546e30829f52dde9e (diff) | |
| download | linux-d8d936c51388442f769a81e512b505dcf87c6a51.tar.xz | |
usb: storage: add a macro for the upper limit of max LUN
The meaning of this value is already used in several places,
but with constant values and comments to explain it separately.
It's better to have a central place to do this then use the macro
in those places for better readability.
Signed-off-by: Dingyan Li <18500469033@163.com>
Reviewed-by: Alan Stern <stern@rowland.harvard.edu>
Link: https://lore.kernel.org/r/20241030083858.46907-1-18500469033@163.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'include/linux/usb')
| -rw-r--r-- | include/linux/usb/storage.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/usb/storage.h b/include/linux/usb/storage.h index 8539956bc2be..51be3bb8fccb 100644 --- a/include/linux/usb/storage.h +++ b/include/linux/usb/storage.h @@ -82,4 +82,12 @@ struct bulk_cs_wrap { #define US_BULK_RESET_REQUEST 0xff #define US_BULK_GET_MAX_LUN 0xfe +/* + * If 4 LUNs are supported then the LUNs would be + * numbered from 0 to 3, and the return value for + * US_BULK_GET_MAX_LUN request would be 3. The valid + * LUN field is 4 bits wide, the upper limit is 0x0f. + */ +#define US_BULK_MAX_LUN_LIMIT 0x0f + #endif |
