deliverable/linux.git
13 years agotipc: relocate/coalesce node cast in tipc_named_node_up
Paul Gortmaker [Fri, 2 Sep 2011 17:45:34 +0000 (13:45 -0400)] 
tipc: relocate/coalesce node cast in tipc_named_node_up

Functions like this are called using unsigned longs from
function pointers.  In this case, the function is passed in
a node which is normally internally treated as a u32 by TIPC.

Rather than add more casts into this function in the future
for each added use of node within, move the cast to a single
place on a local.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Prevent fragmented messages during initial name table exchange
Allan Stephens [Tue, 31 May 2011 15:05:02 +0000 (11:05 -0400)] 
tipc: Prevent fragmented messages during initial name table exchange

Reduces the maximum size of messages sent during the initial exchange
of name table information between two nodes to be no larger than the
MTU of the first link established between the nodes. This ensures that
messages will never need to be fragmented, which would add unnecessary
overhead to the name table synchronization mechanism.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Lower limits for number of bearers and media types
Allan Stephens [Fri, 27 May 2011 19:09:40 +0000 (15:09 -0400)] 
tipc: Lower limits for number of bearers and media types

Reduces the number of bearers a node can support to 2, which can use
identical or non-identical media. This change won't impact users,
since they are currently limited to a maximum of 2 Ethernet bearers,
and will save memory by eliminating a number of unused entries in
TIPC's media and bearer arrays.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Remove redundant search when enabling bearer
Allan Stephens [Fri, 27 May 2011 18:02:48 +0000 (14:02 -0400)] 
tipc: Remove redundant search when enabling bearer

Removes obsolete code that searches for an Ethernet bearer structure entry
to use for a newly enabled bearer, since this search is now performed
at the start of the enabling algorithm.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Fix unsafe device list search when enabling bearer
Allan Stephens [Fri, 27 May 2011 17:59:17 +0000 (13:59 -0400)] 
tipc: Fix unsafe device list search when enabling bearer

Ensures that the device list lock is held while trying to locate
the Ethernet device used by a newly enabled bearer, so that the
addition or removal of a device does not cause problems.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agotipc: Ensure both nodes recognize loss of contact between them
Allan Stephens [Fri, 27 May 2011 15:00:51 +0000 (11:00 -0400)] 
tipc: Ensure both nodes recognize loss of contact between them

Enhances TIPC to ensure that a node that loses contact with a
neighboring node does not allow contact to be re-established until
it sees that its peer has also recognized the loss of contact.

Previously, nodes that were connected by two or more links could
encounter a situation in which node A would lose contact with node B
on all of its links, purge its name table of names published by B,
and then fail to repopulate those names once contact with B was restored.
This would happen because B was able to re-establish one or more links
so quickly that it never reached a point where it had no links to A --
meaning that B never saw a loss of contact with A, and consequently
didn't re-publish its names to A.

This problem is now prevented by enhancing the cleanup done by TIPC
following a loss of contact with a neighboring node to ensure that
node A ignores all messages sent by B until it receives a LINK_PROTOCOL
message that indicates B has lost contact with A, thereby preventing
the (re)establishment of links between the nodes. The loss of contact
is recognized when a RESET or ACTIVATE message is received that has
a "redundant link exists" field of 0, indicating that B's sending link
endpoint is in a reset state and that B has no other working links.

Additionally, TIPC now suppresses the sending of (most) link protocol
messages to a neighboring node while it is cleaning up after an earlier
loss of contact with that node. This stops the peer node from prematurely
activating its link endpoint, which would prevent TIPC from later
activating its own end. TIPC still allows outgoing RESET messages to
occur during cleanup, to avoid problems if its own node recognizes
the loss of contact first and tries to notify the peer of the situation.

Finally, TIPC now recognizes an impending loss of contact with a peer node
as soon as it receives a RESET message on a working link that is the
peer's only link to the node, and ensures that the link protocol
suppression mentioned above goes into effect right away -- that is,
even before its own link endpoints have failed. This is necessary to
ensure correct operation when there are redundant links between the nodes,
since otherwise TIPC would send an ACTIVATE message upon receiving a RESET
on its first link and only begin suppressing when a RESET on its second
link was received, instead of initiating suppression with the first RESET
message as it needs to.

Note: The reworked cleanup code also eliminates a check that prevented
a link endpoint's discovery object from responding to incoming messages
while stale name table entries are being purged. This check is now
unnecessary and would have slowed down re-establishment of communication
between the nodes in some situations.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
13 years agoMerge branch 'fixes' of git://git.user.in-berlin.de/s5r6/linux1394
Linus Torvalds [Sat, 17 Sep 2011 23:54:41 +0000 (16:54 -0700)] 
Merge branch 'fixes' of git://git.user.in-berlin.de/s5r6/linux1394

* 'fixes' of git://git.user.in-berlin.de/s5r6/linux1394:
  firewire: ohci: add no MSI quirk for O2Micro controller

13 years agoMerge branch '3.1-rc-fixes' of git://linux-iscsi.org/target-pending
Linus Torvalds [Sat, 17 Sep 2011 23:52:13 +0000 (16:52 -0700)] 
Merge branch '3.1-rc-fixes' of git://linux-iscsi.org/target-pending

* '3.1-rc-fixes' of git://linux-iscsi.org/target-pending:
  iscsi-target: Fix sendpage breakage with proper padding+DataDigest iovec offsets
  iscsi-target: Disable markers + remove dangerous local scope array usage
  target: Skip non hex characters for VPD=0x83 NAA IEEE Registered Extended
  tcm_fc: Work queue based approach instead of managing own thread and event based mechanism
  tcm_fc: Invalidation of DDP context for FCoE target in error conditions
  target: Fix race between multiple invocations of target_qf_do_work()

13 years agoBluetooth: add support for 2011 mac mini
Jurgen Kramer [Sun, 4 Sep 2011 16:01:42 +0000 (18:01 +0200)] 
Bluetooth: add support for 2011 mac mini

Today I noticed that the usb bluetooth adapter (BCM2046B1) on my 2011
mac mini was not working. I've created a patch to get it going.

Signed-off-by: Jurgen Kramer <gtmkramer@xs4all.nl>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Add MacBookAir4,1 support
Pieter-Augustijn Van Malleghem [Wed, 7 Sep 2011 06:28:10 +0000 (02:28 -0400)] 
Bluetooth: Add MacBookAir4,1 support

This patch against current git adds the hardware ID for the Apple
MacBookAir4,1, released in July 2011. The device features a BCM2046
USB chip. The patch was inspired by the previous modifications adding
support for the MacBookAir3,x.

Signed-off-by: Pieter-Augustijn Van Malleghem <p-a@scarlet.be>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agoBluetooth: Fixed BT ST Channel reg order
Chen Ganir [Tue, 30 Aug 2011 10:58:28 +0000 (13:58 +0300)] 
Bluetooth: Fixed BT ST Channel reg order

Reordered the BT ST channel registration, to make sure that the
event channel is registered before all others. This prevents a
situation where incoming events may cause kernel panic in the ST
driver if the event channel is not yet registered to handle
incoming events.In addition, the deregistration of the channels
was also modified, to be in the reversed order of the registration,
to allow the event channel to be the last one unregistered.

Signed-off-by: Chen Ganir <chen.ganir@ti.com>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
13 years agor8169: do not enable the TBI for anything but the original 8169.
Francois Romieu [Thu, 1 Sep 2011 16:42:09 +0000 (18:42 +0200)] 
r8169: do not enable the TBI for anything but the original 8169.

The TBI bit in PHYStatus is reserved on anything but the oldest 8169.

Nobody complained after I disabled it for the 8168 and the 810x (see
66ec5d4fb1ce6f0bd9df4bc4b758f0916d9f37ab).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes Wang <hayeswang@realtek.com>
13 years agor8169: remove erroneous processing of always set bit.
Francois Romieu [Thu, 25 Aug 2011 16:47:24 +0000 (18:47 +0200)] 
r8169: remove erroneous processing of always set bit.

When set, RxFOVF (resp. RxBOVF) is always 1 (resp. 0).

Signed-off-by: Francois Romieu <romieu@fr.zoreil.com>
Cc: Hayes <hayeswang@realtek.com>
13 years agor8169: fix WOL setting for 8105 and 8111evl
Hayes Wang [Tue, 6 Sep 2011 08:55:14 +0000 (16:55 +0800)] 
r8169: fix WOL setting for 8105 and 8111evl

rtl8105, rtl8111E, and rtl8111evl need enable RxConfig bit 1 ~ 3
for supporting wake on lan.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
13 years agor8169: add MODULE_FIRMWARE for the firmware of 8111evl
Hayes Wang [Tue, 6 Sep 2011 08:55:17 +0000 (16:55 +0800)] 
r8169: add MODULE_FIRMWARE for the firmware of 8111evl

Add MODULE_FIRMWARE for the firmware of RTL8111E-VL

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
13 years agor8169: fix the reset setting for 8111evl
Hayes Wang [Tue, 6 Sep 2011 08:55:16 +0000 (16:55 +0800)] 
r8169: fix the reset setting for 8111evl

rtl8111evl should stop any TLP requirement before resetting by
enabling register 0x37 bit 7.

Signed-off-by: Hayes Wang <hayeswang@realtek.com>
13 years agotcp: md5: remove one indirection level in tcp_md5sig_pool
Eric Dumazet [Mon, 12 Sep 2011 20:28:37 +0000 (20:28 +0000)] 
tcp: md5: remove one indirection level in tcp_md5sig_pool

tcp_md5sig_pool is currently an 'array' (a percpu object) of pointers to
struct tcp_md5sig_pool. Only the pointers are NUMA aware, but objects
themselves are all allocated on a single node.

Remove this extra indirection to get proper percpu memory (NUMA aware)
and make code simpler.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: don't use inetpeer to store metrics for routes.
Yan, Zheng [Mon, 5 Sep 2011 21:34:30 +0000 (21:34 +0000)] 
ipv6: don't use inetpeer to store metrics for routes.

Current IPv6 implementation uses inetpeer to store metrics for
routes. The problem of inetpeer is that it doesn't take subnet
prefix length in to consideration. If two routes have the same
address but different prefix length, they share same inetpeer.
So changing metrics of one route also affects the other. The
fix is to allocate separate metrics storage for each route.

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobna: Eliminate Small Race Condition Window in RX Path
Rasesh Mody [Fri, 16 Sep 2011 15:06:48 +0000 (15:06 +0000)] 
bna: Eliminate Small Race Condition Window in RX Path

Change details:
 - In a continuous sequence of ifconfig up/down operations, there is a small
   window of race between bnad_set_rx_mode() and bnad_cleanup_rx() while the
   former tries to access rx_info->rx & the latter sets it to NULL. This race
   could lead to bna_rx_mode_set() being called with a NULL (rx_info->rx)
   pointer and a crash.
 - Hold bnad->bna_lock while setting / unsetting rx_info->rx in bnad_setup_rx()
   & bnad_cleanup_rx(), thereby eliminating the race described above.

Signed-off-by: Gurunatha Karaje <gkaraje@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobna: Set Ring Param Fix
Rasesh Mody [Fri, 16 Sep 2011 15:06:47 +0000 (15:06 +0000)] 
bna: Set Ring Param Fix

When Rx queue size is changed, queues are torn down and setup with the new queue
size. During this operation, clear promiscuous mode and restore the original
VLAN filter.

Signed-off-by: Gurunatha Karaje <gkaraje@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobna: Semaphore Lock Fix
Rasesh Mody [Fri, 16 Sep 2011 15:06:46 +0000 (15:06 +0000)] 
bna: Semaphore Lock Fix

Remove a BUG_ON() as it is not required.

Change the unconditional write to release a semaphore to read sem first
and then write. This will eliminate the possibility of sem getting locked
while trying to release it in case if previous sem_get operation failed.

Signed-off-by: Gurunatha Karaje <gkaraje@brocade.com>
Signed-off-by: Rasesh Mody <rmody@brocade.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: remove duplicate netif_tx_start_all_queues
Emil Tantilov [Thu, 28 Jul 2011 06:17:09 +0000 (06:17 +0000)] 
ixgbe: remove duplicate netif_tx_start_all_queues

netif_tx_start_all_queues() is already called in ixgbe_up_complete, no need
to do it twice.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix FCRTL/H register dump for X540
Emil Tantilov [Wed, 27 Jul 2011 04:16:29 +0000 (04:16 +0000)] 
ixgbe: fix FCRTL/H register dump for X540

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup some register reads
Emil Tantilov [Tue, 26 Jul 2011 07:51:41 +0000 (07:51 +0000)] 
ixgbe: cleanup some register reads

Remove duplicate inc of hwstats->ruc
Introduce separate loops for 8 and 16 register reads.
Consolidate mac checks under one case.
Make sure registers are cleared on read.

Reported-by: Jonathan Lynch <jonathan.lynch@thenowfactory.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
CC: Jonathan Lynch <jonathan.lynch@thenowfactory.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Make better use of memory allocations in one-buffer mode w/ RSC
Alexander Duyck [Fri, 26 Aug 2011 09:52:38 +0000 (09:52 +0000)] 
ixgbe: Make better use of memory allocations in one-buffer mode w/ RSC

This patch improves the memory utilization with RSC when in one-buffer
mode.  This is accomplished by making the default buffer sizes match up
with the standard memory allocation sizes minus 1K for shared info and
padding overhead.  By doing this CPU utilization when doing large receives
can be reduced by as much as 8%.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: drop adapter from ixgbe_fso call documentation
Alexander Duyck [Thu, 21 Jul 2011 00:40:56 +0000 (00:40 +0000)] 
ixgbe: drop adapter from ixgbe_fso call documentation

The adapter structure was removed from the call so it can be dropped from
the ixgbe_fso documentation.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Add SFP support for missed 82598 PHY
Alexander Duyck [Thu, 21 Jul 2011 00:40:51 +0000 (00:40 +0000)] 
ixgbe: Add SFP support for missed 82598 PHY

One of the 82598 phys was not being correctly identified as being SFP.
This change corrects that.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Add missing code for enabling overheat sensor interrupt
Alexander Duyck [Thu, 21 Jul 2011 00:40:45 +0000 (00:40 +0000)] 
ixgbe: Add missing code for enabling overheat sensor interrupt

This change adds a small bit of missing code for enabling the overheat sensor

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: make ixgbe_up and ixgbe_up_complete void functions
Alexander Duyck [Thu, 21 Jul 2011 00:40:40 +0000 (00:40 +0000)] 
ixgbe: make ixgbe_up and ixgbe_up_complete void functions

ixgbe_up and ixgbe_up_complete will always return 0.  Since this doesn't
provide any useful information we might as well just make them both void
and save ourselves from having to return an unused value.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agov2 ixgbe: Update packet buffer reservation to correct fdir headroom size
Alexander Duyck [Thu, 21 Jul 2011 00:40:35 +0000 (00:40 +0000)] 
v2 ixgbe: Update packet buffer reservation to correct fdir headroom size

This change fixes an issue in which the incorrect amount of headroom was
being reserved for flow director filters.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: remove redundant configuration of tx_sample_rate
Alexander Duyck [Thu, 21 Jul 2011 00:40:30 +0000 (00:40 +0000)] 
ixgbe: remove redundant configuration of tx_sample_rate

This change fixes a minor redundancy in that tx_sample_rate was set twice.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgb: convert to ndo_fix_features
Michał Mirosław [Wed, 8 Jun 2011 08:39:40 +0000 (08:39 +0000)] 
ixgb: convert to ndo_fix_features

Private rx_csum flags are now duplicate of netdev->features & NETIF_F_RXCSUM.
Removing this needs deeper surgery.

Things noticed:
 - ixgb has RX csum disabled by default
 - HW VLAN acceleration probably can be toggled, but it's left as is
 - the resets on RX csum offload change can probably be avoided
 - there is A LOT of copy-and-pasted code here

Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoiscsi-target: Fix sendpage breakage with proper padding+DataDigest iovec offsets
Nicholas Bellinger [Fri, 16 Sep 2011 23:55:47 +0000 (16:55 -0700)] 
iscsi-target: Fix sendpage breakage with proper padding+DataDigest iovec offsets

This patch fixes a bug in the iscsit_fe_sendpage_sg() transmit codepath that
was originally introduced with the v3.1 iscsi-target merge that incorrectly
uses hardcoded cmd->iov_data_count values to determine cmd->iov_data[] offsets
for extra outgoing padding and DataDigest payload vectors.

This code is obviously incorrect for the DataDigest enabled case with sendpage
offload, and this fix ensures correct operation for padding + DataDigest,
padding only, and DataDigest only cases.  The bug was introduced during a
pre-merge change in iscsit_fe_sendpage_sg() to natively use struct scatterlist
instead of the legacy v3.0 struct se_mem logic.

Cc: Andy Grover <agrover@redhat.com>
Cc: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
13 years agoRevert "Scm: Remove unnecessary pid & credential references in Unix socket's send...
David S. Miller [Fri, 16 Sep 2011 23:34:00 +0000 (19:34 -0400)] 
Revert "Scm: Remove unnecessary pid & credential references in Unix socket's send and receive path"

This reverts commit 0856a304091b33a8e8f9f9c98e776f425af2b625.

As requested by Eric Dumazet, it has various ref-counting
problems and has introduced regressions.  Eric will add
a more suitable version of this performance fix.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Update ethtool_rxnfc::rule_cnt on return from ETHTOOL_GRXCLSRLALL
Ben Hutchings [Tue, 6 Sep 2011 13:52:47 +0000 (13:52 +0000)] 
ethtool: Update ethtool_rxnfc::rule_cnt on return from ETHTOOL_GRXCLSRLALL

A user-space process must use ETHTOOL_GRXCLSRLCNT to find the number
of classification rules, then allocate a buffer of the right size,
then use ETHTOOL_GRXCLSRLALL to fill the buffer.  If some other
process inserts or deletes a rule between those two operations,
the user buffer might turn out to be the wrong size.

If it's too small, the return value will be -EMSGSIZE.  But if it's
too large, there is no indication of this.  Fix this by updating
the rule_cnt field on return.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Clean up definitions of rule location arrays in RX NFC
Ben Hutchings [Tue, 6 Sep 2011 13:49:12 +0000 (13:49 +0000)] 
ethtool: Clean up definitions of rule location arrays in RX NFC

Correct the description of ethtool_rxnfc::rule_locs; it is an array
of currently used locations, not all possible valid locations.

Add note that drivers must not use ethtool_rxnfc::rule_locs.

The rule_locs argument to ethtool_ops::get_rxnfc is either NULL or a
pointer to an array of u32, so change the parameter type accordingly.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Explicitly state that RX NFC rule locations are priorities
Ben Hutchings [Tue, 6 Sep 2011 13:48:56 +0000 (13:48 +0000)] 
ethtool: Explicitly state that RX NFC rule locations are priorities

The location of an RX flow classification rule is needed to identify
it for retrieval, replacement or deletion.  However it also defines
the priority of the rule in the case that a flow is matched by
multiple rules.  This is what I intended to imply by referring to the
use of a TCAM, commonly used to implement that behaviour.

However there are other ways this can be done, and it is better to
specify this explicitly.  Further, I want to add the option for
automatic selection of rule locations.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Make struct ethtool_rxnfc kernel-doc more self-consistent
Ben Hutchings [Tue, 6 Sep 2011 13:48:20 +0000 (13:48 +0000)] 
ethtool: Make struct ethtool_rxnfc kernel-doc more self-consistent

Refer consistently to 'classification rules' or just 'rules' rather
than 'filter specifications' or 'filter rules'.

Refer consistently to rule 'locations' and not 'indices'.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocan: ti_hecc: include linux/io.h
Daniel Mack [Fri, 16 Sep 2011 07:57:43 +0000 (07:57 +0000)] 
can: ti_hecc: include linux/io.h

This fixes a build breakage for OMAP3 boards.

Signed-off-by: Daniel Mack <zonque@gmail.com>
Cc: Wolfgang Grandegger <wg@grandegger.com>
Cc: netdev@vger.kernel.org
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: make function table const
stephen hemminger [Fri, 16 Sep 2011 11:10:01 +0000 (11:10 +0000)] 
vxge: make function table const

All tables of function pointers should be const.
The pre-existing code has lots of needless indirection...

Inspired by similar change in PAX.
Compile tested only.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobna: make function tables cont
stephen hemminger [Fri, 16 Sep 2011 11:09:51 +0000 (11:09 +0000)] 
bna: make function tables cont

To prevent malicious usage, all tables of pointers must be const.

Compile tested only.
Gleaned for PAX.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopcnet32: constify function table
stephen hemminger [Fri, 16 Sep 2011 11:06:26 +0000 (11:06 +0000)] 
pcnet32: constify function table

Function tables need to be const to prevent malicious use.

This is compile tested only.
Gleaned from PAX.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agowan: make LAPB callbacks const
stephen hemminger [Fri, 16 Sep 2011 11:04:29 +0000 (11:04 +0000)] 
wan: make LAPB callbacks const

This is compile tested only.
Suggested by dumpster diving in PAX.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoIRDA: Fix global type conflicts in net/irda/irsysctl.c v2
Andi Kleen [Fri, 16 Sep 2011 09:09:50 +0000 (09:09 +0000)] 
IRDA: Fix global type conflicts in net/irda/irsysctl.c v2

The externs here didn't agree with the declarations in qos.c.

Better would be probably to move this into a header, but since it's
common practice to have naked externs with sysctls I left it for now.

Cc: samuel@sortiz.org
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Send ICMPv6 RSes only when RAs are accepted
Tore Anderson [Sun, 28 Aug 2011 23:47:33 +0000 (23:47 +0000)] 
ipv6: Send ICMPv6 RSes only when RAs are accepted

This patch improves the logic determining when to send ICMPv6 Router
Solicitations, so that they are 1) always sent when the kernel is
accepting Router Advertisements, and 2) never sent when the kernel is
not accepting RAs. In other words, the operational setting of the
"accept_ra" sysctl is used.

The change also makes the special "Hybrid Router" forwarding mode
("forwarding" sysctl set to 2) operate exactly the same as the standard
Router mode (forwarding=1). The only difference between the two was
that RSes was being sent in the Hybrid Router mode only. The sysctl
documentation describing the special Hybrid Router mode has therefore
been removed.

Rationale for the change:

Currently, the value of forwarding sysctl is the only thing determining
whether or not to send RSes. If it has the value 0 or 2, they are sent,
otherwise they are not. This leads to inconsistent behaviour in the
following cases:

* accept_ra=0, forwarding=0
* accept_ra=0, forwarding=2
* accept_ra=1, forwarding=2
* accept_ra=2, forwarding=1

In the first three cases, the kernel will send RSes, even though it will
not accept any RAs received in reply. In the last case, it will not send
any RSes, even though it will accept and process any RAs received. (Most
routers will send unsolicited RAs periodically, so suppressing RSes in
the last case will merely delay auto-configuration, not prevent it.)

Also, it is my opinion that having the forwarding sysctl control RS
sending behaviour (completely independent of whether RAs are being
accepted or not) is simply not what most users would intuitively expect
to be the case.

Signed-off-by: Tore Anderson <tore@fud.no>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Handle different key sizes between address families in flow cache
dpward [Mon, 5 Sep 2011 16:47:24 +0000 (16:47 +0000)] 
net: Handle different key sizes between address families in flow cache

With the conversion of struct flowi to a union of AF-specific structs, some
operations on the flow cache need to account for the exact size of the key.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Align AF-specific flowi structs to long
David Ward [Mon, 5 Sep 2011 16:47:23 +0000 (16:47 +0000)] 
net: Align AF-specific flowi structs to long

AF-specific flowi structs are now passed to flow_key_compare, which must
also be aligned to a long.

Signed-off-by: David Ward <david.ward@ll.mit.edu>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Fix fib_info->fib_metrics leak
Yan, Zheng [Sun, 4 Sep 2011 20:24:20 +0000 (20:24 +0000)] 
ipv4: Fix fib_info->fib_metrics leak

Commit 4670994d(net,rcu: convert call_rcu(fc_rport_free_rcu) to
kfree_rcu()) introduced a memory leak. This patch reverts it.

Signed-off-by: Zheng Yan <zheng.z.yan@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocaif: fix a potential NULL dereference
Eric Dumazet [Fri, 2 Sep 2011 02:19:23 +0000 (02:19 +0000)] 
caif: fix a potential NULL dereference

Commit bd30ce4bc0b7 (caif: Use RCU instead of spin-lock in caif_dev.c)
added a potential NULL dereference in case alloc_percpu() fails.

caif_device_alloc() can also use GFP_KERNEL instead of GFP_ATOMIC.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
CC: Sjur Brændeland <sjur.brandeland@stericsson.com>
Acked-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agocan-gw: add netlink based CAN routing
Oliver Hartkopp [Thu, 1 Sep 2011 04:23:23 +0000 (04:23 +0000)] 
can-gw: add netlink based CAN routing

This patch adds a CAN Gateway/Router to route (and modify) CAN frames.

It is based on the PF_CAN core infrastructure for msg filtering and msg
sending and can optionally modify routed CAN frames on the fly.
CAN frames can *only* be routed between CAN network interfaces (one hop).
They can be modified with AND/OR/XOR/SET operations as configured by the
netlink configuration interface known e.g. from iptables. From the netlink
view this can-gw implements RTM_{NEW|DEL|GET}ROUTE for PF_CAN.

The CAN specific userspace tool to manage CAN routing entries can be found in
the CAN utils http://svn.berlios.de/wsvn/socketcan/trunk/can-utils/cangw.c
at the SocketCAN SVN on BerliOS.

Signed-off-by: Oliver Hartkopp <socketcan@hartkopp.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosctp: deal with multiple COOKIE_ECHO chunks
Max Matveev [Mon, 29 Aug 2011 21:02:24 +0000 (21:02 +0000)] 
sctp: deal with multiple COOKIE_ECHO chunks

Attempt to reduce the number of IP packets emitted in response to single
SCTP packet (2e3216cd) introduced a complication - if a packet contains
two COOKIE_ECHO chunks and nothing else then SCTP state machine corks the
socket while processing first COOKIE_ECHO and then loses the association
and forgets to uncork the socket. To deal with the issue add new SCTP
command which can be used to set association explictly. Use this new
command when processing second COOKIE_ECHO chunk to restore the context
for SCTP state machine.

Signed-off-by: Max Matveev <makc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-linus' of git://github.com/dtor/input
Linus Torvalds [Fri, 16 Sep 2011 21:09:19 +0000 (14:09 -0700)] 
Merge branch 'for-linus' of git://github.com/dtor/input

* 'for-linus' of git://github.com/dtor/input:
  Input: wacom - fix touch parsing on newer Bamboos
  Input: bcm5974 - add MacBookAir4,1 trackpad support
  Input: wacom - add POINTER and DIRECT device properties
  Input: adp5588-keys - remove incorrect modalias
  Input: cm109 - fix checking return value of usb_control_msg
  Input: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartner
  Input: wacom - remove pressure for touch devices

13 years agosfc: Use correct fields of struct ethtool_coalesce
Ben Hutchings [Mon, 5 Sep 2011 07:43:49 +0000 (07:43 +0000)] 
sfc: Use correct fields of struct ethtool_coalesce

An earlier developer misunderstood the meaning of the 'irq' fields and
the driver did not support the standard fields.  To avoid invalidating
existing user documentation, we report and accept changes through
either the standard or 'irq' fields.  If both are changed at the same
time, we prefer the standard field.

Also explain why we don't currently use the 'max_frames' fields.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: Validate IRQ moderation parameters in efx_init_irq_moderation()
Ben Hutchings [Mon, 5 Sep 2011 07:43:04 +0000 (07:43 +0000)] 
sfc: Validate IRQ moderation parameters in efx_init_irq_moderation()

Add a range check, and move the check that RX and TX are consistent
from efx_ethtool_set_coalesce().

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: Correct reporting and validation of TX interrupt coalescing
Ben Hutchings [Mon, 5 Sep 2011 07:42:25 +0000 (07:42 +0000)] 
sfc: Correct reporting and validation of TX interrupt coalescing

The reported TX IRQ moderation is generated in a completely crazy way.
Make it simple and correct.

When channels are shared between RX and TX, TX IRQ moderation must be
the same as RX IRQ moderation, but must be specified as 0!  Allow it
to be either specified as the same, or left at its previous value
in which case it will be quietly overridden.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: Use consistent types for interrupt coalescing parameters
Ben Hutchings [Mon, 5 Sep 2011 07:41:44 +0000 (07:41 +0000)] 
sfc: Use consistent types for interrupt coalescing parameters

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: Correct error code for unsupported interrupt coalescing parameters
Ben Hutchings [Mon, 5 Sep 2011 07:41:27 +0000 (07:41 +0000)] 
sfc: Correct error code for unsupported interrupt coalescing parameters

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMAINTAINERS: update ath6kl
Kalle Valo [Tue, 13 Sep 2011 07:21:25 +0000 (10:21 +0300)] 
MAINTAINERS: update ath6kl

It's not in staging anymore and I'm the current maintainer.

Cc: Luis R. Rodriguez <mcgrof@gmail.com>
Cc: Naveen Singh <nvesing@qca.qualcomm.com>
Signed-off-by: Kalle Valo <kvalo@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: fix endian issues and comments for BAR failure handling
Felix Fietkau [Thu, 15 Sep 2011 07:37:46 +0000 (09:37 +0200)] 
mac80211: fix endian issues and comments for BAR failure handling

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Cc: Helmut Schaa <helmut.schaa@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: do not insert padding into tx buffers on AR9380+
Felix Fietkau [Wed, 14 Sep 2011 19:24:27 +0000 (21:24 +0200)] 
ath9k: do not insert padding into tx buffers on AR9380+

With the new EDMA descriptor format, a single descriptor can contain up
to four buffer pointers. By splitting the buffer into two parts, we can
let the hardware add the padding internally instead of using memmove on
the skb data.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: optimize ath_tx_rc_status usage
Felix Fietkau [Wed, 14 Sep 2011 19:24:26 +0000 (21:24 +0200)] 
ath9k: optimize ath_tx_rc_status usage

The only flag that needs to be set when ath_tx_rc_status is called with
rc_update == false is the IEEE80211_TX_STAT_TX_FILTERED flag. All other
data is ignored in that case.
This flag can be set from ath_tx_complete_buf instead, so that we can
drop a few redundant calls to ath_tx_rc_status and remove the rc_update
function parameter

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove a redundant check in ath_tx_form_aggr
Felix Fietkau [Wed, 14 Sep 2011 19:24:25 +0000 (21:24 +0200)] 
ath9k: remove a redundant check in ath_tx_form_aggr

ath_lookup_legacy now checks all the tx rate flags for MCS vs legacy

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: optimize ath9k_ps_restore
Felix Fietkau [Wed, 14 Sep 2011 19:24:24 +0000 (21:24 +0200)] 
ath9k: optimize ath9k_ps_restore

ath_hw_cycle_counters_update only needs to be called if the power state
changes. Most of the time this does not happen, even when ps_usecount
goes down to 0.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: remove the old tx descriptor API
Felix Fietkau [Wed, 14 Sep 2011 19:24:23 +0000 (21:24 +0200)] 
ath9k_hw: remove the old tx descriptor API

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use the new API for setting tx descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:22 +0000 (21:24 +0200)] 
ath9k: use the new API for setting tx descriptors

With the new API, tx descriptors can be written in one single pass
instead of having to re-read and rewrite fields from multiple places.
This makes the code easier to read and also slightly improves performance
on embedded MIPS hardware.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: add a new API for setting tx descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:21 +0000 (21:24 +0200)] 
ath9k_hw: add a new API for setting tx descriptors

Instead of using lots of different functions with long argument lists,
pull all the necessary information from one struct. This makes the code
easier to read and eliminates the need for copying data between multiple
linked descriptors.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdesc
Felix Fietkau [Wed, 14 Sep 2011 19:24:20 +0000 (21:24 +0200)] 
ath9k_hw: do not recalculate the descriptor checksum in ar9003_hw_fill_txdesc

Reduces the number of accesses to uncached descriptor memory.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: call ath9k_hw_set_desc_link for beacon descriptors
Felix Fietkau [Wed, 14 Sep 2011 19:24:19 +0000 (21:24 +0200)] 
ath9k: call ath9k_hw_set_desc_link for beacon descriptors

This ensures that only ath9k_hw_set_desc_link needs to recalculate the tx
descriptor checksum on AR9380+

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: move ath_buf_set_rate to remove a forward declaration
Felix Fietkau [Wed, 14 Sep 2011 19:24:18 +0000 (21:24 +0200)] 
ath9k: move ath_buf_set_rate to remove a forward declaration

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: reduce the number of functions that access the tx descriptor
Felix Fietkau [Wed, 14 Sep 2011 19:24:17 +0000 (21:24 +0200)] 
ath9k: reduce the number of functions that access the tx descriptor

Makes it easier to clean up the ath9k_hw descriptor API

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: remove ATH_TX_XRETRY and BUF_XRETRY flags
Felix Fietkau [Wed, 14 Sep 2011 19:24:16 +0000 (21:24 +0200)] 
ath9k: remove ATH_TX_XRETRY and BUF_XRETRY flags

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: ensure that rx is not enabled during a reset
Felix Fietkau [Wed, 14 Sep 2011 19:23:03 +0000 (21:23 +0200)] 
ath9k: ensure that rx is not enabled during a reset

During a reset, rx buffers are flushed after rx has been disabled. To avoid
race conditions, rx needs to stay disabled during the reset, so avoid any
calls to ath9k_hw_rxena in that case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: make beacon timer initialization more reliable
Felix Fietkau [Wed, 14 Sep 2011 19:23:02 +0000 (21:23 +0200)] 
ath9k: make beacon timer initialization more reliable

When starting the AP beacon timer, it assumes that the TSF has recently
been cleared. Set the SC_OP_TSF_RESET flag to ensure that this is always
the case.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: fix enabling interrupts after a hardware error interrupt
Felix Fietkau [Wed, 14 Sep 2011 19:23:01 +0000 (21:23 +0200)] 
ath9k: fix enabling interrupts after a hardware error interrupt

The interrupt handler increases the interrupt disable refcount, so the
tasklet needs to always call ath9k_hw_enable_interrupts.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix PS wrappers and enabling LED
Mohammed Shafi Shajakhan [Wed, 14 Sep 2011 09:39:40 +0000 (15:09 +0530)] 
ath9k: Fix PS wrappers and enabling LED

in ath_pci_resume it seems we are not enabling LED properly, in addition
we have a PS wrapper fix for this

Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: enable LED pin for AR946/8x chipsets
Mohammed Shafi Shajakhan [Wed, 14 Sep 2011 09:39:13 +0000 (15:09 +0530)] 
ath9k: enable LED pin for AR946/8x chipsets

now the LED starts working for AR946/8x chipsets

Cc: "Balasubramanian, senthilkumar" <senthilb@qca.qualcomm.com>
Signed-off-by: Mohammed Shafi Shajakhan <mohammed@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Do full chip reset on 11A channels for AR9003
Rajkumar Manoharan [Wed, 14 Sep 2011 08:50:30 +0000 (14:20 +0530)] 
ath9k_hw: Do full chip reset on 11A channels for AR9003

AR9003 seems to have issues sometimes with fast channel change
in 5GHz and this case is handled specifically for AR9280 by doing
a full reset. Let's do a full reset for 5GHz channles of AR9380
& for all channels of AR9280 pci chips.

Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: move register definitions to header files
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:19 +0000 (22:38 +0530)] 
ath9k_hw: move register definitions to header files

Move the register macros to appropriate header files to be in
sync with other register definitions and also a single place
to refer everything.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add support for AR946/8x chipsets.
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:18 +0000 (22:38 +0530)] 
ath9k_hw: Add support for AR946/8x chipsets.

This patch adds support for AR946/8x chipets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Split tx/rx gain table initval handling
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:17 +0000 (22:38 +0530)] 
ath9k_hw: Split tx/rx gain table initval handling

Split tx/rx gain table initval hanlding part so readability
is better and easy to manage the code.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_hw: Add initvals and register definitions for AR946/8x chipsets.
Senthil Balasubramanian [Tue, 13 Sep 2011 17:08:16 +0000 (22:38 +0530)] 
ath9k_hw: Add initvals and register definitions for AR946/8x chipsets.

Add initvals and register modifications required to support AR946/8x chipsets.

Signed-off-by: Senthil Balasubramanian <senthilb@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonl80211/cfg80211/mac80211: fix wme docs
Eliad Peller [Sun, 11 Sep 2011 06:46:55 +0000 (09:46 +0300)] 
nl80211/cfg80211/mac80211: fix wme docs

Add/fix some missing docs.

Signed-off-by: Eliad Peller <eliad@wizery.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agofirewire: ohci: add no MSI quirk for O2Micro controller
Ming Lei [Wed, 31 Aug 2011 02:45:46 +0000 (10:45 +0800)] 
firewire: ohci: add no MSI quirk for O2Micro controller

This fixes https://bugs.launchpad.net/ubuntu/+source/linux/+bug/801719 .

An O2Micro PCI Express FireWire controller,
"FireWire (IEEE 1394) [0c00]: O2 Micro, Inc. Device [1217:11f7] (rev 05)"
which is a combination device together with an SDHCI controller and some
sort of storage controller, misses SBP-2 status writes from an attached
FireWire HDD.  This problem goes away if MSI is disabled for this
FireWire controller.

The device reportedly does not require QUIRK_CYCLE_TIMER.

Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de> (amended changelog)
Cc: <stable@kernel.org>
13 years agoMerge branch 'for-linville' of git://github.com/lucacoelho/wl12xx
John W. Linville [Fri, 16 Sep 2011 20:20:43 +0000 (16:20 -0400)] 
Merge branch 'for-linville' of git://github.com/lucacoelho/wl12xx

13 years agoiscsi-target: Disable markers + remove dangerous local scope array usage
Nicholas Bellinger [Fri, 16 Sep 2011 08:44:54 +0000 (01:44 -0700)] 
iscsi-target: Disable markers + remove dangerous local scope array usage

This patch makes iscsi-target explictly disable OFMarker=Yes and IFMarker=yes
parameter key usage during iscsi login by setting IFMarkInt_Reject and
OFMarkInt_Reject values in iscsi_enforce_integrity_rules() to effectively
disable iscsi marker usage.  With this patch, an initiator proposer asking
to enable either marker parameter keys will be issued a 'No' response, and
the target sets OFMarkInt + IFMarkInt parameter key response to 'Irrelevant'.

With markers disabled during iscsi login, this patch removes the problematic
on-stack local-scope array for marker intervals in iscsit_do_rx_data() +
iscsit_do_tx_data(), and other related marker code in iscsi_target_util.c.
This fixes a potentional stack smashing scenario with small range markers
enabled and a large MRDSL as reported by DanC here:

[bug report] target: stack can be smashed
http://www.spinics.net/lists/target-devel/msg00453.html

Reported-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
13 years agotarget: Skip non hex characters for VPD=0x83 NAA IEEE Registered Extended
Nicholas Bellinger [Fri, 16 Sep 2011 08:31:28 +0000 (01:31 -0700)] 
target: Skip non hex characters for VPD=0x83 NAA IEEE Registered Extended

This patch adds target_parse_naa_6h_vendor_specific() to address a bug where the
conversion of PRODUCT SERIAL NUMBER to use hex2bin() in target_emulate_evpd_83()
was not doing proper isxdigit() checking.  This conversion of the vpd_unit_serial
configifs attribute is done while generating a VPD=0x83 NAA IEEE Registered
Extended DESIGNATOR format's 100 bits of unique VENDOR SPECIFIC IDENTIFIER +
VENDOR SPECIFIC IDENTIFIER EXTENSION area.

This patch allows vpd_unit_serial (VPD=0x80) and the T10 Vendor ID DESIGNATOR
format (VPD=0x83) to continue to use free-form variable length ASCII values,
and now skips any non hex characters for fixed length NAA IEEE Registered Extended
DESIGNATOR format (VPD=0x83) requring the binary conversion.

This was originally reported by Martin after the v3.1-rc1 change to use hex2bin()
in commit 11650b859681e03fdbf26277fcfc5f1f62186703 where the use of non hex
characters in vpd_unit_serial generated different values than the original
v3.0 internal hex -> binary code.  This v3.1 change caused a problem with
filesystems who write a NAA DESIGNATOR onto it's ondisk metadata, and this patch
will (again) change existing values to ensure that non hex characters are not
included in the fixed length NAA DESIGNATOR.

Note this patch still expects vpd_unit_serial to be set via existing userspace
methods of uuid generation, and does not do strict formatting via configfs input.

The original bug report and thread can be found here:

NAA breakage
http://www.spinics.net/lists/target-devel/msg00477.html

The v3.1-rc1 formatting of VPD=0x83 w/o this patch:

VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 20
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 6, IEEE Company_id: 0x1405
      Vendor Specific Identifier: 0xffde35ebf
      Vendor Specific Identifier Extension: 0x3092f498ffa820f9
      [0x6001405ffde35ebf3092f498ffa820f9]
  Designation descriptor number 2, descriptor length: 56
    designator_type: T10 vendor identification,  code_set: ASCII
    associated with the addressed logical unit
      vendor id: LIO-ORG
      vendor specific: IBLOCK:ffde35ec-3092-4980-a820-917636ca54f1

The v3.1-final formatting of VPD=0x83 w/ this patch:

VPD INQUIRY: Device Identification page
  Designation descriptor number 1, descriptor length: 20
    designator_type: NAA,  code_set: Binary
    associated with the addressed logical unit
      NAA 6, IEEE Company_id: 0x1405
      Vendor Specific Identifier: 0xffde35ec3
      Vendor Specific Identifier Extension: 0x924980a82091763
      [0x6001405ffde35ec30924980a82091763]
  Designation descriptor number 2, descriptor length: 56
    designator_type: T10 vendor identification,  code_set: ASCII
    associated with the addressed logical unit
      vendor id: LIO-ORG
      vendor specific: IBLOCK:ffde35ec-3092-4980-a820-917636ca54f1

(v2: Fix parsing code to dereference + check for string terminator instead
     of null pointer to ensure a zeroed payload for vpd_unit_serial less
     than 100 bits of NAA DESIGNATOR VENDOR SPECIFIC area.  Also, remove
     the unnecessary bitwise assignment)

Reported-by: Martin Svec <martin.svec@zoner.cz>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
13 years agoiwlagn: workaround bug crashing some APs
Don Fry [Thu, 15 Sep 2011 15:36:22 +0000 (08:36 -0700)] 
iwlagn: workaround bug crashing some APs

This patch reverts commit 9b7688328422b88a7a15dc0dc123ad9ab1a6e22d which
was introduced in 2.6.38-rc1.  It works around a problem where the iwlagn
driver stimulates a bug crashing (requiring power cycle to recover) some
APs under heavy traffic.

CC: stable@kernel.org #2.6.39, #3.0.0 #3.1.0
Signed-off-by: Don Fry <donald.h.fry@intel.com>
SIgned-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Fix rate mask for scan request
Rajkumar Manoharan [Thu, 15 Sep 2011 09:42:29 +0000 (15:12 +0530)] 
wireless: Fix rate mask for scan request

The scan request received from cfg80211_connect do not
have proper rate mast. So the probe request sent on each
channel do not have proper the supported rates ie.

Cc: stable@kernel.org
Reviewed-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortl2800usb: Fix incorrect storage of MAC address on big-endian platforms
Larry Finger [Wed, 14 Sep 2011 21:50:23 +0000 (16:50 -0500)] 
rtl2800usb: Fix incorrect storage of MAC address on big-endian platforms

The eeprom data is stored in little-endian order in the rt2x00 library.
As it was converted to cpu order in the read routines, the data need to
be converted to LE on a big-endian platform.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: Stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agort2800pci: Fix compiler error on PowerPC
Larry Finger [Wed, 14 Sep 2011 21:50:22 +0000 (16:50 -0500)] 
rt2800pci: Fix compiler error on PowerPC

Using gcc 4.4.5 on a Powerbook G4 with a PPC cpu, a complicated
if statement results in incorrect flow, whereas the equivalent switch
statement works correctly.

Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Cc: stable <stable@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoipw2x00: fix rtnl mutex deadlock
Stanislaw Gruszka [Wed, 14 Sep 2011 14:47:50 +0000 (16:47 +0200)] 
ipw2x00: fix rtnl mutex deadlock

This fix regression introduced by:

commit: ecb4433550f0620f3d1471ae7099037ede30a91e
Author: Stanislaw Gruszka <sgruszka@redhat.com>
Date:   Fri Aug 12 14:00:59 2011 +0200

    mac80211: fix suspend/resume races with unregister hw

Above commit add rtnl_lock() into wiphy_register(), what cause deadlock
when initializing ipw2x00 driver, which itself call wiphy_register()
from register_netdev() internal callback with rtnl mutex taken.

To fix move wiphy_register() outside register_netdev(). This solution
have side effect of not creating /sys/class/net/wlanX/phy80211 link,
but that's a minor issue we can live with.

Bisected-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Bisected-by: Michael Witten <mfwitten@gmail.com>
Tested-by: Witold Baryluk <baryluk@smp.if.uj.edu.pl>
Tested-by: Michael Witten <mfwitten@gmail.com>
Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agowireless: Reset beacon_found while updating regulatory
Rajkumar Manoharan [Wed, 14 Sep 2011 08:58:17 +0000 (14:28 +0530)] 
wireless: Reset beacon_found while updating regulatory

During the association, the regulatory is updated by country IE
that reaps the previously found beacons. The impact is that
after a STA disconnects *or* when for any reason a regulatory
domain change happens the beacon hint flag is not cleared
therefore preventing future beacon hints to be learned.
This is important as a regulatory domain change or a restore
of regulatory settings would set back the passive scan and no-ibss
flags on the channel. This is the right place to do this given that
it covers any regulatory domain change.

Cc: stable@kernel.org
Reviewed-by: Luis R. Rodriguez <mcgrof@gmail.com>
Signed-off-by: Rajkumar Manoharan <rmanohar@qca.qualcomm.com>
Acked-by: Luis R. Rodriguez <mcgrof@qca.qualcomm.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoibmveth: Fix checksum offload failure handling
Anton Blanchard [Wed, 7 Sep 2011 14:41:06 +0000 (14:41 +0000)] 
ibmveth: Fix checksum offload failure handling

Fix a number of issues in ibmveth_set_csum_offload:

- set_attr6 and clr_attr6 may be used uninitialised

- We store the result of the IPV4 checksum change in ret but overwrite
  it in a couple of places before checking it again later. Add ret4
  to make it obvious what we are doing.

- We weren't clearing the NETIF_F_IP_CSUM and NETIF_F_IPV6_CSUM flags
  if the enable of that hypervisor feature failed.

Signed-off-by: Anton Blanchard <anton@samba.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoibmveth: Checksum offload is always disabled
Anton Blanchard [Wed, 7 Sep 2011 14:41:05 +0000 (14:41 +0000)] 
ibmveth: Checksum offload is always disabled

Commit b9367bf3ee6d (net: ibmveth: convert to hw_features) reversed
a check in ibmveth_set_csum_offload that results in checksum offload
never being enabled.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org> # 3.0+
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoibmveth: Fix issue with DMA mapping failure
Anton Blanchard [Wed, 7 Sep 2011 14:41:04 +0000 (14:41 +0000)] 
ibmveth: Fix issue with DMA mapping failure

descs[].fields.address is 32bit which truncates any dma mapping
errors so dma_mapping_error() fails to catch it.

Use a dma_addr_t to do the comparison. With this patch I was able
to transfer many gigabytes of data with IOMMU fault injection set
at 10% probability.

Signed-off-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org> # v2.6.37+
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoibmveth: Fix DMA unmap error
Brian King [Wed, 7 Sep 2011 14:41:03 +0000 (14:41 +0000)] 
ibmveth: Fix DMA unmap error

Commit 6e8ab30ec677 (ibmveth: Add scatter-gather support) introduced a
DMA mapping API inconsistency resulting in dma_unmap_page getting
called on memory mapped via dma_map_single. This was seen when
CONFIG_DMA_API_DEBUG was enabled. Fix up this API usage inconsistency.

Signed-off-by: Brian King <brking@linux.vnet.ibm.com>
Acked-by: Anton Blanchard <anton@samba.org>
Cc: <stable@kernel.org> # v2.6.37+
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge git://github.com/Jkirsher/net-next
David S. Miller [Fri, 16 Sep 2011 19:18:02 +0000 (15:18 -0400)] 
Merge git://github.com/Jkirsher/net-next

13 years agoMerge branch 'for-davem' of git://git.infradead.org/users/linville/wireless-next
David S. Miller [Fri, 16 Sep 2011 19:14:19 +0000 (15:14 -0400)] 
Merge branch 'for-davem' of git://git.infradead.org/users/linville/wireless-next

13 years agoMerge branch 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen
Linus Torvalds [Fri, 16 Sep 2011 18:28:11 +0000 (11:28 -0700)] 
Merge branch 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen

* 'stable/bug.fixes' of git://oss.oracle.com/git/kwilk/xen:
  xen/i386: follow-up to "replace order-based range checking of M2P table by linear one"
  xen/irq: Alter the locking to use a mutex instead of a spinlock.
  xen/e820: if there is no dom0_mem=, don't tweak extra_pages.
  xen: disable PV spinlocks on HVM

13 years agotcm_fc: Work queue based approach instead of managing own thread and event based...
Christoph Hellwig [Fri, 26 Aug 2011 16:25:38 +0000 (09:25 -0700)] 
tcm_fc: Work queue based approach instead of managing own thread and event based mechanism

Problem: Changed from wake_up_interruptible -> wake_up_process and
wait_event_interruptible-> schedule_timeout_interruptible broke the FCoE
target.  Earlier approach of wake_up_interruptible was also looking at
'queue_cnt' which is not necessary, because it increment of 'queue_cnt'
with wake_up_inetrriptible / waker_up_process introduces race condition.

Fix: Instead of fixing the code which used wake_up_process and remove
'queue_cnt', using work_queue based approach is cleaner and acheives
same result. As well, work queue based approach has less programming
overhead and OS manages threads which processes work queues.

This patch is developed by Christoph Hellwig and reviwed+validated by
Kiran Patil.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Kiran Patil <kiran.patil@intel.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
This page took 0.098925 seconds and 5 git commands to generate.