[tulip-bug] Kingston kne111tx and recompiling tulip on Mandrake8.0

Donald Becker becker@scyld.com
Thu, 12 Jul 2001 16:50:07 -0400 (EDT)


On Thu, 12 Jul 2001, Keith Warno wrote:

> > > Jul 10 16:48:16 foo kernel: Warning: kfree_skb on hard IRQ d88818c4
> > 
> > Could you please try exactly the same test, making the following source
> > code change around line 2742:
>
> Hmm.  I think I may have made an error in my post; I stated I tried to
> build tulip.c (v0.92w 7/9/2001) with kernel 2.4.6 when in fact it was
> probably 2.4.5 (was a long night that night).
...
> tulip.c: In function `private_ioctl':
> tulip.c:3112: `SIOCSPARAMS' undeclared (first use in this function)
> 
> I'm currently using the kernel-distributed tulip.c.  Perhaps this is
> causing an issue?  Or was something changed from 2.4.5 to 2.4.6 that
> breaks the tulip compile?

Doh!
That's exactly what happened.
The 2.4.6 kernel now defines SIOCGMIIPHY, but not the ioctl(SIOCSPARAMS)
call that sets parameters such as the interrupt mitigation value (on the
tulip) and debug level (on certain drivers).

The work-around is to add an #endif/#ifdef to the kern_compat.h file

#ifndef SIOCGMIIPHY
#define SIOCGMIIPHY (SIOCDEVPRIVATE)		/* Get the PHY in use. */
#define SIOCGMIIREG (SIOCDEVPRIVATE+1) 		/* Read a PHY register. */
#define SIOCSMIIREG (SIOCDEVPRIVATE+2) 		/* Write a PHY register. */
#endif
#ifndef SIOCGPARAMS
#define SIOCGPARAMS (SIOCDEVPRIVATE+3) 		/* Read operational parameters. */
#define SIOCSPARAMS (SIOCDEVPRIVATE+4) 		/* Set operational parameters. */
#endif

Could you please try this?

Donald Becker				becker@scyld.com
Scyld Computing Corporation		http://www.scyld.com
410 Severn Ave. Suite 210		Second Generation Beowulf Clusters
Annapolis MD 21403			410-990-9993