From owner-svn-src-stable-6@FreeBSD.ORG Wed Jan 21 17:16:03 2009 Return-Path: Delivered-To: svn-src-stable-6@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AE105106566B; Wed, 21 Jan 2009 17:16:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 9BAE98FC18; Wed, 21 Jan 2009 17:16:03 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id n0LHG3kd084391; Wed, 21 Jan 2009 17:16:03 GMT (envelope-from jhb@svn.freebsd.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id n0LHG3RG084390; Wed, 21 Jan 2009 17:16:03 GMT (envelope-from jhb@svn.freebsd.org) Message-Id: <200901211716.n0LHG3RG084390@svn.freebsd.org> From: John Baldwin Date: Wed, 21 Jan 2009 17:16:03 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-6@freebsd.org X-SVN-Group: stable-6 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r187541 - in stable/6/sys: . dev/mfi X-BeenThere: svn-src-stable-6@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SVN commit messages for only the 6-stable src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 21 Jan 2009 17:16:04 -0000 Author: jhb Date: Wed Jan 21 17:16:03 2009 New Revision: 187541 URL: http://svn.freebsd.org/changeset/base/187541 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/6/sys/ (props changed) stable/6/sys/dev/mfi/mfi_disk.c Modified: stable/6/sys/dev/mfi/mfi_disk.c ============================================================================== --- stable/6/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:13:31 2009 (r187540) +++ stable/6/sys/dev/mfi/mfi_disk.c Wed Jan 21 17:16:03 2009 (r187541) @@ -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;