Date: Tue, 13 Nov 2001 04:26:16 -0600 From: Alfred Perlstein <bright@mu.org> To: Paul Saab <ps@mu.org> Cc: Danny Braniss <danny@cs.huji.ac.il>, hackers@FreeBSD.org Subject: Re: gx driver MFC Message-ID: <20011113042616.J13393@elvis.mu.org> In-Reply-To: <20011113013235.A35077@elvis.mu.org>; from ps@mu.org on Tue, Nov 13, 2001 at 01:32:35AM -0800 References: <E163YnM-0005vh-00@pampa.cs.huji.ac.il> <20011113022229.H13393@elvis.mu.org> <20011113013235.A35077@elvis.mu.org>
next in thread | previous in thread | raw e-mail | index | archive | help
* Paul Saab <ps@mu.org> [011113 03:32] wrote: > I believe the driver in -current will compile under stable. It requires some minor hacking which I haven't tested, this basically disables the hardware checksum offloading because I'm too tired to figure out the difference at (what the hell time is it anyhow.. AAARGH!!) ohboy.. It also may misbehave if vlan packets arrive, it may even make your dog go bald so no promises. Just take the -current src/sys/modules/gx put it into a -stable in the same location then do the same thing for src/sys/dev/gx/ and apply the following patch. Let me know if it works. --- /usr/src/sys/dev/gx/if_gx.c Wed Oct 24 00:20:45 2001 +++ if_gx.c Tue Nov 13 02:25:30 2001 @@ -349,10 +349,12 @@ ifp->if_snd.ifq_maxlen = GX_TX_RING_CNT - 1; /* see if we can enable hardware checksumming */ +#if 0 /* HAS_IFCAP */ if (gx->gx_vflags & GXF_CSUM) { ifp->if_capabilities = IFCAP_HWCSUM; ifp->if_capenable = ifp->if_capabilities; } +#endif /* figure out transciever type */ if (gx->gx_vflags & GXF_FORCE_TBI || @@ -469,6 +471,7 @@ ctrl |= GX_RXC_LONG_PKT_ENABLE; /* setup receive checksum control */ +#if 0 /* HAS_IFCAP */ if (ifp->if_capenable & IFCAP_RXCSUM) CSR_WRITE_4(gx, GX_RX_CSUM_CONTROL, GX_CSUM_TCP/* | GX_CSUM_IP*/); @@ -476,6 +479,7 @@ /* setup transmit checksum control */ if (ifp->if_capenable & IFCAP_TXCSUM) ifp->if_hwassist = GX_CSUM_FEATURES; +#endif ctrl |= GX_RXC_STRIP_ETHERCRC; /* not on 82542? */ CSR_WRITE_4(gx, GX_RX_CONTROL, ctrl); @@ -958,6 +962,7 @@ error = ifmedia_ioctl(ifp, ifr, &gx->gx_media, command); } break; +#if 0 /* HAS_IFCAP */ case SIOCSIFCAP: mask = ifr->ifr_reqcap ^ ifp->if_capenable; if (mask & IFCAP_HWCSUM) { @@ -969,6 +974,7 @@ gx_init(gx); } break; +#endif default: error = EINVAL; break; @@ -1294,6 +1300,7 @@ #define IP_CSMASK (GX_RXSTAT_IGNORE_CSUM | GX_RXSTAT_HAS_IP_CSUM) #define TCP_CSMASK \ (GX_RXSTAT_IGNORE_CSUM | GX_RXSTAT_HAS_TCP_CSUM | GX_RXERR_TCP_CSUM) +#if 0 /* HAS_IFCAP */ if (ifp->if_capenable & IFCAP_RXCSUM) { #if 0 /* @@ -1313,12 +1320,17 @@ m->m_pkthdr.csum_data = 0xffff; } } +#endif /* * If we received a packet with a vlan tag, pass it * to vlan_input() instead of ether_input(). */ if (staterr & GX_RXSTAT_VLAN_PKT) { +#if 0 + m_freem(m); +#else VLAN_INPUT_TAG(ifp, eh, m, rx->rx_special); +#endif continue; } ether_input(ifp, eh, m); > > Alfred Perlstein (bright@mu.org) wrote: > > * Danny Braniss <danny@cs.huji.ac.il> [011113 02:20] wrote: > > > will th gx driver be MFC'ed any time soon? I have a box and a card > > > sitting around, and was wondering ... > > > > *rolls eyes* > > Stop wondering, start hacking. It should be nearly trivial to do. > > > > :) -- -Alfred Perlstein [alfred@freebsd.org] 'Instead of asking why a piece of software is using "1970s technology," start asking why software is ignoring 30 years of accumulated wisdom.' http://www.morons.org/rants/gpl-harmful.php3 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011113042616.J13393>