From owner-svn-src-all@FreeBSD.ORG Sun Jun 17 05:34:42 2012 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67AE11065774; Sun, 17 Jun 2012 05:34:42 +0000 (UTC) (envelope-from adrian@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:4f8:fff6::2c]) by mx1.freebsd.org (Postfix) with ESMTP id 568E28FC08; Sun, 17 Jun 2012 05:34:42 +0000 (UTC) Received: from svn.freebsd.org (localhost [127.0.0.1]) by svn.freebsd.org (8.14.4/8.14.4) with ESMTP id q5H5Ygcq087317; Sun, 17 Jun 2012 05:34:42 GMT (envelope-from adrian@svn.freebsd.org) Received: (from adrian@localhost) by svn.freebsd.org (8.14.4/8.14.4/Submit) id q5H5Ygi9087315; Sun, 17 Jun 2012 05:34:42 GMT (envelope-from adrian@svn.freebsd.org) Message-Id: <201206170534.q5H5Ygi9087315@svn.freebsd.org> From: Adrian Chadd Date: Sun, 17 Jun 2012 05:34:42 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Subject: svn commit: r237183 - head/sys/dev/ath/ath_hal/ar9002 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.5 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: Sun, 17 Jun 2012 05:34:42 -0000 Author: adrian Date: Sun Jun 17 05:34:41 2012 New Revision: 237183 URL: http://svn.freebsd.org/changeset/base/237183 Log: Add an disabled workaround for the AR9285SE. This just requires a little HAL change (add a new config parameter) and some glue in if_ath_pci.c, however I'm leaving this up for someone else to do. Obtained from: Qualcomm Atheros Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Modified: head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sun Jun 17 04:48:47 2012 (r237182) +++ head/sys/dev/ath/ath_hal/ar9002/ar9285_attach.c Sun Jun 17 05:34:41 2012 (r237183) @@ -369,6 +369,25 @@ ar9285ConfigPCIE(struct ath_hal *ah, HAL { uint32_t val; + /* + * This workaround needs some integration work with the HAL + * config parameters and the if_ath_pci.c glue. + * Specifically, read the value of the PCI register 0x70c + * (4 byte PCI config space register) and store it in ath_hal_war70c. + * Then if it's non-zero, the below WAR would override register + * 0x570c upon suspend/resume. + */ +#if 0 + if (AR_SREV_9285E_20(ah)) { + val = AH_PRIVATE(ah)->ah_config.ath_hal_war70c; + if (val) { + val &= 0xffff00ff; + val |= 0x6f00; + OS_REG_WRITE(ah, 0x570c, val); + } + } +#endif + if (AH_PRIVATE(ah)->ah_ispcie && !restore) { ath_hal_ini_write(ah, &AH5416(ah)->ah_ini_pcieserdes, 1, 0); OS_DELAY(1000);