mirror of https://github.com/ipxe/ipxe.git
[realtek] Report RX error detail in debug messages
Signed-off-by: Michael Brown <mcb30@ipxe.org>pull/12/merge
parent
49d14f0d8d
commit
3aafe5fc54
|
@ -907,13 +907,15 @@ static void realtek_poll_rx ( struct net_device *netdev ) {
|
||||||
len = ( le16_to_cpu ( rx->length ) & RTL_DESC_SIZE_MASK );
|
len = ( le16_to_cpu ( rx->length ) & RTL_DESC_SIZE_MASK );
|
||||||
iob_put ( iobuf, ( len - 4 /* strip CRC */ ) );
|
iob_put ( iobuf, ( len - 4 /* strip CRC */ ) );
|
||||||
|
|
||||||
DBGC2 ( rtl, "REALTEK %p RX %d complete (length %zd)\n",
|
|
||||||
rtl, rx_idx, len );
|
|
||||||
|
|
||||||
/* Hand off to network stack */
|
/* Hand off to network stack */
|
||||||
if ( rx->flags & cpu_to_le16 ( RTL_DESC_RES ) ) {
|
if ( rx->flags & cpu_to_le16 ( RTL_DESC_RES ) ) {
|
||||||
|
DBGC ( rtl, "REALTEK %p RX %d error (length %zd, "
|
||||||
|
"flags %04x)\n", rtl, rx_idx, len,
|
||||||
|
le16_to_cpu ( rx->flags ) );
|
||||||
netdev_rx_err ( netdev, iobuf, -EIO );
|
netdev_rx_err ( netdev, iobuf, -EIO );
|
||||||
} else {
|
} else {
|
||||||
|
DBGC2 ( rtl, "REALTEK %p RX %d complete (length "
|
||||||
|
"%zd)\n", rtl, rx_idx, len );
|
||||||
netdev_rx ( netdev, iobuf );
|
netdev_rx ( netdev, iobuf );
|
||||||
}
|
}
|
||||||
rtl->rx.cons++;
|
rtl->rx.cons++;
|
||||||
|
|
Loading…
Reference in New Issue