Gigabit ethernet driver for Alacritechs SLIC devices (v4)
Subsystems (3)
Lino Sanfilippo
maintainerHi,
this is the forth version of the slicoss gigabit ethernet driver (which is a rework of the driver from Alacritech which can currently be found under drivers/staging/slicoss). The driver is supposed to support Mojave, Oasis and Kalahari cards, for both copper and fiber.
If this code is accepted the staging version can be removed.
The driver has been tested on a SEN2104ET adapter (4 Port PCIe copper).
v4:
- fix wrong driver name in Kconfig file (reported by Rami Rosen)
- remove unused variable from driver struct (reported by Rami Rosen)
- return "err" instead of 0 in slic_load_rcvseq_firmware() (reported by Rami Rosen)
- Fix typos in constants, comments and error message (reported by Markus Böhme)
- fix various warnings concerning signedness (reported by Markus Böhme)
- improve line formatting (reported by Markus Böhme)
- add comment describing the need for SLIC_MAX_TX_COMPLETIONS (suggested by Florian Fainelli)
- do not zero out complete rx descriptor (suggested by Florian Fainelli)
- add missing write barrier (reported by Florian Fainelli)
- remove unneeded assignment of net_device to skb (reported by Florian Fainelli)
- use napi_complete_done() instead of napi_complete (suggested by Florian Fainelli)
- use napi_schedule_irqoff() instead of napi_schedule (suggested by Florian Fainelli)
- do not map error returned by slic_init() to -ENOMEM
- do proper dma syncs before and after rx descriptor status is set to 0
- if after dma sync for CPU rx descriptor is not used return it to HW by means of dma sync for device
v3:
- dont add defines to pci_ids.h but instead put it into the drivers header file (requested by Greg Kroah-Hartman)
v2:
- remove unusual padding in statistic strings (suggested by Andrew Lunn)
- for mdio register and bit names use defines from mii.h instead of own ones (suggested by Andrew Lunn)
- remove unused defines
- ensure PCI flush at two more places
- use mmiowb before lock to prevent mmio writes leaking out of lock
- fix some typos in comments
- add copyright and GPL header
Regards,
Lino
Lino Sanfilippo
maintainerPATCH v4 1/2 net: ethernet: slicoss: add slicoss gigabit ethernet driver
Add driver for Alacritech gigabit ethernet cards with SLIC (session-layer interface control) technology. The driver provides basic support without SLIC for the following devices:
- Mojave cards (single port PCI Gigabit) both copper and fiber
- Oasis cards (single and dual port PCI-x Gigabit) copper and fiber
- Kalahari cards (dual and quad port PCI-e Gigabit) copper and fiber
--- drivers/net/ethernet/Kconfig | 1 + drivers/net/ethernet/Makefile | 1 + drivers/net/ethernet/alacritech/Kconfig | 28 + drivers/net/ethernet/alacritech/Makefile | 4 + drivers/net/ethernet/alacritech/slic.h | 575 +++++++++ drivers/net/ethernet/alacritech/slicoss.c | 1882 +++++++++++++++++++++++++++++ 6 files changed, 2491 insertions(+) create mode 100644 drivers/net/ethernet/alacritech/Kconfig create mode 100644 drivers/net/ethernet/alacritech/Makefile create mode 100644 drivers/net/ethernet/alacritech/slic.h create mode 100644 drivers/net/ethernet/alacritech/slicoss.c
drivers/net/ethernet/Kconfig +1 -0
@@ -21,6 +21,7 @@ source "drivers/net/ethernet/3com/Kconfig" source "drivers/net/ethernet/adaptec/Kconfig" source "drivers/net/ethernet/aeroflex/Kconfig" source "drivers/net/ethernet/agere/Kconfig" +source "drivers/net/ethernet/alacritech/Kconfig" source "drivers/net/ethernet/allwinner/Kconfig" source "drivers/net/ethernet/alteon/Kconfig" source "drivers/net/ethernet/altera/Kconfig"
drivers/net/ethernet/Makefile +1 -0
@@ -7,6 +7,7 @@ obj-$(CONFIG_NET_VENDOR_8390) += 8390/ obj-$(CONFIG_NET_VENDOR_ADAPTEC) += adaptec/ obj-$(CONFIG_GRETH) += aeroflex/ obj-$(CONFIG_NET_VENDOR_AGERE) += agere/ +obj-$(CONFIG_NET_VENDOR_ALACRITECH) += alacritech/ obj-$(CONFIG_NET_VENDOR_ALLWINNER) += allwinner/ obj-$(CONFIG_NET_VENDOR_ALTEON) += alteon/ obj-$(CONFIG_ALTERA_TSE) += altera/
drivers/net/ethernet/alacritech/Kconfig new file +28 -0
@@ -0,0 +1,28 @@ +config NET_VENDOR_ALACRITECH + bool "Alacritech devices" + default y + ---help--- + If you have a network (Ethernet) card belonging to this class, say Y. + + Note that the answer to this question doesn't directly affect the + kernel: saying N will just cause the configurator to skip all the + questions about Alacritech devices. If you say Y, you will be asked + for your specific device in the following questions. + +if NET_VENDOR_ALACRITECH + +config SLICOSS + tristate "Alacritech Slicoss support" + depends on PCI + select CRC32 + ---help--- + This driver supports Gigabit Ethernet adapters based on the + Session Layer Interface (SLIC) technology by Alacritech. + + Supported are Mojave (1 port) and Oasis (1, 2 and 4 port) cards, + both copper and fiber. + + To compile this driver as a module, choose M here: the module + will be called slicoss. This is recommended. + +endif # NET_VENDOR_ALACRITECH
drivers/net/ethernet/alacritech/Makefile new file +4 -0
@@ -0,0 +1,4 @@ +# +# Makefile for the Alacritech Slicoss driver +# +obj-$(CONFIG_SLICOSS) += slicoss.o
drivers/net/ethernet/alacritech/slic.h new file +575 -0
575 lines not on this page · raw message
drivers/net/ethernet/alacritech/slicoss.c new file +1882 -0
1,882 lines not on this page · raw message
Signature · 1 line
1.9.1
Lino Sanfilippo
maintainerPATCH v4 2/2 MAINTAINERS: add entry for slicoss ethernet driver
In reply to Lino SanfilippoAdd myself as maintainer for the slicoss ethernet driver.
--- MAINTAINERS | 5 +++++ 1 file changed, 5 insertions(+)
MAINTAINERS +5 -0
@@ -562,6 +562,11 @@ T: git git://linuxtv.org/anttip/media_tree.git S: Maintained F: drivers/media/usb/airspy/ +ALACRITECH GIGABIT ETHERNET DRIVER +M: Lino Sanfilippo <[email protected]> +S: Maintained +F: drivers/net/ethernet/alacritech/* + ALCATEL SPEEDTOUCH USB DRIVER M: Duncan Sands <[email protected]> L: [email protected]
Signature · 1 line
1.9.1
David Miller
maintainerFrom: Lino Sanfilippo <[email protected]>
Date: Mon, 5 Dec 2016 23:07:15 +0100
Quoted 8 lines
this is the forth version of the slicoss gigabit ethernet driver (which is a rework of the driver from Alacritech which can currently be found under
drivers/staging/slicoss). The driver is supposed to support Mojave, Oasis and Kalahari cards, for both copper and fiber.If this code is accepted the staging version can be removed.
The driver has been tested on a SEN2104ET adapter (4 Port PCIe copper).
I've applied this series, nice work.
But realize that if you use SLICOSS as the Kconfig symbol to select this driver, then while the staging driver is still in the tree it will enable both drivers which both want to attach to the same exact device IDs.
Quoted 10 lines · David Miller
From: Lino Sanfilippo <[email protected]>
Date: Mon, 5 Dec 2016 23:07:15 +0100Quoted 7 lines
this is the forth version of the slicoss gigabit ethernet driver (which is a rework of the driver from Alacritech which can currently be found under
drivers/staging/slicoss). The driver is supposed to support Mojave, Oasis and Kalahari cards, for both copper and fiber.If this code is accepted the staging version can be removed.
Quoted 8 lines
Quoted 1 line
The driver has been tested on a SEN2104ET adapter (4 Port PCIe copper).
I've applied this series, nice work.
But realize that if you use SLICOSS as the
Kconfigsymbol to select this driver, then while the staging driver is still in the tree it will enable both drivers which both want to attach to the same exact device IDs.
If you have taken this in your tree now, I will go delete the staging driver from the staging tree, so we will not have that issue. Should I do that now?
thanks,
greg k-h
David Miller
maintainerFrom: Greg KH <[email protected]>
Date: Tue, 6 Dec 2016 17:40:39 +0100
Quoted 15 lines · David Miller
Quoted 14 lines
From: Lino Sanfilippo <[email protected]>
Date: Mon, 5 Dec 2016 23:07:15 +0100Quoted 8 lines
this is the forth version of the slicoss gigabit ethernet driver (which is a rework of the driver from Alacritech which can currently be found under
drivers/staging/slicoss). The driver is supposed to support Mojave, Oasis and Kalahari cards, for both copper and fiber.If this code is accepted the staging version can be removed.
The driver has been tested on a SEN2104ET adapter (4 Port PCIe copper).
I've applied this series, nice work.
Quoted 8 lines
Quoted 4 lines
But realize that if you use SLICOSS as the
Kconfigsymbol to select this driver, then while the staging driver is still in the tree it will enable both drivers which both want to attach to the same exact device IDs.If you have taken this in your tree now, I will go delete the staging driver from the staging tree, so we will not have that issue. Should I do that now?
Please do.
Lino Sanfilippo
maintainerQuoted 8 lines · David Miller
From: Lino Sanfilippo <[email protected]>
Date: Mon, 5 Dec 2016 23:07:15 +0100Quoted 5 lines
this is the forth version of the slicoss gigabit ethernet driver (which is a rework of the driver from Alacritech which can currently be found under
drivers/staging/slicoss). The driver is supposed to support Mojave, Oasis and Kalahari cards, for both copper and fiber.
Quoted 6 lines
Quoted 3 lines
If this code is accepted the staging version can be removed.
The driver has been tested on a SEN2104ET adapter (4 Port PCIe copper).
I've applied this series, nice work.
Great, thanks!
Regards,
Lino