From patchwork Mon Nov 26 09:32:59 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Russkikh X-Patchwork-Id: 10697867 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 87A0C16B1 for ; Mon, 26 Nov 2018 09:33:09 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 76A7529815 for ; Mon, 26 Nov 2018 09:33:09 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6B0002981A; Mon, 26 Nov 2018 09:33:09 +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 E4AF929815 for ; Mon, 26 Nov 2018 09:33:08 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726333AbeKZU0g (ORCPT ); Mon, 26 Nov 2018 15:26:36 -0500 Received: from mail-eopbgr770051.outbound.protection.outlook.com ([40.107.77.51]:2382 "EHLO NAM02-SN1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726165AbeKZU0f (ORCPT ); Mon, 26 Nov 2018 15:26:35 -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=UKRXoBwWBo5WkqHSGhoYmo00F69ndvsPxlLfjCs5MXr+sH/6bZR5c03r68H6bzaEcW/aikt8Ak6apBUBkvx4cmp5qSy+TfNjNdi/bUKYjIzWQqHi0DImvDH1S4hwq1xwKBh9m19/qzJXYT+4Q8F+1AGmWDbcCGkpu+crrVyJUDU= Received: from BY1PR0701MB1660.namprd07.prod.outlook.com (10.162.110.22) by BY1PR0701MB1894.namprd07.prod.outlook.com (10.162.143.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1361.18; Mon, 26 Nov 2018 09:32:59 +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.019; Mon, 26 Nov 2018 09:32:59 +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 v4 net-next 01/21] net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE Thread-Topic: [PATCH v4 net-next 01/21] net: usb: aqc111: Driver skeleton for Aquantia AQtion USB to 5GbE Thread-Index: AQHUhWsFAiLNfYMwykmnO87PVsQDLA== Date: Mon, 26 Nov 2018 09:32:59 +0000 Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6PR03CA0024.eurprd03.prod.outlook.com (2603:10a6:20b::37) 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;BY1PR0701MB1894;6:Gf/DGo/ARSei9Lsgczs2DQrF+0p80pu7qHIhJVpeD6OAntEuUepX+N/ZBE+zPUFxqUp6VL4DDxzcKsgG6IyKGaxbkuSjwifIBh/78bxriZpZdPkNw0KMd4LnqERTmgMS8SdOrKjl05Hr/4y6qqi2weo/dq6+kO1a0gshxJN6w4XnrhiihbTqKjwUcIFDNf1Se0qrEX0pFeKr8dS0TRCtt3NsCemd7O2uc3yKjWU0sqaXF6unX4JheG/9DaD92mrBrADmyat2guTBacUBGDtSspfEkdjnxprY0QOrpuGEKCTxFJUmbwO4DGpgkDdKbBlZQrMY73y2/XuBfq7HFKJgq3eP7SKiIY0dzon2u2zmjoHvYNVEcAnSXzhf6koqkWSQMNGy/NrdMCsNh1PcRLCCKOt2lcZLh7bTu6WgF+Vthn3QcrMwORU85SGgBXyMXoxfkUVbAkTNLerG1ciwzl794Q==;5:3htK88eqJdDEupXimV5pxNI7uX6mX7E/hURHjmzaEsTd40LunI2Olrd02CJqNDHY4uOU5+Uv7uoPfOM33AxLbgpK/ZATfS5LZmS4v5vPSKbtCnbtb/T2yVbWqINUIHb8GuMUPgHOpbIyChDs+UPasaySaVB8jBp4A0dy+xq+HhI=;7:h/OV0N7xQDnx0J7e5PmpR6CnDdLuV3l+6VI0QtL4NCW+lDQI8lNhinmVncUfqImNPeMGSEDYq/j2g168s6MQAV1Hr4h7t1wNdmSkfzL8e0cZAmVFsg4RkZ+sFPCHvnG47v+tblxDIkfbCa1yHXVYnA== x-ms-office365-filtering-correlation-id: 46d0c081-74d3-4f11-f141-08d653822760 x-microsoft-antispam: BCL:0;PCL:0;RULEID:(2390098)(7020095)(4652040)(8989299)(4534185)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(2017052603328)(7153060)(7193020);SRVR:BY1PR0701MB1894; x-ms-traffictypediagnostic: BY1PR0701MB1894: x-microsoft-antispam-prvs: x-ms-exchange-senderadcheck: 1 x-exchange-antispam-report-cfa-test: BCL:0;PCL:0;RULEID:(6040522)(2401047)(8121501046)(5005006)(3002001)(3231443)(944501410)(52105112)(10201501046)(93006095)(93001095)(148016)(149066)(150057)(6041310)(20161123562045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123564045)(20161123560045)(20161123558120)(201708071742011)(7699051)(76991095);SRVR:BY1PR0701MB1894;BCL:0;PCL:0;RULEID:;SRVR:BY1PR0701MB1894; x-forefront-prvs: 086831DFB4 x-forefront-antispam-report: SFV:NSPM;SFS:(10009020)(39840400004)(376002)(396003)(136003)(366004)(346002)(199004)(189003)(14454004)(102836004)(97736004)(71200400001)(71190400001)(54906003)(6436002)(72206003)(105586002)(110136005)(11346002)(446003)(186003)(486006)(25786009)(2906002)(7736002)(86362001)(5660300001)(316002)(305945005)(2201001)(2501003)(53936002)(99286004)(36756003)(52116002)(6506007)(6116002)(76176011)(386003)(4326008)(3846002)(68736007)(6512007)(107886003)(476003)(81166006)(478600001)(118296001)(26005)(106356001)(8676002)(256004)(81156014)(2616005)(6486002)(66066001)(44832011)(8936002);DIR:OUT;SFP:1101;SCL:1;SRVR:BY1PR0701MB1894;H:BY1PR0701MB1660.namprd07.prod.outlook.com;FPR:;SPF:None;LANG:en;PTR:InfoNoRecords;A:1;MX:1; received-spf: None (protection.outlook.com: aquantia.com does not designate permitted sender hosts) x-microsoft-antispam-message-info: 2BjXncTxzrbu1S2qjtnHVIHBV9MtjgC3Hxtsg6Zs82AupmdFw8yQ1/dtDBedOatJU80E2jpaYNWExe919hrDIDKt1qEV+i7Y9uPRG1nmtLGTV08iPKULQj5scgUrmc6t7BQMtAYbBo7ertskhBqlC1LywJo2FO+TFGpTU7h2GgHaQQMfa+axUqgcoUP3rpkPbXBGNmMY/zMPmyyr2TFq5EaGg7ipx6VtGz/rJvBCj/5umblVUlz59X8no+JOyfpklXRv/ODZcPp7POIPmPPGyI5Ku9Eu587TyOiiD+lkj9naiekJeKHsLj6yhugeyuuA+JPSjFyHtw8iqwWQEwNnkD88Gn8AV9HsoADbIPYTyms= spamdiagnosticoutput: 1:99 spamdiagnosticmetadata: NSPM MIME-Version: 1.0 X-OriginatorOrg: aquantia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 46d0c081-74d3-4f11-f141-08d653822760 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Nov 2018 09:32:59.6647 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 83e2e134-991c-4ede-8ced-34d47e38e6b1 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1894 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");