Skip to contentSkip to conversation

atl1e: Atheros L1E Gigabit Ethernet driver

PATCH In review [email protected] 6 participants 7 messages Jul 17, 2008

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 atl1e: Atheros L1E Gigabit Ethernet driver

From: Jie Yang <[email protected]>

Full patch for the Atheros L1E Gigabit Ethernet driver. Supportring AR8121, AR8113 and AR8114

Signed-off-by Jie Yang <jie.yang @atheros.com>

---
Update on comments:
use git-send-email to send non-mangled patches.

drivers/net/Kconfig +11 -0
index d85b9d0..70c42d6 100644
@@ -2383,6 +2383,17 @@ config ATL1
 	  To compile this driver as a module, choose M here.  The module
 	  will be called atl1.
 
+config ATL1E
+	tristate "Atheros L1E Gigabit Ethernet support (EXPERIMENTAL)"
+	depends on PCI && EXPERIMENTAL
+	select CRC32
+	select MII
+	help
+	  This driver supports the Atheros L1E gigabit ethernet adapter.
+
+	  To compile this driver as a module, choose M here.  The module
+	  will be called atl1e.
+
 endif # NETDEV_1000
 
 #
drivers/net/Makefile +1 -0
index 87703ff..1d93093 100644
@@ -15,6 +15,7 @@ obj-$(CONFIG_EHEA) += ehea/
 obj-$(CONFIG_CAN) += can/
 obj-$(CONFIG_BONDING) += bonding/
 obj-$(CONFIG_ATL1) += atlx/
+obj-$(CONFIG_ATL1E) += atl1e/
 obj-$(CONFIG_GIANFAR) += gianfar_driver.o
 obj-$(CONFIG_TEHUTI) += tehuti.o
 
drivers/net/atl1e/Makefile new file +2 -0
new file mode 100644
index 0000000..bc11be8
@@ -0,0 +1,2 @@
+obj-$(CONFIG_ATL1E)	+= atl1e.o
+atl1e-objs		+= atl1e_main.o atl1e_hw.o atl1e_ethtool.o atl1e_param.o
drivers/net/atl1e/atl1e.h new file +511 -0

511 lines not on this page · raw message

drivers/net/atl1e/atl1e_ethtool.c new file +405 -0

405 lines not on this page · raw message

drivers/net/atl1e/atl1e_hw.c new file +664 -0

664 lines not on this page · raw message

drivers/net/atl1e/atl1e_hw.h new file +793 -0

793 lines not on this page · raw message

drivers/net/atl1e/atl1e_main.c new file +2600 -0

601 lines not on this page · raw message

drivers/net/atl1e/atl1e_param.c new file +263 -0

263 lines not on this page · raw message

The rest of this diff is not shown. View the raw message.

Part of the diff is not shown here. View the raw message.

#1 lore raw
Quoted 2 lines

Full patch for the Atheros L1E Gigabit Ethernet driver. Supportring AR8121, AR8113 and AR8114

Does it have the same 4G limitation as ATL1 card?

If yes, pci_using_64 logic isn't needed, and copying comment from atl1 driver wouldn't hurt, If no, you're setting small DMA mask.

author
#2 lore raw
Quoted 6 lines · Alexey Dobriyan

Does it have the same 4G limitation as ATL1 card?

If yes, pci_using_64 logic isn't needed, and copying comment from atl1 driver wouldn't hurt, If no, you're setting small DMA mask.

--

yes, it do have the limit.

Best wishes
jie

#3 lore raw
In reply to [email protected]
Quoted 8 lines
drivers/net/atl1e/atl1e_param.c new file +7 -0
+/*
+ * atl1e_check_options - Range Checking for Command Line Parameters
+ * @adapter: board private structure
+ *
+ * This routine checks all command line parameters for valid user
+ * input.  If an invalid value is given, or if no user specified
+ * value exists, a default value is used.  The final value is stored

drivers/net/atl1e/atl1e_param.c line 184

Quoted 10 lines
drivers/net/atl1e/atl1e_param.c new file +10 -0
+ * in a variable in the adapter structure.
+ */
+void __devinit atl1e_check_options(struct atl1e_adapter *adapter)
+{
+	struct pci_dev *pdev = adapter->pdev;
+	int bd = adapter->bd_number;
+	if (bd >= ATL1E_MAX_NIC) {
+		dev_notice(&pdev->dev, "no configuration for board #%i\n", bd);
+		dev_notice(&pdev->dev, "Using defaults for all values\n");
+	}

The use of module parameters to set options is discouraged, especially when there are better choices. All these parameter should be controllable by ethtool. The reason is that users (and tools) shouldn't have to know the
special parameters that are specific to that hardware.

This version is okay as is for initial inclusion, but the parameters should be removed later.

#4 lore raw
In reply to [email protected]

Hello,

drivers/net/atl1e/atl1e.h line 77

Quoted 4 lines
drivers/net/atl1e/atl1e.h new file +4 -0
+#define SPEED_0		   0xffff
+#define SPEED_10           10
+#define SPEED_100          100
+#define SPEED_100          100

Small thing - double define for SPEED_100.

Quoted 1 line

+#define SPEED_1000 1000

Mariusz

#5 lore raw
Quoted 10 lines · Mariusz Kozlowski

Hello,

drivers/net/atl1e/atl1e.h line 77

Quoted 4 lines
drivers/net/atl1e/atl1e.h new file +4 -0
+#define SPEED_0		   0xffff
+#define SPEED_10           10
+#define SPEED_100          100
+#define SPEED_100          100

Small thing - double define for SPEED_100.

Quoted 1 line

+#define SPEED_1000 1000

In fact these are all duplicates of macros defined in <linux/ethtool.h> (except SPEED_0, whatever that means).

Ben.

Signature · 2 lines
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
maintainer
#6 lore raw
In reply to Mariusz Kozlowski

From: Mariusz Kozlowski <[email protected]>
Date: Thu, 17 Jul 2008 22:04:14 +0200

Quoted 10 lines

Hello,

drivers/net/atl1e/atl1e.h line 77

Quoted 4 lines
drivers/net/atl1e/atl1e.h new file +4 -0
+#define SPEED_0		   0xffff
+#define SPEED_10           10
+#define SPEED_100          100
+#define SPEED_100          100

Small thing - double define for SPEED_100.

Quoted 1 line

+#define SPEED_1000 1000

And these are all entirely superfluous, since they are already defined in linux/ethtool.h