From owner-freebsd-current@FreeBSD.ORG Wed Sep 7 21:35:36 2011 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 075931065677; Wed, 7 Sep 2011 21:35:36 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id D11D38FC0A; Wed, 7 Sep 2011 21:35:35 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 894C246B09; Wed, 7 Sep 2011 17:35:35 -0400 (EDT) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 0E5EC8A02E; Wed, 7 Sep 2011 17:35:35 -0400 (EDT) From: John Baldwin To: Daniel Eischen Date: Wed, 7 Sep 2011 17:35:34 -0400 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110617; KDE/4.5.5; amd64; ; ) References: <201109061608.42887.jhb@freebsd.org> In-Reply-To: MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201109071735.34593.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.6 (bigwig.baldwin.cx); Wed, 07 Sep 2011 17:35:35 -0400 (EDT) Cc: adrian@freebsd.org, freebsd-current@freebsd.org, Warner Losh Subject: Re: ath0 no longer attaches, cardbus problems? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Sep 2011 21:35:36 -0000 On Wednesday, September 07, 2011 4:18:25 pm Daniel Eischen wrote: > On Tue, 6 Sep 2011, John Baldwin wrote: > > > On Tuesday, September 06, 2011 3:34:58 pm Daniel Eischen wrote: > >> On Tue, 6 Sep 2011, John Baldwin wrote: > >>> > >>> Looks like I had a typo in my original e-mail, try > >>> "debug.acpi.disabled=hostres" > >>> rather than "debug.acpi.disable=hostres". > >> > >> Ok, I'll try that. > > Setting debug.acpi.disabled=hostres in /boot/loader.conf > did not help. I tried this with a recent kernel from HEAD. Did it remove the 'pcib0: decoding ....' lines from a verbose dmesg? > More info. I've found that kernels: > > March 31 - work, ath attaches and works > > April 1 - June 6: panic on cardbus attach > > June 7 - HEAD: work, but ath doesn't attach > > > I found the commit that fixed the panic: > > Index: sys/dev/pci/pci.c > =================================================================== > RCS file: /opt/FreeBSD/cvs/src/sys/dev/pci/pci.c,v > retrieving revision 1.420 > retrieving revision 1.421 > diff -u -r1.420 -r1.421 > --- sys/dev/pci/pci.c 3 May 2011 17:37:24 -0000 1.420 > +++ sys/dev/pci/pci.c 6 Jun 2011 13:21:11 -0000 1.421 > @@ -2576,6 +2576,17 @@ > uint16_t cmd; > struct resource *res; > > + /* > + * The BAR may already exist if the device is a CardBus card > + * whose CIS is stored in this BAR. > + */ > + pm = pci_find_bar(dev, reg); > + if (pm != NULL) { > + maprange = pci_maprange(pm->pm_value); > + barlen = maprange == 64 ? 2 : 1; > + return (barlen); > + } > + > pci_read_bar(dev, reg, &map, &testval); > if (PCI_BAR_MEM(map)) { > type = SYS_RES_MEMORY; > > > I applied this patch to the April 1st kernel (which previously > paniced) and was able to boot the kernel. ath still does not > attach. > > So the commit that broke my cardbus ath occurred on April 1. Hmm. There are no PCI or Cardbus commits on April 1. There are some ath(4) changes though including two HAL changes: Author: adrian Date: Sat Apr 2 00:24:13 2011 New Revision: 220258 URL: http://svn.freebsd.org/changeset/base/220258 Log: Add some more debugging Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar2133.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar2133.c Sat Apr 2 00:08:32 2011 (r220257) +++ head/sys/dev/ath/ath_hal/ar5416/ar2133.c Sat Apr 2 00:24:13 2011 (r220258) @@ -251,11 +251,19 @@ ar2133SetRfRegs(struct ath_hal *ah, cons /* Only the 5 or 2 GHz OB/DB need to be set for a mode */ if (IEEE80211_IS_CHAN_2GHZ(chan)) { + HALDEBUG(ah, HAL_DEBUG_EEPROM, "%s: 2ghz: OB_2:%d, DB_2:%d\n", + __func__, + ath_hal_eepromGet(ah, AR_EEP_OB_2, AH_NULL), + ath_hal_eepromGet(ah, AR_EEP_DB_2, AH_NULL)); ar5416ModifyRfBuffer(priv->Bank6Data, ath_hal_eepromGet(ah, AR_EEP_OB_2, AH_NULL), 3, 197, 0); ar5416ModifyRfBuffer(priv->Bank6Data, ath_hal_eepromGet(ah, AR_EEP_DB_2, AH_NULL), 3, 194, 0); } else { + HALDEBUG(ah, HAL_DEBUG_EEPROM, "%s: 5ghz: OB_5:%d, DB_5:%d\n", + __func__, + ath_hal_eepromGet(ah, AR_EEP_OB_5, AH_NULL), + ath_hal_eepromGet(ah, AR_EEP_DB_5, AH_NULL)); ar5416ModifyRfBuffer(priv->Bank6Data, ath_hal_eepromGet(ah, AR_EEP_OB_5, AH_NULL), 3, 203, 0); ar5416ModifyRfBuffer(priv->Bank6Data, Date: Sat Apr 2 00:27:22 2011 New Revision: 220259 URL: http://svn.freebsd.org/changeset/base/220259 Log: From ath9k - clear the RX descriptor status before recycling it. Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Modified: head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c ============================================================================== --- head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Apr 2 00:24:13 2011 (r220258) +++ head/sys/dev/ath/ath_hal/ar5416/ar5416_recv.c Sat Apr 2 00:27:22 2011 (r220259) @@ -67,6 +67,7 @@ ar5416SetupRxDesc(struct ath_hal *ah, st uint32_t size, u_int flags) { struct ar5416_desc *ads = AR5416DESC(ds); + HAL_CAPABILITIES *pCap = &AH_PRIVATE(ah)->ah_caps; HALASSERT((size &~ AR_BufLen) == 0); @@ -77,6 +78,10 @@ ar5416SetupRxDesc(struct ath_hal *ah, st /* this should be enough */ ads->ds_rxstatus8 &= ~AR_RxDone; + /* clear the rest of the status fields */ + if (! pCap->halAutoSleepSupport) + OS_MEMZERO(&(ads->u), sizeof(ads->u)); + return AH_TRUE; } > > -- > DE > -- John Baldwin