summaryrefslogtreecommitdiffstats
path: root/src/drivers/net/pnic.c
diff options
context:
space:
mode:
authorMichael Brown2007-07-05 18:23:03 +0200
committerMichael Brown2007-07-05 18:23:03 +0200
commited7eae6005fa2cf7bf6a7650cf42762f4d1f8754 (patch)
tree6ab451c25ee0bf45fd908abfc2107cae8d236679 /src/drivers/net/pnic.c
parentAllow recording of TX and RX errors to aid in end-user debugging. (diff)
downloadipxe-ed7eae6005fa2cf7bf6a7650cf42762f4d1f8754.tar.gz
ipxe-ed7eae6005fa2cf7bf6a7650cf42762f4d1f8754.tar.xz
ipxe-ed7eae6005fa2cf7bf6a7650cf42762f4d1f8754.zip
Use netdev_rx_err() to report receive errors.
Diffstat (limited to 'src/drivers/net/pnic.c')
-rw-r--r--src/drivers/net/pnic.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/drivers/net/pnic.c b/src/drivers/net/pnic.c
index f614a073..38b4af6d 100644
--- a/src/drivers/net/pnic.c
+++ b/src/drivers/net/pnic.c
@@ -128,13 +128,14 @@ static void pnic_poll ( struct net_device *netdev, unsigned int rx_quota ) {
break;
iobuf = alloc_iob ( ETH_FRAME_LEN );
if ( ! iobuf ) {
- printf ( "could not allocate buffer\n" );
+ DBG ( "could not allocate buffer\n" );
+ netdev_rx_err ( netdev, NULL, -ENOMEM );
break;
}
if ( pnic_command ( pnic, PNIC_CMD_RECV, NULL, 0,
iobuf->data, ETH_FRAME_LEN, &length )
!= PNIC_STATUS_OK ) {
- free_iob ( iobuf );
+ netdev_rx_err ( netdev, iobuf, -EIO );
break;
}
iob_put ( iobuf, length );