From owner-svn-src-all@FreeBSD.ORG Mon Jul 12 22:57:58 2010 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 442131065670; Mon, 12 Jul 2010 22:57:58 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 1A0F38FC08; Mon, 12 Jul 2010 22:57:58 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.3/8.14.3) with ESMTP id o6CMvvem041896; Mon, 12 Jul 2010 22:57:57 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.3/8.14.3/Submit) id o6CMvvC5041893; Mon, 12 Jul 2010 22:57:57 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201007122257.o6CMvvC5041893@svn.freebsd.org> From: Marius Strobl Date: Mon, 12 Jul 2010 22:57:57 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r209960 - head/sys/dev/mpt X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jul 2010 22:57:58 -0000 Author: marius Date: Mon Jul 12 22:57:57 2010 New Revision: 209960 URL: http://svn.freebsd.org/changeset/base/209960 Log: - Make the maxsize parameter of the data buffer DMA tag match maxio, which was missed in r209599. Reported and tested by: Michael Moll - Declare mpt_dma_buf_alloc() static just like mpt_dma_buf_free(), both are used in mpt.c only. Reviewed by: ken MFC after: r209599 Modified: head/sys/dev/mpt/mpt.c head/sys/dev/mpt/mpt.h Modified: head/sys/dev/mpt/mpt.c ============================================================================== --- head/sys/dev/mpt/mpt.c Mon Jul 12 21:47:30 2010 (r209959) +++ head/sys/dev/mpt/mpt.c Mon Jul 12 22:57:57 2010 (r209960) @@ -128,6 +128,7 @@ static void mpt_send_event_ack(struct mp static int mpt_send_event_request(struct mpt_softc *mpt, int onoff); static int mpt_soft_reset(struct mpt_softc *mpt); static void mpt_hard_reset(struct mpt_softc *mpt); +static int mpt_dma_buf_alloc(struct mpt_softc *mpt); static void mpt_dma_buf_free(struct mpt_softc *mpt); static int mpt_configure_ioc(struct mpt_softc *mpt, int, int); static int mpt_enable_ioc(struct mpt_softc *mpt, int); @@ -2475,7 +2476,7 @@ mpt_download_fw(struct mpt_softc *mpt) return (0); } -int +static int mpt_dma_buf_alloc(struct mpt_softc *mpt) { struct mpt_map_info mi; @@ -2486,8 +2487,9 @@ mpt_dma_buf_alloc(struct mpt_softc *mpt) /* Create a child tag for data buffers */ if (mpt_dma_tag_create(mpt, mpt->parent_dmat, 1, 0, BUS_SPACE_MAXADDR, BUS_SPACE_MAXADDR, - NULL, NULL, MAXBSIZE, mpt->max_cam_seg_cnt, - BUS_SPACE_MAXSIZE_32BIT, 0, &mpt->buffer_dmat) != 0) { + NULL, NULL, (mpt->max_cam_seg_cnt - 1) * PAGE_SIZE, + mpt->max_cam_seg_cnt, BUS_SPACE_MAXSIZE_32BIT, 0, + &mpt->buffer_dmat) != 0) { mpt_prt(mpt, "cannot create a dma tag for data buffers\n"); return (1); } Modified: head/sys/dev/mpt/mpt.h ============================================================================== --- head/sys/dev/mpt/mpt.h Mon Jul 12 21:47:30 2010 (r209959) +++ head/sys/dev/mpt/mpt.h Mon Jul 12 22:57:57 2010 (r209960) @@ -1279,7 +1279,6 @@ void mpt_check_doorbell(struct mpt_soft void mpt_dump_reply_frame(struct mpt_softc *mpt, MSG_DEFAULT_REPLY *reply_frame); -int mpt_dma_buf_alloc(struct mpt_softc *mpt); void mpt_set_config_regs(struct mpt_softc *); int mpt_issue_cfg_req(struct mpt_softc */*mpt*/, request_t */*req*/, cfgparms_t *params,