Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 24 Nov 2009 13:05:33 -0500
From:      John Baldwin <jhb@freebsd.org>
To:        "Jeremy O'Brien" <obrien654j@gmail.com>
Cc:        freebsd-drivers@freebsd.org
Subject:   Re: Cisco Aironet MPI350 Fix
Message-ID:  <200911241305.33470.jhb@freebsd.org>
In-Reply-To: <20091124043015.GA21209@goldengraham>
References:  <20091122175555.GA15539@minifree.wright.edu> <20091123211734.GA1207@minifree> <20091124043015.GA21209@goldengraham>

next in thread | previous in thread | raw e-mail | index | archive | help
On Monday 23 November 2009 11:30:15 pm Jeremy O'Brien wrote:
> On Mon, Nov 23, 2009 at 04:17:34PM -0500, Jeremy O'Brien wrote:
> > On Mon, Nov 23, 2009 at 10:01:50AM -0500, John Baldwin wrote:
> > > On Sunday 22 November 2009 12:55:55 pm Jeremy O'Brien wrote:
> > > > Hello,
> > > > 
> > > > I have a Cisco Aironet MPI350 PCI card in my Thinkpad X31, and on a
> > > > fresh install of FreeBSD 8.0-RC3, the card did not work. Also, it caused
> > > > my system to freeze up for a few seconds about once a minute as the
> > > > driver spit out "an0: device timeout" messages so long as the interface
> > > > was up. I researched the issue, and found the following fix already in
> > > > dragonflybsd's tree:
> > > > 
> > > > 
> > > http://gitweb.dragonflybsd.org/dragonfly.git/commit/7a2a04db44efafea257db883ae3eb5e4ebf2ece9
> > > > 
> > > > I modified the patch and applied it to FreeBSD's kernel (trivial), and
> > > > am happy to report that my card is now working flawlessly. Could someone
> > > > possibly review this patch and integrate it into the source tree so that
> > > > others may benefit from it as well?
> > > > 
> > > > The patch is based off of 8.0-RC3's code, but applies to the latest code
> > > > as well without modification.
> > > 
> > > Can you try this version?  The IFF_DRV_OACTIVE bits don't look correct to me 
> > > so I've left them out.  I also changed the driver to use bus_*() vs 
> > > bus_space_*().
> > > 
> > > -- 
> > > John Baldwin
> > 
> > Tried it at home, worked great. My university's wireless is shoddy.
> 
> I'm not sure if this is related to your patch or not, but I've been
> getting spurts of kernel: stray irq7 messages that I don't recall
> getting before the patch. Do you think it could be related?

I'm not sure.  Presumably your an(4) adapter isn't using IRQ 7?  I will
commit the current set of patches, but perhaps it is worth trying the
changes for OACTIVE.  Hmm, it does seem that the OACTIVE handling is a bit
busted as the current code will never set the flag since m0 is always NULL
when the function is exited.  I still don't think the DFly change is correct
since it can set the flag if the ifqueue was empty for some reason.  Perhaps
try this patch, it sets OACTIVE if we queued any packets for transmit:

Index: if_an.c
===================================================================
--- if_an.c	(revision 199757)
+++ if_an.c	(working copy)
@@ -2915,11 +2915,11 @@
 		CSR_WRITE_2(sc, AN_INT_EN(sc->mpi350), AN_INTRS(sc->mpi350));
 	}
 
-	if (m0 != NULL)
+	if (sc->an_rdata.an_tx_prod != idx) {
 		ifp->if_drv_flags |= IFF_DRV_OACTIVE;
+		sc->an_rdata.an_tx_prod = idx;
+	}
 
-	sc->an_rdata.an_tx_prod = idx;
-
 	return;
 }
 


-- 
John Baldwin



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200911241305.33470.jhb>