aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/chelsio/sge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/chelsio/sge.c')
-rw-r--r--drivers/net/chelsio/sge.c24
1 files changed, 16 insertions, 8 deletions
diff --git a/drivers/net/chelsio/sge.c b/drivers/net/chelsio/sge.c
index 1be1bbd16164..e4f874a70fe5 100644
--- a/drivers/net/chelsio/sge.c
+++ b/drivers/net/chelsio/sge.c
@@ -2095,10 +2095,14 @@ static void espibug_workaround_t204(unsigned long data)
2095 0x0, 0x7, 0x43, 0x0, 0x0, 0x0 2095 0x0, 0x7, 0x43, 0x0, 0x0, 0x0
2096 }; 2096 };
2097 2097
2098 memcpy(skb->data + sizeof(struct cpl_tx_pkt), 2098 skb_copy_to_linear_data_offset(skb,
2099 ch_mac_addr, ETH_ALEN); 2099 sizeof(struct cpl_tx_pkt),
2100 memcpy(skb->data + skb->len - 10, 2100 ch_mac_addr,
2101 ch_mac_addr, ETH_ALEN); 2101 ETH_ALEN);
2102 skb_copy_to_linear_data_offset(skb,
2103 skb->len - 10,
2104 ch_mac_addr,
2105 ETH_ALEN);
2102 skb->cb[0] = 0xff; 2106 skb->cb[0] = 0xff;
2103 } 2107 }
2104 2108
@@ -2125,10 +2129,14 @@ static void espibug_workaround(unsigned long data)
2125 if (!skb->cb[0]) { 2129 if (!skb->cb[0]) {
2126 u8 ch_mac_addr[ETH_ALEN] = 2130 u8 ch_mac_addr[ETH_ALEN] =
2127 {0x0, 0x7, 0x43, 0x0, 0x0, 0x0}; 2131 {0x0, 0x7, 0x43, 0x0, 0x0, 0x0};
2128 memcpy(skb->data + sizeof(struct cpl_tx_pkt), 2132 skb_copy_to_linear_data_offset(skb,
2129 ch_mac_addr, ETH_ALEN); 2133 sizeof(struct cpl_tx_pkt),
2130 memcpy(skb->data + skb->len - 10, ch_mac_addr, 2134 ch_mac_addr,
2131 ETH_ALEN); 2135 ETH_ALEN);
2136 skb_copy_to_linear_data_offset(skb,
2137 skb->len - 10,
2138 ch_mac_addr,
2139 ETH_ALEN);
2132 skb->cb[0] = 0xff; 2140 skb->cb[0] = 0xff;
2133 } 2141 }
2134 2142