From owner-svn-src-projects@FreeBSD.ORG Sat Dec 29 05:50:17 2012 Return-Path: Delivered-To: svn-src-projects@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9831D588; Sat, 29 Dec 2012 05:50:17 +0000 (UTC) (envelope-from marcel@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 62EF98FC0A; Sat, 29 Dec 2012 05:50:17 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.5/8.14.5) with ESMTP id qBT5oH0X085164; Sat, 29 Dec 2012 05:50:17 GMT (envelope-from marcel@svn.freebsd.org) Received: (from marcel@localhost) by svn.freebsd.org (8.14.5/8.14.5/Submit) id qBT5oH9A085163; Sat, 29 Dec 2012 05:50:17 GMT (envelope-from marcel@svn.freebsd.org) Message-Id: <201212290550.qBT5oH9A085163@svn.freebsd.org> From: Marcel Moolenaar Date: Sat, 29 Dec 2012 05:50:17 +0000 (UTC) To: src-committers@freebsd.org, svn-src-projects@freebsd.org Subject: svn commit: r244811 - projects/altix2/sys/dev/mpt X-SVN-Group: projects MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-projects@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the src " projects" tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 29 Dec 2012 05:50:17 -0000 Author: marcel Date: Sat Dec 29 05:50:16 2012 New Revision: 244811 URL: http://svnweb.freebsd.org/changeset/base/244811 Log: Use busdma_sync_range() for the request and reply buffers. Modified: projects/altix2/sys/dev/mpt/mpt.c Modified: projects/altix2/sys/dev/mpt/mpt.c ============================================================================== --- projects/altix2/sys/dev/mpt/mpt.c Sat Dec 29 03:28:55 2012 (r244810) +++ projects/altix2/sys/dev/mpt/mpt.c Sat Dec 29 05:50:16 2012 (r244811) @@ -806,8 +806,9 @@ mpt_intr(void *arg) " 0x%x)\n", req_index, reply_desc); } - busdma_sync(mpt->request_md, - BUSDMA_SYNC_POSTREAD | BUSDMA_SYNC_POSTWRITE); + busdma_sync_range(mpt->request_md, + BUSDMA_SYNC_POSTREAD | BUSDMA_SYNC_POSTWRITE, + req->req_pbuf, MPT_REQUEST_AREA); free_rf = mpt_reply_handlers[cb_index](mpt, req, reply_desc, reply_frame); @@ -846,8 +847,9 @@ mpt_complete_request_chain(struct mpt_so MSG_REQUEST_HEADER *msg_hdr; u_int cb_index; - busdma_sync(mpt->request_md, - BUSDMA_SYNC_POSTREAD | BUSDMA_SYNC_POSTWRITE); + busdma_sync_range(mpt->request_md, + BUSDMA_SYNC_POSTREAD | BUSDMA_SYNC_POSTWRITE, + req->req_pbuf, MPT_REQUEST_AREA); msg_hdr = (MSG_REQUEST_HEADER *)req->req_vbuf; ioc_status_frame.Function = msg_hdr->Function; ioc_status_frame.MsgContext = msg_hdr->MsgContext; @@ -1235,7 +1237,7 @@ mpt_free_request(struct mpt_softc *mpt, mpt_send_event_ack(mpt, req, &record->reply, record->context); offset = (uint32_t)((uint8_t *)record - mpt->reply); reply_baddr = offset + (mpt->reply_phys & 0xFFFFFFFF); - busdma_sync_range(mpt->reply_md, BUSDMA_SYNC_PREREAD, offset, + busdma_sync_range(mpt->reply_md, BUSDMA_SYNC_PREREAD, reply_baddr, MPT_REPLY_SIZE); mpt_free_reply(mpt, reply_baddr); } @@ -1276,8 +1278,9 @@ mpt_send_cmd(struct mpt_softc *mpt, requ if (mpt->verbose > MPT_PRT_DEBUG2) { mpt_dump_request(mpt, req); } - busdma_sync(mpt->request_md, - BUSDMA_SYNC_PREREAD | BUSDMA_SYNC_PREWRITE); + busdma_sync_range(mpt->request_md, + BUSDMA_SYNC_PREREAD | BUSDMA_SYNC_PREWRITE, + req->req_pbuf, MPT_REQUEST_AREA); req->state |= REQ_STATE_QUEUED; KASSERT(mpt_req_on_free_list(mpt, req) == 0, ("req %p:%u func %x on freelist list in mpt_send_cmd",