Date: Sat, 19 Feb 2000 23:49:16 -0600 From: Chris Csanady <cc@137.org> To: "Kenneth D. Merry" <ken@kdm.org> Cc: Chris Csanady <cc@137.org>, freebsd-alpha@freebsd.org Subject: Re: Netbooting.. Message-ID: <38AF805C.68A6F23A@ameslab.gov> References: <38AB2424.C4C9D80D@ameslab.gov> <20000219193644.A81810@panzer.kdm.org> <38AF79AE.15C1FE6E@ameslab.gov> <20000219223054.B82975@panzer.kdm.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
"Kenneth D. Merry" wrote:
>
> On Sat, Feb 19, 2000 at 23:20:46 -0600, Chris Csanady wrote:
> > "Kenneth D. Merry" wrote:
> > > FWIW, I'm having similar problems with a DEC3000/300 box I'm trying to
> > > netboot. (It took me a while to figure out that I had to boot "ez0"
> > > instead of "esa0" to get bootp instead of MOP.)
>
> [ ... ]
>
> > > I may try to track this down tomorrow. It seems like it should be
> > > solveable. BTW, I'm running with -current as of ~February 12th, I think,
> > > and I'm netbooting (bootp, tftp and NFS) off a FreeBSD/alpha box.
> >
> > Do you have the bootp options in your kernel? Drew pointed out that
> > I need these as well as the NFS_ROOT option in my kernel.
> >
> > options BOOTP # Use BOOTP to obtain IP address/hostname
> > options BOOTP_NFSROOT # NFS mount root filesystem using BOOTP info
> > options BOOTP_NFSV3 # Use NFS v3 to NFS mount root
> > options BOOTP_COMPAT # Workaround for broken bootp daemons.
> > options BOOTP_WIRED_TO=dc0 # Use interface fxp0 for BOOTP
>
> Oops, no, I don't have those. It makes sense that I would need them,
> though. :)
>
> > Also, it turned out that dc0 does not autodetect the media correctly on my
> > boxes. If you have xp1000's, you will probably need the included patches.
>
> Nah, this is a fairly old box with a 10BaseT-only Lance ethernet interface.
>
> I haven't had any trouble with the dc0 driver detecting the media on a
> 433au box. Although I do have the media type hard-coded in SRM, I think.
>
> What patches are you talking about?
Hmm.. Perhaps I forgot to attach them. :) This happens sometimes. The
patches basically make the dc driver listen to the SRM settings. Here they
are in any case..
Chris
[-- Attachment #2 --]
Index: if_dc.c
===================================================================
RCS file: /home/ncvs/src/sys/pci/if_dc.c,v
retrieving revision 1.7
diff -u -r1.7 if_dc.c
--- if_dc.c 2000/01/24 17:19:37 1.7
+++ if_dc.c 2000/02/07 17:04:48
@@ -1721,6 +1721,33 @@
bpfattach(ifp, DLT_EN10MB, sizeof(struct ether_header));
+#ifdef __alpha__
+ sc->dc_srm_media = 0;
+
+ /* Remember the SRM console media setting */
+ if (DC_IS_INTEL(sc)) {
+ command = pci_read_config(dev, DC_PCI_CFDD, 4);
+ command &= ~(DC_CFDD_SNOOZE_MODE|DC_CFDD_SLEEP_MODE);
+ switch ((command >> 8) & 0xff) {
+ case 3:
+ sc->dc_srm_media = IFM_10_T;
+ break;
+ case 4:
+ sc->dc_srm_media = IFM_10_T | IFM_FDX;
+ break;
+ case 5:
+ sc->dc_srm_media = IFM_100_TX;
+ break;
+ case 6:
+ sc->dc_srm_media = IFM_100_TX | IFM_FDX;
+ break;
+ }
+ if (sc->dc_srm_media)
+ sc->dc_srm_media |= IFM_ACTIVE | IFM_ETHER;
+ }
+#endif
+
+
fail:
splx(s);
@@ -2669,6 +2696,15 @@
sc->dc_stat_ch = timeout(dc_tick, sc, hz);
+#ifdef __alpha__
+ if(sc->dc_srm_media) {
+ struct ifreq ifr;
+
+ ifr.ifr_media = sc->dc_srm_media;
+ ifmedia_ioctl(ifp, &ifr, &mii->mii_media, SIOCSIFMEDIA);
+ sc->dc_srm_media = 0;
+ }
+#endif
return;
}
@@ -2772,6 +2808,10 @@
case SIOCSIFMEDIA:
mii = device_get_softc(sc->dc_miibus);
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
+#ifdef __alpha__
+ if (sc->dc_srm_media)
+ sc->dc_srm_media = 0;
+#endif
break;
default:
error = EINVAL;
Index: if_dcreg.h
===================================================================
RCS file: /home/ncvs/src/sys/pci/if_dcreg.h,v
retrieving revision 1.3
diff -u -r1.3 if_dcreg.h
--- if_dcreg.h 2000/01/19 19:03:08 1.3
+++ if_dcreg.h 2000/02/07 17:04:49
@@ -655,6 +655,9 @@
struct dc_list_data *dc_ldata;
struct dc_chain_data dc_cdata;
struct callout_handle dc_stat_ch;
+#ifdef __alpha__
+ int dc_srm_media;
+#endif
};
#define DC_TX_POLL 0x00000001
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?38AF805C.68A6F23A>
