13 Jan, 2012
2 commits
-
module_param(bool) used to counter-intuitively take an int. In
fddd5201 (mid-2009) we allowed bool or int/unsigned int using a messy
trick.It's time to remove the int/unsigned int option. For this version
it'll simply give a warning, but it'll break next kernel version.Acked-by: Mauro Carvalho Chehab
Signed-off-by: Rusty Russell -
For historical reasons, we allow module_param(bool) to take an int (or
an unsigned int). That's going away.A few drivers really want an int: they set it to -1 and a parameter
will set it to 0 or 1. This sucks: reading them from sysfs will give
'Y' for both -1 and 1, but if we change it to an int, then the users
might be broken (if they did "param" instead of "param=1").Use a new 'bint' parser for them.
(ntfs has a different problem: it needs an int for debug_msgs because
it's also exposed via sysctl.)Cc: Steve Glendinning
Cc: Jean Delvare
Cc: Guenter Roeck
Cc: Hoang-Nam Nguyen
Cc: Christoph Raisch
Cc: Roland Dreier
Cc: Sean Hefty
Cc: Hal Rosenstock
Cc: linux390@de.ibm.com
Cc: Anton Altaparmakov
Cc: Jaroslav Kysela
Cc: Takashi Iwai
Cc: lm-sensors@lm-sensors.org
Cc: linux-rdma@vger.kernel.org
Cc: linux-s390@vger.kernel.org
Cc: linux-ntfs-dev@lists.sourceforge.net
Cc: alsa-devel@alsa-project.org
Acked-by: Takashi Iwai (For the sound part)
Acked-by: Guenter Roeck (For the hwmon driver)
Signed-off-by: Rusty Russell
09 Jan, 2012
2 commits
-
infiniband changes for 3.3 merge window
* tag 'infiniband-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
rdma/core: Fix sparse warnings
RDMA/cma: Fix endianness bugs
RDMA/nes: Fix terminate during AE
RDMA/nes: Make unnecessarily global nes_set_pau() static
RDMA/nes: Change MDIO bus clock to 2.5MHz
IB/cm: Fix layout of APR message
IB/mlx4: Fix SL to 802.1Q priority-bits mapping for IBoE
IB/qib: Default some module parameters optimally
IB/qib: Optimize locking for get_txreq()
IB/qib: Fix a possible data corruption when receiving packets
IB/qib: Eliminate 64-bit jiffies use
IB/qib: Fix style issues
IB/uverbs: Protect QP multicast list -
* 'for-linus2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (165 commits)
reiserfs: Properly display mount options in /proc/mounts
vfs: prevent remount read-only if pending removes
vfs: count unlinked inodes
vfs: protect remounting superblock read-only
vfs: keep list of mounts for each superblock
vfs: switch ->show_options() to struct dentry *
vfs: switch ->show_path() to struct dentry *
vfs: switch ->show_devname() to struct dentry *
vfs: switch ->show_stats to struct dentry *
switch security_path_chmod() to struct path *
vfs: prefer ->dentry->d_sb to ->mnt->mnt_sb
vfs: trim includes a bit
switch mnt_namespace ->root to struct mount
vfs: take /proc/*/mounts and friends to fs/proc_namespace.c
vfs: opencode mntget() mnt_set_mountpoint()
vfs: spread struct mount - remaining argument of next_mnt()
vfs: move fsnotify junk to struct mount
vfs: move mnt_devname
vfs: move mnt_list to struct mount
vfs: switch pnode.h macros to struct mount *
...
05 Jan, 2012
6 commits
-
Clean up sparse warnings in the rdma core layer.
Signed-off-by: Sean Hefty
Signed-off-by: Roland Dreier -
Fix endianness bugs reported by sparse in the RDMA core stack. Note
that these are real bugs, but don't affect any existing code to the
best of my knowledge. The mlid issue would only affect kernel users
of rdma_join_multicast which have the rdma_cm attach/detach its QP.
There are no current in tree users that do this. (rdma_join_multicast
may be used called by user space applications, which does not have
this issue.) And the pkey setting is simply returned as
informational.Signed-off-by: Sean Hefty
Signed-off-by: Roland Dreier -
Fix for reset which happens right after sending a terminate message.
Terminate timer is not deleted when the connection is closed.Signed-off-by: Tatyana Nikolova
Signed-off-by: Faisal Latif
Signed-off-by: Roland Dreier -
Warned about by sparse.
Signed-off-by: Tatyana Nikolova
Signed-off-by: Faisal Latif
Signed-off-by: Roland Dreier -
Change the PHY clock divisor to make the MDIO clock 2.5MHz, instead of
3.5MHz (which is out of spec).Signed-off-by: Tatyana Nikolova
Signed-off-by: Faisal Latif
Signed-off-by: Roland Dreier
04 Jan, 2012
11 commits
-
Add a missing 16-bit reserved field between ap_status and info fields.
Signed-off-by: Eli Cohen
Acked-by: Sean Hefty
Signed-off-by: Roland Dreier -
For IBoE, SLs 0-7 are mapped to Ethernet 802.1Q user priority bits
(pbits) which are part of the VLAN tag, SLs 8-15 are reserved.Under Ethernet, the ConnectX firmware treats (decode/encode) the four
bit SL field in various constructs such as QPC / UD WQE / CQE as PPP0
and not as 0PPP. This correlates well to the fact that within the
vlan tag the pbits are located in bits 15-13 and not 12-14.The current code wasn't consistent around that area - the
encoding was correct for the IBoE QPC.path.schedule_queue field,
but was wrong for IBoE CQEs and when MLX header was built.These inconsistencies resulted in wrong SL wire 802.1Q pbits
mapping, which is fixed by using SL PPP0 all around the place.Signed-off-by: Oren Duer
Signed-off-by: Or Gerlitz
Signed-off-by: Roland Dreier -
Minimize the need for users to have to set module parameters to get
good performance.The following two parameters are changed:
- rcvhdrcnt to twice the rcvegrcnt
- pcie_caps=0x51The rcvhdrcnt at twice the egrcount allows the preemptive NAK code
during reception to function in 100% of the cases rather than a sender
jiffies-based timeout.The pcie_caps default of 0x51 will set the proposed MaxPayload and
MaxReceiveReqest to 256 and 4096 respectively. The capabilities on
the root complex will be used to limit those values.Reviewed-by: Ram Vepa
Signed-off-by: Mike Marciniszyn
Signed-off-by: Roland Dreier -
The current code locks the QP s_lock, followed by the pending_lock, I
guess to to protect against the allocate failing.This patch only locks the pending_lock, assuming that the empty case
is an exeception, in which case the pending_lock is dropped, and the
original code is executed. This will save a lock of s_lock in the
normal case.The observation is that the sdma descriptors will deplete at twice the
rate of txreq's, so this should be rare.Signed-off-by: Mike Marciniszyn
Signed-off-by: Roland Dreier -
Prevent a receive data corruption by ensuring that the write to update
the rcvhdrheadn register to generate an interrupt is at the very end
of the receive processing.Signed-off-by: Ramkrishna Vepa
Signed-off-by: Mike Marciniszyn
Cc:
Signed-off-by: Roland Dreier -
The qib driver makes use of the the 64-bit jiffies API.
Code inspection reveals that that version of the API is not really
required. This patch converts to use the "normal" jiffies.Reviewed-by: Ram Vepa
Signed-off-by: Mike Marciniszyn
Signed-off-by: Roland Dreier -
More style issues revealed with checkpatch.pl -f.
Signed-off-by: Mike Marciniszyn
Signed-off-by: Roland Dreier -
Userspace verbs multicast attach/detach operations on a QP are done
while holding the rwsem of the QP for reading. That's not sufficient
since a reader lock allows more than one reader to acquire the
lock. However, multicast attach/detach does list manipulation that
can corrupt the list if multiple threads run in parallel.Fix this by acquiring the rwsem as a writer to serialize attach/detach
operations. Add idr_write_qp() and put_qp_write() to encapsulate
this.This fixes oops seen when running applications that perform multicast
joins/leaves.Reported by: Mike Dubman
Signed-off-by: Eli Cohen
Cc:
Signed-off-by: Roland Dreier -
Signed-off-by: Al Viro
-
Signed-off-by: Al Viro
-
both callers of device_get_devnode() are only interested in lower 16bits
and nobody tries to return anything wider than 16bit anyway.Signed-off-by: Al Viro
24 Dec, 2011
1 commit
-
Conflicts:
net/bluetooth/l2cap_core.cJust 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
20 Dec, 2011
3 commits
-
Commit 53ab1c64983 ("IB/qib: Correct nfreectxts for multiple HCAs")
reversed the increments and decrements of dd->nfreectxts. Fix it.Reviewed-by: Ram Vepa
Signed-off-by: Mike Marciniszyn
Signed-off-by: Roland Dreier -
private_data_len is defined as a u8. If the user specifies a large
private_data size (> 220 bytes), we will calculate a total length that
exceeds 255, resulting in private_data_len wrapping back to 0. This
can lead to overwriting random kernel memory. Avoid this by verifying
that the resulting size fits into a u8.Reported-by: B. Thery
Addresses:
Signed-off-by: Sean Hefty
Signed-off-by: Roland Dreier
14 Dec, 2011
3 commits
-
Signed-off-by: Jack Morgenstein
Signed-off-by: David S. Miller -
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
Signed-off-by: David S. Miller -
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
Signed-off-by: Yevgeny Petrilin
Signed-off-by: David S. Miller
07 Dec, 2011
1 commit
-
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
Cc:
Signed-off-by: Roland Dreier
06 Dec, 2011
6 commits
-
Reduce the number of dst_get_neighbour_noref() calls within a single
call chain. Primarily by passing the neighbour pointer down to the
helper functions.Handle dst_get_neighbour_noref() returning NULL in ipoib_start_xmit()
by incrementing the dropped counter and freeing the packet. We don't
want it to fall through into the ARP/RARP/multicast handling, since
that should only happen when skb_dst() is NULL.Signed-off-by: David S. Miller
Acked-by: Roland Dreier -
Three pieces of code do the same thing, create a l2t entry and then
import this information into the c4iw_ep object.Create a helper function and call it from these 3 locations instead.
Signed-off-by: David S. Miller
Acked-by: Roland Dreier -
Do this instead of performing a by-hand lookup.
Signed-off-by: David S. Miller
Acked-by: Roland Dreier -
This way we consolidate the RCU locking down into the place where it
actually matters, and also we can make the code handle
dst_get_neighbour_noref() returning NULL properly.Signed-off-by: David S. Miller
-
IPV4 should do exactly what the IPV6 code does here, which is
use the neighbour obtained via the dst entry.And now that the two code paths do the same thing, use a common
helper function to perform the operation.Signed-off-by: David S. Miller
Acked-by: Eric Dumazet
Acked-by: Roland Dreier -
To reflect the fact that a refrence is not obtained to the
resulting neighbour entry.Signed-off-by: David S. Miller
Acked-by: Roland Dreier
03 Dec, 2011
1 commit
01 Dec, 2011
1 commit
-
netdev->neigh_priv_len records the private area length.
This will trigger for neigh_table objects which set tbl->entry_size
to zero, and the first instances of this will be forthcoming.Signed-off-by: David S. Miller
30 Nov, 2011
3 commits
-
Commit f2c31e32b37 ("net: fix NULL dereferences in check_peer_redir()")
forgot to take care of infiniband uses of dst neighbours.Many thanks to Marc Aurele who provided a nice bug report and feedback.
Reported-by: Marc Aurele La France
Signed-off-by: Eric Dumazet
Cc: David Miller
Cc:
Signed-off-by: Roland Dreier -
This following can occur with ipoib when processing a multicast reponse:
BUG: soft lockup - CPU#0 stuck for 67s! [ib_mad1:982]
Modules linked in: ...
CPU 0:
Modules linked in: ...
Pid: 982, comm: ib_mad1 Not tainted 2.6.32-131.0.15.el6.x86_64 #1 ProLiant DL160 G5
RIP: 0010:[] [] _spin_unlock_irqrestore+0x17/0x20
RSP: 0018:ffff8802119ed860 EFLAGS: 00000246
0000000000000004 RBX: ffff8802119ed860 RCX: 000000000000a299
RDX: ffff88021086c700 RSI: 0000000000000246 RDI: 0000000000000246
RBP: ffffffff8100bc8e R08: ffff880210ac229c R09: 0000000000000000
R10: ffff88021278aab8 R11: 0000000000000000 R12: ffff8802119ed860
R13: ffffffff8100be6e R14: 0000000000000001 R15: 0000000000000003
FS: 0000000000000000(0000) GS:ffff880028200000(0000) knlGS:0000000000000000
CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b
CR2: 00000000006d4840 CR3: 0000000209aa5000 CR4: 00000000000406f0
DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
Call Trace:
[] ? ipoib_mcast_send+0x157/0x480 [ib_ipoib]
[] ? apic_timer_interrupt+0xe/0x20
[] ? apic_timer_interrupt+0xe/0x20
[] ? ipoib_path_lookup+0x124/0x2d0 [ib_ipoib]
[] ? ipoib_start_xmit+0x17c/0x430 [ib_ipoib]
[] ? dev_hard_start_xmit+0x2c8/0x3f0
[] ? sch_direct_xmit+0x15a/0x1c0
[] ? dev_queue_xmit+0x388/0x4d0
[] ? ipoib_mcast_join_finish+0x2c7/0x510 [ib_ipoib]
[] ? ipoib_mcast_sendonly_join_complete+0x1b8/0x1f0 [ib_ipoib]
[] ? mcast_work_handler+0x1a6/0x710 [ib_sa]
[] ? ib_send_mad+0xfe/0x3c0 [ib_mad]
[] ? ib_get_cached_lmc+0xa3/0xb0 [ib_core]
[] ? join_handler+0xeb/0x200 [ib_sa]
[] ? ib_sa_mcmember_rec_callback+0x5c/0xa0 [ib_sa]
[] ? recv_handler+0x3c/0x70 [ib_sa]
[] ? ib_mad_completion_handler+0x844/0x9d0 [ib_mad]
[] ? ib_mad_completion_handler+0x0/0x9d0 [ib_mad]
[] ? worker_thread+0x170/0x2a0
[] ? autoremove_wake_function+0x0/0x40
[] ? worker_thread+0x0/0x2a0
[] ? kthread+0x96/0xa0
[] ? child_rip+0xa/0x20Coinciding with stack trace is the following message:
ib0: ib_address_create failed
The code below in ipoib_mcast_join_finish() will note the above
failure in the address handle but otherwise continue:ah = ipoib_create_ah(dev, priv->pd, &av);
if (!ah) {
ipoib_warn(priv, "ib_address_create failed\n");
} else {The while loop at the bottom of ipoib_mcast_join_finish() will attempt
to send queued multicast packets in mcast->pkt_queue and eventually
end up in ipoib_mcast_send():if (!mcast->ah) {
if (skb_queue_len(&mcast->pkt_queue) < IPOIB_MAX_MCAST_QUEUE)
skb_queue_tail(&mcast->pkt_queue, skb);
else {
++dev->stats.tx_dropped;
dev_kfree_skb_any(skb);
}My read is that the code will requeue the packet and return to the
ipoib_mcast_join_finish() while loop and the stage is set for the
"hung" task diagnostic as the while loop never sees a non-NULL ah, and
will do nothing to resolve.There are GFP_ATOMIC allocates in the provider routines, so this is
possible and should be dealt with.The test that induced the failure is associated with a host SM on the
same server during a shutdown.This patch causes ipoib_mcast_join_finish() to exit with an error
which will flush the queued mcast packets. Nothing is done to unwind
the QP attached state so that subsequent sends from above will retry
the join.Reviewed-by: Ram Vepa
Reviewed-by: Gary Leshner
Signed-off-by: Mike Marciniszyn
Signed-off-by: Roland Dreier