On Wed, Aug 04, 2010 at 08:17:00PM +1000, Jonathan Gray wrote:
> On Tue, Aug 03, 2010 at 11:12:01PM +0100, Stuart Henderson wrote:
> > Do you know what the last working kernel was?
> > 
> > I have an archive of old kernels if you want to track it down without
> > the cvs up -D / compile dance, mail me offlist.
> 
> broken:
> OpenBSD 4.7-current (GENERIC) #104: Thu Jul  8 16:47:03 MDT 2010
> 
> works:
> OpenBSD 4.7-current (GENERIC) #98: Wed Jul  7 18:25:12 MDT 2010
> 
> I don't see how it could be an em problem as there are no commits
> in this window and all the commits either side of it are chip
> specific to other chips.

With a lot of help debugging from Mike Belopuhov, turns out to be
am em bug in the original support for these chips from dms
that gcc4 exposes.

There seems to be a seperate problem with linkstate but
a NA200 boots and all the ports can pass traffic with this diff.

Index: if_em.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/if_em.c,v
retrieving revision 1.242
diff -u -p -r1.242 if_em.c
--- if_em.c     3 Aug 2010 16:21:52 -0000       1.242
+++ if_em.c     4 Aug 2010 15:00:35 -0000
@@ -1648,12 +1648,11 @@ em_allocate_pci_resources(struct em_soft
         * can confuse the system
         */
        if(sc->hw.mac_type == em_icp_xxxx) {
-               uint8_t offset;
+               int offset;
                pcireg_t val;
                
                if (!pci_get_capability(sc->osdep.em_pa.pa_pc, 
-                   sc->osdep.em_pa.pa_tag, PCI_CAP_ID_ST, (int*) &offset, 
-                   &val)) {
+                   sc->osdep.em_pa.pa_tag, PCI_CAP_ID_ST, &offset, &val)) {
                        return (0);
                }
                offset += PCI_ST_SMIA_OFFSET;

Reply via email to