@@ -113,4 +113,6 @@ source "drivers/xen/Kconfig"
source "drivers/staging/Kconfig"
source "drivers/platform/Kconfig"
+
+source "drivers/shared/Kconfig"
endmenu
@@ -21,6 +21,8 @@ obj-$(CONFIG_XEN) += xen/
# regulators early, since some subsystems rely on them to initialize
obj-$(CONFIG_REGULATOR) += regulator/
+obj-y += shared/
+
# char/ comes before serial/ etc so that the VT console is the boot-time
# default.
obj-y += char/
@@ -31,8 +31,8 @@
* SOFTWARE.
*/
-#include <linux/mlx4/cq.h>
-#include <linux/mlx4/qp.h>
+#include <drivers/mlx4/cq.h>
+#include <drivers/mlx4/qp.h>
#include "mlx4_ib.h"
#include "user.h"
@@ -33,7 +33,7 @@
#include <rdma/ib_mad.h>
#include <rdma/ib_smi.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4_ib.h"
@@ -38,8 +38,8 @@
#include <rdma/ib_smi.h>
#include <rdma/ib_user_verbs.h>
-#include <linux/mlx4/driver.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/driver.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4_ib.h"
#include "user.h"
@@ -41,8 +41,8 @@
#include <rdma/ib_verbs.h>
#include <rdma/ib_umem.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/doorbell.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/doorbell.h>
struct mlx4_ib_ucontext {
struct ib_ucontext ibucontext;
@@ -36,7 +36,7 @@
#include <rdma/ib_cache.h>
#include <rdma/ib_pack.h>
-#include <linux/mlx4/qp.h>
+#include <drivers/mlx4/qp.h>
#include "mlx4_ib.h"
#include "user.h"
@@ -31,8 +31,8 @@
* SOFTWARE.
*/
-#include <linux/mlx4/qp.h>
-#include <linux/mlx4/srq.h>
+#include <drivers/mlx4/qp.h>
+#include <drivers/mlx4/srq.h>
#include "mlx4_ib.h"
#include "user.h"
@@ -2688,21 +2688,6 @@ config MLX4_EN
This driver supports Mellanox Technologies ConnectX Ethernet
devices.
-config MLX4_CORE
- tristate
- depends on PCI
- default n
-
-config MLX4_DEBUG
- bool "Verbose debugging output" if (MLX4_CORE && EMBEDDED)
- depends on MLX4_CORE
- default y
- ---help---
- This option causes debugging code to be compiled into the
- mlx4_core driver. The output can be turned on via the
- debug_level module parameter (which can also be set after
- the driver is loaded through sysfs).
-
config TEHUTI
tristate "Tehuti Networks 10G Ethernet"
depends on PCI
@@ -237,7 +237,7 @@ obj-$(CONFIG_BFIN_MAC) += bfin_mac.o
obj-$(CONFIG_DM9000) += dm9000.o
obj-$(CONFIG_PASEMI_MAC) += pasemi_mac_driver.o
pasemi_mac_driver-objs := pasemi_mac.o pasemi_mac_ethtool.o
-obj-$(CONFIG_MLX4_CORE) += mlx4/
+obj-$(CONFIG_MLX4_EN) += mlx4/
obj-$(CONFIG_ENC28J60) += enc28j60.o
obj-$(CONFIG_ETHOC) += ethoc.o
@@ -1,8 +1,3 @@
-obj-$(CONFIG_MLX4_CORE) += mlx4_core.o
-
-mlx4_core-y := alloc.o catas.o cmd.o cq.o eq.o fw.o icm.o intf.o main.o mcg.o \
- mr.o pd.o port.o profile.o qp.o reset.o sense.o srq.o
-
obj-$(CONFIG_MLX4_EN) += mlx4_en.o
mlx4_en-y := en_main.o en_tx.o en_rx.o en_ethtool.o en_port.o en_cq.o \
@@ -31,9 +31,9 @@
*
*/
-#include <linux/mlx4/cq.h>
-#include <linux/mlx4/qp.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cq.h>
+#include <drivers/mlx4/qp.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4_en.h"
@@ -36,9 +36,9 @@
#include <linux/delay.h>
#include <linux/netdevice.h>
-#include <linux/mlx4/driver.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/driver.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4_en.h"
@@ -36,10 +36,10 @@
#include <linux/if_vlan.h>
#include <linux/delay.h>
-#include <linux/mlx4/driver.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/cmd.h>
-#include <linux/mlx4/cq.h>
+#include <drivers/mlx4/driver.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/cmd.h>
+#include <drivers/mlx4/cq.h>
#include "mlx4_en.h"
#include "en_port.h"
@@ -34,8 +34,8 @@
#include <linux/if_vlan.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/cmd.h>
#include "en_port.h"
#include "mlx4_en.h"
@@ -32,7 +32,7 @@
*/
#include <linux/vmalloc.h>
-#include <linux/mlx4/qp.h>
+#include <drivers/mlx4/qp.h>
#include "mlx4_en.h"
@@ -31,8 +31,8 @@
*
*/
-#include <linux/mlx4/cq.h>
-#include <linux/mlx4/qp.h>
+#include <drivers/mlx4/cq.h>
+#include <drivers/mlx4/qp.h>
#include <linux/skbuff.h>
#include <linux/if_ether.h>
#include <linux/if_vlan.h>
@@ -32,8 +32,8 @@
*/
#include <asm/page.h>
-#include <linux/mlx4/cq.h>
-#include <linux/mlx4/qp.h>
+#include <drivers/mlx4/cq.h>
+#include <drivers/mlx4/qp.h>
#include <linux/skbuff.h>
#include <linux/if_vlan.h>
#include <linux/vmalloc.h>
@@ -40,11 +40,11 @@
#include <linux/netdevice.h>
#include <linux/inet_lro.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/qp.h>
-#include <linux/mlx4/cq.h>
-#include <linux/mlx4/srq.h>
-#include <linux/mlx4/doorbell.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/qp.h>
+#include <drivers/mlx4/cq.h>
+#include <drivers/mlx4/srq.h>
+#include <drivers/mlx4/doorbell.h>
#include "en_port.h"
new file mode 100644
@@ -0,0 +1,34 @@
+#
+# Drivers that arbitrate shared access to multi-function hardware
+#
+
+#
+# Main options are selected by client modules that really use the
+# hardware, and are not exposed to the user to choose
+#
+
+config MLX4_CORE
+ tristate
+ depends on PCI
+ default n
+
+menuconfig SHARED_DEVICES
+ bool "Shared device arbitration driver options"
+ ---help---
+ Some devices can be used simultaneously as an Ethernet NIC
+ and a Fibre Channel-over-Ethernet HBA, with separate NIC and
+ HBA drivers that both use a common low-level driver to
+ arbitrate shared access to the common hardware. Say Y here
+ to get to see options for the low-level arbitration drivers.
+
+ If in doubt, say N.
+
+config MLX4_DEBUG
+ bool "mlx4_core verbose debugging output" if (MLX4_CORE && SHARED_DEVICES)
+ depends on MLX4_CORE
+ default y
+ ---help---
+ This option causes debugging code to be compiled into the
+ mlx4_core driver. The output can be turned on via the
+ debug_level module parameter (which can also be set after
+ the driver is loaded through sysfs).
new file mode 100644
@@ -0,0 +1 @@
+obj-$(CONFIG_MLX4_CORE) += mlx4/
new file mode 100644
@@ -0,0 +1,4 @@
+obj-$(CONFIG_MLX4_CORE) += mlx4_core.o
+
+mlx4_core-y := alloc.o catas.o cmd.o cq.o eq.o fw.o icm.o intf.o main.o mcg.o \
+ mr.o pd.o port.o profile.o qp.o reset.o sense.o srq.o
similarity index 100%
rename from drivers/net/mlx4/alloc.c
rename to drivers/shared/mlx4/alloc.c
similarity index 100%
rename from drivers/net/mlx4/catas.c
rename to drivers/shared/mlx4/catas.c
similarity index 99%
rename from drivers/net/mlx4/cmd.c
rename to drivers/shared/mlx4/cmd.c
@@ -36,7 +36,7 @@
#include <linux/pci.h>
#include <linux/errno.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include <asm/io.h>
similarity index 99%
rename from drivers/net/mlx4/cq.c
rename to drivers/shared/mlx4/cq.c
@@ -37,8 +37,8 @@
#include <linux/init.h>
#include <linux/hardirq.h>
-#include <linux/mlx4/cmd.h>
-#include <linux/mlx4/cq.h>
+#include <drivers/mlx4/cmd.h>
+#include <drivers/mlx4/cq.h>
#include "mlx4.h"
#include "icm.h"
similarity index 99%
rename from drivers/net/mlx4/eq.c
rename to drivers/shared/mlx4/eq.c
@@ -36,7 +36,7 @@
#include <linux/mm.h>
#include <linux/dma-mapping.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4.h"
#include "fw.h"
similarity index 99%
rename from drivers/net/mlx4/fw.c
rename to drivers/shared/mlx4/fw.c
@@ -32,7 +32,7 @@
* SOFTWARE.
*/
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "fw.h"
#include "icm.h"
similarity index 100%
rename from drivers/net/mlx4/fw.h
rename to drivers/shared/mlx4/fw.h
similarity index 99%
rename from drivers/net/mlx4/icm.c
rename to drivers/shared/mlx4/icm.c
@@ -36,7 +36,7 @@
#include <linux/mm.h>
#include <linux/scatterlist.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4.h"
#include "icm.h"
similarity index 100%
rename from drivers/net/mlx4/icm.h
rename to drivers/shared/mlx4/icm.h
similarity index 100%
rename from drivers/net/mlx4/intf.c
rename to drivers/shared/mlx4/intf.c
similarity index 99%
rename from drivers/net/mlx4/main.c
rename to drivers/shared/mlx4/main.c
@@ -39,8 +39,8 @@
#include <linux/pci.h>
#include <linux/dma-mapping.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/doorbell.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/doorbell.h>
#include "mlx4.h"
#include "fw.h"
similarity index 99%
rename from drivers/net/mlx4/mcg.c
rename to drivers/shared/mlx4/mcg.c
@@ -35,7 +35,7 @@
#include <linux/string.h>
#include <linux/slab.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4.h"
similarity index 99%
rename from drivers/net/mlx4/mlx4.h
rename to drivers/shared/mlx4/mlx4.h
@@ -42,9 +42,9 @@
#include <linux/timer.h>
#include <linux/workqueue.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/driver.h>
-#include <linux/mlx4/doorbell.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/driver.h>
+#include <drivers/mlx4/doorbell.h>
#define DRV_NAME "mlx4_core"
#define PFX DRV_NAME ": "
similarity index 99%
rename from drivers/net/mlx4/mr.c
rename to drivers/shared/mlx4/mr.c
@@ -35,7 +35,7 @@
#include <linux/init.h>
#include <linux/errno.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4.h"
#include "icm.h"
similarity index 100%
rename from drivers/net/mlx4/pd.c
rename to drivers/shared/mlx4/pd.c
similarity index 99%
rename from drivers/net/mlx4/port.c
rename to drivers/shared/mlx4/port.c
@@ -33,7 +33,7 @@
#include <linux/errno.h>
#include <linux/if_ether.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4.h"
similarity index 100%
rename from drivers/net/mlx4/profile.c
rename to drivers/shared/mlx4/profile.c
similarity index 99%
rename from drivers/net/mlx4/qp.c
rename to drivers/shared/mlx4/qp.c
@@ -35,8 +35,8 @@
#include <linux/init.h>
-#include <linux/mlx4/cmd.h>
-#include <linux/mlx4/qp.h>
+#include <drivers/mlx4/cmd.h>
+#include <drivers/mlx4/qp.h>
#include "mlx4.h"
#include "icm.h"
similarity index 100%
rename from drivers/net/mlx4/reset.c
rename to drivers/shared/mlx4/reset.c
similarity index 99%
rename from drivers/net/mlx4/sense.c
rename to drivers/shared/mlx4/sense.c
@@ -34,7 +34,7 @@
#include <linux/errno.h>
#include <linux/if_ether.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4.h"
similarity index 99%
rename from drivers/net/mlx4/srq.c
rename to drivers/shared/mlx4/srq.c
@@ -33,7 +33,7 @@
#include <linux/init.h>
-#include <linux/mlx4/cmd.h>
+#include <drivers/mlx4/cmd.h>
#include "mlx4.h"
#include "icm.h"
similarity index 100%
rename from include/linux/mlx4/cmd.h
rename to include/drivers/mlx4/cmd.h
similarity index 98%
rename from include/linux/mlx4/cq.h
rename to include/drivers/mlx4/cq.h
@@ -35,8 +35,8 @@
#include <linux/types.h>
-#include <linux/mlx4/device.h>
-#include <linux/mlx4/doorbell.h>
+#include <drivers/mlx4/device.h>
+#include <drivers/mlx4/doorbell.h>
struct mlx4_cqe {
__be32 vlan_my_qpn;
similarity index 100%
rename from include/linux/mlx4/device.h
rename to include/drivers/mlx4/device.h
similarity index 100%
rename from include/linux/mlx4/doorbell.h
rename to include/drivers/mlx4/doorbell.h
similarity index 100%
rename from include/linux/mlx4/driver.h
rename to include/drivers/mlx4/driver.h
similarity index 99%
rename from include/linux/mlx4/qp.h
rename to include/drivers/mlx4/qp.h
@@ -35,7 +35,7 @@
#include <linux/types.h>
-#include <linux/mlx4/device.h>
+#include <drivers/mlx4/device.h>
#define MLX4_INVALID_LKEY 0x100