diff options
| author | Sean Bruno <sbruno@FreeBSD.org> | 2013-09-11 19:20:53 +0000 |
|---|---|---|
| committer | Sean Bruno <sbruno@FreeBSD.org> | 2013-09-11 19:20:53 +0000 |
| commit | 2e155a928e25d0a641770c1797ffb0fa47ab8e64 (patch) | |
| tree | 879a0f88b18de901474c71506e25965e197fbdf3 /sys/dev/mfi | |
| parent | df2e60250dc8e06bace25da98e8106b5fe6e0d55 (diff) | |
Notes
Diffstat (limited to 'sys/dev/mfi')
| -rw-r--r-- | sys/dev/mfi/mfi_syspd.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/dev/mfi/mfi_syspd.c b/sys/dev/mfi/mfi_syspd.c index 739b86621962..e9587dd74d35 100644 --- a/sys/dev/mfi/mfi_syspd.c +++ b/sys/dev/mfi/mfi_syspd.c @@ -126,7 +126,8 @@ mfi_syspd_attach(device_t dev) sectors / (1024 * 1024 / secsize), sectors, sc->pd_id); sc->pd_disk = disk_alloc(); sc->pd_disk->d_drv1 = sc; - sc->pd_disk->d_maxsize = sc->pd_controller->mfi_max_io * secsize; + sc->pd_disk->d_maxsize = min(sc->pd_controller->mfi_max_io * secsize, + (sc->pd_controller->mfi_max_sge - 1) * PAGE_SIZE); sc->pd_disk->d_name = "mfisyspd"; sc->pd_disk->d_open = mfi_syspd_open; sc->pd_disk->d_close = mfi_syspd_close; |
