Browse Source

[realtek] Report RX error detail in debug messages

Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 11 years ago
parent
commit
3aafe5fc54
1 changed files with 5 additions and 3 deletions
  1. 5
    3
      src/drivers/net/realtek.c

+ 5
- 3
src/drivers/net/realtek.c View File

@@ -907,13 +907,15 @@ static void realtek_poll_rx ( struct net_device *netdev ) {
907 907
 		len = ( le16_to_cpu ( rx->length ) & RTL_DESC_SIZE_MASK );
908 908
 		iob_put ( iobuf, ( len - 4 /* strip CRC */ ) );
909 909
 
910
-		DBGC2 ( rtl, "REALTEK %p RX %d complete (length %zd)\n",
911
-			rtl, rx_idx, len );
912
-
913 910
 		/* Hand off to network stack */
914 911
 		if ( rx->flags & cpu_to_le16 ( RTL_DESC_RES ) ) {
912
+			DBGC ( rtl, "REALTEK %p RX %d error (length %zd, "
913
+			       "flags %04x)\n", rtl, rx_idx, len,
914
+			       le16_to_cpu ( rx->flags ) );
915 915
 			netdev_rx_err ( netdev, iobuf, -EIO );
916 916
 		} else {
917
+			DBGC2 ( rtl, "REALTEK %p RX %d complete (length "
918
+				"%zd)\n", rtl, rx_idx, len );
917 919
 			netdev_rx ( netdev, iobuf );
918 920
 		}
919 921
 		rtl->rx.cons++;

Loading…
Cancel
Save