svn commit: r365612 - in stable/12: . sys/amd64/conf sys/conf sys/contrib/dev/ice sys/dev/ice sys/modules sys/modules/ice sys/modules/ice_ddp tools/kerneldoc/subsys

Eric Joyner erj at FreeBSD.org
Thu Sep 10 20:46:18 UTC 2020


Author: erj
Date: Thu Sep 10 20:46:16 2020
New Revision: 365612
URL: https://svnweb.freebsd.org/changeset/base/365612

Log:
  MFC r361541, r362038, r364240
  
  These MFCs add the ice(4) driver to the kernel for Intel 800 Series
  Ethernet adapters, a couple fixes for the ice_ddp module makefile, and
  remove some redeclarations, respectively.
  
  Relnotes:	yes
  Sponsored by:	Intel Corporation

Added:
  stable/12/sys/contrib/dev/ice/
     - copied from r361541, head/sys/contrib/dev/ice/
  stable/12/sys/dev/ice/
     - copied from r361541, head/sys/dev/ice/
  stable/12/sys/modules/ice/
     - copied from r361541, head/sys/modules/ice/
  stable/12/sys/modules/ice_ddp/
     - copied from r361541, head/sys/modules/ice_ddp/
  stable/12/tools/kerneldoc/subsys/Doxyfile-dev_ice
     - copied unchanged from r361541, head/tools/kerneldoc/subsys/Doxyfile-dev_ice
Modified:
  stable/12/MAINTAINERS
  stable/12/sys/amd64/conf/GENERIC
  stable/12/sys/amd64/conf/NOTES
  stable/12/sys/conf/files.amd64
  stable/12/sys/conf/files.arm64
  stable/12/sys/dev/ice/ice_common.h
  stable/12/sys/modules/Makefile
  stable/12/sys/modules/ice_ddp/Makefile
Directory Properties:
  stable/12/   (props changed)

Modified: stable/12/MAINTAINERS
==============================================================================
--- stable/12/MAINTAINERS	Thu Sep 10 20:34:44 2020	(r365611)
+++ stable/12/MAINTAINERS	Thu Sep 10 20:46:16 2020	(r365612)
@@ -89,9 +89,11 @@ share/mk/*.test.mk	freebsd-testing,ngie (same list as 
 stand/forth		dteske	Pre-commit review requested.
 stand/lua		kevans	Pre-commit review requested
 sys/compat/linuxkpi	hselasky	If in doubt, ask.
+sys/contrib/dev/ice	erj	Pre-commit phabricator review requested.
 sys/dev/e1000	erj	Pre-commit phabricator review requested.
 sys/dev/ixgbe	erj	Pre-commit phabricator review requested.
 sys/dev/ixl	erj	Pre-commit phabricator review requested.
+sys/dev/ice	erj	Pre-commit phabricator review requested.
 sys/dev/sound/usb	hselasky	If in doubt, ask.
 sys/dev/usb	hselasky	If in doubt, ask.
 sys/dev/xen	royger		Pre-commit review recommended.

Modified: stable/12/sys/amd64/conf/GENERIC
==============================================================================
--- stable/12/sys/amd64/conf/GENERIC	Thu Sep 10 20:34:44 2020	(r365611)
+++ stable/12/sys/amd64/conf/GENERIC	Thu Sep 10 20:46:16 2020	(r365612)
@@ -225,6 +225,7 @@ device		ix			# Intel PRO/10GbE PCIE PF Ethernet
 device		ixv			# Intel PRO/10GbE PCIE VF Ethernet
 device		ixl			# Intel 700 Series Physical Function
 device		iavf			# Intel Adaptive Virtual Function
+device		ice			# Intel 800 Series Physical Function
 device		vmx			# VMware VMXNET3 Ethernet
 
 # PCI Ethernet NICs.

Modified: stable/12/sys/amd64/conf/NOTES
==============================================================================
--- stable/12/sys/amd64/conf/NOTES	Thu Sep 10 20:34:44 2020	(r365611)
+++ stable/12/sys/amd64/conf/NOTES	Thu Sep 10 20:46:16 2020	(r365612)
@@ -306,6 +306,8 @@ options 	DRM_DEBUG	# Include debug printfs (slow)
 # ed:   Western Digital and SMC 80xx; Novell NE1000 and NE2000; 3Com 3C503
 #       HP PC Lan+, various PC Card devices
 #       (requires miibus)
+# ice:	Intel 800 Series Physical Function
+#	Requires the ice_ddp module for full functionality
 # ipw:	Intel PRO/Wireless 2100 IEEE 802.11 adapter
 #	Requires the ipw firmware module
 # iwi:	Intel PRO/Wireless 2200BG/2225BG/2915ABG IEEE 802.11 adapters
@@ -332,6 +334,8 @@ device		iwi		# Intel 2200BG/2225BG/2915ABG wireless NI
 device		iwn		# Intel 4965/1000/5000/6000 wireless NICs.
 device		ixl		# Intel 700 Series Physical Function
 device		iavf		# Intel Adaptive Virtual Function
+device		ice		# Intel 800 Series Physical Function
+device		ice_ddp		# Intel 800 Series DDP Package
 device  	mthca		# Mellanox HCA InfiniBand
 device  	mlx4		# Shared code module between IB and Ethernet
 device  	mlx4ib		# Mellanox ConnectX HCA InfiniBand

Modified: stable/12/sys/conf/files.amd64
==============================================================================
--- stable/12/sys/conf/files.amd64	Thu Sep 10 20:34:44 2020	(r365611)
+++ stable/12/sys/conf/files.amd64	Thu Sep 10 20:46:16 2020	(r365612)
@@ -255,6 +255,52 @@ dev/imcsmb/imcsmb.c		optional	imcsmb
 dev/imcsmb/imcsmb_pci.c		optional	imcsmb pci
 dev/intel/spi.c			optional	intelspi
 dev/io/iodev.c			optional	io
+dev/ice/if_ice_iflib.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_lib.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_osdep.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_resmgr.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_strings.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_iflib_recovery_txrx.c	optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_iflib_txrx.c	optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_common.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_controlq.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_dcb.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_flex_pipe.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_flow.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_nvm.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_sched.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_sriov.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_switch.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+ice_ddp.c			optional ice_ddp	\
+	compile-with	"${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01030900 -mice_ddp -c${.TARGET}"	\
+	no-implicit-rule before-depend local		\
+	clean		"ice_ddp.c"
+ice_ddp.fwo			optional ice_ddp	\
+	dependency	"ice_ddp.fw"			\
+	compile-with	"${NORMAL_FWO}"			\
+	no-implicit-rule				\
+	clean		"ice_ddp.fwo"
+ice_ddp.fw			optional ice_ddp	\
+	dependency	"$S/contrib/dev/ice/ice-1.3.9.0.pkg" \
+	compile-with	"${CP} $S/contrib/dev/ice/ice-1.3.9.0.pkg ice_ddp.fw" \
+	no-obj no-implicit-rule				\
+	clean		"ice_ddp.fw"
 dev/ioat/ioat.c			optional	ioat pci
 dev/ioat/ioat_test.c		optional	ioat pci
 dev/ipmi/ipmi.c			optional	ipmi

Modified: stable/12/sys/conf/files.arm64
==============================================================================
--- stable/12/sys/conf/files.arm64	Thu Sep 10 20:34:44 2020	(r365611)
+++ stable/12/sys/conf/files.arm64	Thu Sep 10 20:46:16 2020	(r365612)
@@ -221,6 +221,53 @@ dev/axgbe/xgbe-dev.c		optional	axgbe
 dev/axgbe/xgbe-drv.c		optional	axgbe
 dev/axgbe/xgbe-mdio.c		optional	axgbe
 dev/cpufreq/cpufreq_dt.c	optional	cpufreq fdt
+dev/ice/if_ice_iflib.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_lib.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_osdep.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_resmgr.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_strings.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_iflib_recovery_txrx.c	optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_iflib_txrx.c	optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_common.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_controlq.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_dcb.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_flex_pipe.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_flow.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_nvm.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_sched.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_sriov.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+dev/ice/ice_switch.c		optional	ice pci \
+	compile-with "${NORMAL_C} -I$S/dev/ice"
+ice_ddp.c			optional ice_ddp	\
+	compile-with	"${AWK} -f $S/tools/fw_stub.awk ice_ddp.fw:ice_ddp:0x01030900 -mice_ddp -c${.TARGET}"	\
+	no-implicit-rule before-depend local		\
+	clean		"ice_ddp.c"
+ice_ddp.fwo			optional ice_ddp	\
+	dependency	"ice_ddp.fw"			\
+	compile-with	"${NORMAL_FWO}"			\
+	no-implicit-rule				\
+	clean		"ice_ddp.fwo"
+ice_ddp.fw			optional ice_ddp	\
+	dependency	"$S/contrib/dev/ice/ice-1.3.9.0.pkg" \
+	compile-with	"${CP} $S/contrib/dev/ice/ice-1.3.9.0.pkg ice_ddp.fw" \
+	no-obj no-implicit-rule				\
+	clean		"ice_ddp.fw"
+dev/iicbus/sy8106a.c		optional	sy8106a fdt
 dev/iicbus/twsi/mv_twsi.c	optional	twsi fdt
 dev/iicbus/twsi/a10_twsi.c	optional	twsi fdt
 dev/iicbus/twsi/twsi.c		optional	twsi fdt

Modified: stable/12/sys/dev/ice/ice_common.h
==============================================================================
--- head/sys/dev/ice/ice_common.h	Tue May 26 23:35:10 2020	(r361541)
+++ stable/12/sys/dev/ice/ice_common.h	Thu Sep 10 20:46:16 2020	(r365612)
@@ -46,16 +46,6 @@ enum ice_fw_modes {
 	ICE_FW_MODE_ROLLBACK
 };
 
-/* prototype for functions used for SW locks */
-void ice_free_list(struct LIST_HEAD_TYPE *list);
-void ice_init_lock(struct ice_lock *lock);
-void ice_acquire_lock(struct ice_lock *lock);
-void ice_release_lock(struct ice_lock *lock);
-void ice_destroy_lock(struct ice_lock *lock);
-
-void *ice_alloc_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m, u64 size);
-void ice_free_dma_mem(struct ice_hw *hw, struct ice_dma_mem *m);
-
 void ice_idle_aq(struct ice_hw *hw, struct ice_ctl_q_info *cq);
 bool ice_sq_done(struct ice_hw *hw, struct ice_ctl_q_info *cq);
 
@@ -77,13 +67,6 @@ ice_clean_rq_elem(struct ice_hw *hw, struct ice_ctl_q_
 enum ice_status
 ice_get_link_status(struct ice_port_info *pi, bool *link_up);
 enum ice_status ice_update_link_info(struct ice_port_info *pi);
-enum ice_status
-ice_acquire_nvm(struct ice_hw *hw, enum ice_aq_res_access_type access);
-void ice_release_nvm(struct ice_hw *hw);
-enum ice_status
-ice_aq_read_nvm(struct ice_hw *hw, u16 module_typeid, u32 offset, u16 length,
-		void *data, bool last_command, bool read_shadow_ram,
-		struct ice_sq_cd *cd);
 enum ice_status
 ice_acquire_res(struct ice_hw *hw, enum ice_aq_res_ids res,
 		enum ice_aq_res_access_type access, u32 timeout);

Modified: stable/12/sys/modules/Makefile
==============================================================================
--- stable/12/sys/modules/Makefile	Thu Sep 10 20:34:44 2020	(r365611)
+++ stable/12/sys/modules/Makefile	Thu Sep 10 20:46:16 2020	(r365612)
@@ -160,6 +160,8 @@ SUBDIR=	\
         ${_ibcore} \
 	${_ibcs2} \
 	${_ichwd} \
+	${_ice} \
+	${_ice_ddp} \
 	${_ida} \
 	if_bridge \
 	if_disc \
@@ -566,6 +568,13 @@ _rtwnfw=	rtwnfw
 	${MACHINE_ARCH} != "powerpc" && ${MACHINE_ARCH} != "powerpcspe" && \
 	${MACHINE_CPUARCH} != "riscv"
 _cxgbe=		cxgbe
+.endif
+
+.if ${MACHINE_ARCH} == "amd64" || ${MACHINE_ARCH} == "arm64"
+_ice=		ice
+.if ${MK_SOURCELESS_UCODE} != "no"
+_ice_ddp=	ice_ddp
+.endif
 .endif
 
 # These rely on 64bit atomics

Modified: stable/12/sys/modules/ice_ddp/Makefile
==============================================================================
--- head/sys/modules/ice_ddp/Makefile	Tue May 26 23:35:10 2020	(r361541)
+++ stable/12/sys/modules/ice_ddp/Makefile	Thu Sep 10 20:46:16 2020	(r365612)
@@ -1,24 +1,6 @@
 # $FreeBSD$
 
-# Find the highest version DDP package file and build a .ko for it
-PKG_FILE != find ${SRCTOP}/sys/contrib/dev/ice -name 'ice-*.pkg' | sort -V | tail -1
+KMOD=	ice_ddp
+FIRMWS=	${SRCTOP}/sys/contrib/dev/ice/ice-1.3.9.0.pkg:ice_ddp:0x01030900
 
-.if empty(PKG_FILE)
-.error Unable to locate the DDP package binary file
-.endif
-
-.info Found ${PKG_FILE}
-
-PKG_NAME != basename ${PKG_FILE}
-PKG_VER_STR != basename -s .pkg ${PKG_NAME}
-PKG_VER_STR := ${PKG_VER_STR:S/^ice-//}
-PKG_VER_STR := ${PKG_VER_STR:S/-signed$//}
-PKG_VER_MAJ != echo ${PKG_VER_STR} | cut -d. -f1
-PKG_VER_MIN != echo ${PKG_VER_STR} | cut -d. -f2
-PKG_VER_UPD != echo ${PKG_VER_STR} | cut -d. -f3
-PKG_VER_DFT != echo ${PKG_VER_STR} | cut -d. -f4
-PKG_VERSION != printf "0x%02x%02x%02x%02x" "${PKG_VER_MAJ}" "${PKG_VER_MIN}" "${PKG_VER_UPD}" "${PKG_VER_DFT}"
-
-KMOD := ice_ddp
-FIRMWS := ${PKG_FILE}:ice_ddp:${PKG_VERSION}
 .include <bsd.kmod.mk>

Copied: stable/12/tools/kerneldoc/subsys/Doxyfile-dev_ice (from r361541, head/tools/kerneldoc/subsys/Doxyfile-dev_ice)
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ stable/12/tools/kerneldoc/subsys/Doxyfile-dev_ice	Thu Sep 10 20:46:16 2020	(r365612, copy of r361541, head/tools/kerneldoc/subsys/Doxyfile-dev_ice)
@@ -0,0 +1,21 @@
+# Doxyfile 1.5.2
+
+# $FreeBSD$
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = "FreeBSD kernel ice device code"
+OUTPUT_DIRECTORY       = $(DOXYGEN_DEST_PATH)/dev_ice/
+EXTRACT_ALL            = YES    # TODO: ice has @file comments.. disable this?
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = $(DOXYGEN_SRC_PATH)/dev/ice/ \
+                         $(NOTREVIEWED)
+
+GENERATE_TAGFILE       = dev_ice/dev_ice.tag
+
+ at INCLUDE_PATH          = $(DOXYGEN_INCLUDE_PATH)
+ at INCLUDE               = common-Doxyfile
+


More information about the svn-src-all mailing list