]> git.ipfire.org Git - thirdparty/ipxe.git/commitdiff
[realtek] Report RX error detail in debug messages
authorMichael Brown <mcb30@ipxe.org>
Sun, 14 Jul 2013 22:38:43 +0000 (00:38 +0200)
committerMichael Brown <mcb30@ipxe.org>
Sun, 14 Jul 2013 22:38:43 +0000 (00:38 +0200)
Signed-off-by: Michael Brown <mcb30@ipxe.org>
src/drivers/net/realtek.c

index 498c233f854184fd181505419c7c2e1fb95cd69c..867efbcd34583ebab22f6a4f61d77fde0fea4bfe 100644 (file)
@@ -907,13 +907,15 @@ static void realtek_poll_rx ( struct net_device *netdev ) {
                len = ( le16_to_cpu ( rx->length ) & RTL_DESC_SIZE_MASK );
                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 */
                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 );
                } else {
+                       DBGC2 ( rtl, "REALTEK %p RX %d complete (length "
+                               "%zd)\n", rtl, rx_idx, len );
                        netdev_rx ( netdev, iobuf );
                }
                rtl->rx.cons++;