Received: by 2002:ab2:7855:0:b0:1f9:5764:f03e with SMTP id m21csp547627lqp; Wed, 22 May 2024 11:54:49 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCWO/XRDwEzFQ/5JGY/VBF1qzkZf67NQ/iQ8RgWnIvBaz0t4QkKTLYopjOjDb/SyaHWh/38ULpK8KtAiDVo0s5QIltU0vGAHtjEiFxZg9w== X-Google-Smtp-Source: AGHT+IF3LXfSuUhdlJoqQA3fpWlPGhNE63lcYE/8+Drdaj2k0o05pplCBcd7keP1cTotp7ZRe4f6 X-Received: by 2002:a17:906:894:b0:a59:9e01:e788 with SMTP id a640c23a62f3a-a62280b52e8mr185413066b.34.1716404089193; Wed, 22 May 2024 11:54:49 -0700 (PDT) Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a5a17b21dd9si1492615866b.448.2024.05.22.11.54.48 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 22 May 2024 11:54:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-186629-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=ITzirOcR; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-186629-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-186629-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id AA0A31F227A2 for ; Wed, 22 May 2024 18:54:48 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 215EA146A74; Wed, 22 May 2024 18:54:29 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="ITzirOcR" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AF0814658A; Wed, 22 May 2024 18:54:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716404068; cv=none; b=T33ioNX7A3b6t/nghDNeFeCaJw6Z6u8F1HWQfOMQHE+Xco67Y+E2lIBynbkCpNxB6f/ob+4SiBWUfuuC1nu+3azKBka3JbxtH1bbyfCXzIlhojodXw3jfznwcnXSvgVMiofDpyanMDsfaEbzf6Oh1RoE5rLvm8T0oTlRa2mYhmg= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1716404068; c=relaxed/simple; bh=DMRvf07peoglRNpptOpy9FxHymXTYhNp+h97lqVJS6Q=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=B24O3T/bFIlbYUFtbaLZ99hvL2755G7CjmXuBQnNCMfWEtasT7R+aeRcmk7BNIfaoivKS01LdHQ+b4RL1b6gZRejtmKUyF7C5HAXJZUbHaNj5i2i1/00azz5DlzSndJ4LNKwJhgdcIieIZpk71KScu5aTmb/QNV4irHcNE/Bu2I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=ITzirOcR; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id B6E3EC2BBFC; Wed, 22 May 2024 18:54:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1716404067; bh=DMRvf07peoglRNpptOpy9FxHymXTYhNp+h97lqVJS6Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=ITzirOcR3vPpMjOihnD85nEB6qjNj0LyGkiC3ctz/sm6kRqyILGcgZY6wYaSz2VOL gCLJTYZI07xOeNOmByYrR8e9W43tyeSoeUXkXO02W97oilFT3fdhHmCfBvMjysz+SU 6Ch1hoc5ezqFmnQ7sPf0vdek35wB+n1dZ7gj9KdEeEfEXLgoHdUqmK/x3C4y1EPtJg hByMMAkSl26FKlyUCo47qqlGcRFCCh5AHbufrUFwrgVegVj54wYFwdNqSfVCDo2D8R HovsY2XYjw40x7y74Pf/izyZ1Evib+57F1636U741gwc4Ied5S3N95EvR4CF6k9MeF VI734pkgVbnYw== Date: Wed, 22 May 2024 19:54:23 +0100 From: Simon Horman To: Parthiban Veerasooran Cc: steve.glendinning@shawell.net, UNGLinuxDriver@microchip.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] net: usb: smsc95xx: configure external LEDs function for EVB-LAN8670-USB Message-ID: <20240522185423.GC883722@kernel.org> References: <20240522140817.409936-1-Parthiban.Veerasooran@microchip.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240522140817.409936-1-Parthiban.Veerasooran@microchip.com> On Wed, May 22, 2024 at 07:38:17PM +0530, Parthiban Veerasooran wrote: > By default, LAN9500A configures the external LEDs to the below function. > nSPD_LED -> Speed Indicator > nLNKA_LED -> Link and Activity Indicator > nFDX_LED -> Full Duplex Link Indicator > > But, EVB-LAN8670-USB uses the below external LEDs function which can be > enabled by writing 1 to the LED Select (LED_SEL) bit in the LAN9500A. > nSPD_LED -> Speed Indicator > nLNKA_LED -> Link Indicator > nFDX_LED -> Activity Indicator > > Signed-off-by: Parthiban Veerasooran > --- > drivers/net/usb/smsc95xx.c | 12 ++++++++++++ > drivers/net/usb/smsc95xx.h | 1 + > 2 files changed, 13 insertions(+) > > diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c > index cbea24666479..05975461bf10 100644 > --- a/drivers/net/usb/smsc95xx.c > +++ b/drivers/net/usb/smsc95xx.c > @@ -1006,6 +1006,18 @@ static int smsc95xx_reset(struct usbnet *dev) > /* Configure GPIO pins as LED outputs */ > write_buf = LED_GPIO_CFG_SPD_LED | LED_GPIO_CFG_LNK_LED | > LED_GPIO_CFG_FDX_LED; > + > + /* Set LED Select (LED_SEL) bit for the external LED pins functionality > + * in the Microchip's EVB-LAN8670-USB 10BASE-T1S Ethernet device which > + * uses the below LED function. > + * nSPD_LED -> Speed Indicator > + * nLNKA_LED -> Link Indicator > + * nFDX_LED -> Activity Indicator > + */ > + if (dev->udev->descriptor.idVendor == 0x184F && > + dev->udev->descriptor.idProduct == 0x0051) Hi Parthiban, There seems to be an endian missmatch here. The type of .idVendor and .idProduct is __le16, but here they are compared against host byte-order integers. Flagged by Sparse. > + write_buf |= LED_GPIO_CFG_LED_SEL; > + > ret = smsc95xx_write_reg(dev, LED_GPIO_CFG, write_buf); > if (ret < 0) > return ret; .. -- pw-bot: changes-requested