mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-12-02 20:36:47 +07:00
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net
Jeff Kirsher says: ==================== This series contains updates to e1000, ixgb and e1000e for Christoph. Christoph provides 3 patches to resolve missing dma_error_call's to provided Intel drivers which did not have this fix. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
commit
fe2d2c208d
@ -1053,6 +1053,10 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
|
||||
txdr->buffer_info[i].dma =
|
||||
dma_map_single(&pdev->dev, skb->data, skb->len,
|
||||
DMA_TO_DEVICE);
|
||||
if (dma_mapping_error(&pdev->dev, txdr->buffer_info[i].dma)) {
|
||||
ret_val = 4;
|
||||
goto err_nomem;
|
||||
}
|
||||
tx_desc->buffer_addr = cpu_to_le64(txdr->buffer_info[i].dma);
|
||||
tx_desc->lower.data = cpu_to_le32(skb->len);
|
||||
tx_desc->lower.data |= cpu_to_le32(E1000_TXD_CMD_EOP |
|
||||
@ -1069,7 +1073,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
|
||||
rxdr->buffer_info = kcalloc(rxdr->count, sizeof(struct e1000_buffer),
|
||||
GFP_KERNEL);
|
||||
if (!rxdr->buffer_info) {
|
||||
ret_val = 4;
|
||||
ret_val = 5;
|
||||
goto err_nomem;
|
||||
}
|
||||
|
||||
@ -1077,7 +1081,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
|
||||
rxdr->desc = dma_alloc_coherent(&pdev->dev, rxdr->size, &rxdr->dma,
|
||||
GFP_KERNEL);
|
||||
if (!rxdr->desc) {
|
||||
ret_val = 5;
|
||||
ret_val = 6;
|
||||
goto err_nomem;
|
||||
}
|
||||
memset(rxdr->desc, 0, rxdr->size);
|
||||
@ -1101,7 +1105,7 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
|
||||
|
||||
skb = alloc_skb(E1000_RXBUFFER_2048 + NET_IP_ALIGN, GFP_KERNEL);
|
||||
if (!skb) {
|
||||
ret_val = 6;
|
||||
ret_val = 7;
|
||||
goto err_nomem;
|
||||
}
|
||||
skb_reserve(skb, NET_IP_ALIGN);
|
||||
@ -1110,6 +1114,10 @@ static int e1000_setup_desc_rings(struct e1000_adapter *adapter)
|
||||
rxdr->buffer_info[i].dma =
|
||||
dma_map_single(&pdev->dev, skb->data,
|
||||
E1000_RXBUFFER_2048, DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&pdev->dev, rxdr->buffer_info[i].dma)) {
|
||||
ret_val = 8;
|
||||
goto err_nomem;
|
||||
}
|
||||
rx_desc->buffer_addr = cpu_to_le64(rxdr->buffer_info[i].dma);
|
||||
memset(skb->data, 0x00, skb->len);
|
||||
}
|
||||
|
@ -848,11 +848,16 @@ static void e1000_alloc_jumbo_rx_buffers(struct e1000_ring *rx_ring,
|
||||
}
|
||||
}
|
||||
|
||||
if (!buffer_info->dma)
|
||||
if (!buffer_info->dma) {
|
||||
buffer_info->dma = dma_map_page(&pdev->dev,
|
||||
buffer_info->page, 0,
|
||||
PAGE_SIZE,
|
||||
DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&pdev->dev, buffer_info->dma)) {
|
||||
adapter->alloc_rx_buff_failed++;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
rx_desc = E1000_RX_DESC_EXT(*rx_ring, i);
|
||||
rx_desc->read.buffer_addr = cpu_to_le64(buffer_info->dma);
|
||||
|
@ -2159,6 +2159,10 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter, int cleaned_count)
|
||||
skb->data,
|
||||
adapter->rx_buffer_len,
|
||||
DMA_FROM_DEVICE);
|
||||
if (dma_mapping_error(&pdev->dev, buffer_info->dma)) {
|
||||
adapter->alloc_rx_buff_failed++;
|
||||
break;
|
||||
}
|
||||
|
||||
rx_desc = IXGB_RX_DESC(*rx_ring, i);
|
||||
rx_desc->buff_addr = cpu_to_le64(buffer_info->dma);
|
||||
@ -2168,7 +2172,8 @@ ixgb_alloc_rx_buffers(struct ixgb_adapter *adapter, int cleaned_count)
|
||||
rx_desc->status = 0;
|
||||
|
||||
|
||||
if (++i == rx_ring->count) i = 0;
|
||||
if (++i == rx_ring->count)
|
||||
i = 0;
|
||||
buffer_info = &rx_ring->buffer_info[i];
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user