svn commit: r252334 - in releng/8.4: . sys/conf sys/dev/fxp sys/dev/virtio/network
Xin LI
delphij at FreeBSD.org
Fri Jun 28 05:22:00 UTC 2013
Author: delphij
Date: Fri Jun 28 05:21:59 2013
New Revision: 252334
URL: http://svnweb.freebsd.org/changeset/base/252334
Log:
Fix a problem where dhclient(8) utility tries to initilaize an
fxp(4) forever because the driver resets the controller chip
twice upon initialization. [EN-13:01]
Fix a problem where frames sent to additional MAC addresses are
not forwarded to the vtnet(4) interface. [EN-13:02]
Approved by: so (delphij)
Modified:
releng/8.4/UPDATING
releng/8.4/sys/conf/newvers.sh
releng/8.4/sys/dev/fxp/if_fxp.c
releng/8.4/sys/dev/virtio/network/if_vtnet.c
Modified: releng/8.4/UPDATING
==============================================================================
--- releng/8.4/UPDATING Fri Jun 28 05:21:21 2013 (r252333)
+++ releng/8.4/UPDATING Fri Jun 28 05:21:59 2013 (r252334)
@@ -15,6 +15,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.
debugging tools present in HEAD were left in place because
sun4v support still needs work to become production ready.
+20130628: p1 FreeBSD-EN-13:01.fxp
+ FreeBSD-EN-13:02.vtnet
+ Fix a problem where dhclient(8) utility tries to initilaize an
+ fxp(4) forever because the driver resets the controller chip
+ twice upon initialization. [EN-13:01]
+
+ Fix a problem where frames sent to additional MAC addresses are
+ not forwarded to the vtnet(4) interface. [EN-13:02]
+
20130429:
Fix a bug that allows NFS clients to issue READDIR on files.
Modified: releng/8.4/sys/conf/newvers.sh
==============================================================================
--- releng/8.4/sys/conf/newvers.sh Fri Jun 28 05:21:21 2013 (r252333)
+++ releng/8.4/sys/conf/newvers.sh Fri Jun 28 05:21:59 2013 (r252334)
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="8.4"
-BRANCH="RELEASE"
+BRANCH="RELEASE-p1"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
Modified: releng/8.4/sys/dev/fxp/if_fxp.c
==============================================================================
--- releng/8.4/sys/dev/fxp/if_fxp.c Fri Jun 28 05:21:21 2013 (r252333)
+++ releng/8.4/sys/dev/fxp/if_fxp.c Fri Jun 28 05:21:59 2013 (r252334)
@@ -1074,7 +1074,8 @@ fxp_suspend(device_t dev)
pmstat |= PCIM_PSTAT_PME | PCIM_PSTAT_PMEENABLE;
sc->flags |= FXP_FLAG_WOL;
/* Reconfigure hardware to accept magic frames. */
- fxp_init_body(sc, 1);
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
+ fxp_init_body(sc, 0);
}
pci_write_config(sc->dev, pmc + PCIR_POWER_STATUS, pmstat, 2);
}
@@ -2140,8 +2141,10 @@ fxp_tick(void *xsc)
*/
if (sc->rx_idle_secs > FXP_MAX_RX_IDLE) {
sc->rx_idle_secs = 0;
- if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
fxp_init_body(sc, 1);
+ }
return;
}
/*
@@ -2239,6 +2242,7 @@ fxp_watchdog(struct fxp_softc *sc)
device_printf(sc->dev, "device timeout\n");
sc->ifp->if_oerrors++;
+ sc->ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
fxp_init_body(sc, 1);
}
@@ -2273,6 +2277,10 @@ fxp_init_body(struct fxp_softc *sc, int
int i, prm;
FXP_LOCK_ASSERT(sc, MA_OWNED);
+
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+ return;
+
/*
* Cancel any pending I/O
*/
@@ -2812,6 +2820,7 @@ fxp_miibus_statchg(device_t dev)
*/
if (sc->revision == FXP_REV_82557)
return;
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
fxp_init_body(sc, 0);
}
@@ -2835,9 +2844,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
if (ifp->if_flags & IFF_UP) {
if (((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) &&
((ifp->if_flags ^ sc->if_flags) &
- (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0)
+ (IFF_PROMISC | IFF_ALLMULTI | IFF_LINK0)) != 0) {
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
fxp_init_body(sc, 0);
- else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
+ } else if ((ifp->if_drv_flags & IFF_DRV_RUNNING) == 0)
fxp_init_body(sc, 1);
} else {
if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
@@ -2850,8 +2860,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
case SIOCADDMULTI:
case SIOCDELMULTI:
FXP_LOCK(sc);
- if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0)
+ if ((ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
fxp_init_body(sc, 0);
+ }
FXP_UNLOCK(sc);
break;
@@ -2941,8 +2953,10 @@ fxp_ioctl(struct ifnet *ifp, u_long comm
~(IFCAP_VLAN_HWTSO | IFCAP_VLAN_HWCSUM);
reinit++;
}
- if (reinit > 0 && ifp->if_flags & IFF_UP)
+ if (reinit > 0 && (ifp->if_drv_flags & IFF_DRV_RUNNING) != 0) {
+ ifp->if_drv_flags &= ~IFF_DRV_RUNNING;
fxp_init_body(sc, 0);
+ }
FXP_UNLOCK(sc);
VLAN_CAPABILITIES(ifp);
break;
Modified: releng/8.4/sys/dev/virtio/network/if_vtnet.c
==============================================================================
--- releng/8.4/sys/dev/virtio/network/if_vtnet.c Fri Jun 28 05:21:21 2013 (r252333)
+++ releng/8.4/sys/dev/virtio/network/if_vtnet.c Fri Jun 28 05:21:59 2013 (r252334)
@@ -2470,9 +2470,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *
sglist_init(&sg, 4, segs);
error |= sglist_append(&sg, &hdr, sizeof(struct virtio_net_ctrl_hdr));
error |= sglist_append(&sg, &filter->vmf_unicast,
- sizeof(struct vtnet_mac_table));
+ sizeof(uint32_t) + filter->vmf_unicast.nentries * ETHER_ADDR_LEN);
error |= sglist_append(&sg, &filter->vmf_multicast,
- sizeof(struct vtnet_mac_table));
+ sizeof(uint32_t) + filter->vmf_multicast.nentries * ETHER_ADDR_LEN);
error |= sglist_append(&sg, &ack, sizeof(uint8_t));
KASSERT(error == 0 && sg.sg_nseg == 4,
("error adding MAC filtering message to sglist"));
More information about the svn-src-all
mailing list