From owner-svn-src-all@freebsd.org Tue Oct 20 01:45:49 2015 Return-Path: Delivered-To: svn-src-all@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 C764AA19774; Tue, 20 Oct 2015 01:45:49 +0000 (UTC) (envelope-from cem@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 961211F1D; Tue, 20 Oct 2015 01:45:49 +0000 (UTC) (envelope-from cem@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id t9K1jmZB027316; Tue, 20 Oct 2015 01:45:48 GMT (envelope-from cem@FreeBSD.org) Received: (from cem@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id t9K1jmbZ027315; Tue, 20 Oct 2015 01:45:48 GMT (envelope-from cem@FreeBSD.org) Message-Id: <201510200145.t9K1jmbZ027315@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: cem set sender to cem@FreeBSD.org using -f From: "Conrad E. Meyer" Date: Tue, 20 Oct 2015 01:45:48 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r289608 - head/sys/dev/ntb/ntb_hw X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 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: Tue, 20 Oct 2015 01:45:49 -0000 Author: cem Date: Tue Oct 20 01:45:48 2015 New Revision: 289608 URL: https://svnweb.freebsd.org/changeset/base/289608 Log: NTB: Drop some dead softc members Sponsored by: EMC / Isilon Storage Division Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c Modified: head/sys/dev/ntb/ntb_hw/ntb_hw.c ============================================================================== --- head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:45:38 2015 (r289607) +++ head/sys/dev/ntb/ntb_hw/ntb_hw.c Tue Oct 20 01:45:48 2015 (r289608) @@ -176,8 +176,6 @@ struct ntb_softc { uint32_t ppd; uint8_t conn_type; uint8_t dev_type; - uint8_t link_width; - uint8_t link_speed; /* Offset of peer bar0 in B2B BAR */ uint64_t b2b_off; @@ -1747,7 +1745,7 @@ static void recover_soc_link(void *arg) { struct ntb_softc *ntb = arg; - uint8_t speed, width; + unsigned speed, width, oldspeed, oldwidth; uint32_t status32; soc_perform_link_restart(ntb); @@ -1774,9 +1772,12 @@ recover_soc_link(void *arg) goto out; status32 = ntb_reg_read(4, ntb->reg->lnk_sta); - width = (status32 & NTB_LINK_WIDTH_MASK) >> 4; - speed = (status32 & NTB_LINK_SPEED_MASK); - if (ntb->link_width != width || ntb->link_speed != speed) + width = NTB_LNK_STA_WIDTH(status32); + speed = status32 & NTB_LINK_SPEED_MASK; + + oldwidth = NTB_LNK_STA_WIDTH(ntb->lnk_sta); + oldspeed = ntb->lnk_sta & NTB_LINK_SPEED_MASK; + if (oldwidth != width || oldspeed != speed) goto retry; out: