Don't use PAGE_SIZE to calculate controller-specific attributes.
PR: kern/21220 Submitted by: Dennis Lindroos MFC After: 1 week
This commit is contained in:
parent
f5b2f15a0c
commit
4161b1a1e9
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=138090
@ -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);
|
||||
}
|
||||
|
||||
|
@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
#define MLX_BLKSIZE 512 /* fixed feature */
|
||||
#define MLX_PAGE_SIZE 4096 /* controller, not cpu, attribute */
|
||||
|
||||
/*
|
||||
* Selected command codes.
|
||||
|
Loading…
Reference in New Issue
Block a user