From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_DBL_ABUSE_MALW autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C060BC2D0DB for ; Thu, 30 Jan 2020 17:11:03 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 9587820707 for ; Thu, 30 Jan 2020 17:11:03 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="RW4nfedL"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=kernel.org header.i=@kernel.org header.b="S3+Rs+Ad" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 9587820707 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=rY6XQMYeSfmKFGcLKy97ZZorgg24yfDaVlq9oK263hA=; b=RW4nfedLUH63HQ RN0dep5f8Moclnn/DS/5E4w3Wy5Ida51A7LrxHENLfsg713LdK4pgkFVjV0SKC9t7MApAOntIw/wt +t1ejyu/z01F9rauY+lFDFWbDhcAYcqGcoF5jXzJiEG2V6wye8TFBcxYU/6EotCGEikpEJoEaosM4 fqk+IRKxzDHRZAhh/zdSBeijI0w+L76sfacM1vUgUAQwPleUCn2SqehDDji4BoGlk8aYtb2DoBOLS Pswo9964BYlFhFOMT3ZlNhvKsApuxKHYW3zlncGq7VlWRTgEm9GngfbMKDIkZrciqdkRzFhtDJCvg KmoekVhUTR6qx+4miceg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixDLK-0003r3-TH; Thu, 30 Jan 2020 17:11:02 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1ixDLE-0003fP-SE for linux-arm-kernel@lists.infradead.org; Thu, 30 Jan 2020 17:11:01 +0000 Received: from cakuba (unknown [199.201.64.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id D4AB020707; Thu, 30 Jan 2020 17:10:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1580404256; bh=Hxrsh7O/rjzAeL1uBZU4NMmuZq1J4Zw8jlVqpSJ/bR4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=S3+Rs+Ad125yxd6jqyK1V6fCELrvcCmCaIoeJpZld0ZcfixK0JJDrONTnLfoa7w27 oiiKZKJjwAhxUh3gMtGWF2xjVe3ofm0/vd8aTqCiRH8jE8zA79fG4bkhDFQf9UP1gW kyjzhAV/8gHxw4DJwQBnUgr2ogEgCLzhmPkbrEI8= Date: Thu, 30 Jan 2020 09:10:55 -0800 From: Jakub Kicinski To: Robert Jones Subject: Re: [PATCH net] net: thunderx: workaround BGX TX Underflow issue Message-ID: <20200130091055.159d63ed@cakuba> In-Reply-To: <20200129223609.9327-1-rjones@gateworks.com> References: <20200129223609.9327-1-rjones@gateworks.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200130_091059_315254_FDF8D2B3 X-CRM114-Status: GOOD ( 12.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: netdev@vger.kernel.org, Tim Harvey , linux-kernel@vger.kernel.org, Robert Richter , Sunil Goutham , David Miller , linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Wed, 29 Jan 2020 14:36:09 -0800, Robert Jones wrote: > From: Tim Harvey > > While it is not yet understood why a TX underflow can easily occur > for SGMII interfaces resulting in a TX wedge. It has been found that > disabling/re-enabling the LMAC resolves the issue. > > Signed-off-by: Tim Harvey > Reviewed-by: Robert Jones Sunil or Robert (i.e. one of the maintainers) will have to review this patch (as indicated by Dave by marking it with "Needs Review / ACK" in patchwork). At a quick look there are some things which jump out at me: > +static int bgx_register_intr(struct pci_dev *pdev) > +{ > + struct bgx *bgx = pci_get_drvdata(pdev); > + struct device *dev = &pdev->dev; > + int num_vec, ret; > + > + /* Enable MSI-X */ > + num_vec = pci_msix_vec_count(pdev); > + ret = pci_alloc_irq_vectors(pdev, num_vec, num_vec, PCI_IRQ_MSIX); > + if (ret < 0) { > + dev_err(dev, "Req for #%d msix vectors failed\n", num_vec); > + return 1; Please propagate real error codes, or make this function void as the caller never actually checks the return value. > + } > + sprintf(bgx->irq_name, "BGX%d", bgx->bgx_id); > + ret = request_irq(pci_irq_vector(pdev, GMPX_GMI_TX_INT), There is a alloc_irq and request_irq call added in this patch but there is never any freeing. Are you sure this is fine? Devices can be reprobed (unbound and bound to drivers via sysfs). > + bgx_intr_handler, 0, bgx->irq_name, bgx); Please align the continuation line with the opening bracket (checkpatch --strict should help catch this). > + if (ret) > + return 1; > + > + return 0; > +} _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel