Message ID | 9255483491fb18b9cdb2ea86ede6fe8e81c71be0.camel@microchip.com |
---|---|
State | New |
Headers | show
Return-Path: <SRS0=550V=AK=vger.kernel.org=netdev-owner@kernel.org> 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=-7.0 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS autolearn=ham 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 DC399C433E0 for <netdev@archiver.kernel.org>; Mon, 29 Jun 2020 20:01:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A9D2920672 for <netdev@archiver.kernel.org>; Mon, 29 Jun 2020 20:01:41 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=microchip.com header.i=@microchip.com header.b="umhQcdYt"; dkim=pass (1024-bit key) header.d=microchiptechnology.onmicrosoft.com header.i=@microchiptechnology.onmicrosoft.com header.b="DKtE7fp7" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388657AbgF2UBk (ORCPT <rfc822;netdev@archiver.kernel.org>); Mon, 29 Jun 2020 16:01:40 -0400 Received: from esa2.microchip.iphmx.com ([68.232.149.84]:39950 "EHLO esa2.microchip.iphmx.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388647AbgF2UBi (ORCPT <rfc822;netdev@vger.kernel.org>); Mon, 29 Jun 2020 16:01:38 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=microchip.com; i=@microchip.com; q=dns/txt; s=mchp; t=1593460896; x=1624996896; h=from:to:cc:subject:date:message-id:content-id: content-transfer-encoding:mime-version; bh=X6v+GJn3BdQxBi0OBo9rz/xKibjYdilAa4DSeJv/TKE=; b=umhQcdYtIaCdkm+RT10LUtIbRr11GHzz043PssD+TNHagQY52WJ0UG4o Cgs5jn38hk07pTsGB1QHbdV2M9sTj6xn0DYD+jOzFo4BDxnsIvdSte93k gjdj+WdhKQ/WvGzjAcyvYXP/6wYAVn9l4gujcEozCZA13aTgpo7KdXCnR uLsWmqNTh+YPmW5cgPe0mvVhQkFieiy+itPcCWKk3LHW5wzCLiJe6pDT2 toxWVUY3MuEstYQnN0U/ngowEcDQh0aRofPu/5EpuaJjvUpygotAgZgqL 1MEvfYkLJcTP2b5fgsjqNhzf2pkoKMPt8bdym622gmgcWi7sms3N3LtPY Q==; IronPort-SDR: UBieLuFr/X4vL8IcjoiEhkmkj1x2jiLm7EJ7L4FSamJsNAMfU4S+1Zc45TKo4VZ4eXdOmxN7/A DGhwiDWYSmQD51CELbym2mNIeYHq3yFwLilo6ZKaURXdTLKGmvW6tF25U8UGAGBPE9S8eNpX+s QngyLNnXinWu2D17XjdZNYQVgChckgZAfscLeNyOLVTp1MsvPnhnI/42e+kJYYQx8cEblNyhnM 2DH4IuCcnB4g2VAYZCxNTeVM0yOHNva+jM3ROkJltpbs5pa2YP+AqW87VFGExzL2LETTQsoR5o ENA= X-IronPort-AV: E=Sophos;i="5.75,295,1589266800"; d="scan'208";a="80128601" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa2.microchip.iphmx.com with ESMTP/TLS/AES256-SHA256; 29 Jun 2020 13:01:36 -0700 Received: from chn-vm-ex02.mchp-main.com (10.10.87.72) by chn-vm-ex02.mchp-main.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3; Mon, 29 Jun 2020 13:01:18 -0700 Received: from NAM11-DM6-obe.outbound.protection.outlook.com (10.10.215.89) by email.microchip.com (10.10.87.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1979.3 via Frontend Transport; Mon, 29 Jun 2020 13:01:18 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=AlwV5ijbkKIY8wHCcMb1NDd8lC6T7S0xc6vQXZbAdycztgZVRWaTaWss2DfSaKggTpV6R/YFXDgVzQ/BkH88LFuqTWocJ5zQlZf+0aZVNZPl8s/0hohR4M/+jisbz/wX/6wUKGOBu+U21nu0mz0xBS/SmZ3XXT54wtXVZ8cQpMPKzimyQg0I1wNNIQOAfvIGWKic8t+Elphdqwo0ZWb6WAkgxlJbQqWKd9n224/BEw/fFWcItVuviPSMdkMQaip07GXPCMKlr1FwJ2piHAPSuE3aIXzQmonUT0qJre+KVhIjqVTPyrl4TAF0S794bRPYRS1PCWCsMvPWSrrz7chx7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X6v+GJn3BdQxBi0OBo9rz/xKibjYdilAa4DSeJv/TKE=; b=dZ96vDEdA5TyLxCpZdNgxu3YXfSJGfsN8S/psGcu7+Rp9EUM8zyqpqA1lKMWR2IVxiT/9fyugW699BUiXGb0v03NMyY27ZDHVmJI5KDI+oRf0eYJtZoyCgpj7t474IIqT4lRTbW4hXhZE1yA1dm2Ng09TeXA6Bljg8HHywed3wmeQVZoWtzC2zx+3yuEiWRb3cD6XMYwIb/NNO8Coss+AiS7FaaAhwgqLqZgj2VdTVifgjijNcAKD1E+fDAPK+uOzfQa7BIg8I1tP2BH2Cgi53QkhpzwMjrIf4KvFIl2o1XLEsNDSULpKbKGGh0cEq9JDUTojIqFaDZsyMNn8DHt5g== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=microchip.com; dmarc=pass action=none header.from=microchip.com; dkim=pass header.d=microchip.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=microchiptechnology.onmicrosoft.com; s=selector2-microchiptechnology-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=X6v+GJn3BdQxBi0OBo9rz/xKibjYdilAa4DSeJv/TKE=; b=DKtE7fp7mtaLgie3s2MhdsKsjLhZXTLq11MIA1pUibboquWXY6M0Sf67T+0HkqY/XHCPYQ/Pe0e4iFuicsMsWs1dU9JGVervUVhsJ88Ae1eOIPZG+xMqejcTpFLXPyvyTh8+JVWHYwMIUIKiwG36xBQZCjnPsTZs3ZfhhhAvG6k= Received: from BY5PR11MB3927.namprd11.prod.outlook.com (2603:10b6:a03:186::21) by BYAPR11MB2792.namprd11.prod.outlook.com (2603:10b6:a02:c3::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3131.24; Mon, 29 Jun 2020 20:01:29 +0000 Received: from BY5PR11MB3927.namprd11.prod.outlook.com ([fe80::5993:d0ac:9849:d311]) by BY5PR11MB3927.namprd11.prod.outlook.com ([fe80::5993:d0ac:9849:d311%7]) with mapi id 15.20.3131.027; Mon, 29 Jun 2020 20:01:29 +0000 From: <Andre.Edich@microchip.com> To: <netdev@vger.kernel.org>, <UNGLinuxDriver@microchip.com>, <steve.glendinning@shawell.net> CC: <Parthiban.Veerasooran@microchip.com> Subject: [PATCH net-next 3/8] smsc95xx: add PAL support to use external PHY drivers Thread-Topic: [PATCH net-next 3/8] smsc95xx: add PAL support to use external PHY drivers Thread-Index: AQHWTlATxfp4qn3AGUya8kyVakY9YA== Date: Mon, 29 Jun 2020 20:01:28 +0000 Message-ID: <9255483491fb18b9cdb2ea86ede6fe8e81c71be0.camel@microchip.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: user-agent: Evolution 3.36.3 authentication-results: vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=none action=none header.from=microchip.com; x-originating-ip: [93.202.178.57] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 779a4efe-ef99-4127-96e7-08d81c673665 x-ms-traffictypediagnostic: BYAPR11MB2792: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: <BYAPR11MB2792E6A0CFF50FF97DDD0E6BEC6E0@BYAPR11MB2792.namprd11.prod.outlook.com> x-bypassexternaltag: True x-ms-oob-tlc-oobclassifiers: OLM:7691; x-forefront-prvs: 044968D9E1 x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: KyKBg9vxrkSIlU/EBjLm1HQ/kW9aH7vt7FZTbunnJ8ev7n6XpA3ytVHX/6Rwnwf8zL8TzGmdQYerIQVXglPSnwVTavc/V5uBq5bhFCOm43Y6beUdrnYg5gh2nlO531xjmdgp/f5v7Dk/okel/u53zeJP0ZTSvZK4WJCSdJhfW3i/cG3UfNUxnnX+uz07fD4vx/igyFdOB+Dv3+ckGwoAJgu4yh4Q5VVK3Y+X4lf9Ej6o+uQ/plhPkStWURYitEJ5M0Z0RZn9gIb0vJxMnby9P5OBjTbu78zSVuf9AR2GZ2Qd13urCiXL3b+nlQOCh6TP x-forefront-antispam-report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:BY5PR11MB3927.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(366004)(376002)(346002)(396003)(136003)(39860400002)(6506007)(4326008)(110136005)(478600001)(2616005)(2906002)(8676002)(316002)(8936002)(36756003)(6512007)(186003)(86362001)(83380400001)(71200400001)(26005)(6486002)(76116006)(107886003)(91956017)(5660300002)(66446008)(64756008)(66946007)(66556008)(66476007); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata: KYMgVTtb3AIN6+w6YRD4UGPfjaiZvJ+vrQGNxujcDaM2m/kWgRjfKSfuKAF5/wGPv1BQL+x8rECqxQKJcA1CB8eJHQ4KQZtZtM0zrghBoLLpmV+RzA/c1rIJ0KfnCxTUauL2vrDgpOSW3wDRiBqllG7r7uFjVISNHEWFdoAc1Nv2vD1B1obtLVOdWD0/h8qraytvVNcjwkvdirDYRNoGWogfJ8b2ykgm7GOp2W9GtoInatpnFZko+UEBhApcxvnZZhjoEWptQzJ8Lw3eWKFEpICiII6nNcip+HWP09Dvx5WpAhcC7z3LqpQAJWjGjcLRLdbU37+HY4dL3Ov4AG+Q2HOmZ83+myA4me9Fe812TWdx9tmO7OB8LEiBxF4CsYll+aAe9HPzXxGHXkxiwXJc+mH1nilaXu91NnF8Jwju6n+2WwFnaO8DBO6Iw1hDD0KmZptV/b00erWEDy1hYpXeOic2j47jQDu3TVR3c9dvQwSnUZd8KKSm5JBmSEyq+HWr Content-Type: text/plain; charset="utf-8" Content-ID: <4C5882CA48D8DE49A0D993EC04935602@namprd11.prod.outlook.com> Content-Transfer-Encoding: base64 MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BY5PR11MB3927.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 779a4efe-ef99-4127-96e7-08d81c673665 X-MS-Exchange-CrossTenant-originalarrivaltime: 29 Jun 2020 20:01:29.0772 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 3f4057f3-b418-4d4e-ba84-d55b4e897d88 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: OUj0GwSyfZQIccA2NPRCBrpvt1ofLSQb6ZeeFI+/ayYqaFl0hpOCjLLP3WXRaKPgLTD6sj+fjxUzw+r2/MaioP3UgysKH4+OMn7+k6OOyYk= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB2792 Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: <netdev.vger.kernel.org> X-Mailing-List: netdev@vger.kernel.org |
Series |
None
|
expand
|
diff --git a/drivers/net/usb/smsc95xx.c b/drivers/net/usb/smsc95xx.c index bb4ccbda031a..fbb80a7aef32 100644 --- a/drivers/net/usb/smsc95xx.c +++ b/drivers/net/usb/smsc95xx.c @@ -18,6 +18,8 @@ #include <linux/usb/usbnet.h> #include <linux/slab.h> #include <linux/of_net.h> +#include <linux/mdio.h> +#include <linux/phy.h> #include "smsc95xx.h" #define SMSC_CHIPNAME "smsc95xx" @@ -64,6 +66,8 @@ struct smsc95xx_priv { bool link_ok; struct delayed_work carrier_check; struct usbnet *dev; + struct mii_bus *mdiobus; + struct phy_device *phydev; }; static bool turbo_mode = true; @@ -284,6 +288,22 @@ static void smsc95xx_mdio_write(struct net_device *netdev, int phy_id, int idx, __smsc95xx_mdio_write(netdev, phy_id, idx, regval, 0); } +static int smsc95xx_mdiobus_read(struct mii_bus *bus, int phy_id, int idx) +{ + struct usbnet *dev = bus->priv; + + return __smsc95xx_mdio_read(dev->net, phy_id, idx, 0); +} + +static int smsc95xx_mdiobus_write(struct mii_bus *bus, int phy_id, int idx, + u16 regval) +{ + struct usbnet *dev = bus->priv; + + __smsc95xx_mdio_write(dev->net, phy_id, idx, regval, 0); + return 0; +} +