svn commit: r187540 - in stable/7/sys: . contrib/pf dev/ath/ath_hal
dev/cxgb dev/mfi
John Baldwin
jhb at FreeBSD.org
Wed Jan 21 09:13:32 PST 2009
Author: jhb
Date: Wed Jan 21 17:13:31 2009
New Revision: 187540
URL: http://svn.freebsd.org/changeset/base/187540
Log:
MFC: Fix the maximum transfer size for mfi(4) disk devices to not exceed
the maximum number of scatter/gather elements supported in the bus dma tag.
Modified:
stable/7/sys/ (props changed)
stable/7/sys/contrib/pf/ (props changed)
stable/7/sys/dev/ath/ath_hal/ (props changed)
stable/7/sys/dev/cxgb/ (props changed)
stable/7/sys/dev/mfi/mfi_disk.c
Modified: stable/7/sys/dev/mfi/mfi_disk.c
==============================================================================
--- stable/7/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:07:46 2009 (r187539)
+++ stable/7/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:13:31 2009 (r187540)
@@ -136,7 +136,8 @@ mfi_disk_attach(device_t dev)
sc->ld_disk = disk_alloc();
sc->ld_disk->d_drv1 = sc;
- sc->ld_disk->d_maxsize = sc->ld_controller->mfi_max_io * secsize;
+ sc->ld_disk->d_maxsize = min(sc->ld_controller->mfi_max_io * secsize,
+ (sc->ld_controller->mfi_max_sge - 1) * PAGE_SIZE);
sc->ld_disk->d_name = "mfid";
sc->ld_disk->d_open = mfi_disk_open;
sc->ld_disk->d_close = mfi_disk_close;
More information about the svn-src-all
mailing list