ebcf596d89f9686308db768e527a22165831b473 |
|
27-Apr-2012 |
Linus Torvalds <torvalds@linux-foundation.org> |
Merge tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband Pull infiniband fixes from Roland Dreier: "A few fixes for regressions introduced in 3.4-rc1: - fix memory leak in mlx4 - fix two problems with new MAD response generation code" * tag 'ib-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband: IB/mlx4: Fix memory leaks in ib_link_query_port() IB/mad: Don't send response for failed MADs IB/mad: Set 'D' bit in response for unhandled MADs
|
bf6b47deb40f9fc8ddb4573373dc9614aab59d35 |
|
11-Apr-2012 |
Jesper Juhl <jj@chaosbits.net> |
IB/mlx4: Fix memory leaks in ib_link_query_port() If the call to mlx4_MAD_IFC() fails in ib_link_query_port() we will currently do 'return err;' which will leak 'in_mad' and 'out_mad'. We should instead do 'goto out;' where we'll properly free the memory we previously allocated. Signed-off-by: Jesper Juhl <jj@chaosbits.net> Acked-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
d2ef406866620f0450ad0b4c7fb5c2796c7bf245 |
|
02-Apr-2012 |
Or Gerlitz <ogerlitz@mellanox.com> |
IB/mlx4: Don't return an invalid speed when a port is down When the IB port is down, the active_speed value returned by the MAD_IFC command is seven (7) which isn't among the defined IB speeds in enum ib_port_speed, and this invalid speed value is passed up to higher layers or applications who do port query. Fix that by setting the speed to be SDR -- the lowest possible -- when the port is down. Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
42872c7a5ed8d3ed49f51cb783978ca50369c564 |
|
13-Mar-2012 |
Roland Dreier <roland@purestorage.com> |
Merge branches 'misc' and 'mlx4' into for-next Conflicts: drivers/infiniband/hw/mlx4/main.c drivers/net/ethernet/mellanox/mlx4/main.c include/linux/mlx4/device.h
|
a9c766bb75ee2caad2735e41784387784ffd87db |
|
11-Jan-2012 |
Or Gerlitz <ogerlitz@mellanox.com> |
IB/mlx4: Fix info returned when querying IBoE ports To issue a port query, use the QUERY_(Ethernet)_PORT command instead of the MAD_IFC command, since MAD_IFC attempts to query the firmware IB SMA, which is irrelevant for IBoE ports. This allows us to handle both 10Gb/s and 40Gb/s rates (e.g in sysfs), using QDR speed (10Gb/s) and width of 1X or 4X. Signed-off-by: Dotan Barak <dotanb@mellanox.com> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
8154c07fe14e387c5a7c7f2eb70534813634e45e |
|
06-Mar-2012 |
Or Gerlitz <ogerlitz@mellanox.com> |
mlx4_core: Get rid of redundant ext_port_cap flags While doing the work for commit a6f7feae6d ("IB/mlx4: pass SMP vendor-specific attribute MADs to firmware") we realized that the firmware would respond on all sorts of vendor-specific MADs. Therefore commit 97285b7817 ("mlx4_core: Add extended port capabilities support") adds redundant code into the driver, since there's no real reaon to maintain the extended capabilities of the port, as they can be queried on demand (e.g the FDR10 capability). This patch reverts commit 97285b7817 and removes the check for extended caps from the mlx4_ib driver port query flow. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
2e96691c31ecf749f48aa94ea837b95dd656f5c2 |
|
28-Feb-2012 |
Or Gerlitz <ogerlitz@mellanox.com> |
IB: Use central enum for speed instead of hard-coded values The kernel IB stack uses one enumeration for IB speed, which wasn't explicitly specified in the verbs header file. Add that enum, and use it all over the code. The IB speed/width notation is also used by iWARP and IBoE HW drivers, which use the convention of rate = speed * width to advertise their port link rate. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
a5bbe892da9441835cb6fece26d9bbd95fc820be |
|
09-Feb-2012 |
Eli Cohen <eli@dev.mellanox.co.il> |
mlx4: Enforce device max FMR maps in FMR alloc ConnectX devices have a limit on the number of mappings that can be done on an FMR before having to call sync_tpt. The current mlx4_ib driver reports the limit correctly in max_map_per_fmr in .query_device(), but mlx4_core doesn't check it when actually allocating FMRs. Add a max_fmr_maps field to struct mlx4_caps and enforce this maximum value on FMR allocations. Signed-off-by: Eli Cohen <eli@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
abb434cb0539fb355c1c921f8fd761efbbac3462 |
|
23-Dec-2011 |
David S. Miller <davem@davemloft.net> |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net Conflicts: net/bluetooth/l2cap_core.c Just two overlapping changes, one added an initialization of a local variable, and another change added a new local variable. Signed-off-by: David S. Miller <davem@davemloft.net>
|
8e59d254feb3826230d19fb643691c89eabd71f8 |
|
13-Dec-2011 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
mlx4_ib: disable SRIOV mode for IB ports (not yet supported) Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/infiniband/hw/mlx4/main.c
|
f9baff509f8a05a79626defdbdf4f4aa4efd373b |
|
13-Dec-2011 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
mlx4_core: Add "native" argument to mlx4_cmd and its callers (where needed) For SRIOV, some Hypervisor commands can be executed directly (native = 1). Others should go through the command wrapper flow (for tracking resource usage, for example, or for changing some HCA configurations that slaves need to be notified of). This patch sets the groundwork for this capability -- adding the correct value of "native" in each case. Note that if SRIOV is not activated, this parameter has no effect. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/infiniband/hw/mlx4/main.c
|
65dab25deb8da7dba4b6dd0145a9143be7f8369f |
|
13-Dec-2011 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
mlx4: Extanding port_mask functionality Port mask now has additional state. Port can be set as "none". In this case neither the mlx4_en or mlx4_ib drivers take ownership of the port. In multifunction mode there is an option to set the vfs as single ported devices. (in single function mode, both physical ports belong to same function) Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/infiniband/hw/mlx4/main.c
|
4af3ce0de0c12e5c17811eaefad36ab8e146c0fd |
|
06-Dec-2011 |
Roland Dreier <roland@purestorage.com> |
IB/mlx4: Fix shutdown crash accessing a non-existent bitmap Commit cfcde11c3d7a ("IB/mlx4: Use flow counters on IBoE ports") added code that sets elements of counters[] to -1 if no counter is allocated, but then goes ahead and passes every entry to mlx4_counter_free() on shutdown. This is a bad idea, especially if MLX4_DEV_CAP_FLAG_COUNTERS isn't set so there isn't even an underlying bitmap to free from. Tested-by: Sean Hefty <sean.hefty@intel.com> Cc: <stable@kernel.org> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
504255f8d0480cf293962adf4bc3aecac645ae71 |
|
01-Nov-2011 |
Roland Dreier <roland@purestorage.com> |
Merge branches 'amso1100', 'cma', 'cxgb3', 'cxgb4', 'fdr', 'ipath', 'ipoib', 'misc', 'mlx4', 'misc', 'nes', 'qib' and 'xrc' into for-next
|
bcacb897569f0e7aab7643b22567d8de22ef9dfc |
|
10-Oct-2011 |
Or Gerlitz <ogerlitz@mellanox.com> |
IB/mlx4: Enable 4K mtu for IBoE The IBoE port MTU is derived from the corresponding Ethernet netdevice MTU, which can support jumbo frames of 9K, and hence surely supports the max IB mtu of 4K. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
a5e12dff757b562bbecd6a2359fdc4c43d4d97de |
|
03-Oct-2011 |
Marcel Apfelbaum <marcela@dev.mellanox.co.il> |
IB/mlx4: Configure extended active speeds Set the extended active speeds based on the hardware configuration. Signed-off-by: Marcel Apfelbaum <marcela@dev.mellanox.co.il> Reviewed-by: Hal Rosenstock <hal@mellanox.com> [ Move FDR-10 handling into ib_link_query_port(). - Roland ] Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
42849b2697c36abdafa6aef64186b15055392046 |
|
11-Aug-2011 |
Sean Hefty <sean.hefty@intel.com> |
RDMA/uverbs: Export ib_open_qp() capability to user space Allow processes that share the same XRC domain to open an existing shareable QP. This permits those processes to receive events on the shared QP and transfer ownership, so that any process may modify the QP. The latter allows the creating process to exit, while a remaining process can still transition it for path migration purposes. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
0a1405da9952a72dd587829a3321695adde7dca1 |
|
02-Jun-2011 |
Sean Hefty <sean.hefty@intel.com> |
IB/mlx4: Add support for XRC QPs Support the creation of XRC INI and TGT QPs. To handle the case where a CQ or PD is not provided, we allocate them internally with the xrcd. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
18abd5ea571608a7c726fc56e21d3e31f9febfd0 |
|
02-Jun-2011 |
Sean Hefty <sean.hefty@intel.com> |
IB/mlx4: Add support for XRC SRQs Allow the user to create XRC SRQs. This patch is based on a patch from Jack Morgenstrein <jackm@dev.mellanox.co.il>. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
012a8ff577f95211c6ffd3b77a94c34ebae009b6 |
|
02-Jun-2011 |
Sean Hefty <sean.hefty@intel.com> |
IB/mlx4: Add support for XRC domains Support creating and destroying XRC domains. Any sharing of the XRCD is managed above the low-level driver. Signed-off-by: Sean Hefty <sean.hefty@intel.com> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
cfcde11c3d7ae175f49280bb6f913478c2f1bd8c |
|
15-Jun-2011 |
Or Gerlitz <ogerlitz@mellanox.com> |
IB/mlx4: Use flow counters on IBoE ports Allocate flow counter per Ethernet/IBoE port, and attach this counter to all the QPs created on that port. Based on patch by Eli Cohen <eli@mellanox.co.il>. Signed-off-by: Or Gerlitz <ogerlitz@mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
6451c712fef3b13bb3fc5a41adadc539e0d06a42 |
|
15-Jun-2011 |
Or Gerlitz <ogerlitz@mellanox.com> |
IB/mlx4: Generate GID change events in IBoE code IBoE doesn't use LIDs. Use the GID change event to update the IB core cache for addition/deletion of GIDs. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Or Gerlitz <ogerlitz@mellanox.co.il> Signed-off-by: Roland Dreier <roland@purestorage.com>
/drivers/infiniband/hw/mlx4/main.c
|
0345584e0b8be3735a950d17c7e463db20c6ce27 |
|
22-Mar-2011 |
Yevgeny Petrilin <yevgenyp@mellanox.co.il> |
mlx4: generalization of multicast steering. The same packet steering mechanism would be used both for IB and Ethernet, Both multicasts and unicasts. This commit prepares the general infrastructure for this. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/infiniband/hw/mlx4/main.c
|
725c89997e03d71b09ea3c17c997da0712b9d835 |
|
22-Mar-2011 |
Yevgeny Petrilin <yevgenyp@mellanox.co.il> |
mlx4_en: Reporting HW revision in ethtool -i HW revision is derived from device ID and rev id. Signed-off-by: Eugenia Emantayev <eugenia@mellanox.co.il> Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/infiniband/hw/mlx4/main.c
|
da995a8aee044bc5d0847e19e351cd48a2cb8bcc |
|
02-Dec-2010 |
Aleksey Senin <alex@senin.name> |
IB/mlx4: Handle protocol field in multicast table The newest device firmware stores IB vs. Ethernet protocol in two bits in members_count field of multicast group table (0: Infiniband, 1: Ethernet). When changing the QP members count for a multicast group, it important not to reset this information. When calling multicast attach first time, the protocol type should be specified. In this patch we always set it IB, but in the future we will handle Ethernet too. When looking for a QP, the protocol type shoud be checked too. Signed-off-by: Aleksey Senin <alekseys@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
4979d18fe105297f8f065743f31f8f735da8df2d |
|
12-Jan-2011 |
Roland Dreier <rolandd@cisco.com> |
mlx4_{core, ib, en}: Fix driver when sizeof (phys_addr_t) > sizeof (long) Some systems have PCI addresses that don't fit in unsigned long (eg some 32-bit PowerPC 440 systems have 36-bit bus addresses). Fix up mlx4 drivers by using phys_addr_t where appropriate, so we don't truncate any PCI resource addresses before ioremapping them. Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
17f7f4d9fcce8f1b75b5f735569309dee7665968 |
|
27-Dec-2010 |
David S. Miller <davem@davemloft.net> |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6 Conflicts: net/ipv4/fib_frontend.c
|
21d606090ec1aacc998276f5af34c43a88f01218 |
|
11-Nov-2010 |
Eli Cohen <eli@dev.mellanox.co.il> |
IB/mlx4: Fix IBoE link state Use netif_running() and netif_carrier_ok() to report link state, exactly as is done to report Ethernet link state in sysfs. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
328266c561153a0c19084088d5dacd40632dc7ae |
|
15-Nov-2010 |
Eli Cohen <eli@dev.mellanox.co.il> |
IB/mlx4: Fix IBoE reported link rate The link rate is the product of the link speed in the link width. For Etherent ports the rate is 10G, so we use 1 for the width and 4 for speed to get the correct rate. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
22f4fbd9bd283ef85126e511171932a4af703776 |
|
24-Nov-2010 |
Eric Dumazet <eric.dumazet@gmail.com> |
infiniband: remove dev_base_lock use dev_base_lock is the legacy way to lock the device list, and is planned to disappear. (writers hold RTNL, readers hold RCU lock) Convert rdma_translate_ip() and update_ipv6_gids() to RCU locking. Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Acked-by: Roland Dreier <rolandd@cisco.com> Signed-off-by: David S. Miller <davem@davemloft.net>
/drivers/infiniband/hw/mlx4/main.c
|
116e9535fe5e00bafab7a637f306b110cf95cff5 |
|
27-Oct-2010 |
Roland Dreier <rolandd@cisco.com> |
Merge branches 'amso1100', 'cma', 'cxgb3', 'cxgb4', 'ehca', 'iboe', 'ipoib', 'misc', 'mlx4', 'nes', 'qib' and 'srp' into for-next
|
4c3eb3ca13966508bcb64f39dcdef48be22f1731 |
|
26-Aug-2010 |
Eli Cohen <eli@dev.mellanox.co.il> |
IB/mlx4: Add VLAN support for IBoE This patch allows IBoE traffic to be encapsulated in 802.1Q tagged VLAN frames. The VLAN tag is encoded in the GID and derived from it by a simple computation. The netdev notifier callback is modified to catch VLAN device addition/removal and the port's GID table is updated to reflect the change, so that for each netdevice there is an entry in the GID table. When the port's GID table is exhausted, GID entries will not be added. Only children of the main interfaces can add to the GID table; if a VLAN interface is added on another VLAN interface (e.g. "vconfig add eth2.6 8"), then that interfaces will not add an entry to the GID table. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
fa417f7b520ee60b39f7e23528d2030af30a07d1 |
|
25-Oct-2010 |
Eli Cohen <eli@mellanox.co.il> |
IB/mlx4: Add support for IBoE Add support for IBoE to mlx4_ib. The bulk of the code is handling the new address vector fields; mlx4 needs the MAC address of a remote node to include it in a WQE (for datagrams) or in the QP context (for connected QPs). Address resolution is done by assuming all unicast GIDs are either link-local IPv6 addresses. Multicast group attach/detach needs to update the NIC's multicast filters; but since attaching a QP to a multicast group can be done before the QP is bound to a port, for IBoE we need to keep track of all multicast groups that a QP is attached too before it transitions from INIT to RTR (since it does not have a port in the INIT state). Signed-off-by: Eli Cohen <eli@mellanox.co.il> [ Many things cleaned up and otherwise monkeyed with; hope I didn't introduce too many bugs. - Roland ] Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
d0d68b8693bd16bfbbc93b89f1d9f3351723307c |
|
04-Oct-2010 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Signal node desc changes to SM by using FW to generate trap 144 The Node Description cannot be changed via MADs (it is read-only). Until now, it was changed in the driver via sysfs, and the new Node Description was simply inserted by the driver into MAD responses (replacing the description returned by FW). System startup scripts use the sysfs interface to change the node description at driver startup to show the hostname, etc. However, this has a race condition: the SM could discover the original FW node description rather than the system-specific description if it queried the port before the startup scripts finish running. For mlx4, we fix this with a new FW command (SET_NODE) that allows passing the new node description to FW. When this command is invoked, FW sends a trap 144 to the SM. When it gets this trap, the SM can query the node to obtain the new node description -- thus eliminating the effects of the race. This patch simply calls SET_NODE command when a new node description is entered via sysfs (thus causing trap 144 to be issued by the FW). We ignore all failures of the SET_NODE command (including those caused by using a device FW that predates the SET_NODE command), since in that case things work just as before. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
5a0fd09428e47fb08d5a887515d92bb2447f4b65 |
|
07-Oct-2010 |
Eli Cohen <eli@dev.mellanox.co.il> |
IB/mlx4: Limit size of fast registration WRs Fix the limit on the size of max fast registration WRs that can be posted to match hardware capabilities. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
9a6edb60ec10d86b1025a0cdad68fd89f1ddaf02 |
|
07-May-2010 |
Ralph Campbell <ralph.campbell@qlogic.com> |
IB/core: Allow device-specific per-port sysfs files Add a new parameter to ib_register_device() so that low-level device drivers can pass in a pointer to a callback function that will be called for each port that is registered in sysfs. This allows low-level device drivers to create files in /sys/class/infiniband/<hca>/ports/<N>/ without having to poke through the internals of the RDMA sysfs handling. There is no need for an unregister function since the kobject reference will go to zero when ib_unregister_device() is called. Signed-off-by: Ralph Campbell <ralph.campbell@qlogic.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
6fa8f719844b8455033e295f720e739c1dc3804a |
|
14-Apr-2010 |
Vladimir Sokolovsky <vlad@mellanox.co.il> |
IB/mlx4: Add support for masked atomic operations Add support for masked atomic operations (masked compare and swap, masked fetch and add). Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
5a0e3ad6af8660be21ca98a971cd00f331318c05 |
|
24-Mar-2010 |
Tejun Heo <tj@kernel.org> |
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
/drivers/infiniband/hw/mlx4/main.c
|
417608c20a4c8397bc5307d949ec01ea0a0dd8e5 |
|
12-Nov-2009 |
Eli Cohen <eli@mellanox.co.il> |
IB/mlx4: Remove limitation on LSO header size Current code has a limitation: an LSO header is not allowed to cross a 64 byte boundary. This patch removes this limitation by setting the WQE RR for large headers thus allowing LSO headers of any size. The extra buffer reserved for MLX4_IB_QP_LSO QPs has been doubled, from 64 to 128 bytes, assuming this is reasonable upper limit for header length. Also, this patch will cause IB_DEVICE_UD_TSO to be set only for HCA FW versions that set MLX4_DEV_CAP_FLAG_BLH; e.g. FW version 2.6.000 and higher. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
45c448a1c0bed9c7eab6064493a7c5d94defcafd |
|
11-Sep-2009 |
Roland Dreier <rolandd@cisco.com> |
Merge branches 'cxgb3', 'ehca', 'ipath', 'ipoib', 'misc', 'mlx4', 'mthca' and 'nes' into for-linus
|
3b4a8cd51e59c1c342c51b241bbb96c6ac24a147 |
|
06-Sep-2009 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Don't allow userspace open while recovering from catastrophic error Userspace apps are supposed to release all ib device resources if they receive a fatal async event (IBV_EVENT_DEVICE_FATAL). However, the app has no way of knowing when the device has come back up, except to repeatedly attempt ibv_open_device() until it succeeds. However, currently there is no protection against the open succeeding while the device is in being removed following the fatal event. In this case, the open will succeed, but as a result the device waits in the middle of its removal until the new app releases its resources -- and the new app will not do so, since the open succeeded at a point following the fatal event generation. This patch adds an "active" flag to the device. The active flag is set to false (in the fatal event flow) before the "fatal" event is generated, so any subsequent ibv_dev_open() call to the device will fail until the device comes back up, thus preventing the above deadlock. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
f1aa78b26e8dabc2956be94a93c40c6cc08eb4a3 |
|
06-Sep-2009 |
Marcin Slusarz <marcin.slusarz@gmail.com> |
IB: Use printk_once() for driver versions Replace open-coded reimplementations with printk_once(). Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
e1d60ec6699f19b760df8261e922ae236ea7bb31 |
|
30-Mar-2009 |
Roland Dreier <rdreier@cisco.com> |
IB/mlx4: Use pgprot_writecombine() for BlueFlame pages The PAT work on x86 has finally made pgprot_writecombine() a usable API for modular drivers. As the comment indicates, this is exactly what we want to use in mlx4_ib to map BlueFlame pages up to userspace, since using WC for these pages improves small message latency significantly. Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
a6a47771b113be8e694aedd80f66ea94d05bd8df |
|
19-Mar-2009 |
Yevgeny Petrilin <yevgenyp@mellanox.co.il> |
IB/mlx4: Unregister IB device prior to CLOSE PORT command According to the ConnectX programmer's reference manual, all operations should be stopped, all QPs should be torn down and all WQEs flushed before the CLOSE_PORT command is invoked. In some cases reversing the order of operations (as implemented now) could cause a loss of completions. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
22e7ef9c089305111661b01e425cd0b974231e2e |
|
09-Jan-2009 |
Roland Dreier <rolandd@cisco.com> |
IB/mlx4: Don't register IB device for adapters with no IB ports If the mlx4_ib driver finds an adapter that has only ethernet ports, the current code will register an IB device with 0 ports. Nothing useful or sensible can be done with such a device, so just skip registering it. Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
b8dd786f9417e5885929bfe33a235c76a9c1c569 |
|
22-Dec-2008 |
Yevgeny Petrilin <yevgenyp@mellanox.co.il> |
mlx4_core: Add support for multiple completion event vectors When using MSI-X mode, create a completion event queue for each CPU. Report the number of completion EQs in a new struct mlx4_caps member, num_comp_vectors, and extend the mlx4_cq_alloc() interface with a vector parameter so that consumers can specify which completion EQ should be used to report events for the CQ being created. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
7ff93f8b7ecbc36e7ffc5c11a61643821c1bfee5 |
|
23-Oct-2008 |
Yevgeny Petrilin <yevgenyp@mellanox.co.il> |
mlx4_core: Multiple port type support Multi-protocol adapters support different port types. Each consumer of mlx4_core queries for supported port types; in particular mlx4_ib can no longer assume that all physical ports belong to it. Port type is configured through a sysfs interface. When the type of a port is changed, all mlx4 interfaces are unregistered, and then registered again with the new port types. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
51a379d0c8f7a6db7c9e3c9c770d90a6d2d1ef9b |
|
25-Jul-2008 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
mlx4: Update/add Mellanox Technologies copyright lines to mlx4 driver files Update existing Mellanox copyright lines to 2008, and add such lines to files where they are missing. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
95d04f0735b4fc837bff9aedcc3f3efb20ddc3d1 |
|
23-Jul-2008 |
Roland Dreier <rolandd@cisco.com> |
IB/mlx4: Add support for memory management extensions and local DMA L_Key Add support for the following operations to mlx4 when device firmware supports them: - Send with invalidate and local invalidate send queue work requests; - Allocate/free fast register MRs; - Allocate/free fast register MR page lists; - Fast register MR send queue work requests; - Local DMA L_Key. Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
521e575b9a7324a0bca762622139f69582a042bf |
|
15-Jul-2008 |
Ron Livne <ronli@voltaire.com> |
IB/mlx4: Add support for blocking multicast loopback packets Add support for handling the IB_QP_CREATE_MULTICAST_BLOCK_LOOPBACK flag by using the per-multicast group loopback blocking feature of mlx4 hardware. Signed-off-by: Ron Livne <ronli@voltaire.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
6296883ca4cd52dafb45f191d24102e28ded38f2 |
|
23-Apr-2008 |
Yevgeny Petrilin <yevgenyp@mellanox.co.il> |
mlx4_core: Move kernel doorbell management into core In addition to mlx4_ib, there will be ethernet and FC consumers of mlx4_core, so move the code for managing kernel doorbells into the core module to avoid having to duplicate this multiple times. Signed-off-by: Yevgeny Petrilin <yevgenyp@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
f4e91eb4a81559da87a3843758a641b5cc590b65 |
|
22-Feb-2008 |
Tony Jones <tonyj@suse.de> |
IB: convert struct class_device to struct device This converts the main ib_device to use struct device instead of struct class_device as class_device is going away. Signed-off-by: Tony Jones <tonyj@suse.de> Signed-off-by: Kay Sievers <kay.sievers@vrfy.org> Cc: Roland Dreier <rolandd@cisco.com> Cc: Sean Hefty <sean.hefty@intel.com> Cc: Hal Rosenstock <hal.rosenstock@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
/drivers/infiniband/hw/mlx4/main.c
|
068c4ea1bb9ef733961d3d7a104fa9250ba80087 |
|
17-Apr-2008 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Update module version and release date The mlx4_ib driver is stable enough for production use, so bump the version number to 1.0 to indicate this. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
bbf8eed1a0f8949f7385146624f736f829992a70 |
|
17-Apr-2008 |
Vladimir Sokolovsky <vlad@dev.mellanox.co.il> |
IB/mlx4: Add support for resizing CQs Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
3fdcb97f0b8d8a29117dc36acd0b15965d2a2160 |
|
17-Apr-2008 |
Eli Cohen <eli@dev.mellanox.co.il> |
IB/mlx4: Add support for modifying CQ moderation parameters Signed-off-by: Eli Cohen <eli@mellnaox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
b832be1e4007f4a54954ec68bd865ff05d6babca |
|
17-Apr-2008 |
Eli Cohen <eli@dev.mellanox.co.il> |
IB/mlx4: Add IPoIB LSO support Add TSO support to the mlx4_ib driver. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
8ff095ec4bce7be943beff3b330562e2f0e42167 |
|
17-Apr-2008 |
Eli Cohen <eli@dev.mellanox.co.il> |
IB/mlx4: Add IPoIB checksum offload support ConnectX devices support checksum generation and verification of TCP and UDP packets for UD IPoIB messages. This patch checks if the HCA supports this and sets the IB_DEVICE_UD_IP_CSUM capability flag if it does. It implements support for handling the IB_SEND_IP_CSUM send flag and setting the csum_ok field in receive work completions. Signed-off-by: Eli Cohen <eli@mellanox.co.il> Signed-off-by: Ali Ayub <ali@mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
37608eea86a358ac6a18df0af55d4f77d08a1f30 |
|
17-Apr-2008 |
Roland Dreier <rolandd@cisco.com> |
mlx4_core: Fix confusion between mlx4_event and mlx4_dev_event enums The struct mlx4_interface.event() method was supposed to get an enum mlx4_dev_event, but the driver code was actually passing in the hardware enum mlx4_event values. Fix up the callers of mlx4_dispatch_event() so that they pass in the right type of value, and fix up the event method in mlx4_ib so that it can handle the enum mlx4_dev_event values. This eliminates the need for the subtype parameter to the event method, so remove it. This also fixes the sparse warning drivers/net/mlx4/intf.c:127:48: warning: mixing different enum types drivers/net/mlx4/intf.c:127:48: int enum mlx4_event versus drivers/net/mlx4/intf.c:127:48: int enum mlx4_dev_event Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
68f3948dab39249d178eb007c071f87fb6481fc6 |
|
05-Feb-2008 |
Roland Dreier <rolandd@cisco.com> |
IB/mlx4: Actually print out the driver version The string mlx4_ib_version was defined, but never used. Print out the version once when the first device is initialized. Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
893da75956ab48545e8732b46e1cf4350bd25f9c |
|
27-Jan-2008 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
mlx4_core: Don't read reserved fields in mlx4_QUERY_ADAPTER() The firmware QUERY_ADAPTER command does not return vendor_id, device_id, and revision_id; eliminate these fields from the query. Initialize the rev_id field of the mlx4 device via init_node_data (MAD IFC query), as is done in the query_device verb implementation. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
8ad11fb6b0739e704953e2b0aed453bf7d75d4f6 |
|
31-Jul-2007 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Implement FMRs Implement FMRs for mlx4. This is an adaptation of code from mthca. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
cd9281d873c91a01af0cb96ff0f75e9905e54403 |
|
18-Sep-2007 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Display misc device information under /sys/class/infiniband/ display the following device information under /sys/class/infiniband/mlx4_X: board_id, fw_ver, hw_rev, hca_type. This patch makes this information available to userspace utilities such as ibstat and ibv_devinfo. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
65541cb7cf353946ecd78016a453b453b8830656 |
|
21-Jun-2007 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Implement query SRQ Signed-off-by: Dotan Barak <dotanb@mellanox.co.il> Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
6a775e2ba4f7635849ade628e64723ab2beef0bc |
|
20-Jun-2007 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Implement query QP Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
149983af609e8f5c57157467baf8545d17b8a6a1 |
|
26-Jun-2007 |
Dotan Barak <dotanb@dev.mellanox.co.il> |
mlx4_core: Get the maximum message size from reported device capabilities Get the maximum message size from the device capabilities returned from the QUERY_DEV_CAP firmware command, rather than hard-coding 2 GB. Signed-off-by: Dotan Barak <dotanb@dev.mellanox.co.il> Signed-off-by: Michael S. Tsirkin <mst@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
c8681f14013d3ad2fc4fb4e30cfd4ea548f7a249 |
|
21-Jun-2007 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Correct max_srq_wr returned from mlx4_ib_query_device() We need to keep a spare entry in the SRQ so that there always is a next WQE available when posting receives (so that we can tell the difference between a full queue and an empty queue). So subtract 1 from the value HW gives us before reporting the limit on SRQ entries to consumers. Found by Mellanox QA. Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
5ae2a7a836be660ff1621cce1c46930f19200589 |
|
18-Jun-2007 |
Roland Dreier <rolandd@cisco.com> |
IB/mlx4: Handle FW command interface rev 3 Upcoming firmware introduces command interface revision 3, which changes the way port capabilities are queried and set. Update the driver to handle both the new and old command interfaces by adding a new MLX4_FLAG_OLD_PORT_CMDS that it is set after querying the firmware interface revision and then using the correct interface based on the setting of the flag. Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
26c6bc7b812b4157ba929035e467c0f4dd165916 |
|
13-May-2007 |
Jack Morgenstein <jackm@dev.mellanox.co.il> |
IB/mlx4: Fix uninitialized spinlock for 32-bit archs uar_lock spinlock was used in mlx4_ib_cq_arm without being initialized (this only affects 32-bit archs, because uar_lock is not used on 64-bit archs and MLX4_INIT_DOORBELL_LOCK() is a NOP). Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il> Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|
225c7b1feef1b41170f7037a5b10a65cd8a42c54 |
|
09-May-2007 |
Roland Dreier <rolandd@cisco.com> |
IB/mlx4: Add a driver Mellanox ConnectX InfiniBand adapters Add an InfiniBand driver for Mellanox ConnectX adapters. Because these adapters can also be used as ethernet NICs and Fibre Channel HBAs, the driver is split into two modules: mlx4_core: Handles low-level things like device initialization and processing firmware commands. Also controls resource allocation so that the InfiniBand, ethernet and FC functions can share a device without stepping on each other. mlx4_ib: Handles InfiniBand-specific things; plugs into the InfiniBand midlayer. Signed-off-by: Roland Dreier <rolandd@cisco.com>
/drivers/infiniband/hw/mlx4/main.c
|