diff options
| author | Caleb Connolly <[email protected]> | 2024-03-20 14:30:50 +0000 |
|---|---|---|
| committer | Mattijs Korpershoek <[email protected]> | 2024-03-22 10:16:13 +0100 |
| commit | 304fa0aa445384e5e681a54abf413850591cec10 (patch) | |
| tree | 5817de290bf955376c21b2eb081bbaa8e1142195 /cmd | |
| parent | 341a172ef7867e3bfa90d6951997e5e2f168e188 (diff) | |
usb: gadget: UMS: support multiple sector sizes
UFS storage often uses a 4096-byte sector size, add support for dynamic
sector sizes based loosely on the Linux implementation.
Support for dynamic sector sizes changes the types used in some
divisions, resulting in the compiler attempting to use
libgcc helpers (__aeabi_ldivmod).
Replace these divisions with calls to lldiv() to handle this correctly.
Reviewed-by: Mattijs Korpershoek <[email protected]>
Reviewed-by: Neil Armstrong <[email protected]>
Signed-off-by: Caleb Connolly <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
[mkorpershoek: squashed the lldiv() fix from caleb]
Signed-off-by: Mattijs Korpershoek <[email protected]>
Diffstat (limited to 'cmd')
| -rw-r--r-- | cmd/usb_mass_storage.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/cmd/usb_mass_storage.c b/cmd/usb_mass_storage.c index a8ddeb49462..751701fe73a 100644 --- a/cmd/usb_mass_storage.c +++ b/cmd/usb_mass_storage.c @@ -88,10 +88,6 @@ static int ums_init(const char *devtype, const char *devnums_part_str) if (!strchr(devnum_part_str, ':')) partnum = 0; - /* f_mass_storage.c assumes SECTOR_SIZE sectors */ - if (block_dev->blksz != SECTOR_SIZE) - goto cleanup; - ums_new = realloc(ums, (ums_count + 1) * sizeof(*ums)); if (!ums_new) goto cleanup; |
