Patch "net: bcmgenet: Fix FCS generation for fragmented skbuffs" has been added to the 5.4-stable tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This is a note to let you know that I've just added the patch titled

    net: bcmgenet: Fix FCS generation for fragmented skbuffs

to the 5.4-stable tree which can be found at:
    http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
     net-bcmgenet-fix-fcs-generation-for-fragmented-skbuf.patch
and it can be found in the queue-5.4 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@xxxxxxxxxxxxxxx> know about it.



commit 71959784908d9b9b24f945b2df35b25bc6fac9ee
Author: Adrian Cinal <adriancinal@xxxxxxxxx>
Date:   Thu Dec 28 14:56:38 2023 +0100

    net: bcmgenet: Fix FCS generation for fragmented skbuffs
    
    [ Upstream commit e584f2ff1e6cc9b1d99e8a6b0f3415940d1b3eb3 ]
    
    The flag DMA_TX_APPEND_CRC was only written to the first DMA descriptor
    in the TX path, where each descriptor corresponds to a single skbuff
    fragment (or the skbuff head). This led to packets with no FCS appearing
    on the wire if the kernel allocated the packet in fragments, which would
    always happen when using PACKET_MMAP/TPACKET (cf. tpacket_fill_skb() in
    net/af_packet.c).
    
    Fixes: 1c1008c793fa ("net: bcmgenet: add main driver file")
    Signed-off-by: Adrian Cinal <adriancinal1@xxxxxxxxx>
    Acked-by: Doug Berger <opendmb@xxxxxxxxx>
    Acked-by: Florian Fainelli <florian.fainelli@xxxxxxxxxxxx>
    Link: https://lore.kernel.org/r/20231228135638.1339245-1-adriancinal1@xxxxxxxxx
    Signed-off-by: Jakub Kicinski <kuba@xxxxxxxxxx>
    Signed-off-by: Sasha Levin <sashal@xxxxxxxxxx>

diff --git a/drivers/net/ethernet/broadcom/genet/bcmgenet.c b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
index 750acbf294640..eeadeeec17bab 100644
--- a/drivers/net/ethernet/broadcom/genet/bcmgenet.c
+++ b/drivers/net/ethernet/broadcom/genet/bcmgenet.c
@@ -1648,8 +1648,10 @@ static netdev_tx_t bcmgenet_xmit(struct sk_buff *skb, struct net_device *dev)
 		/* Note: if we ever change from DMA_TX_APPEND_CRC below we
 		 * will need to restore software padding of "runt" packets
 		 */
+		len_stat |= DMA_TX_APPEND_CRC;
+
 		if (!i) {
-			len_stat |= DMA_TX_APPEND_CRC | DMA_SOP;
+			len_stat |= DMA_SOP;
 			if (skb->ip_summed == CHECKSUM_PARTIAL)
 				len_stat |= DMA_TX_DO_CSUM;
 		}




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux