From owner-freebsd-hackers Fri Mar 31 9:34:19 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.thebiz.net (mx1.thebiz.net [216.238.0.20]) by hub.freebsd.org (Postfix) with SMTP id 6727E37B9D9 for ; Fri, 31 Mar 2000 09:34:14 -0800 (PST) (envelope-from matt@thebiz.net) Received: (qmail 16474 invoked from network); 31 Mar 2000 12:34:12 -0500 Received: from mail2.thebiz.net (172.16.0.129) by mx1.thebiz.net with SMTP; 31 Mar 2000 12:34:12 -0500 Received: (qmail 14459 invoked by uid 0); 31 Mar 2000 12:34:11 -0500 Received: from unknown (HELO mahatma) (216.238.1.20) by mail.thebiz.net with SMTP; 31 Mar 2000 12:34:11 -0500 Message-ID: <019001bf9b37$3111f430$1401eed8@mahatma> From: "Matthew Zahorik" To: Subject: BOOTP kernel modification Date: Fri, 31 Mar 2000 12:33:13 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6700 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6700 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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: 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: on dc0 dcphy0: 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