aboutsummaryrefslogtreecommitdiffstats
path: root/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1366-net-amd-xgbe-Get-rid-of-custom-hex_dump_to_buffer.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1366-net-amd-xgbe-Get-rid-of-custom-hex_dump_to_buffer.patch')
-rw-r--r--meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1366-net-amd-xgbe-Get-rid-of-custom-hex_dump_to_buffer.patch68
1 files changed, 0 insertions, 68 deletions
diff --git a/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1366-net-amd-xgbe-Get-rid-of-custom-hex_dump_to_buffer.patch b/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1366-net-amd-xgbe-Get-rid-of-custom-hex_dump_to_buffer.patch
deleted file mode 100644
index 0a45b519..00000000
--- a/meta-v1000/recipes-kernel/linux/linux-yocto-4.14.71/1366-net-amd-xgbe-Get-rid-of-custom-hex_dump_to_buffer.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From ca109497162520942cba79a7592cc071665e0a98 Mon Sep 17 00:00:00 2001
-From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-Date: Tue, 19 Dec 2017 23:22:15 +0200
-Subject: [PATCH 1366/4131] net: amd-xgbe: Get rid of custom
- hex_dump_to_buffer()
-
-Get rid of yet another custom hex_dump_to_buffer().
-
-The output is slightly changed, i.e. each byte followed by white space.
-
-Note, we don't use print_hex_dump() here since the original code uses
-nedev_dbg().
-
-Acked-by: Tom Lendacky <thomas.lendacky@amd.com>
-Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
-Signed-off-by: David S. Miller <davem@davemloft.net>
-Signed-off-by: Sudheesh Mavila <sudheesh.mavila@amd.com>
----
- drivers/net/ethernet/amd/xgbe/xgbe-drv.c | 24 +++++++-----------------
- 1 file changed, 7 insertions(+), 17 deletions(-)
-
-diff --git a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
-index d3e0186..d432e33 100644
---- a/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
-+++ b/drivers/net/ethernet/amd/xgbe/xgbe-drv.c
-@@ -2930,9 +2930,8 @@ void xgbe_dump_rx_desc(struct xgbe_prv_data *pdata, struct xgbe_ring *ring,
- void xgbe_print_pkt(struct net_device *netdev, struct sk_buff *skb, bool tx_rx)
- {
- struct ethhdr *eth = (struct ethhdr *)skb->data;
-- unsigned char *buf = skb->data;
- unsigned char buffer[128];
-- unsigned int i, j;
-+ unsigned int i;
-
- netdev_dbg(netdev, "\n************** SKB dump ****************\n");
-
-@@ -2943,22 +2942,13 @@ void xgbe_print_pkt(struct net_device *netdev, struct sk_buff *skb, bool tx_rx)
- netdev_dbg(netdev, "Src MAC addr: %pM\n", eth->h_source);
- netdev_dbg(netdev, "Protocol: %#06hx\n", ntohs(eth->h_proto));
-
-- for (i = 0, j = 0; i < skb->len;) {
-- j += snprintf(buffer + j, sizeof(buffer) - j, "%02hhx",
-- buf[i++]);
--
-- if ((i % 32) == 0) {
-- netdev_dbg(netdev, " %#06x: %s\n", i - 32, buffer);
-- j = 0;
-- } else if ((i % 16) == 0) {
-- buffer[j++] = ' ';
-- buffer[j++] = ' ';
-- } else if ((i % 4) == 0) {
-- buffer[j++] = ' ';
-- }
-+ for (i = 0; i < skb->len; i += 32) {
-+ unsigned int len = min(skb->len - i, 32U);
-+
-+ hex_dump_to_buffer(&skb->data[i], len, 32, 1,
-+ buffer, sizeof(buffer), false);
-+ netdev_dbg(netdev, " %#06x: %s\n", i, buffer);
- }
-- if (i % 32)
-- netdev_dbg(netdev, " %#06x: %s\n", i - (i % 32), buffer);
-
- netdev_dbg(netdev, "\n************** SKB dump ****************\n");
- }
---
-2.7.4
-