|
@@ -128,13 +128,14 @@ static void pnic_poll ( struct net_device *netdev, unsigned int rx_quota ) {
|
128
|
128
|
break;
|
129
|
129
|
iobuf = alloc_iob ( ETH_FRAME_LEN );
|
130
|
130
|
if ( ! iobuf ) {
|
131
|
|
- printf ( "could not allocate buffer\n" );
|
|
131
|
+ DBG ( "could not allocate buffer\n" );
|
|
132
|
+ netdev_rx_err ( netdev, NULL, -ENOMEM );
|
132
|
133
|
break;
|
133
|
134
|
}
|
134
|
135
|
if ( pnic_command ( pnic, PNIC_CMD_RECV, NULL, 0,
|
135
|
136
|
iobuf->data, ETH_FRAME_LEN, &length )
|
136
|
137
|
!= PNIC_STATUS_OK ) {
|
137
|
|
- free_iob ( iobuf );
|
|
138
|
+ netdev_rx_err ( netdev, iobuf, -EIO );
|
138
|
139
|
break;
|
139
|
140
|
}
|
140
|
141
|
iob_put ( iobuf, length );
|