linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vijay Khemka <vijaykhemka@fb.com>
To: "David S. Miller" <davem@davemloft.net>,
	Florian Fainelli <f.fainelli@gmail.com>,
	YueHaibing <yuehaibing@huawei.com>, Andrew Lunn <andrew@lunn.ch>,
	Kate Stewart <kstewart@linuxfoundation.org>,
	"Mauro Carvalho Chehab" <mchehab+samsung@kernel.org>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: "openbmc @ lists . ozlabs . org" <openbmc@lists.ozlabs.org>,
	"joel@jms.id.au" <joel@jms.id.au>,
	"linux-aspeed@lists.ozlabs.org" <linux-aspeed@lists.ozlabs.org>,
	Sai Dasari <sdasari@fb.com>
Subject: Re: [PATCH v2] ftgmac100: Disable HW checksum generation on AST2500
Date: Thu, 10 Oct 2019 19:20:47 +0000	[thread overview]
Message-ID: <4B7340B5-C35C-4B18-8D8C-B5B8D16BA551@fb.com> (raw)
In-Reply-To: <20190911194453.2595021-1-vijaykhemka@fb.com>

Resending this patch again. 

On 9/11/19, 1:05 PM, "Vijay Khemka" <vijaykhemka@fb.com> wrote:

    HW checksum generation is not working for AST2500, specially with IPV6
    over NCSI. All TCP packets with IPv6 get dropped. By disabling this
    it works perfectly fine with IPV6. As it works for IPV4 so enabled
    hw checksum back for IPV4.
    
    Verified with IPV6 enabled and can do ssh.
    
    Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
    ---
    Changes since v1:
     Enabled IPV4 hw checksum generation as it works for IPV4.
    
     drivers/net/ethernet/faraday/ftgmac100.c | 13 ++++++++++++-
     1 file changed, 12 insertions(+), 1 deletion(-)
    
    diff --git a/drivers/net/ethernet/faraday/ftgmac100.c b/drivers/net/ethernet/faraday/ftgmac100.c
    index 030fed65393e..0255a28d2958 100644
    --- a/drivers/net/ethernet/faraday/ftgmac100.c
    +++ b/drivers/net/ethernet/faraday/ftgmac100.c
    @@ -1842,8 +1842,19 @@ static int ftgmac100_probe(struct platform_device *pdev)
     	/* AST2400  doesn't have working HW checksum generation */
     	if (np && (of_device_is_compatible(np, "aspeed,ast2400-mac")))
     		netdev->hw_features &= ~NETIF_F_HW_CSUM;
    +
    +	/* AST2500 doesn't have working HW checksum generation for IPV6
    +	 * but it works for IPV4, so disabling hw checksum and enabling
    +	 * it for only IPV4.
    +	 */
    +	if (np && (of_device_is_compatible(np, "aspeed,ast2500-mac"))) {
    +		netdev->hw_features &= ~NETIF_F_HW_CSUM;
    +		netdev->hw_features |= NETIF_F_IP_CSUM;
    +	}
    +
     	if (np && of_get_property(np, "no-hw-checksum", NULL))
    -		netdev->hw_features &= ~(NETIF_F_HW_CSUM | NETIF_F_RXCSUM);
    +		netdev->hw_features &= ~(NETIF_F_HW_CSUM | NETIF_F_RXCSUM
    +					 | NETIF_F_IP_CSUM);
     	netdev->features |= netdev->hw_features;
     
     	/* register network device */
    -- 
    2.17.1
    
    


  parent reply	other threads:[~2019-10-10 19:22 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20190911194453.2595021-1-vijaykhemka@fb.com>
2019-09-17 19:34 ` [PATCH v2] ftgmac100: Disable HW checksum generation on AST2500 Vijay Khemka
2019-09-24 17:26   ` Vijay Khemka
2019-10-10 19:20 ` Vijay Khemka [this message]
2019-10-11  1:16   ` Jakub Kicinski
     [not found] <20191011213027.2110008-1-vijaykhemka@fb.com>
2019-10-17  1:28 ` Benjamin Herrenschmidt
2019-10-17 22:01   ` Vijay Khemka
2019-10-17 23:14     ` Benjamin Herrenschmidt
2019-10-17 23:34       ` Benjamin Herrenschmidt
2019-10-18  0:06       ` Vijay Khemka
2019-10-18  0:32         ` Benjamin Herrenschmidt
2019-10-18 22:50           ` Vijay Khemka
2019-10-19  0:03             ` Benjamin Herrenschmidt
2019-10-19  1:31               ` Vijay Khemka
2019-10-19 10:25                 ` Benjamin Herrenschmidt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B7340B5-C35C-4B18-8D8C-B5B8D16BA551@fb.com \
    --to=vijaykhemka@fb.com \
    --cc=andrew@lunn.ch \
    --cc=benh@kernel.crashing.org \
    --cc=davem@davemloft.net \
    --cc=f.fainelli@gmail.com \
    --cc=joel@jms.id.au \
    --cc=kstewart@linuxfoundation.org \
    --cc=linux-aspeed@lists.ozlabs.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=mchehab+samsung@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=openbmc@lists.ozlabs.org \
    --cc=sdasari@fb.com \
    --cc=tglx@linutronix.de \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).