From: Bryan Whitehead <Bryan.Whitehead@microchip.com>
Add LAN743X Driver to Kconfig and Makefile
Removed "depends on SPI" from NET_VENDOR_MICROCHIP group
Because all existing drivers already specify SPI dependency, and
New driver does not have SPI dependency.
Signed-off-by: Bryan Whitehead <Bryan.Whitehead@microchip.com>
---
drivers/net/ethernet/microchip/Kconfig | 10 +++++++++-
drivers/net/ethernet/microchip/Makefile | 1 +
2 files changed, 10 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/microchip/Kconfig b/drivers/net/ethernet/microchip/Kconfig
index 36a09d9..5796718 100644
--- a/drivers/net/ethernet/microchip/Kconfig
+++ b/drivers/net/ethernet/microchip/Kconfig
@@ -5,7 +5,6 @@
config NET_VENDOR_MICROCHIP
bool "Microchip devices"
default y
- depends on SPI
---help---
If you have a network (Ethernet) card belonging to this class, say Y.
@@ -42,4 +41,13 @@ config ENCX24J600
To compile this driver as a module, choose M here. The module will be
called encx24j600.
+config LAN743X
+ tristate "LAN7430 support"
+ depends on PCI
+ ---help---
+ Support for the Microchip LAN7430 PCI Express Gigabit Ethernet chip
+
+ To compile this driver as a module, choose M here. The module will be
+ called lan743x.
+
endif # NET_VENDOR_MICROCHIPdiff --git a/drivers/net/ethernet/microchip/Makefile b/drivers/net/ethernet/microchip/Makefile
index ff78f62..f7215dd 100644
--- a/drivers/net/ethernet/microchip/Makefile
+++ b/drivers/net/ethernet/microchip/Makefile
@@ -4,3 +4,4 @@
obj-$(CONFIG_ENC28J60) += enc28j60.o
obj-$(CONFIG_ENCX24J600) += encx24j600.o encx24j600-regmap.o
+obj-$(CONFIG_LAN743X) += lan743x.o
--
2.7.4
Hi Bryan,
[auto build test WARNING on net-next/master]
url: https://github.com/0day-ci/linux/commits/Bryan-Whitehead-microchip-com/Add-LAN743X-driver/20170814-141247
config: i386-allyesconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
All warnings (new ones prefixed by >>):
drivers/net//ethernet/microchip/lan743x.c: In function 'lan743x_ptpci_settime64':quoted
drivers/net//ethernet/microchip/lan743x.c:1117:83: warning: format '%ld' expects argument of type 'long int', but argument 4 has type 'time64_t {aka const long long int}' [-Wformat=]
NETIF_WARNING(adapter, drv, adapter->netdev,
^
vim +1117 drivers/net//ethernet/microchip/lan743x.c
a33f5600 Bryan Whitehead 2017-08-11 1103
a33f5600 Bryan Whitehead 2017-08-11 1104 #ifdef CONFIG_PTP_1588_CLOCK
a33f5600 Bryan Whitehead 2017-08-11 1105 static int lan743x_ptpci_settime64(struct ptp_clock_info *ptpci,
a33f5600 Bryan Whitehead 2017-08-11 1106 const struct timespec64 *ts)
a33f5600 Bryan Whitehead 2017-08-11 1107 {
a33f5600 Bryan Whitehead 2017-08-11 1108 struct lan743x_ptp *ptp = LAN743X_PTPCI_TO_PTP;
a33f5600 Bryan Whitehead 2017-08-11 1109 struct lan743x_adapter *adapter = LAN743X_PTP_TO_ADAPTER;
a33f5600 Bryan Whitehead 2017-08-11 1110
a33f5600 Bryan Whitehead 2017-08-11 1111 if (ts) {
a33f5600 Bryan Whitehead 2017-08-11 1112 u32 seconds = 0;
a33f5600 Bryan Whitehead 2017-08-11 1113 u32 nano_seconds = 0;
a33f5600 Bryan Whitehead 2017-08-11 1114
a33f5600 Bryan Whitehead 2017-08-11 1115 if ((ts->tv_sec > 0xFFFFFFFFLL) ||
a33f5600 Bryan Whitehead 2017-08-11 1116 (ts->tv_sec < 0)) {
a33f5600 Bryan Whitehead 2017-08-11 @1117 NETIF_WARNING(adapter, drv, adapter->netdev,
a33f5600 Bryan Whitehead 2017-08-11 1118 "ts->tv_sec out of range, %ld",
a33f5600 Bryan Whitehead 2017-08-11 1119 ts->tv_sec);
a33f5600 Bryan Whitehead 2017-08-11 1120 return -EINVAL;
a33f5600 Bryan Whitehead 2017-08-11 1121 }
a33f5600 Bryan Whitehead 2017-08-11 1122 if ((ts->tv_nsec >= 1000000000L) ||
a33f5600 Bryan Whitehead 2017-08-11 1123 (ts->tv_nsec < 0)) {
a33f5600 Bryan Whitehead 2017-08-11 1124 NETIF_WARNING(adapter, drv, adapter->netdev,
a33f5600 Bryan Whitehead 2017-08-11 1125 "ts->tv_nsec out of range, %ld",
a33f5600 Bryan Whitehead 2017-08-11 1126 ts->tv_nsec);
a33f5600 Bryan Whitehead 2017-08-11 1127 return -EINVAL;
a33f5600 Bryan Whitehead 2017-08-11 1128 }
a33f5600 Bryan Whitehead 2017-08-11 1129 seconds = ts->tv_sec;
a33f5600 Bryan Whitehead 2017-08-11 1130 nano_seconds = ts->tv_nsec;
a33f5600 Bryan Whitehead 2017-08-11 1131 NETIF_INFO(adapter, drv, adapter->netdev,
a33f5600 Bryan Whitehead 2017-08-11 1132 "settime = %u.%09u", seconds, nano_seconds);
a33f5600 Bryan Whitehead 2017-08-11 1133 lan743x_ptp_clock_set(adapter, seconds, nano_seconds, 0);
a33f5600 Bryan Whitehead 2017-08-11 1134 } else {
a33f5600 Bryan Whitehead 2017-08-11 1135 NETIF_WARNING(adapter, drv, adapter->netdev, "ts == NULL");
a33f5600 Bryan Whitehead 2017-08-11 1136 return -EINVAL;
a33f5600 Bryan Whitehead 2017-08-11 1137 }
a33f5600 Bryan Whitehead 2017-08-11 1138 return 0;
a33f5600 Bryan Whitehead 2017-08-11 1139 }
a33f5600 Bryan Whitehead 2017-08-11 1140 #endif /*CONFIG_PTP_1588_CLOCK */
a33f5600 Bryan Whitehead 2017-08-11 1141
:::::: The code at line 1117 was first introduced by commit
:::::: a33f5600a21257dc396a7278c7c5ff74ac2f7844 Add LAN743X driver
:::::: TO: Bryan Whitehead [off-list ref]
:::::: CC: 0day robot [off-list ref]
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation