From owner-cvs-src-old@FreeBSD.ORG Tue Jun 29 22:08:11 2010 Return-Path: Delivered-To: cvs-src-old@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 18F04106582C for ; Tue, 29 Jun 2010 22:08:11 +0000 (UTC) (envelope-from ken@FreeBSD.org) Received: from repoman.freebsd.org (repoman.freebsd.org [IPv6:2001:4f8:fff6::29]) by mx1.freebsd.org (Postfix) with ESMTP id 07EBE8FC15 for ; Tue, 29 Jun 2010 22:08:11 +0000 (UTC) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.14.3/8.14.3) with ESMTP id o5TM8A6d091729 for ; Tue, 29 Jun 2010 22:08:10 GMT (envelope-from ken@repoman.freebsd.org) Received: (from svn2cvs@localhost) by repoman.freebsd.org (8.14.3/8.14.3/Submit) id o5TM8AQL091728 for cvs-src-old@freebsd.org; Tue, 29 Jun 2010 22:08:10 GMT (envelope-from ken@repoman.freebsd.org) Message-Id: <201006292208.o5TM8AQL091728@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: svn2cvs set sender to ken@repoman.freebsd.org using -f From: "Kenneth D. Merry" Date: Tue, 29 Jun 2010 22:07:53 +0000 (UTC) To: cvs-src-old@freebsd.org X-FreeBSD-CVS-Branch: HEAD Subject: cvs commit: src/sys/dev/mpt mpt.c mpt.h mpt_cam.c mpt_pci.c mpt_raid.c X-BeenThere: cvs-src-old@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: **OBSOLETE** CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Jun 2010 22:08:11 -0000 ken 2010-06-29 22:07:53 UTC FreeBSD src repository Modified files: sys/dev/mpt mpt.c mpt.h mpt_cam.c mpt_pci.c mpt_raid.c Log: SVN rev 209599 on 2010-06-29 22:07:53Z by ken Change the mpt driver to allow larger I/O sizes. The mpt driver previously didn't report a 'maxio' size to CAM, and so the da(4) driver limited I/O sizes to DFLTPHYS (64K) by default. The number of scatter gather segments allowed, as reported to busdma, was (128K / PAGE_SIZE) + 1, or 33 on architectures with 4K pages. Change things around so that we wait until we've determined how many segments the adapter can support before creating the busdma tag used for buffers, so we can potentially support more S/G segments and therefore larger I/O sizes. Also, fix some things that were broken about the module unload path. It still gets hung up inside CAM, though. mpt.c: Move some busdma initialization calls in here, and call them just after we've gotten the IOCFacts, and know how many S/G segments this adapter can support. mpt.h: Get rid of MPT_MAXPHYS, it is no longer used. Add max_cam_seg_cnt, which is used to report our maximum I/O size up to CAM. mpt_cam.c: Use max_cam_seg_cnt to report our maximum I/O size to CAM. Fix the locking in mpt_cam_detach(). mpt_pci.c: Pull some busdma initialization and teardown out and put it in mpt.c. We now delay it until we know many scatter gather segments the adapter can support, and therefore how to setup our busdma tags. mpt_raid.c: Make sure we wake up the right wait channel to get the raid thread to wake up when we're trying to shut it down. Reviewed by: gibbs, mjacob MFC after: 2 weeks Revision Changes Path 1.52 +129 -16 src/sys/dev/mpt/mpt.c 1.51 +2 -3 src/sys/dev/mpt/mpt.h 1.74 +3 -6 src/sys/dev/mpt/mpt_cam.c 1.57 +0 -87 src/sys/dev/mpt/mpt_pci.c 1.27 +1 -1 src/sys/dev/mpt/mpt_raid.c