Date: Fri, 31 Mar 2000 12:33:13 -0500 From: "Matthew Zahorik" <matt@thebiz.net> To: <freebsd-hackers@freebsd.org> Subject: BOOTP kernel modification Message-ID: <019001bf9b37$3111f430$1401eed8@mahatma>
next in thread | raw e-mail | index | archive | help
Hello! I have a problem where I'm trying to bootp an Alpha box. It works great over a hub, but through a switch it fails miserably. I tracked it down to a bad autoconfiguration. The switch is autonegotiating 100Mb/fdx and the client is autonegotiating 100Mb/hdx. Needless to say, this doesn't help with BOOTP requests - things tend to time out. Forcing the switch to 100Mb/hdx makes the process work smoothly. Forcing the switch to 100Mb/fdx causes more timeouts. For other reasons, I'd like to force the switch to 100Mb/fdx at all times, and just force the BOOTP process to initialize the card at a 100Mb/fdx. I'm new to kernel programming, so I'd like someone to tell me if this is the correct way to do this. In nfs/bootp_subr.c in the function bootpc_fakeup_interface you have: /* * Bring up the interface. * * Get the old interface flags and or IFF_UP into them; if * IFF_UP set blindly, interface selection can be clobbered. */ error = ifioctl(so, SIOCGIFFLAGS, (caddr_t)ireq, procp); if (error) panic("bootpc_fakeup_interface: GIFFLAGS, error=%d", error); ireq->ifr_flags |= IFF_UP; error = ifioctl(so, SIOCSIFFLAGS, (caddr_t)ireq, procp); if (error) panic("bootpc_fakeup_interface: SIFFLAGS, error=%d", error); to which I'd add: ireq->ifr_media = IFF_100_TX | IFF_FDX; error = ifioctl(so, SIOCSIFMEDIA, (caddr_t)ireq, procp); if (error) panic("bootpc_fakeup_interface: SIFMEDIA, error=%d", error); right before the SIOCGIFFFLAGS ioctl, so the media type would be set before the interface would be brought up. Will this work? (: Is the interface initialized somewhere else in the kernel? (excluding ifconfigs in startup scripts, which I'm well aware of) If it doesn't work, how do I get this bit of code to force 100Mb/fdx? I have no problem making this into a kernel option like 'option BOOTP_FORCE_MEDIA="IFF_100_TX | IFF_FDX" ' Also, netboot will have to be changed (yes, it works on Alpha just fine) b ut I can't get it to compile. Before I monkey around with it more, is there a magic trick? It currently breaks looking for net.h and net_if.h Finally, the link and activity lights don't work on these machines after the kernel boots: dc0: <Intel 21143 10/100BaseTX> port 0x1100-0x117f mem 0x20c2000-0x20c23ff \ irq 29 at device 9.0 on pci0 dc0: interrupting at TSUNAMI irq 29 dc0: Ethernet address: 08:00:2b:86:28:54 miibus0: <MII bus> on dc0 dcphy0: <Intel 21143 NWAY media interface> on miibus0 dcphy0: 10baseT, 10baseT-FDX, 100baseTX, 100baseTX-FDX, auto What part of the code should I look at to get this working? This is all on 4.0-RELEASE on a Tsunami based Alpha (DS10, 466MHz EV6) Thanks! - Matt -- Matthew Zahorik Director of Systems and Networking - BiznessOnline.com matt@thebiz.net President of AlbanyNet Inc. - a BiznessOnline subsidiary maz@albany.net Voice: (518) 292-1001 Fax: (518) 626-0793 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?019001bf9b37$3111f430$1401eed8>