diff options
| author | uwe <uwe@NetBSD.org> | 2022-04-13 15:24:42 +0000 |
|---|---|---|
| committer | uwe <uwe@NetBSD.org> | 2022-04-13 15:24:42 +0000 |
| commit | ab1be36056dde4248dc5e736e7a1af95c0147c5d (patch) | |
| tree | 2086a91e0f1db0e2a0b20e28ea792f6198674740 /sys/dev | |
| parent | d00989601b1af367b00526db851777db91920cb6 (diff) | |
vio9p: Bump max tag len to match QEMU.
QEMU defines it to 32 but includes the final zero byte into the limit.
Our code counts the final zero byte separately, so adjust this define
appropriately.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/pci/vio9p.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/sys/dev/pci/vio9p.c b/sys/dev/pci/vio9p.c index 1acfa684ff5..adec9026bee 100644 --- a/sys/dev/pci/vio9p.c +++ b/sys/dev/pci/vio9p.c @@ -1,4 +1,4 @@ -/* $NetBSD: vio9p.c,v 1.7 2022/04/13 15:08:52 uwe Exp $ */ +/* $NetBSD: vio9p.c,v 1.8 2022/04/13 15:24:42 uwe Exp $ */ /* * Copyright (c) 2019 Internet Initiative Japan, Inc. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: vio9p.c,v 1.7 2022/04/13 15:08:52 uwe Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vio9p.c,v 1.8 2022/04/13 15:24:42 uwe Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -77,7 +77,12 @@ __KERNEL_RCSID(0, "$NetBSD: vio9p.c,v 1.7 2022/04/13 15:08:52 uwe Exp $"); #define VIO9P_SEGSIZE PAGE_SIZE #define VIO9P_N_SEGMENTS (VIO9P_MAX_REQLEN / VIO9P_SEGSIZE) -#define P9_MAX_TAG_LEN 16 +/* + * QEMU defines this as 32 but includes the final zero byte into the + * limit. The code below counts the final zero byte separately, so + * adjust this define to match. + */ +#define P9_MAX_TAG_LEN 31 CTASSERT((PAGE_SIZE) == (VIRTIO_PAGE_SIZE)); /* XXX */ |
