lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Thu, 20 Feb 2014 14:12:08 +0000
From:	"Frank.Li@...escale.com" <Frank.Li@...escale.com>
To:	"fugang.duan@...escale.com" <fugang.duan@...escale.com>,
	"davem@...emloft.net" <davem@...emloft.net>
CC:	"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: RE: [PATCH] net: fec: fix potential issue to avoid fec interrupt
 lost and crc error



> -----Original Message-----
> From: Fugang Duan [mailto:B38611@...escale.com]
> Sent: Thursday, February 20, 2014 4:15 AM
> To: Li Frank-B20596; davem@...emloft.net
> Cc: netdev@...r.kernel.org
> Subject: [PATCH] net: fec: fix potential issue to avoid fec interrupt lost
> and crc error
> 
> The current flow: Set TX BD ready, and then set "INT" and "PINS" bit to
> enable tx interrupt generation and crc checksum.
> 
> There has potential issue like as:
> CPU			fec uDMA
> Set tx ready bit
> 			uDMA start the BD transmission
> Set "INT" bit
> Set "PINS" bit
> ...
> 
> Above situation cause fec tx interrupt lost and fec MAC don't do CRC checksum.
> The patch fix the potential issue.
> 
> Signed-off-by: Fugang Duan <B38611@...escale.com>

Acked-by: Frank Li <Frank.li@...escale.com>

> ---
>  drivers/net/ethernet/freescale/fec_main.c |   13 +++++++------
>  1 files changed, 7 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/net/ethernet/freescale/fec_main.c
> b/drivers/net/ethernet/freescale/fec_main.c
> index 45b8b22..739608b 100644
> --- a/drivers/net/ethernet/freescale/fec_main.c
> +++ b/drivers/net/ethernet/freescale/fec_main.c
> @@ -390,12 +390,6 @@ fec_enet_start_xmit(struct sk_buff *skb, struct
> net_device *ndev)
>  			netdev_err(ndev, "Tx DMA memory map failed\n");
>  		return NETDEV_TX_OK;
>  	}
> -	/* Send it on its way.  Tell FEC it's ready, interrupt when done,
> -	 * it's the last BD of the frame, and to put the CRC on the end.
> -	 */
> -	status |= (BD_ENET_TX_READY | BD_ENET_TX_INTR
> -			| BD_ENET_TX_LAST | BD_ENET_TX_TC);
> -	bdp->cbd_sc = status;
> 
>  	if (fep->bufdesc_ex) {
> 
> @@ -417,6 +411,13 @@ fec_enet_start_xmit(struct sk_buff *skb, struct
> net_device *ndev)
>  		}
>  	}
> 
> +	/* Send it on its way.  Tell FEC it's ready, interrupt when done,
> +	 * it's the last BD of the frame, and to put the CRC on the end.
> +	 */
> +	status |= (BD_ENET_TX_READY | BD_ENET_TX_INTR
> +			| BD_ENET_TX_LAST | BD_ENET_TX_TC);
> +	bdp->cbd_sc = status;
> +
>  	bdp_pre = fec_enet_get_prevdesc(bdp, fep);
>  	if ((id_entry->driver_data & FEC_QUIRK_ERR006358) &&
>  	    !(bdp_pre->cbd_sc & BD_ENET_TX_READY)) {
> --
> 1.7.2.rc3
> 

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ