Commit e649985b authored by Joe Perches's avatar Joe Perches Committed by David S. Miller

forcedeth: Use print_hex_dump

Use the standard code to emit hex dumps.
Signed-off-by: default avatarJoe Perches <joe@perches.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 6b80858d
...@@ -2192,15 +2192,10 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev) ...@@ -2192,15 +2192,10 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev)
netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n", netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n",
__func__, entries, tx_flags_extra); __func__, entries, tx_flags_extra);
{ #ifdef DEBUG
int j; print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1,
for (j = 0; j < 64; j++) { skb->data, 64, true);
if ((j%16) == 0) #endif
dprintk("\n%03x:", j);
dprintk(" %02x", ((unsigned char *)skb->data)[j]);
}
dprintk("\n");
}
writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl);
return NETDEV_TX_OK; return NETDEV_TX_OK;
...@@ -2343,15 +2338,10 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, ...@@ -2343,15 +2338,10 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb,
netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n", netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n",
__func__, entries, tx_flags_extra); __func__, entries, tx_flags_extra);
{ #ifdef DEBUG
int j; print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1,
for (j = 0; j < 64; j++) { skb->data, 64, true);
if ((j%16) == 0) #endif
dprintk("\n%03x:", j);
dprintk(" %02x", ((unsigned char *)skb->data)[j]);
}
dprintk("\n");
}
writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl);
return NETDEV_TX_OK; return NETDEV_TX_OK;
...@@ -2666,16 +2656,11 @@ static int nv_rx_process(struct net_device *dev, int limit) ...@@ -2666,16 +2656,11 @@ static int nv_rx_process(struct net_device *dev, int limit)
skb = np->get_rx_ctx->skb; skb = np->get_rx_ctx->skb;
np->get_rx_ctx->skb = NULL; np->get_rx_ctx->skb = NULL;
{
int j;
netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags); netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags);
for (j = 0; j < 64; j++) { #ifdef DEBUG
if ((j%16) == 0 && j) print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET,
dprintk("\n%03x:", j); 16, 1, skb->data, 64, true);
dprintk(" %02x", ((unsigned char *)skb->data)[j]); #endif
}
dprintk("\n");
}
/* look at what we actually got: */ /* look at what we actually got: */
if (np->desc_ver == DESC_VER_1) { if (np->desc_ver == DESC_VER_1) {
if (likely(flags & NV_RX_DESCRIPTORVALID)) { if (likely(flags & NV_RX_DESCRIPTORVALID)) {
...@@ -2793,16 +2778,11 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit) ...@@ -2793,16 +2778,11 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit)
skb = np->get_rx_ctx->skb; skb = np->get_rx_ctx->skb;
np->get_rx_ctx->skb = NULL; np->get_rx_ctx->skb = NULL;
{
int j;
netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags); netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags);
for (j = 0; j < 64; j++) { #ifdef DEBUG
if ((j%16) == 0 && j) print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1,
dprintk("\n%03x:", j); skb->data, 64, true);
dprintk(" %02x", ((unsigned char *)skb->data)[j]); #endif
}
dprintk("\n");
}
/* look at what we actually got: */ /* look at what we actually got: */
if (likely(flags & NV_RX2_DESCRIPTORVALID)) { if (likely(flags & NV_RX2_DESCRIPTORVALID)) {
len = flags & LEN_MASK_V2; len = flags & LEN_MASK_V2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment