diff options
Diffstat (limited to 'drivers/net/ethernet/sun/sunvnet.c')
-rw-r--r-- | drivers/net/ethernet/sun/sunvnet.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/net/ethernet/sun/sunvnet.c b/drivers/net/ethernet/sun/sunvnet.c index 23c89ab5a6ad..f67539650c38 100644 --- a/drivers/net/ethernet/sun/sunvnet.c +++ b/drivers/net/ethernet/sun/sunvnet.c | |||
@@ -350,14 +350,17 @@ static int vnet_walk_rx_one(struct vnet_port *port, | |||
350 | if (IS_ERR(desc)) | 350 | if (IS_ERR(desc)) |
351 | return PTR_ERR(desc); | 351 | return PTR_ERR(desc); |
352 | 352 | ||
353 | if (desc->hdr.state != VIO_DESC_READY) | ||
354 | return 1; | ||
355 | |||
356 | rmb(); | ||
357 | |||
353 | viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%llx:%llx]\n", | 358 | viodbg(DATA, "vio_walk_rx_one desc[%02x:%02x:%08x:%08x:%llx:%llx]\n", |
354 | desc->hdr.state, desc->hdr.ack, | 359 | desc->hdr.state, desc->hdr.ack, |
355 | desc->size, desc->ncookies, | 360 | desc->size, desc->ncookies, |
356 | desc->cookies[0].cookie_addr, | 361 | desc->cookies[0].cookie_addr, |
357 | desc->cookies[0].cookie_size); | 362 | desc->cookies[0].cookie_size); |
358 | 363 | ||
359 | if (desc->hdr.state != VIO_DESC_READY) | ||
360 | return 1; | ||
361 | err = vnet_rx_one(port, desc->size, desc->cookies, desc->ncookies); | 364 | err = vnet_rx_one(port, desc->size, desc->cookies, desc->ncookies); |
362 | if (err == -ECONNRESET) | 365 | if (err == -ECONNRESET) |
363 | return err; | 366 | return err; |