problem with vr0
Gary Allan
dragonfly at gallan.plus.com
Wed Jan 26 11:37:02 PST 2005
George Georgalis wrote:
On Wed, Jan 26, 2005 at 10:27:11AM +0100, Joerg Sonnenberger wrote:
On Wed, Jan 26, 2005 at 01:21:55AM -0500, George Georgalis wrote:
I put kern.polling.enable=1 in /etc/rc.conf but have the feeling it
belongs elsewhere...
/etc/sysctl.conf
okay. console messages remain the same, and no other changes noted
either.
// George
I've noticed that polling support for the vr device can not be
controlled or displayed from ifconfig (Unlike in FreeBSD). Adding the
following seems to enable that support. No guarantees on correctness but
maybe someone else can take a look.
cd /usr/src/sys/dev/netif/vr/
diff -ruN if_vr.c if_vr.c.new
--- if_vr.c 2005-01-26 19:19:42.000000000 +0000
+++ if_vr.c.new 2005-01-26 19:26:04.000000000 +0000
@@ -880,6 +880,10 @@
ifp->if_init = vr_init;
ifp->if_baudrate = 10000000;
ifp->if_snd.ifq_maxlen = VR_TX_LIST_CNT - 1;
+#ifdef DEVICE_POLLING
+ ifp->if_capabilities |= IFCAP_POLLING;
+#endif
+ ifp->if_capenable = ifp->if_capabilities;
/*
* Do MII setup.
@@ -1690,6 +1694,11 @@
mii = device_get_softc(sc->vr_miibus);
error = ifmedia_ioctl(ifp, ifr, &mii->mii_media, command);
break;
+ case SIOCSIFCAP:
+ ifp->if_capenable &= ~IFCAP_POLLING;
+ ifp->if_capenable |= ifr->ifr_reqcap & IFCAP_POLLING;
+ break;
+
default:
error = EINVAL;
break;
After the modifications with DEVICE_POLLING kernel support and
kern.polling.enable=1.
ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=40<polling>
inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255
ether 00:40:63:d8:23:0d
media: Ethernet autoselect (none)
status: no carrier
ifconfig vr0 -polling && ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255
ether 00:40:63:d8:23:0d
media: Ethernet autoselect (none)
status: no carrier
ifconfig vr0 polling && ifconfig vr0
vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=40<polling>
inet 192.168.50.1 netmask 0xffffff00 broadcast 192.168.50.255
ether 00:40:63:d8:23:0d
media: Ethernet autoselect (none)
status: no carrier
Regards
G.Allan
More information about the Bugs
mailing list