diff options
author | scottl <scottl@FreeBSD.org> | 2004-11-25 12:15:49 +0000 |
---|---|---|
committer | scottl <scottl@FreeBSD.org> | 2004-11-25 12:15:49 +0000 |
commit | 0e27fd31e80cc7f840809862987b009f302fbe74 (patch) | |
tree | 503350cbd0480256ec57e0bd4e1c46056223d646 | |
parent | 7a1c04147228acca88490c8064190d63272d49c5 (diff) | |
download | FreeBSD-src-0e27fd31e80cc7f840809862987b009f302fbe74.zip FreeBSD-src-0e27fd31e80cc7f840809862987b009f302fbe74.tar.gz |
Don't use PAGE_SIZE to calculate controller-specific attributes.
PR: kern/21220
Submitted by: Dennis Lindroos
MFC After: 1 week
-rw-r--r-- | sys/dev/mlx/mlx_disk.c | 4 | ||||
-rw-r--r-- | sys/dev/mlx/mlxreg.h | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c index 8b19fa8..db86bf8 100644 --- a/sys/dev/mlx/mlx_disk.c +++ b/sys/dev/mlx/mlx_disk.c @@ -239,10 +239,10 @@ mlxd_attach(device_t dev) * maximum except on v2 cards where the maximum is set to 8 pages. */ if (sc->mlxd_controller->mlx_iftype == MLX_IFTYPE_2) - sc->mlxd_disk->d_maxsize = 8 * PAGE_SIZE; + sc->mlxd_disk->d_maxsize = 8 * MLX_PAGE_SIZE; else { s1 = sc->mlxd_controller->mlx_enq2->me_maxblk * MLX_BLKSIZE; - s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * PAGE_SIZE; + s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * MLX_PAGE_SIZE; sc->mlxd_disk->d_maxsize = imin(s1, s2); } diff --git a/sys/dev/mlx/mlxreg.h b/sys/dev/mlx/mlxreg.h index fef77df..16fdd0c 100644 --- a/sys/dev/mlx/mlxreg.h +++ b/sys/dev/mlx/mlxreg.h @@ -27,6 +27,7 @@ */ #define MLX_BLKSIZE 512 /* fixed feature */ +#define MLX_PAGE_SIZE 4096 /* controller, not cpu, attribute */ /* * Selected command codes. |