summaryrefslogtreecommitdiffstats
path: root/sys/dev/mlx
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2003-02-25 20:47:22 +0000
committerjhb <jhb@FreeBSD.org>2003-02-25 20:47:22 +0000
commitf1c8252d4ae1f5b3c53300c142edaba3c8f40f93 (patch)
treed5bbb65b394cdcf40ba740a34cbaaabb329596ec /sys/dev/mlx
parent7bc17a00665255b67f9b8204e22d219b3fb77719 (diff)
downloadFreeBSD-src-f1c8252d4ae1f5b3c53300c142edaba3c8f40f93.zip
FreeBSD-src-f1c8252d4ae1f5b3c53300c142edaba3c8f40f93.tar.gz
Limit the maximum I/O size to 8 pages for version 2 controllers. This
fixes problems with some mlx(4) cards in Alpha machines. Reviewed by: msmith (ages ago)
Diffstat (limited to 'sys/dev/mlx')
-rw-r--r--sys/dev/mlx/mlx_disk.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/mlx/mlx_disk.c b/sys/dev/mlx/mlx_disk.c
index 449a5474..9725e04 100644
--- a/sys/dev/mlx/mlx_disk.c
+++ b/sys/dev/mlx/mlx_disk.c
@@ -235,11 +235,15 @@ mlxd_attach(device_t dev)
/*
* Set maximum I/O size to the lesser of the recommended maximum and the practical
- * maximum.
+ * maximum except on v2 cards where the maximum is set to 8 pages.
*/
- s1 = sc->mlxd_controller->mlx_enq2->me_maxblk * MLX_BLKSIZE;
- s2 = (sc->mlxd_controller->mlx_enq2->me_max_sg - 1) * PAGE_SIZE;
- sc->mlxd_disk.d_maxsize = imin(s1, s2);
+ if (sc->mlxd_controller->mlx_iftype == MLX_IFTYPE_2)
+ dsk->si_iosize_max = 8 * 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;
+ dsk->si_iosize_max = imin(s1, s2);
+ }
disk_create(sc->mlxd_unit, &sc->mlxd_disk, 0, NULL, NULL);
OpenPOWER on IntegriCloud