* [PATCH 01/12] Make and configuration files.
@ 2016-12-27 13:15 David VomLehn
2016-12-28 4:47 ` Rami Rosen
0 siblings, 1 reply; 6+ messages in thread
From: David VomLehn @ 2016-12-27 13:15 UTC (permalink / raw)
To: netdev
Cc: Simon Edelhaus, David VomLehn, Dmitrii Tarakanov, Alexander Loktionov
Patches to create the make and configuration files.
Signed-off-by: Dmitrii Tarakanov <Dmitrii.Tarakanov@aquantia.com>
Signed-off-by: Alexander Loktionov <Alexander.Loktionov@aquantia.com>
Signed-off-by: David M. VomLehn <vomlehn@texas.net>
---
drivers/net/ethernet/aquantia/atlantic/Kconfig | 9 ++++++
drivers/net/ethernet/aquantia/atlantic/Makefile | 40 +++++++++++++++++++++++++
drivers/net/ethernet/aquantia/atlantic/ver.h | 18 +++++++++++
3 files changed, 67 insertions(+)
create mode 100644 drivers/net/ethernet/aquantia/atlantic/Kconfig
create mode 100644 drivers/net/ethernet/aquantia/atlantic/Makefile
create mode 100644 drivers/net/ethernet/aquantia/atlantic/ver.h
diff --git a/drivers/net/ethernet/aquantia/atlantic/Kconfig b/drivers/net/ethernet/aquantia/atlantic/Kconfig
new file mode 100644
index 0000000..33f1eb6
--- /dev/null
+++ b/drivers/net/ethernet/aquantia/atlantic/Kconfig
@@ -0,0 +1,9 @@
+#
+# Aquantia device configuration
+#
+
+config AQTION
+ tristate "Aquantia AQtion Support"
+ depends on PCI
+ ---help---
+ This enables the support for the Aquantia AQtion Ethernet card.
\ No newline at end of file
diff --git a/drivers/net/ethernet/aquantia/atlantic/Makefile b/drivers/net/ethernet/aquantia/atlantic/Makefile
new file mode 100644
index 0000000..f0d961f
--- /dev/null
+++ b/drivers/net/ethernet/aquantia/atlantic/Makefile
@@ -0,0 +1,40 @@
+TARGET:=atlantic
+
+CC = gcc
+
+ifeq "$(CC)" "gcc"
+ ccflags-y := -Wall
+endif
+
+ifneq ($(KERNELRELEASE),)
+ $(TARGET)-objs:=aq_main.o aq_nic.o aq_pci_func.o aq_nic.o aq_vec.o \
+ aq_ring.o aq_hw_utils.o aq_ethtool.o hw_atl/hw_atl_a0.o \
+ hw_atl/hw_atl_utils.o hw_atl/hw_atl_llh.o
+
+ obj-m:=$(TARGET).o
+else
+ ifndef KDIR
+ BUILD_DIR:=/lib/modules/$(shell uname -r)/build
+ else
+ BUILD_DIR:=$(KDIR)
+ endif
+
+ PWD:=$(shell pwd)
+
+all:
+ $(MAKE) -j4 CC=$(CC) -C $(BUILD_DIR) M=$(PWD) modules
+
+dox: .doxygen
+ @doxygen $<
+
+clean:
+ $(MAKE) -j4 -C $(BUILD_DIR) M=$(PWD) clean
+ @-rm -rdf doc/html 2 > /dev/null
+
+load:
+ insmod ./$(TARGET).ko
+
+unload:
+ rmmod ./$(TARGET).ko
+
+endif
diff --git a/drivers/net/ethernet/aquantia/atlantic/ver.h b/drivers/net/ethernet/aquantia/atlantic/ver.h
new file mode 100644
index 0000000..225f561
--- /dev/null
+++ b/drivers/net/ethernet/aquantia/atlantic/ver.h
@@ -0,0 +1,18 @@
+/*
+ * Aquantia Corporation Network Driver
+ * Copyright (C) 2014-2016 Aquantia Corporation. All rights reserved
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ */
+
+#ifndef VER_H
+#define VER_H
+
+#define NIC_MAJOR_DRIVER_VERSION 1
+#define NIC_MINOR_DRIVER_VERSION 4
+#define NIC_BUILD_DRIVER_VERSION 1671
+#define NIC_REVISION_DRIVER_VERSION 0
+
+#endif /* VER_H */
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 01/12] Make and configuration files.
2016-12-27 13:15 [PATCH 01/12] Make and configuration files David VomLehn
@ 2016-12-28 4:47 ` Rami Rosen
2016-12-28 5:24 ` David VomLehn
0 siblings, 1 reply; 6+ messages in thread
From: Rami Rosen @ 2016-12-28 4:47 UTC (permalink / raw)
To: David VomLehn
Cc: Netdev, Simon Edelhaus, Dmitrii Tarakanov, Alexander Loktionov
Hi, David,
For the Makefile, you should follow the pattern which is common in
Linux Kernel Ethernet drivers, for example,
http://lxr.free-electrons.com/source/drivers/net/ethernet/intel/i40e/Makefile or
http://lxr.free-electrons.com/source/drivers/net/ethernet/mellanox/mlx5/core/Makefile
Don't think that I ever saw usage of "-j" in a kernel module Makefile;
apart from it, "-j4" is specific to one platform with a given number
of cores, and of course there can be platforms with many more cores,
for which it is less suitable. You can pass the "-j" when running
"make" from the command line, there is no justification to put it in a
Makefile:
>+all:
>+ $(MAKE) -j4 CC=$(CC) -C $(BUILD_DIR) M=$(PWD) modules
>+
>+dox: .doxygen
>+ @doxygen $<
>+
>+clean:
>+ $(MAKE) -j4 -C $(BUILD_DIR) M=$(PWD) clean
Don't think I ever encountered load/unload targets in Linux Kernel
Makefiles (not talking about out of tree projects):
>+load:
>+ insmod ./$(TARGET).ko
>+
>+unload:
>+ rmmod ./$(TARGET).ko
Regards,
Rami Rosen
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 01/12] Make and configuration files.
2016-12-28 4:47 ` Rami Rosen
@ 2016-12-28 5:24 ` David VomLehn
0 siblings, 0 replies; 6+ messages in thread
From: David VomLehn @ 2016-12-28 5:24 UTC (permalink / raw)
To: Rami Rosen; +Cc: Netdev, Simon Edelhaus, Dmitrii Tarakanov, Alexander Loktionov
On 12/27/2016 08:47 PM, Rami Rosen wrote:
> Hi, David,
>
> For the Makefile, you should follow the pattern which is common in
> Linux Kernel Ethernet drivers, for example,
> http://lxr.free-electrons.com/source/drivers/net/ethernet/intel/i40e/Makefile or
> http://lxr.free-electrons.com/source/drivers/net/ethernet/mellanox/mlx5/core/Makefile
>
>
> Don't think that I ever saw usage of "-j" in a kernel module Makefile;
> apart from it, "-j4" is specific to one platform with a given number
> of cores, and of course there can be platforms with many more cores,
> for which it is less suitable. You can pass the "-j" when running
> "make" from the command line, there is no justification to put it in a
> Makefile:
>
>> +all:
>> + $(MAKE) -j4 CC=$(CC) -C $(BUILD_DIR) M=$(PWD) modules
>> +
>> +dox: .doxygen
>> + @doxygen $<
>> +
>> +clean:
>> + $(MAKE) -j4 -C $(BUILD_DIR) M=$(PWD) clean
> Don't think I ever encountered load/unload targets in Linux Kernel
> Makefiles (not talking about out of tree projects):
>
>> +load:
>> + insmod ./$(TARGET).ko
>> +
>> +unload:
>> + rmmod ./$(TARGET).ko
>
> Regards,
> Rami Rosen
You are right. The driver spent a while as an out-of-tree build module,
where this made sense. It clearly no longer makes sense.
--
David VL
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH 01/12] Make and configuration files.
@ 2016-12-27 13:17 David VomLehn
2016-12-27 16:15 ` Joe Perches
2016-12-28 14:34 ` Joe Perches
0 siblings, 2 replies; 6+ messages in thread
From: David VomLehn @ 2016-12-27 13:17 UTC (permalink / raw)
To: netdev
Cc: Simon Edelhaus, David VomLehn, Dmitrii Tarakanov, Alexander Loktionov
Patches to create the make and configuration files.
Signed-off-by: Dmitrii Tarakanov <Dmitrii.Tarakanov@aquantia.com>
Signed-off-by: Alexander Loktionov <Alexander.Loktionov@aquantia.com>
Signed-off-by: David M. VomLehn <vomlehn@texas.net>
---
drivers/net/ethernet/aquantia/atlantic/Kconfig | 9 ++++++
drivers/net/ethernet/aquantia/atlantic/Makefile | 40 +++++++++++++++++++++++++
drivers/net/ethernet/aquantia/atlantic/ver.h | 18 +++++++++++
3 files changed, 67 insertions(+)
create mode 100644 drivers/net/ethernet/aquantia/atlantic/Kconfig
create mode 100644 drivers/net/ethernet/aquantia/atlantic/Makefile
create mode 100644 drivers/net/ethernet/aquantia/atlantic/ver.h
diff --git a/drivers/net/ethernet/aquantia/atlantic/Kconfig b/drivers/net/ethernet/aquantia/atlantic/Kconfig
new file mode 100644
index 0000000..33f1eb6
--- /dev/null
+++ b/drivers/net/ethernet/aquantia/atlantic/Kconfig
@@ -0,0 +1,9 @@
+#
+# Aquantia device configuration
+#
+
+config AQTION
+ tristate "Aquantia AQtion Support"
+ depends on PCI
+ ---help---
+ This enables the support for the Aquantia AQtion Ethernet card.
\ No newline at end of file
diff --git a/drivers/net/ethernet/aquantia/atlantic/Makefile b/drivers/net/ethernet/aquantia/atlantic/Makefile
new file mode 100644
index 0000000..f0d961f
--- /dev/null
+++ b/drivers/net/ethernet/aquantia/atlantic/Makefile
@@ -0,0 +1,40 @@
+TARGET:=atlantic
+
+CC = gcc
+
+ifeq "$(CC)" "gcc"
+ ccflags-y := -Wall
+endif
+
+ifneq ($(KERNELRELEASE),)
+ $(TARGET)-objs:=aq_main.o aq_nic.o aq_pci_func.o aq_nic.o aq_vec.o \
+ aq_ring.o aq_hw_utils.o aq_ethtool.o hw_atl/hw_atl_a0.o \
+ hw_atl/hw_atl_utils.o hw_atl/hw_atl_llh.o
+
+ obj-m:=$(TARGET).o
+else
+ ifndef KDIR
+ BUILD_DIR:=/lib/modules/$(shell uname -r)/build
+ else
+ BUILD_DIR:=$(KDIR)
+ endif
+
+ PWD:=$(shell pwd)
+
+all:
+ $(MAKE) -j4 CC=$(CC) -C $(BUILD_DIR) M=$(PWD) modules
+
+dox: .doxygen
+ @doxygen $<
+
+clean:
+ $(MAKE) -j4 -C $(BUILD_DIR) M=$(PWD) clean
+ @-rm -rdf doc/html 2 > /dev/null
+
+load:
+ insmod ./$(TARGET).ko
+
+unload:
+ rmmod ./$(TARGET).ko
+
+endif
diff --git a/drivers/net/ethernet/aquantia/atlantic/ver.h b/drivers/net/ethernet/aquantia/atlantic/ver.h
new file mode 100644
index 0000000..225f561
--- /dev/null
+++ b/drivers/net/ethernet/aquantia/atlantic/ver.h
@@ -0,0 +1,18 @@
+/*
+ * Aquantia Corporation Network Driver
+ * Copyright (C) 2014-2016 Aquantia Corporation. All rights reserved
+ *
+ * This program is free software; you can redistribute it and/or modify it
+ * under the terms and conditions of the GNU General Public License,
+ * version 2, as published by the Free Software Foundation.
+ */
+
+#ifndef VER_H
+#define VER_H
+
+#define NIC_MAJOR_DRIVER_VERSION 1
+#define NIC_MINOR_DRIVER_VERSION 4
+#define NIC_BUILD_DRIVER_VERSION 1671
+#define NIC_REVISION_DRIVER_VERSION 0
+
+#endif /* VER_H */
--
2.7.4
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH 01/12] Make and configuration files.
2016-12-27 13:17 David VomLehn
@ 2016-12-27 16:15 ` Joe Perches
2016-12-28 14:34 ` Joe Perches
1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2016-12-27 16:15 UTC (permalink / raw)
To: David VomLehn, netdev
Cc: Simon Edelhaus, Dmitrii Tarakanov, Alexander Loktionov
On Tue, 2016-12-27 at 05:17 -0800, David VomLehn wrote:
> Patches to create the make and configuration files.
A few small things about this patch series that adds a
new driver:
These should be sent with a cover letter [0/N] so that
the reason this series is useful can be added to the
merge log.
Patch 1 will not build if CONFIG_AQTION is enabled.
Patch 1/12 should be reordered to be patch 12/12 and
all the other patches moved up appropriately.
The patches should ave a subject prefix of "AQtion: " so
the generic titles are recognizable.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH 01/12] Make and configuration files.
2016-12-27 13:17 David VomLehn
2016-12-27 16:15 ` Joe Perches
@ 2016-12-28 14:34 ` Joe Perches
1 sibling, 0 replies; 6+ messages in thread
From: Joe Perches @ 2016-12-28 14:34 UTC (permalink / raw)
To: David VomLehn, netdev
Cc: Simon Edelhaus, Dmitrii Tarakanov, Alexander Loktionov
On Tue, 2016-12-27 at 05:17 -0800, David VomLehn wrote:
> Patches to create the make and configuration file
[]
> \ No newline at end of file
Not good
> diff --git a/drivers/net/ethernet/aquantia/atlantic/Makefile b/drivers/net/ethernet/aquantia/atlantic/Makefile
A really atypical Makefile you'll probably need to rework
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2016-12-28 14:35 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-27 13:15 [PATCH 01/12] Make and configuration files David VomLehn
2016-12-28 4:47 ` Rami Rosen
2016-12-28 5:24 ` David VomLehn
2016-12-27 13:17 David VomLehn
2016-12-27 16:15 ` Joe Perches
2016-12-28 14:34 ` Joe Perches
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.