Date: Mon, 17 Nov 2008 23:30:19 +0000 (UTC) From: John Baldwin <jhb@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r185035 - head/sys/dev/mfi Message-ID: <200811172330.mAHNUJ5T061140@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: jhb Date: Mon Nov 17 23:30:19 2008 New Revision: 185035 URL: http://svn.freebsd.org/changeset/base/185035 Log: 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. Reviewed by: scottl MFC after: 1 week Modified: head/sys/dev/mfi/mfi_disk.c Modified: head/sys/dev/mfi/mfi_disk.c ============================================================================== --- head/sys/dev/mfi/mfi_disk.c Mon Nov 17 23:07:18 2008 (r185034) +++ head/sys/dev/mfi/mfi_disk.c Mon Nov 17 23:30:19 2008 (r185035) @@ -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;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200811172330.mAHNUJ5T061140>