git: 8974b83aa1a0 - stable/13 - sdio: Do not allow setting a block size if function doesn't support it
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Thu, 02 Feb 2023 06:57:18 UTC
The branch stable/13 has been updated by manu: URL: https://cgit.FreeBSD.org/src/commit/?id=8974b83aa1a077bc038f59c0909e4698f88a5904 commit 8974b83aa1a077bc038f59c0909e4698f88a5904 Author: Emmanuel Vadot <manu@FreeBSD.org> AuthorDate: 2021-05-26 11:15:58 +0000 Commit: Emmanuel Vadot <manu@FreeBSD.org> CommitDate: 2023-02-02 06:47:34 +0000 sdio: Do not allow setting a block size if function doesn't support it (cherry picked from commit 49da0242e798ade8a578036929bff493a2d6ef75) --- sys/dev/sdio/sdio_subr.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sys/dev/sdio/sdio_subr.c b/sys/dev/sdio/sdio_subr.c index 0885b16550a6..50b741ff2a27 100644 --- a/sys/dev/sdio/sdio_subr.c +++ b/sys/dev/sdio/sdio_subr.c @@ -121,6 +121,9 @@ sdio_set_block_size(struct sdio_func *f, uint16_t bs) uint32_t addr; uint16_t v; + if (bs > f->max_blksize) + return (EOPNOTSUPP); + if (!sdio_get_support_multiblk(f->dev)) return (EOPNOTSUPP);