diff options
author | Joe Perches <joe@perches.com> | 2010-11-29 02:41:54 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2010-11-29 14:44:52 -0500 |
commit | e649985b4ab1e86b3a389cf0d7c48f9cb1e27ae6 (patch) | |
tree | 1ce4293ca03e724b63e4a9a3fd98726c8c2d73ec /drivers/net/forcedeth.c | |
parent | 6b80858d2c0a378894b9df35d3703d62b0b12dbc (diff) |
forcedeth: Use print_hex_dump
Use the standard code to emit hex dumps.
Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/forcedeth.c')
-rw-r--r-- | drivers/net/forcedeth.c | 54 |
1 files changed, 17 insertions, 37 deletions
diff --git a/drivers/net/forcedeth.c b/drivers/net/forcedeth.c index 767d1eb87c94..1ac8b4e87276 100644 --- a/drivers/net/forcedeth.c +++ b/drivers/net/forcedeth.c | |||
@@ -2192,15 +2192,10 @@ static netdev_tx_t nv_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
2192 | 2192 | ||
2193 | netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n", | 2193 | netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n", |
2194 | __func__, entries, tx_flags_extra); | 2194 | __func__, entries, tx_flags_extra); |
2195 | { | 2195 | #ifdef DEBUG |
2196 | int j; | 2196 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1, |
2197 | for (j = 0; j < 64; j++) { | 2197 | skb->data, 64, true); |
2198 | if ((j%16) == 0) | 2198 | #endif |
2199 | dprintk("\n%03x:", j); | ||
2200 | dprintk(" %02x", ((unsigned char *)skb->data)[j]); | ||
2201 | } | ||
2202 | dprintk("\n"); | ||
2203 | } | ||
2204 | 2199 | ||
2205 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); | 2200 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); |
2206 | return NETDEV_TX_OK; | 2201 | return NETDEV_TX_OK; |
@@ -2343,15 +2338,10 @@ static netdev_tx_t nv_start_xmit_optimized(struct sk_buff *skb, | |||
2343 | 2338 | ||
2344 | netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n", | 2339 | netdev_dbg(dev, "%s: entries %d queued for transmission. tx_flags_extra: %x\n", |
2345 | __func__, entries, tx_flags_extra); | 2340 | __func__, entries, tx_flags_extra); |
2346 | { | 2341 | #ifdef DEBUG |
2347 | int j; | 2342 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1, |
2348 | for (j = 0; j < 64; j++) { | 2343 | skb->data, 64, true); |
2349 | if ((j%16) == 0) | 2344 | #endif |
2350 | dprintk("\n%03x:", j); | ||
2351 | dprintk(" %02x", ((unsigned char *)skb->data)[j]); | ||
2352 | } | ||
2353 | dprintk("\n"); | ||
2354 | } | ||
2355 | 2345 | ||
2356 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); | 2346 | writel(NVREG_TXRXCTL_KICK|np->txrxctl_bits, get_hwbase(dev) + NvRegTxRxControl); |
2357 | return NETDEV_TX_OK; | 2347 | return NETDEV_TX_OK; |
@@ -2666,16 +2656,11 @@ static int nv_rx_process(struct net_device *dev, int limit) | |||
2666 | skb = np->get_rx_ctx->skb; | 2656 | skb = np->get_rx_ctx->skb; |
2667 | np->get_rx_ctx->skb = NULL; | 2657 | np->get_rx_ctx->skb = NULL; |
2668 | 2658 | ||
2669 | { | ||
2670 | int j; | ||
2671 | netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags); | 2659 | netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags); |
2672 | for (j = 0; j < 64; j++) { | 2660 | #ifdef DEBUG |
2673 | if ((j%16) == 0 && j) | 2661 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, |
2674 | dprintk("\n%03x:", j); | 2662 | 16, 1, skb->data, 64, true); |
2675 | dprintk(" %02x", ((unsigned char *)skb->data)[j]); | 2663 | #endif |
2676 | } | ||
2677 | dprintk("\n"); | ||
2678 | } | ||
2679 | /* look at what we actually got: */ | 2664 | /* look at what we actually got: */ |
2680 | if (np->desc_ver == DESC_VER_1) { | 2665 | if (np->desc_ver == DESC_VER_1) { |
2681 | if (likely(flags & NV_RX_DESCRIPTORVALID)) { | 2666 | if (likely(flags & NV_RX_DESCRIPTORVALID)) { |
@@ -2793,16 +2778,11 @@ static int nv_rx_process_optimized(struct net_device *dev, int limit) | |||
2793 | skb = np->get_rx_ctx->skb; | 2778 | skb = np->get_rx_ctx->skb; |
2794 | np->get_rx_ctx->skb = NULL; | 2779 | np->get_rx_ctx->skb = NULL; |
2795 | 2780 | ||
2796 | { | 2781 | netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags); |
2797 | int j; | 2782 | #ifdef DEBUG |
2798 | netdev_dbg(dev, "Dumping packet (flags 0x%x)\n", flags); | 2783 | print_hex_dump(KERN_DEBUG, "", DUMP_PREFIX_OFFSET, 16, 1, |
2799 | for (j = 0; j < 64; j++) { | 2784 | skb->data, 64, true); |
2800 | if ((j%16) == 0 && j) | 2785 | #endif |
2801 | dprintk("\n%03x:", j); | ||
2802 | dprintk(" %02x", ((unsigned char *)skb->data)[j]); | ||
2803 | } | ||
2804 | dprintk("\n"); | ||
2805 | } | ||
2806 | /* look at what we actually got: */ | 2786 | /* look at what we actually got: */ |
2807 | if (likely(flags & NV_RX2_DESCRIPTORVALID)) { | 2787 | if (likely(flags & NV_RX2_DESCRIPTORVALID)) { |
2808 | len = flags & LEN_MASK_V2; | 2788 | len = flags & LEN_MASK_V2; |