summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXin LI <delphij@FreeBSD.org>2013-06-28 05:21:59 +0000
committerXin LI <delphij@FreeBSD.org>2013-06-28 05:21:59 +0000
commiteafb08f1d7292a2096e2b2e63e6da888f33a3153 (patch)
tree930d46817e1d0e2a3f5741fad177f9cb0ad59a0e
parent4493d04f4b9521cdc5077f9316ddc8eda06a4cf4 (diff)
downloadsrc-test2-eafb08f1d7292a2096e2b2e63e6da888f33a3153.tar.gz
src-test2-eafb08f1d7292a2096e2b2e63e6da888f33a3153.zip
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)
Notes
Notes: svn path=/releng/8.4/; revision=252334
-rw-r--r--UPDATING9
-rw-r--r--sys/conf/newvers.sh2
-rw-r--r--sys/dev/fxp/if_fxp.c26
-rw-r--r--sys/dev/virtio/network/if_vtnet.c4
4 files changed, 32 insertions, 9 deletions
diff --git a/UPDATING b/UPDATING
index d9925ebd9af6..4df517a85e62 100644
--- a/UPDATING
+++ b/UPDATING
@@ -15,6 +15,15 @@ NOTE TO PEOPLE WHO THINK THAT FreeBSD 8.x IS SLOW ON IA64 OR SUN4V:
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.
diff --git a/sys/conf/newvers.sh b/sys/conf/newvers.sh
index ec526e65ea2f..a6c190bc925b 100644
--- a/sys/conf/newvers.sh
+++ b/sys/conf/newvers.sh
@@ -32,7 +32,7 @@
TYPE="FreeBSD"
REVISION="8.4"
-BRANCH="RELEASE"
+BRANCH="RELEASE-p1"
if [ "X${BRANCH_OVERRIDE}" != "X" ]; then
BRANCH=${BRANCH_OVERRIDE}
fi
diff --git a/sys/dev/fxp/if_fxp.c b/sys/dev/fxp/if_fxp.c
index 0235decebb08..983ab19696ba 100644
--- a/sys/dev/fxp/if_fxp.c
+++ b/sys/dev/fxp/if_fxp.c
@@ -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 setmedia)
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 command, caddr_t data)
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 command, caddr_t data)
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 command, caddr_t data)
~(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;
diff --git a/sys/dev/virtio/network/if_vtnet.c b/sys/dev/virtio/network/if_vtnet.c
index 177869ca1753..d6fcac6d7b54 100644
--- a/sys/dev/virtio/network/if_vtnet.c
+++ b/sys/dev/virtio/network/if_vtnet.c
@@ -2470,9 +2470,9 @@ vtnet_rx_filter_mac(struct vtnet_softc *sc)
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"));