From patchwork Thu Feb 3 16:21:33 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rolf Eike Beer X-Patchwork-Id: 12734311 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A5E5DC433F5 for ; Thu, 3 Feb 2022 16:31:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352221AbiBCQb2 (ORCPT ); Thu, 3 Feb 2022 11:31:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352217AbiBCQbT (ORCPT ); Thu, 3 Feb 2022 11:31:19 -0500 Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7FF1BC06173D for ; Thu, 3 Feb 2022 08:31:18 -0800 (PST) Received: (qmail 17231 invoked from network); 3 Feb 2022 16:22:54 -0000 Received: from p200300cf070ba5000c0051fffe8bdde4.dip0.t-ipconnect.de ([2003:cf:70b:a500:c00:51ff:fe8b:dde4]:41726 HELO eto.sf-tec.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.38dev) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA for ; Thu, 03 Feb 2022 17:22:54 +0100 From: Rolf Eike Beer To: netdev@vger.kernel.org Subject: [PATCH 1/3] sunhme: remove unused tx_dump_ring() Date: Thu, 03 Feb 2022 17:21:33 +0100 Message-ID: <12947229.uLZWGnKmhe@eto.sf-tec.de> In-Reply-To: <4686583.GXAFRqVoOG@eto.sf-tec.de> References: <4686583.GXAFRqVoOG@eto.sf-tec.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org I can't find a reference to it in the entire git history. Signed-off-by: Rolf Eike Beer Reviewed-by: Sean Anderson --- drivers/net/ethernet/sun/sunhme.c | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index ad9029ae6848..22abfe58f728 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -135,25 +135,9 @@ static __inline__ void tx_dump_log(void) this = (this + 1) & (TX_LOG_LEN - 1); } } -static __inline__ void tx_dump_ring(struct happy_meal *hp) -{ - struct hmeal_init_block *hb = hp->happy_block; - struct happy_meal_txd *tp = &hb->happy_meal_txd[0]; - int i; - - for (i = 0; i < TX_RING_SIZE; i+=4) { - printk("TXD[%d..%d]: [%08x:%08x] [%08x:%08x] [%08x:%08x] [%08x:%08x]\n", - i, i + 4, - le32_to_cpu(tp[i].tx_flags), le32_to_cpu(tp[i].tx_addr), - le32_to_cpu(tp[i + 1].tx_flags), le32_to_cpu(tp[i + 1].tx_addr), - le32_to_cpu(tp[i + 2].tx_flags), le32_to_cpu(tp[i + 2].tx_addr), - le32_to_cpu(tp[i + 3].tx_flags), le32_to_cpu(tp[i + 3].tx_addr)); - } -} #else #define tx_add_log(hp, a, s) do { } while(0) #define tx_dump_log() do { } while(0) -#define tx_dump_ring(hp) do { } while(0) #endif #ifdef HMEDEBUG From patchwork Thu Feb 3 16:22:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rolf Eike Beer X-Patchwork-Id: 12734310 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id C4CBFC433EF for ; Thu, 3 Feb 2022 16:31:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232725AbiBCQb0 (ORCPT ); Thu, 3 Feb 2022 11:31:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57626 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1352216AbiBCQbT (ORCPT ); Thu, 3 Feb 2022 11:31:19 -0500 Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C4BBC061401 for ; Thu, 3 Feb 2022 08:31:18 -0800 (PST) Received: (qmail 17228 invoked from network); 3 Feb 2022 16:22:53 -0000 Received: from p200300cf070ba5000c0051fffe8bdde4.dip0.t-ipconnect.de ([2003:cf:70b:a500:c00:51ff:fe8b:dde4]:41724 HELO eto.sf-tec.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.38dev) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA for ; Thu, 03 Feb 2022 17:22:53 +0100 From: Rolf Eike Beer To: netdev@vger.kernel.org Subject: [PATCH 2/3] sunhme: fix the version number in struct ethtool_drvinfo Date: Thu, 03 Feb 2022 17:22:23 +0100 Message-ID: <3152336.aeNJFYEL58@eto.sf-tec.de> In-Reply-To: <4686583.GXAFRqVoOG@eto.sf-tec.de> References: <4686583.GXAFRqVoOG@eto.sf-tec.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org Fixes: 050bbb196392b9c178f82b1205a23dd2f915ee93 Signed-off-by: Rolf Eike Beer --- drivers/net/ethernet/sun/sunhme.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 22abfe58f728..43834339bb43 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2470,8 +2470,8 @@ static void hme_get_drvinfo(struct net_device *dev, struct ethtool_drvinfo *info { struct happy_meal *hp = netdev_priv(dev); - strlcpy(info->driver, "sunhme", sizeof(info->driver)); - strlcpy(info->version, "2.02", sizeof(info->version)); + strlcpy(info->driver, DRV_NAME, sizeof(info->driver)); + strlcpy(info->version, DRV_VERSION, sizeof(info->version)); if (hp->happy_flags & HFLAG_PCI) { struct pci_dev *pdev = hp->happy_dev; strlcpy(info->bus_info, pci_name(pdev), sizeof(info->bus_info)); From patchwork Thu Feb 3 16:23:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rolf Eike Beer X-Patchwork-Id: 12734309 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB560C433F5 for ; Thu, 3 Feb 2022 16:31:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352224AbiBCQb0 (ORCPT ); Thu, 3 Feb 2022 11:31:26 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57620 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1348141AbiBCQbT (ORCPT ); Thu, 3 Feb 2022 11:31:19 -0500 X-Greylist: delayed 400 seconds by postgrey-1.37 at lindbergh.monkeyblade.net; Thu, 03 Feb 2022 08:31:18 PST Received: from mail.sf-mail.de (mail.sf-mail.de [IPv6:2a01:4f8:1c17:6fae:616d:6c69:616d:6c69]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 658DFC06173B for ; Thu, 3 Feb 2022 08:31:18 -0800 (PST) Received: (qmail 17225 invoked from network); 3 Feb 2022 16:22:53 -0000 Received: from p200300cf070ba5000c0051fffe8bdde4.dip0.t-ipconnect.de ([2003:cf:70b:a500:c00:51ff:fe8b:dde4]:41722 HELO eto.sf-tec.de) (auth=eike@sf-mail.de) by mail.sf-mail.de (Qsmtpd 0.38dev) with (TLS_AES_256_GCM_SHA384 encrypted) ESMTPSA for ; Thu, 03 Feb 2022 17:22:53 +0100 From: Rolf Eike Beer To: netdev@vger.kernel.org Subject: [PATCH 3/3] sunhme: forward the error code from pci_enable_device() Date: Thu, 03 Feb 2022 17:23:54 +0100 Message-ID: <8022143.T7Z3S40VBb@eto.sf-tec.de> In-Reply-To: <4686583.GXAFRqVoOG@eto.sf-tec.de> References: <4686583.GXAFRqVoOG@eto.sf-tec.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org This already returns a proper error value, so pass it to the caller. Signed-off-by: Rolf Eike Beer Reviewed-by: Sean Anderson --- drivers/net/ethernet/sun/sunhme.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/sun/sunhme.c b/drivers/net/ethernet/sun/sunhme.c index 43834339bb43..980a936ce8d1 100644 --- a/drivers/net/ethernet/sun/sunhme.c +++ b/drivers/net/ethernet/sun/sunhme.c @@ -2969,11 +2969,12 @@ static int happy_meal_pci_probe(struct pci_dev *pdev, strcpy(prom_name, "SUNW,hme"); #endif - err = -ENODEV; + err = pci_enable_device(pdev); - if (pci_enable_device(pdev)) + if (err) goto err_out; pci_set_master(pdev); + err = -ENODEV; if (!strcmp(prom_name, "SUNW,qfe") || !strcmp(prom_name, "qfe")) { qp = quattro_pci_find(pdev);