From patchwork Wed Nov 21 10:13:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Russkikh X-Patchwork-Id: 10692253 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4B7E21751 for ; Wed, 21 Nov 2018 10:13:39 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 382A129412 for ; Wed, 21 Nov 2018 10:13:39 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2C4972975D; Wed, 21 Nov 2018 10:13:39 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A69BB29412 for ; Wed, 21 Nov 2018 10:13:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729202AbeKUUr0 (ORCPT ); Wed, 21 Nov 2018 15:47:26 -0500 Received: from mail-eopbgr790082.outbound.protection.outlook.com ([40.107.79.82]:39040 "EHLO NAM03-CO1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726016AbeKUUrQ (ORCPT ); Wed, 21 Nov 2018 15:47:16 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=AQUANTIA1COM.onmicrosoft.com; s=selector1-aquantia-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=XHEqb77klLkCKhf/jfkh0ZqvIxyv0IYtr0kEXGYjslY=; b=mhoxDLigvQDEU+uWeppm6xNt4Tmy11pCky6Su0TWu7FcLTSAUJMLFtx7hBrn9Es6w+PbjHbNUBRQ1t+l+UaAXi0X4xwhzSWQHswf8ZZTGMjCWdcNJ+8kp+VtrU6gygatoVjnceFgZ+UdXDCgHP7N8Bhy5Png2MTeGvpi7wP3YtE= Received: from BY1PR0701MB1660.namprd07.prod.outlook.com (10.162.110.22) by BY1PR0701MB1159.namprd07.prod.outlook.com (10.160.105.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1294.36; Wed, 21 Nov 2018 10:13:21 +0000 Received: from BY1PR0701MB1660.namprd07.prod.outlook.com ([fe80::f8ee:2260:e410:fffd]) by BY1PR0701MB1660.namprd07.prod.outlook.com ([fe80::f8ee:2260:e410:fffd%3]) with mapi id 15.20.1361.015; Wed, 21 Nov 2018 10:13:22 +0000 From: Igor Russkikh To: "linux-usb@vger.kernel.org" , "davem@davemloft.net" , "netdev@vger.kernel.org" CC: "andrew@lunn.ch" , Dmitry Bezrukov , Igor Russkikh Subject: [PATCH v3 net-next 01/21] net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE Thread-Topic: [PATCH v3 net-next 01/21] net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE Thread-Index: AQHUgYLUq3+l5JgqU0CUMfTffT5yxQ== Date: Wed, 21 Nov 2018 10:13:21 +0000 Message-ID: <30d2794fb069dd9cdb3f5f81d7cdfc0c8c688aaf.1542794577.git.igor.russkikh@aquantia.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR0402CA0007.eurprd04.prod.outlook.com (2603:10a6:209::20) To BY1PR0701MB1660.namprd07.prod.outlook.com (2a01:111:e400:522a::22) authentication-results: spf=none (sender IP is ) smtp.mailfrom=Igor.Russkikh@aquantia.com; x-ms-exchange-messagesentrepresentingtype: 1 x-originating-ip: [95.79.108.179] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1;BY1PR0701MB1159;6:EDsf63gEj36ZY/B3/fgFLTUW6WGcLC8Aw3PIWkURPeYhxuEH627bjTbwrR0B1my19oVx9mddgC6F4yCjCUxKZ14ZTBgOD9DiZBzoSgukrHAdZWxp1lGXWb7PPJk4OBJuzDBy6lRgbQJ0N82zrX5wLjIhPW5oXGWImzyqPcXzevSXAROXSkoA5tjq3uJYupK4jR9zDtKMBhIM3imu7BI+rZcjHwz0fc3CGxRgbF4wYC/D2Xa5MMPNgotRzjFtVG3PugIfDsxyyWAdSh0pcNdXlTm3zq5SGsmFB8PhnlDVN5G/HXNeRCagFv+FySWYOud+mQ76vetg6cOU9ea4QN7EvDTqQf85273Kd3C2RLlRdZ2hKCzYY5sLUOLrsw3t/FwVwKrsxlNVBqXSQ9pFO0xTBb9myMenzLlWRpAW789PrMnWMpCqhsB0NWsakBeSn2TniD42hKRSSjwrCcL5rX0BkSt1LY9hG23xRtxEAc1pSLw=;5:Bk3Ka0wLZ+P8ck56y6am9O7d7Iu46MIHUbLDUlborXYOZyhhlq8CWsDOTPtxZWBDaU63DBkQioFAZmCyVgQD2R9B0YFgiueNZJRKHOwcYlrllQL9v013EGKsdH+Tnz/xbzC+1QJFk3ru97jIAgC2RFonISjlXHBKFgr/cZsrJfg=;7:aM4fZmVAUUIwzBgDP01GjH+7U/I7Ch8LqcdSupnZSATVJ2MLR9P75z2GiMfaLSLXKvT58BzpW4S2IvIgnq4W6gWlN/8KZMbZu8rF87NlyjB0CJairwmA0g7lYC3og02UhtAwV/xanGGpgvCBzVvSIw== x-ms-office365-filtering-correlation-id: 46a07c6d-3f9b-4620-740a-08d64f99f731 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(5600074)(711020)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(2017052603328)(7153060)(7193020);SRVR:BY1PR0701MB1159; x-ms-traffictypediagnostic: BY1PR0701MB1159: x-microsoft-antispam-prvs: x-exchange-antispam-report-test: UriScan:(112561432440764); x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(93006095)(93001095)(3231442)(944501410)(52105112)(10201501046)(3002001)(148016)(149066)(150057)(6041310)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(20161123564045)(20161123562045)(20161123560045)(201708071742011)(7699051)(76991095);SRVR:BY1PR0701MB1159;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1159; x-forefront-prvs: 08635C03D4 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(346002)(39850400004)(396003)(376002)(366004)(136003)(189003)(199004)(186003)(386003)(446003)(44832011)(71200400001)(476003)(2616005)(66066001)(256004)(6506007)(97736004)(71190400001)(81166006)(8936002)(102836004)(2900100001)(81156014)(118296001)(11346002)(68736007)(26005)(486006)(99286004)(52116002)(14454004)(305945005)(7736002)(2906002)(478600001)(6512007)(86362001)(76176011)(5660300001)(3846002)(53936002)(6116002)(107886003)(106356001)(4326008)(105586002)(110136005)(316002)(25786009)(72206003)(36756003)(54906003)(8676002)(2201001)(2501003)(6436002)(6486002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1159;H:BY1PR0701MB1660.namprd07.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;MX:1;A:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: fFBErNC0df962VLnrQ7Mljgi+w9V8hC2j7+aBgqxkEq6MjpkhATpO6figJvuKxQkl4W4tJMSpQYNkt3v5VQJE9GUatQWwADiJxr6KV1/laV0c6kPaqaFgnZdftpcMsKf478emqEXAomndQAmXCMY4SNEbtW8FcpWgcZWeVTQgS06KPHtYmBDfqO/hBYqK70A6WE1sTy2LYF57BeeOF9RcLYholc7ZTTbSYy39oZdmDWoTDYVuXFvce48bG2SItd+Y+zkIbSeH7OENsVAOUUWzk3dIXxj0Irp2QmXzJThdECVC1BUI58IZGcx973x3siVOd+z3OFHJM0ATiTTq2yodfAQtkfIxCyekMDuPMnbgqM= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46a07c6d-3f9b-4620-740a-08d64f99f731 X-MS-Exchange-CrossTenant-originalarrivaltime: 21 Nov 2018 10:13:21.9526 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1159 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Dmitry Bezrukov Initialize usb_driver structure skeleton Signed-off-by: Dmitry Bezrukov Signed-off-by: Igor Russkikh --- drivers/net/usb/Kconfig | 12 ++++++++++ drivers/net/usb/Makefile | 1 + drivers/net/usb/aqc111.c | 48 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 61 insertions(+) create mode 100644 drivers/net/usb/aqc111.c diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 418b0904cecb..e5fb8ef2d815 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig @@ -613,4 +613,16 @@ config USB_NET_CH9200 To compile this driver as a module, choose M here: the module will be called ch9200. +config USB_NET_AQC111 + tristate "Aquantia AQtion USB to 5/2.5GbE Controllers support" + depends on USB_USBNET + select CRC32 + default y + help + This option adds support for Aquantia AQtion USB + Ethernet adapters based on AQC111U/AQC112 chips. + + This driver should work with at least the following devices: + * Aquantia AQtion USB to 5GbE + endif # USB_NET_DRIVERS diff --git a/drivers/net/usb/Makefile b/drivers/net/usb/Makefile index 27307a4ab003..99fd12be2111 100644 --- a/drivers/net/usb/Makefile +++ b/drivers/net/usb/Makefile @@ -40,3 +40,4 @@ obj-$(CONFIG_USB_VL600) += lg-vl600.o obj-$(CONFIG_USB_NET_QMI_WWAN) += qmi_wwan.o obj-$(CONFIG_USB_NET_CDC_MBIM) += cdc_mbim.o obj-$(CONFIG_USB_NET_CH9200) += ch9200.o +obj-$(CONFIG_USB_NET_AQC111) += aqc111.o diff --git a/drivers/net/usb/aqc111.c b/drivers/net/usb/aqc111.c new file mode 100644 index 000000000000..96aca929b570 --- /dev/null +++ b/drivers/net/usb/aqc111.c @@ -0,0 +1,48 @@ +// SPDX-License-Identifier: GPL-2.0-or-later +/* Aquantia Corp. Aquantia AQtion USB to 5GbE Controller + * Copyright (C) 2003-2005 David Hollis + * Copyright (C) 2005 Phil Chang + * Copyright (C) 2002-2003 TiVo Inc. + * Copyright (C) 2017-2018 ASIX + * Copyright (C) 2018 Aquantia Corp. + */ + +#include +#include +#include +#include +#include +#include + +static const struct driver_info aqc111_info = { + .description = "Aquantia AQtion USB to 5GbE Controller", +}; + +#define AQC111_USB_ETH_DEV(vid, pid, table) \ + USB_DEVICE_INTERFACE_CLASS((vid), (pid), USB_CLASS_VENDOR_SPEC), \ + .driver_info = (unsigned long)&(table) \ +}, \ +{ \ + USB_DEVICE_AND_INTERFACE_INFO((vid), (pid), \ + USB_CLASS_COMM, \ + USB_CDC_SUBCLASS_ETHERNET, \ + USB_CDC_PROTO_NONE), \ + .driver_info = (unsigned long)&(table), + +static const struct usb_device_id products[] = { + {AQC111_USB_ETH_DEV(0x2eca, 0xc101, aqc111_info)}, + { },/* END */ +}; +MODULE_DEVICE_TABLE(usb, products); + +static struct usb_driver aq_driver = { + .name = "aqc111", + .id_table = products, + .probe = usbnet_probe, + .disconnect = usbnet_disconnect, +}; + +module_usb_driver(aq_driver); + +MODULE_DESCRIPTION("Aquantia AQtion USB to 5/2.5GbE Controllers"); +MODULE_LICENSE("GPL");