Commit d2201a21 authored by Mintz, Yuval's avatar Mintz, Yuval Committed by David S. Miller

qed: No need for LL2 frags indication

This is a legacy leftover; There's no current flow where 'frags_mapped'
would be set.
Signed-off-by: default avatarYuval Mintz <Yuval.Mintz@cavium.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 0518c12f
...@@ -73,7 +73,6 @@ struct qed_cb_ll2_info { ...@@ -73,7 +73,6 @@ struct qed_cb_ll2_info {
int rx_cnt; int rx_cnt;
u32 rx_size; u32 rx_size;
u8 handle; u8 handle;
bool frags_mapped;
/* Lock protecting LL2 buffer lists in sleepless context */ /* Lock protecting LL2 buffer lists in sleepless context */
spinlock_t lock; spinlock_t lock;
...@@ -108,12 +107,6 @@ static void qed_ll2b_complete_tx_packet(void *cxt, ...@@ -108,12 +107,6 @@ static void qed_ll2b_complete_tx_packet(void *cxt,
cdev->ll2->cbs->tx_cb(cdev->ll2->cb_cookie, skb, cdev->ll2->cbs->tx_cb(cdev->ll2->cb_cookie, skb,
b_last_fragment); b_last_fragment);
if (cdev->ll2->frags_mapped)
/* Case where mapped frags were received, need to
* free skb with nr_frags marked as 0
*/
skb_shinfo(skb)->nr_frags = 0;
dev_kfree_skb_any(skb); dev_kfree_skb_any(skb);
} }
...@@ -2100,7 +2093,6 @@ static int qed_ll2_start(struct qed_dev *cdev, struct qed_ll2_params *params) ...@@ -2100,7 +2093,6 @@ static int qed_ll2_start(struct qed_dev *cdev, struct qed_ll2_params *params)
spin_lock_init(&cdev->ll2->lock); spin_lock_init(&cdev->ll2->lock);
cdev->ll2->rx_size = NET_SKB_PAD + ETH_HLEN + cdev->ll2->rx_size = NET_SKB_PAD + ETH_HLEN +
L1_CACHE_BYTES + params->mtu; L1_CACHE_BYTES + params->mtu;
cdev->ll2->frags_mapped = params->frags_mapped;
/*Allocate memory for LL2 */ /*Allocate memory for LL2 */
DP_INFO(cdev, "Allocating LL2 buffers of size %08x bytes\n", DP_INFO(cdev, "Allocating LL2 buffers of size %08x bytes\n",
...@@ -2313,22 +2305,15 @@ static int qed_ll2_start_xmit(struct qed_dev *cdev, struct sk_buff *skb) ...@@ -2313,22 +2305,15 @@ static int qed_ll2_start_xmit(struct qed_dev *cdev, struct sk_buff *skb)
for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
frag = &skb_shinfo(skb)->frags[i]; frag = &skb_shinfo(skb)->frags[i];
if (!cdev->ll2->frags_mapped) {
mapping = skb_frag_dma_map(&cdev->pdev->dev, frag, 0, mapping = skb_frag_dma_map(&cdev->pdev->dev, frag, 0,
skb_frag_size(frag), skb_frag_size(frag), DMA_TO_DEVICE);
DMA_TO_DEVICE);
if (unlikely(dma_mapping_error(&cdev->pdev->dev, if (unlikely(dma_mapping_error(&cdev->pdev->dev, mapping))) {
mapping))) {
DP_NOTICE(cdev, DP_NOTICE(cdev,
"Unable to map frag - dropping packet\n"); "Unable to map frag - dropping packet\n");
rc = -ENOMEM;
goto err; goto err;
} }
} else {
mapping = page_to_phys(skb_frag_page(frag)) |
frag->page_offset;
}
rc = qed_ll2_set_fragment_of_tx_packet(QED_LEADING_HWFN(cdev), rc = qed_ll2_set_fragment_of_tx_packet(QED_LEADING_HWFN(cdev),
cdev->ll2->handle, cdev->ll2->handle,
......
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