From owner-svn-src-head@freebsd.org Tue Dec 19 18:12:20 2017 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 52A92E95266; Tue, 19 Dec 2017 18:12:20 +0000 (UTC) (envelope-from shurd@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 1C7923F7F; Tue, 19 Dec 2017 18:12:20 +0000 (UTC) (envelope-from shurd@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id vBJICJoq044451; Tue, 19 Dec 2017 18:12:19 GMT (envelope-from shurd@FreeBSD.org) Received: (from shurd@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id vBJICJeR044450; Tue, 19 Dec 2017 18:12:19 GMT (envelope-from shurd@FreeBSD.org) Message-Id: <201712191812.vBJICJeR044450@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: shurd set sender to shurd@FreeBSD.org using -f From: Stephen Hurd Date: Tue, 19 Dec 2017 18:12:19 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r326985 - head/sys/dev/bnxt X-SVN-Group: head X-SVN-Commit-Author: shurd X-SVN-Commit-Paths: head/sys/dev/bnxt X-SVN-Commit-Revision: 326985 X-SVN-Commit-Repository: base 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.25 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: Tue, 19 Dec 2017 18:12:20 -0000 Author: shurd Date: Tue Dec 19 18:12:18 2017 New Revision: 326985 URL: https://svnweb.freebsd.org/changeset/base/326985 Log: Add byte swapping in bnxt_cfg_async_cr() request The firmware is always in little endian, use htole*() for all request fields larger than one byte. Submitted by: Bhargava Chenna Marreddy Sponsored by: Broadcom Limited Modified: head/sys/dev/bnxt/bnxt_hwrm.c Modified: head/sys/dev/bnxt/bnxt_hwrm.c ============================================================================== --- head/sys/dev/bnxt/bnxt_hwrm.c Tue Dec 19 17:59:00 2017 (r326984) +++ head/sys/dev/bnxt/bnxt_hwrm.c Tue Dec 19 18:12:18 2017 (r326985) @@ -945,9 +945,9 @@ bnxt_cfg_async_cr(struct bnxt_softc *softc) bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_CFG); - req.fid = 0xffff; + req.fid = htole16(0xffff); req.enables = htole32(HWRM_FUNC_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); - req.async_event_cr = softc->def_cp_ring.ring.phys_id; + req.async_event_cr = htole16(softc->def_cp_ring.ring.phys_id); rc = hwrm_send_message(softc, &req, sizeof(req)); } @@ -957,7 +957,7 @@ bnxt_cfg_async_cr(struct bnxt_softc *softc) bnxt_hwrm_cmd_hdr_init(softc, &req, HWRM_FUNC_VF_CFG); req.enables = htole32(HWRM_FUNC_VF_CFG_INPUT_ENABLES_ASYNC_EVENT_CR); - req.async_event_cr = softc->def_cp_ring.ring.phys_id; + req.async_event_cr = htole16(softc->def_cp_ring.ring.phys_id); rc = hwrm_send_message(softc, &req, sizeof(req)); }