From owner-svn-src-all@freebsd.org Thu Oct 27 02:20:15 2016 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 10999C2266A; Thu, 27 Oct 2016 02:20:15 +0000 (UTC) (envelope-from kevlo@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 D4285214; Thu, 27 Oct 2016 02:20:14 +0000 (UTC) (envelope-from kevlo@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u9R2KEXH037278; Thu, 27 Oct 2016 02:20:14 GMT (envelope-from kevlo@FreeBSD.org) Received: (from kevlo@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u9R2KEtQ037277; Thu, 27 Oct 2016 02:20:14 GMT (envelope-from kevlo@FreeBSD.org) Message-Id: <201610270220.u9R2KEtQ037277@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: kevlo set sender to kevlo@FreeBSD.org using -f From: Kevin Lo Date: Thu, 27 Oct 2016 02:20:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r307982 - head/sys/dev/re 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.23 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: Thu, 27 Oct 2016 02:20:15 -0000 Author: kevlo Date: Thu Oct 27 02:20:13 2016 New Revision: 307982 URL: https://svnweb.freebsd.org/changeset/base/307982 Log: Disable CLKREQ for ASPM since re(4) doesn't implement link level power saving. Reviewed by: yongari Modified: head/sys/dev/re/if_re.c Modified: head/sys/dev/re/if_re.c ============================================================================== --- head/sys/dev/re/if_re.c Thu Oct 27 00:33:14 2016 (r307981) +++ head/sys/dev/re/if_re.c Thu Oct 27 02:20:13 2016 (r307982) @@ -1358,15 +1358,17 @@ re_attach(device_t dev) CSR_WRITE_1(sc, RL_EECMD, RL_EEMODE_OFF); } - /* Disable ASPM L0S/L1. */ + /* Disable ASPM L0S/L1 and CLKREQ. */ if (sc->rl_expcap != 0) { cap = pci_read_config(dev, sc->rl_expcap + PCIER_LINK_CAP, 2); if ((cap & PCIEM_LINK_CAP_ASPM) != 0) { ctl = pci_read_config(dev, sc->rl_expcap + PCIER_LINK_CTL, 2); - if ((ctl & PCIEM_LINK_CTL_ASPMC) != 0) { - ctl &= ~PCIEM_LINK_CTL_ASPMC; + if ((ctl & (PCIEM_LINK_CTL_ECPM | + PCIEM_LINK_CTL_ASPMC))!= 0) { + ctl &= ~(PCIEM_LINK_CTL_ECPM | + PCIEM_LINK_CTL_ASPMC); pci_write_config(dev, sc->rl_expcap + PCIER_LINK_CTL, ctl, 2); device_printf(dev, "ASPM disabled\n");