From patchwork Thu Jun 25 16:38:03 2009 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland Dreier X-Patchwork-Id: 29180 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@bilbo.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from ozlabs.org (ozlabs.org [203.10.76.45]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mx.ozlabs.org", Issuer "CA Cert Signing Authority" (verified OK)) by bilbo.ozlabs.org (Postfix) with ESMTPS id 2E573B707D for ; Fri, 26 Jun 2009 02:38:26 +1000 (EST) Received: by ozlabs.org (Postfix) id 1E398DDD0B; Fri, 26 Jun 2009 02:38:26 +1000 (EST) Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.176.167]) by ozlabs.org (Postfix) with ESMTP id 2BFD4DDD01 for ; Fri, 26 Jun 2009 02:38:25 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751411AbZFYQiG (ORCPT ); Thu, 25 Jun 2009 12:38:06 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751663AbZFYQiF (ORCPT ); Thu, 25 Jun 2009 12:38:05 -0400 Received: from sj-iport-6.cisco.com ([171.71.176.117]:45512 "EHLO sj-iport-6.cisco.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750964AbZFYQiB (ORCPT ); Thu, 25 Jun 2009 12:38:01 -0400 X-IronPort-AV: E=Sophos;i="4.42,291,1243814400"; d="scan'208";a="331733659" Received: from sj-dkim-1.cisco.com ([171.71.179.21]) by sj-iport-6.cisco.com with ESMTP; 25 Jun 2009 16:38:04 +0000 Received: from sj-core-2.cisco.com (sj-core-2.cisco.com [171.71.177.254]) by sj-dkim-1.cisco.com (8.12.11/8.12.11) with ESMTP id n5PGc4O7004166; Thu, 25 Jun 2009 09:38:04 -0700 Received: from xbh-sjc-221.amer.cisco.com (xbh-sjc-221.cisco.com [128.107.191.63]) by sj-core-2.cisco.com (8.13.8/8.14.3) with ESMTP id n5PGc4wI010772; Thu, 25 Jun 2009 16:38:04 GMT Received: from xfe-sjc-211.amer.cisco.com ([171.70.151.174]) by xbh-sjc-221.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 25 Jun 2009 09:38:04 -0700 Received: from roland-conroe ([10.33.42.9]) by xfe-sjc-211.amer.cisco.com with Microsoft SMTPSVC(6.0.3790.3959); Thu, 25 Jun 2009 09:38:03 -0700 Received: by roland-conroe (Postfix, from userid 33217) id 9A36BE71D7; Thu, 25 Jun 2009 09:38:03 -0700 (PDT) From: Roland Dreier To: Joe Eykholt Cc: Mike Christie , Scott Feldman , Hannes Reinecke , James.Bottomley@HansenPartnership.com, davem@davemloft.net, gospo@redhat.com, abjoglek@cisco.com, netdev@vger.kernel.org, linux-scsi@vger.kernel.org Subject: Re: [PATCH] Consolidate shared code between enic and fnic drivers. References: <4A3A7D4B.5050204@cs.wisc.edu> <4A416B02.2040607@cisco.com> X-Message-Flag: Warning: May contain useful information Date: Thu, 25 Jun 2009 09:38:03 -0700 In-Reply-To: <4A416B02.2040607@cisco.com> (Joe Eykholt's message of "Tue, 23 Jun 2009 16:53:38 -0700") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.91 (gnu/linux) MIME-Version: 1.0 X-OriginalArrivalTime: 25 Jun 2009 16:38:03.0878 (UTC) FILETIME=[4F842060:01C9F5B3] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; l=24497; t=1245947884; x=1246811884; c=relaxed/simple; s=sjdkim1004; h=Content-Type:From:Subject:Content-Transfer-Encoding:MIME-Version; d=cisco.com; i=rdreier@cisco.com; z=From:=20Roland=20Dreier=20 |Subject:=20Re=3A=20[PATCH]=20Consolidate=20shared=20code=2 0between=20enic=20and=20fnic=20drivers. |Sender:=20; bh=LBSJTqCXILY2BUleDX0qyTmynK16DqMgsgnTBuPum/g=; b=ZmSHT2xDQ25DU7kBs3a+QMzFmxpqptmOx2lmKRyrIJ5gB/9DlBFy41UBiz IPY6vSB42Bh9PslFNjF6vUNb6z4/0c8/yHUe1/TxKzi2cTeGl82RPiUzgPVm l/RgYbfOPfXun+octKYPv+Xkez7dBQDkyGALPe/l+bHyZIktruts4=; Authentication-Results: sj-dkim-1; header.From=rdreier@cisco.com; dkim=pass ( sig from cisco.com/sjdkim1004 verified; ); Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org > Or how about include/drivers/mlx4 and similarly for cisco_vnic > (but we're leaning towards cvnic)? > > include/drivers seems more like a generally useful subdirectory > with some meaning. include/shared leaves one guessing as to what > it might be. Makes sense... here's a first stab at a patch to move the mlx4_core module into drivers/shared and include/drivers (as a git patch, to make the renames not create thousands of lines of "delete one file, create the same contents somewhere else"). Comments welcome -- does this seem like something worth doing to people? NOT-Signed-off-by: Roland Dreier --- drivers/Kconfig | 2 + drivers/Makefile | 2 + drivers/infiniband/hw/mlx4/cq.c | 4 +- drivers/infiniband/hw/mlx4/mad.c | 2 +- drivers/infiniband/hw/mlx4/main.c | 4 +- drivers/infiniband/hw/mlx4/mlx4_ib.h | 4 +- drivers/infiniband/hw/mlx4/qp.c | 2 +- drivers/infiniband/hw/mlx4/srq.c | 4 +- drivers/net/Kconfig | 15 ------------ drivers/net/Makefile | 2 +- drivers/net/mlx4/Makefile | 5 ---- drivers/net/mlx4/en_cq.c | 6 ++-- drivers/net/mlx4/en_main.c | 6 ++-- drivers/net/mlx4/en_netdev.c | 8 +++--- drivers/net/mlx4/en_port.c | 4 +- drivers/net/mlx4/en_resources.c | 2 +- drivers/net/mlx4/en_rx.c | 4 +- drivers/net/mlx4/en_tx.c | 4 +- drivers/net/mlx4/mlx4_en.h | 10 ++++---- drivers/shared/Kconfig | 34 ++++++++++++++++++++++++++++ drivers/shared/Makefile | 1 + drivers/shared/mlx4/Makefile | 4 +++ drivers/{net => shared}/mlx4/alloc.c | 0 drivers/{net => shared}/mlx4/catas.c | 0 drivers/{net => shared}/mlx4/cmd.c | 2 +- drivers/{net => shared}/mlx4/cq.c | 4 +- drivers/{net => shared}/mlx4/eq.c | 2 +- drivers/{net => shared}/mlx4/fw.c | 2 +- drivers/{net => shared}/mlx4/fw.h | 0 drivers/{net => shared}/mlx4/icm.c | 2 +- drivers/{net => shared}/mlx4/icm.h | 0 drivers/{net => shared}/mlx4/intf.c | 0 drivers/{net => shared}/mlx4/main.c | 4 +- drivers/{net => shared}/mlx4/mcg.c | 2 +- drivers/{net => shared}/mlx4/mlx4.h | 6 ++-- drivers/{net => shared}/mlx4/mr.c | 2 +- drivers/{net => shared}/mlx4/pd.c | 0 drivers/{net => shared}/mlx4/port.c | 2 +- drivers/{net => shared}/mlx4/profile.c | 0 drivers/{net => shared}/mlx4/qp.c | 4 +- drivers/{net => shared}/mlx4/reset.c | 0 drivers/{net => shared}/mlx4/sense.c | 2 +- drivers/{net => shared}/mlx4/srq.c | 2 +- include/{linux => drivers}/mlx4/cmd.h | 0 include/{linux => drivers}/mlx4/cq.h | 4 +- include/{linux => drivers}/mlx4/device.h | 0 include/{linux => drivers}/mlx4/doorbell.h | 0 include/{linux => drivers}/mlx4/driver.h | 0 include/{linux => drivers}/mlx4/qp.h | 2 +- include/{linux => drivers}/mlx4/srq.h | 0 50 files changed, 97 insertions(+), 74 deletions(-) create mode 100644 drivers/shared/Kconfig create mode 100644 drivers/shared/Makefile create mode 100644 drivers/shared/mlx4/Makefile rename drivers/{net => shared}/mlx4/alloc.c (100%) rename drivers/{net => shared}/mlx4/catas.c (100%) rename drivers/{net => shared}/mlx4/cmd.c (99%) rename drivers/{net => shared}/mlx4/cq.c (99%) rename drivers/{net => shared}/mlx4/eq.c (99%) rename drivers/{net => shared}/mlx4/fw.c (99%) rename drivers/{net => shared}/mlx4/fw.h (100%) rename drivers/{net => shared}/mlx4/icm.c (99%) rename drivers/{net => shared}/mlx4/icm.h (100%) rename drivers/{net => shared}/mlx4/intf.c (100%) rename drivers/{net => shared}/mlx4/main.c (99%) rename drivers/{net => shared}/mlx4/mcg.c (99%) rename drivers/{net => shared}/mlx4/mlx4.h (99%) rename drivers/{net => shared}/mlx4/mr.c (99%) rename drivers/{net => shared}/mlx4/pd.c (100%) rename drivers/{net => shared}/mlx4/port.c (99%) rename drivers/{net => shared}/mlx4/profile.c (100%) rename drivers/{net => shared}/mlx4/qp.c (99%) rename drivers/{net => shared}/mlx4/reset.c (100%) rename drivers/{net => shared}/mlx4/sense.c (99%) rename drivers/{net => shared}/mlx4/srq.c (99%) rename include/{linux => drivers}/mlx4/cmd.h (100%) rename include/{linux => drivers}/mlx4/cq.h (98%) rename include/{linux => drivers}/mlx4/device.h (100%) rename include/{linux => drivers}/mlx4/doorbell.h (100%) rename include/{linux => drivers}/mlx4/driver.h (100%) rename include/{linux => drivers}/mlx4/qp.h (99%) rename include/{linux => drivers}/mlx4/srq.h (100%) diff --git a/include/linux/mlx4/srq.h b/include/drivers/mlx4/srq.h similarity index 100% rename from include/linux/mlx4/srq.h rename to include/drivers/mlx4/srq.h diff --git a/drivers/Kconfig b/drivers/Kconfig index 48bbdbe..b88b3bf 100644 --- a/drivers/Kconfig +++ b/drivers/Kconfig @@ -113,4 +113,6 @@ source "drivers/xen/Kconfig" source "drivers/staging/Kconfig" source "drivers/platform/Kconfig" + +source "drivers/shared/Kconfig" endmenu diff --git a/drivers/Makefile b/drivers/Makefile index bc4205d..15e9ceb 100644 --- a/drivers/Makefile +++ b/drivers/Makefile @@ -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/ diff --git a/drivers/infiniband/hw/mlx4/cq.c b/drivers/infiniband/hw/mlx4/cq.c index de5263b..6df07ce 100644 --- a/drivers/infiniband/hw/mlx4/cq.c +++ b/drivers/infiniband/hw/mlx4/cq.c @@ -31,8 +31,8 @@ * SOFTWARE. */ -#include -#include +#include +#include #include "mlx4_ib.h" #include "user.h" diff --git a/drivers/infiniband/hw/mlx4/mad.c b/drivers/infiniband/hw/mlx4/mad.c index 19e68ab..5699a02 100644 --- a/drivers/infiniband/hw/mlx4/mad.c +++ b/drivers/infiniband/hw/mlx4/mad.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include "mlx4_ib.h" diff --git a/drivers/infiniband/hw/mlx4/main.c b/drivers/infiniband/hw/mlx4/main.c index ae3d759..ed5c018 100644 --- a/drivers/infiniband/hw/mlx4/main.c +++ b/drivers/infiniband/hw/mlx4/main.c @@ -38,8 +38,8 @@ #include #include -#include -#include +#include +#include #include "mlx4_ib.h" #include "user.h" diff --git a/drivers/infiniband/hw/mlx4/mlx4_ib.h b/drivers/infiniband/hw/mlx4/mlx4_ib.h index 8a7dd67..d853527 100644 --- a/drivers/infiniband/hw/mlx4/mlx4_ib.h +++ b/drivers/infiniband/hw/mlx4/mlx4_ib.h @@ -41,8 +41,8 @@ #include #include -#include -#include +#include +#include struct mlx4_ib_ucontext { struct ib_ucontext ibucontext; diff --git a/drivers/infiniband/hw/mlx4/qp.c b/drivers/infiniband/hw/mlx4/qp.c index c4a0264..2523194 100644 --- a/drivers/infiniband/hw/mlx4/qp.c +++ b/drivers/infiniband/hw/mlx4/qp.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "mlx4_ib.h" #include "user.h" diff --git a/drivers/infiniband/hw/mlx4/srq.c b/drivers/infiniband/hw/mlx4/srq.c index d425652..9ac59e9 100644 --- a/drivers/infiniband/hw/mlx4/srq.c +++ b/drivers/infiniband/hw/mlx4/srq.c @@ -31,8 +31,8 @@ * SOFTWARE. */ -#include -#include +#include +#include #include "mlx4_ib.h" #include "user.h" diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index c155bd3..cb99ed9 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig @@ -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 diff --git a/drivers/net/Makefile b/drivers/net/Makefile index 4b58a59..a97f8be 100644 --- a/drivers/net/Makefile +++ b/drivers/net/Makefile @@ -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 diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index 1fd068e..b699e36 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -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 \ diff --git a/drivers/net/mlx4/en_cq.c b/drivers/net/mlx4/en_cq.c index 21786ad..4031782 100644 --- a/drivers/net/mlx4/en_cq.c +++ b/drivers/net/mlx4/en_cq.c @@ -31,9 +31,9 @@ * */ -#include -#include -#include +#include +#include +#include #include "mlx4_en.h" diff --git a/drivers/net/mlx4/en_main.c b/drivers/net/mlx4/en_main.c index 9ed4a15..181535b 100644 --- a/drivers/net/mlx4/en_main.c +++ b/drivers/net/mlx4/en_main.c @@ -36,9 +36,9 @@ #include #include -#include -#include -#include +#include +#include +#include #include "mlx4_en.h" diff --git a/drivers/net/mlx4/en_netdev.c b/drivers/net/mlx4/en_netdev.c index 93f4abd..e0d3be0 100644 --- a/drivers/net/mlx4/en_netdev.c +++ b/drivers/net/mlx4/en_netdev.c @@ -36,10 +36,10 @@ #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include "mlx4_en.h" #include "en_port.h" diff --git a/drivers/net/mlx4/en_port.c b/drivers/net/mlx4/en_port.c index a29abe8..07aa02d 100644 --- a/drivers/net/mlx4/en_port.c +++ b/drivers/net/mlx4/en_port.c @@ -34,8 +34,8 @@ #include -#include -#include +#include +#include #include "en_port.h" #include "mlx4_en.h" diff --git a/drivers/net/mlx4/en_resources.c b/drivers/net/mlx4/en_resources.c index 65ca706..8c5d6ff 100644 --- a/drivers/net/mlx4/en_resources.c +++ b/drivers/net/mlx4/en_resources.c @@ -32,7 +32,7 @@ */ #include -#include +#include #include "mlx4_en.h" diff --git a/drivers/net/mlx4/en_rx.c b/drivers/net/mlx4/en_rx.c index 91bdfdf..705f8ab 100644 --- a/drivers/net/mlx4/en_rx.c +++ b/drivers/net/mlx4/en_rx.c @@ -31,8 +31,8 @@ * */ -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/mlx4/en_tx.c b/drivers/net/mlx4/en_tx.c index 08c43f2..ce56a87 100644 --- a/drivers/net/mlx4/en_tx.c +++ b/drivers/net/mlx4/en_tx.c @@ -32,8 +32,8 @@ */ #include -#include -#include +#include +#include #include #include #include diff --git a/drivers/net/mlx4/mlx4_en.h b/drivers/net/mlx4/mlx4_en.h index c7c5e86..349a634 100644 --- a/drivers/net/mlx4/mlx4_en.h +++ b/drivers/net/mlx4/mlx4_en.h @@ -40,11 +40,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "en_port.h" diff --git a/drivers/shared/Kconfig b/drivers/shared/Kconfig new file mode 100644 index 0000000..5e6ea3c --- /dev/null +++ b/drivers/shared/Kconfig @@ -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). diff --git a/drivers/shared/Makefile b/drivers/shared/Makefile new file mode 100644 index 0000000..42c840e --- /dev/null +++ b/drivers/shared/Makefile @@ -0,0 +1 @@ +obj-$(CONFIG_MLX4_CORE) += mlx4/ diff --git a/drivers/shared/mlx4/Makefile b/drivers/shared/mlx4/Makefile new file mode 100644 index 0000000..bdae863 --- /dev/null +++ b/drivers/shared/mlx4/Makefile @@ -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 diff --git a/drivers/net/mlx4/alloc.c b/drivers/shared/mlx4/alloc.c similarity index 100% rename from drivers/net/mlx4/alloc.c rename to drivers/shared/mlx4/alloc.c diff --git a/drivers/net/mlx4/catas.c b/drivers/shared/mlx4/catas.c similarity index 100% rename from drivers/net/mlx4/catas.c rename to drivers/shared/mlx4/catas.c diff --git a/drivers/net/mlx4/cmd.c b/drivers/shared/mlx4/cmd.c similarity index 99% rename from drivers/net/mlx4/cmd.c rename to drivers/shared/mlx4/cmd.c index 2845a05..5d9342d 100644 --- a/drivers/net/mlx4/cmd.c +++ b/drivers/shared/mlx4/cmd.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include diff --git a/drivers/net/mlx4/cq.c b/drivers/shared/mlx4/cq.c similarity index 99% rename from drivers/net/mlx4/cq.c rename to drivers/shared/mlx4/cq.c index ac57b6a..07313cb 100644 --- a/drivers/net/mlx4/cq.c +++ b/drivers/shared/mlx4/cq.c @@ -37,8 +37,8 @@ #include #include -#include -#include +#include +#include #include "mlx4.h" #include "icm.h" diff --git a/drivers/net/mlx4/eq.c b/drivers/shared/mlx4/eq.c similarity index 99% rename from drivers/net/mlx4/eq.c rename to drivers/shared/mlx4/eq.c index b9ceddd..828fccd 100644 --- a/drivers/net/mlx4/eq.c +++ b/drivers/shared/mlx4/eq.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "mlx4.h" #include "fw.h" diff --git a/drivers/net/mlx4/fw.c b/drivers/shared/mlx4/fw.c similarity index 99% rename from drivers/net/mlx4/fw.c rename to drivers/shared/mlx4/fw.c index cee199c..c967f46 100644 --- a/drivers/net/mlx4/fw.c +++ b/drivers/shared/mlx4/fw.c @@ -32,7 +32,7 @@ * SOFTWARE. */ -#include +#include #include "fw.h" #include "icm.h" diff --git a/drivers/net/mlx4/fw.h b/drivers/shared/mlx4/fw.h similarity index 100% rename from drivers/net/mlx4/fw.h rename to drivers/shared/mlx4/fw.h diff --git a/drivers/net/mlx4/icm.c b/drivers/shared/mlx4/icm.c similarity index 99% rename from drivers/net/mlx4/icm.c rename to drivers/shared/mlx4/icm.c index baf4bf6..1e7dcc0 100644 --- a/drivers/net/mlx4/icm.c +++ b/drivers/shared/mlx4/icm.c @@ -36,7 +36,7 @@ #include #include -#include +#include #include "mlx4.h" #include "icm.h" diff --git a/drivers/net/mlx4/icm.h b/drivers/shared/mlx4/icm.h similarity index 100% rename from drivers/net/mlx4/icm.h rename to drivers/shared/mlx4/icm.h diff --git a/drivers/net/mlx4/intf.c b/drivers/shared/mlx4/intf.c similarity index 100% rename from drivers/net/mlx4/intf.c rename to drivers/shared/mlx4/intf.c diff --git a/drivers/net/mlx4/main.c b/drivers/shared/mlx4/main.c similarity index 99% rename from drivers/net/mlx4/main.c rename to drivers/shared/mlx4/main.c index 018348c..c37340c 100644 --- a/drivers/net/mlx4/main.c +++ b/drivers/shared/mlx4/main.c @@ -39,8 +39,8 @@ #include #include -#include -#include +#include +#include #include "mlx4.h" #include "fw.h" diff --git a/drivers/net/mlx4/mcg.c b/drivers/shared/mlx4/mcg.c similarity index 99% rename from drivers/net/mlx4/mcg.c rename to drivers/shared/mlx4/mcg.c index 6053c35..d8cf9f5 100644 --- a/drivers/net/mlx4/mcg.c +++ b/drivers/shared/mlx4/mcg.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include "mlx4.h" diff --git a/drivers/net/mlx4/mlx4.h b/drivers/shared/mlx4/mlx4.h similarity index 99% rename from drivers/net/mlx4/mlx4.h rename to drivers/shared/mlx4/mlx4.h index 5bd79c2..64c7c82 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/shared/mlx4/mlx4.h @@ -42,9 +42,9 @@ #include #include -#include -#include -#include +#include +#include +#include #define DRV_NAME "mlx4_core" #define PFX DRV_NAME ": " diff --git a/drivers/net/mlx4/mr.c b/drivers/shared/mlx4/mr.c similarity index 99% rename from drivers/net/mlx4/mr.c rename to drivers/shared/mlx4/mr.c index f96948b..9a7e799 100644 --- a/drivers/net/mlx4/mr.c +++ b/drivers/shared/mlx4/mr.c @@ -35,7 +35,7 @@ #include #include -#include +#include #include "mlx4.h" #include "icm.h" diff --git a/drivers/net/mlx4/pd.c b/drivers/shared/mlx4/pd.c similarity index 100% rename from drivers/net/mlx4/pd.c rename to drivers/shared/mlx4/pd.c diff --git a/drivers/net/mlx4/port.c b/drivers/shared/mlx4/port.c similarity index 99% rename from drivers/net/mlx4/port.c rename to drivers/shared/mlx4/port.c index 606aa58..260c87d 100644 --- a/drivers/net/mlx4/port.c +++ b/drivers/shared/mlx4/port.c @@ -33,7 +33,7 @@ #include #include -#include +#include #include "mlx4.h" diff --git a/drivers/net/mlx4/profile.c b/drivers/shared/mlx4/profile.c similarity index 100% rename from drivers/net/mlx4/profile.c rename to drivers/shared/mlx4/profile.c diff --git a/drivers/net/mlx4/qp.c b/drivers/shared/mlx4/qp.c similarity index 99% rename from drivers/net/mlx4/qp.c rename to drivers/shared/mlx4/qp.c index 1c565ef..4595047 100644 --- a/drivers/net/mlx4/qp.c +++ b/drivers/shared/mlx4/qp.c @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include #include "mlx4.h" #include "icm.h" diff --git a/drivers/net/mlx4/reset.c b/drivers/shared/mlx4/reset.c similarity index 100% rename from drivers/net/mlx4/reset.c rename to drivers/shared/mlx4/reset.c diff --git a/drivers/net/mlx4/sense.c b/drivers/shared/mlx4/sense.c similarity index 99% rename from drivers/net/mlx4/sense.c rename to drivers/shared/mlx4/sense.c index f36ae69..03638fd 100644 --- a/drivers/net/mlx4/sense.c +++ b/drivers/shared/mlx4/sense.c @@ -34,7 +34,7 @@ #include #include -#include +#include #include "mlx4.h" diff --git a/drivers/net/mlx4/srq.c b/drivers/shared/mlx4/srq.c similarity index 99% rename from drivers/net/mlx4/srq.c rename to drivers/shared/mlx4/srq.c index fe9f218..898afab 100644 --- a/drivers/net/mlx4/srq.c +++ b/drivers/shared/mlx4/srq.c @@ -33,7 +33,7 @@ #include -#include +#include #include "mlx4.h" #include "icm.h" diff --git a/include/linux/mlx4/cmd.h b/include/drivers/mlx4/cmd.h similarity index 100% rename from include/linux/mlx4/cmd.h rename to include/drivers/mlx4/cmd.h diff --git a/include/linux/mlx4/cq.h b/include/drivers/mlx4/cq.h similarity index 98% rename from include/linux/mlx4/cq.h rename to include/drivers/mlx4/cq.h index 6f65b2c..9883a89 100644 --- a/include/linux/mlx4/cq.h +++ b/include/drivers/mlx4/cq.h @@ -35,8 +35,8 @@ #include -#include -#include +#include +#include struct mlx4_cqe { __be32 vlan_my_qpn; diff --git a/include/linux/mlx4/device.h b/include/drivers/mlx4/device.h similarity index 100% rename from include/linux/mlx4/device.h rename to include/drivers/mlx4/device.h diff --git a/include/linux/mlx4/doorbell.h b/include/drivers/mlx4/doorbell.h similarity index 100% rename from include/linux/mlx4/doorbell.h rename to include/drivers/mlx4/doorbell.h diff --git a/include/linux/mlx4/driver.h b/include/drivers/mlx4/driver.h similarity index 100% rename from include/linux/mlx4/driver.h rename to include/drivers/mlx4/driver.h diff --git a/include/linux/mlx4/qp.h b/include/drivers/mlx4/qp.h similarity index 99% rename from include/linux/mlx4/qp.h rename to include/drivers/mlx4/qp.h index 9f29d86..30e40ac 100644 --- a/include/linux/mlx4/qp.h +++ b/include/drivers/mlx4/qp.h @@ -35,7 +35,7 @@ #include -#include +#include #define MLX4_INVALID_LKEY 0x100