From owner-svn-src-head@freebsd.org Fri Nov 27 18:13:30 2015 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 172F9A3A510; Fri, 27 Nov 2015 18:13:30 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D78BB1EE3; Fri, 27 Nov 2015 18:13:29 +0000 (UTC) (envelope-from zbb@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id tARIDSXs018779; Fri, 27 Nov 2015 18:13:28 GMT (envelope-from zbb@FreeBSD.org) Received: (from zbb@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id tARIDSUR018778; Fri, 27 Nov 2015 18:13:28 GMT (envelope-from zbb@FreeBSD.org) Message-Id: <201511271813.tARIDSUR018778@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: zbb set sender to zbb@FreeBSD.org using -f From: Zbigniew Bodek Date: Fri, 27 Nov 2015 18:13:28 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r291399 - head/sys/boot/usb X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 27 Nov 2015 18:13:30 -0000 Author: zbb Date: Fri Nov 27 18:13:28 2015 New Revision: 291399 URL: https://svnweb.freebsd.org/changeset/base/291399 Log: Use properly aligned buffer in usb_alloc The PA adress must be gathered from an aligned VA, not the RAW pointer to the memory space. Reviewed by: hselasky Submitted by: Wojciech Macek Obtained from: Semihalf Sponsored by: Juniper Networks Inc. Differential Revision: https://reviews.freebsd.org/D4140 Modified: head/sys/boot/usb/usb_busdma_loader.c Modified: head/sys/boot/usb/usb_busdma_loader.c ============================================================================== --- head/sys/boot/usb/usb_busdma_loader.c Fri Nov 27 16:23:27 2015 (r291398) +++ head/sys/boot/usb/usb_busdma_loader.c Fri Nov 27 18:13:28 2015 (r291399) @@ -233,7 +233,7 @@ usb_pc_alloc_mem(struct usb_page_cache * pc->ismultiseg = (align == 1); /* compute physical address */ - usb_pc_common_mem_cb(pc, ptr, size); + usb_pc_common_mem_cb(pc, pc->buffer, size); usb_pc_cpu_flush(pc); return (0);