Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F151525316
D6657.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D6657.diff
View Options
Index: head/sys/dev/xen/netfront/netfront.c
===================================================================
--- head/sys/dev/xen/netfront/netfront.c
+++ head/sys/dev/xen/netfront/netfront.c
@@ -146,7 +146,8 @@
static int xn_ifmedia_upd(struct ifnet *ifp);
static void xn_ifmedia_sts(struct ifnet *ifp, struct ifmediareq *ifmr);
-int xn_connect(struct netfront_info *);
+static int xn_connect(struct netfront_info *);
+static void xn_kick_rings(struct netfront_info *);
static int xn_get_responses(struct netfront_rxq *,
struct netfront_rx_info *, RING_IDX, RING_IDX *,
@@ -976,7 +977,9 @@
break;
if (xn_connect(sc) != 0)
break;
- xenbus_set_state(dev, XenbusStateConnected);
+ /* Switch to connected state before kicking the rings. */
+ xenbus_set_state(sc->xbdev, XenbusStateConnected);
+ xn_kick_rings(sc);
break;
case XenbusStateClosing:
xenbus_set_state(dev, XenbusStateClosed);
@@ -1924,7 +1927,7 @@
}
/* START of Xenolinux helper functions adapted to FreeBSD */
-int
+static int
xn_connect(struct netfront_info *np)
{
int i, error;
@@ -1968,8 +1971,20 @@
* packets.
*/
netfront_carrier_on(np);
+
+ return (0);
+}
+
+static void
+xn_kick_rings(struct netfront_info *np)
+{
+ struct netfront_rxq *rxq;
+ struct netfront_txq *txq;
+ int i;
+
for (i = 0; i < np->num_queues; i++) {
txq = &np->txq[i];
+ rxq = &np->rxq[i];
xen_intr_signal(txq->xen_intr_handle);
XN_TX_LOCK(txq);
xn_txeof(txq);
@@ -1978,8 +1993,6 @@
xn_alloc_rx_buffers(rxq);
XN_RX_UNLOCK(rxq);
}
-
- return (0);
}
static void
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, Apr 10, 12:41 AM (22 h, 1 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
31182781
Default Alt Text
D6657.diff (1 KB)
Attached To
Mode
D6657: xen-netfront: fix initialization
Attached
Detach File
Event Timeline
Log In to Comment