]> Pileus Git - ~andy/linux/log
~andy/linux
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 4 Mar 2011 19:10:40 +0000 (14:10 -0500)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 into for-davem

13 years agoipv6: Use ERR_CAST in addrconf_dst_alloc.
David S. Miller [Thu, 3 Mar 2011 20:10:37 +0000 (12:10 -0800)]
ipv6: Use ERR_CAST in addrconf_dst_alloc.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Thu, 3 Mar 2011 19:28:35 +0000 (11:28 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6

13 years agoipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.
David S. Miller [Thu, 3 Mar 2011 19:24:19 +0000 (11:24 -0800)]
ipv4: Fix __ip_dev_find() to use ifa_local instead of ifa_address.

Reported-by: Stephen Hemminger <shemminger@vyatta.com>
Reported-by: Julian Anastasov <ja@ssi.bg>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet_sched: reduce fifo qdisc size
Eric Dumazet [Thu, 3 Mar 2011 19:10:02 +0000 (11:10 -0800)]
net_sched: reduce fifo qdisc size

Because of various alignements [SLUB / qdisc], we use 512 bytes of
memory for one {p|b}fifo qdisc, instead of 256 bytes on 64bit arches and
192 bytes on 32bit ones.

Move the "u32 limit" inside "struct Qdisc" (no impact on other qdiscs)

Change qdisc_alloc(), first trying a regular allocation before an
oversized one.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms
Patrick McHardy [Thu, 3 Mar 2011 18:55:40 +0000 (10:55 -0800)]
netlink: kill loginuid/sessionid/sid members from struct netlink_skb_parms

Netlink message processing in the kernel is synchronous these days, the
session information can be collected when needed.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Fix crash in dst_release when udp_sendmsg route lookup fails.
David S. Miller [Thu, 3 Mar 2011 18:38:01 +0000 (10:38 -0800)]
ipv4: Fix crash in dst_release when udp_sendmsg route lookup fails.

As reported by Eric:

[11483.697233] IP: [<c12b0638>] dst_release+0x18/0x60
 ...
[11483.697741] Call Trace:
[11483.697764]  [<c12fc9d2>] udp_sendmsg+0x282/0x6e0
[11483.697790]  [<c12a1c01>] ? memcpy_toiovec+0x51/0x70
[11483.697818]  [<c12dbd90>] ? ip_generic_getfrag+0x0/0xb0

The pointer passed to dst_release() is -EINVAL, that's because
we leave an error pointer in the local variable "rt" by accident.

NULL it out to fix the bug.

Reported-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoixgbe: cleanup copyright string for 2011
Don Skidmore [Wed, 23 Feb 2011 09:58:39 +0000 (09:58 +0000)]
ixgbe: cleanup copyright string for 2011

Updating the copyrights for 2011 as well as make the ixgbe_copyright string
a constant.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add function pointer for semaphore function
Don Skidmore [Fri, 25 Feb 2011 01:58:04 +0000 (01:58 +0000)]
ixgbe: add function pointer for semaphore function

The X540 devices grabs semaphores differently than 82599 and 82598
devices do.  They do however also grab them in allot of the same
functions.  So I'm adding a new MAC operation function pointer to
allow us to use the correct function based on our MAC type.  I'm also
changing all the semaphore calls to use this new function pointer.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: X540 Cleanup
Greg Rose [Tue, 1 Mar 2011 04:37:15 +0000 (04:37 +0000)]
ixgbe: X540 Cleanup

Clean up commented out include file and use #define instead of hard coded
value for number of RAR entries.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup handling of I2C interface to PHY
Emil Tantilov [Sat, 19 Feb 2011 08:43:55 +0000 (08:43 +0000)]
ixgbe: cleanup handling of I2C interface to PHY

The I2C interface was not being correctly locked down per port.  As such
this can lead to race conditions that can cause issues.  This patch cleans
up the handling to make certain we are not experiencing racy I2C access.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: store permanent address before initializing Rx addresses
Emil Tantilov [Sat, 19 Feb 2011 08:43:49 +0000 (08:43 +0000)]
ixgbe: store permanent address before initializing Rx addresses

We were reading the address after it had been initialized and this results
in the permanent address on the system being changed.  This change corrects
that by storing the address before we re-initialize it.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Numerous whitespace / formatting cleanups
Emil Tantilov [Sat, 19 Feb 2011 08:43:44 +0000 (08:43 +0000)]
ixgbe: Numerous whitespace / formatting cleanups

This patch contains a number of whitespace and formatting cleanups.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Specific check for 100 Full link speed
Emil Tantilov [Sat, 19 Feb 2011 08:43:39 +0000 (08:43 +0000)]
ixgbe: Specific check for 100 Full link speed

This patch specifically checks for 100 Full link speed instead of
assuming we are linked at 100 if not linked at 10G and 1G.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Drop unused code for setting up unicast addresses
Emil Tantilov [Sat, 19 Feb 2011 08:43:34 +0000 (08:43 +0000)]
ixgbe: Drop unused code for setting up unicast addresses

This change removes the unused code that was setting up the uc_addr_list.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: rework ixgbe MTA handling to not drop packets
Emil Tantilov [Fri, 18 Feb 2011 08:58:27 +0000 (08:58 +0000)]
ixgbe: rework ixgbe MTA handling to not drop packets

This change modifies the ixgbe drivers so that it will not drop the
multicast filters while updating them.  Instead it uses an intermediate
table to store the filter and then writes that filter to the hardware.

Based on original patch from Dave Boutcher <daveboutcher@gmail.com>

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Reported-by: Dave Boutcher <daveboutcher@gmail.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup X540 PHY reset function pointer
Don Skidmore [Fri, 18 Feb 2011 19:29:46 +0000 (19:29 +0000)]
ixgbe: cleanup X540 PHY reset function pointer

The X540 PHY reset pointer isn't currently used which is a good thing as it
wouldn't work as implemented.  On top of that the X540 firmware is written
with the assumption that is does not need to be reset for proper
initialization so it's not needed.  I'm just assigning the pointer at NULL
as the current implementation is rather misleading.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Bounds checking for set_rar, clear_rar, set_vmdq, clear_vmdq
Emil Tantilov [Thu, 17 Feb 2011 11:34:58 +0000 (11:34 +0000)]
ixgbe: Bounds checking for set_rar, clear_rar, set_vmdq, clear_vmdq

This change makes it so that out of bounds requests to these calls will
now return IXGBE_ERR_INVALID_ARGUMENT instead of returning 0.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Fill out PCIe speed and width enums with values
Emil Tantilov [Thu, 17 Feb 2011 11:34:53 +0000 (11:34 +0000)]
ixgbe: Fill out PCIe speed and width enums with values

This patch fills in the values for bus speed and width of the
ixgbe_bus_speed and ixgbe_bus_width enums.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: add polling test to end of PHY reset
Emil Tantilov [Wed, 16 Feb 2011 01:38:13 +0000 (01:38 +0000)]
ixgbe: add polling test to end of PHY reset

Some PHYs require that we poll the reset bit and wait for it to clear
before continuing initialization.  As such we should add this check to the
end of the ixgbe_reset_phy_generic routine.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Check link wants report current link state
Emil Tantilov [Wed, 16 Feb 2011 01:38:08 +0000 (01:38 +0000)]
ixgbe: Check link wants report current link state

Currently check link reports the link state as down, if at any time
the link had previously gone down since the last time the LINKS
register was read.  This does not accurately reflect the function of
the check link call, which should be to return the CURRENT link
state. Code now reads the LINKS registers twice, once to clear the
previous and again to get the current value.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup code in ixgbe_identify_sfp_module_generic
Emil Tantilov [Wed, 16 Feb 2011 10:14:00 +0000 (10:14 +0000)]
ixgbe: cleanup code in ixgbe_identify_sfp_module_generic

This change cleans up several issues in ixgbe_identify_sfp_module_generic
including whitespace, redundant code, I2C EEPROM reads without exception
handling, and an if/elseif/else without braces.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: Add ability to double reset on failure to clear master enable
Emil Tantilov [Mon, 14 Feb 2011 08:45:13 +0000 (08:45 +0000)]
ixgbe: Add ability to double reset on failure to clear master enable

Double resets are required for recovery from certain error conditions.
Between resets, it is necessary to stall to allow time for any pending HW
events to complete. We use 1usec since that is what is needed for
ixgbe_disable_pcie_master(). The second reset then clears out any effects
of those events.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: set media type for 82599 T3 LOM
Emil Tantilov [Sat, 12 Feb 2011 10:52:07 +0000 (10:52 +0000)]
ixgbe: set media type for 82599 T3 LOM

The media type was not being set for the 82599 T3 LAN on motherboard.  This
change corrects that.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: balance free_irq calls with request_irq calls
Alexander Duyck [Tue, 15 Feb 2011 02:12:05 +0000 (02:12 +0000)]
ixgbe: balance free_irq calls with request_irq calls

We were incorrectly freeing IRQs that we had not requested.  This change
corrects that by making certain we only free q_vectors that we have
requested IRQs for.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup logic related to HW semaphores
Emil Tantilov [Tue, 8 Feb 2011 09:42:41 +0000 (09:42 +0000)]
ixgbe: cleanup logic related to HW semaphores

This change cleans up much of the logic related to the hardware semaphores
on the adapters. There were a number of issues with timings that needed to
be addressed.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup wake on LAN defines
Emil Tantilov [Tue, 8 Feb 2011 09:48:32 +0000 (09:48 +0000)]
ixgbe: cleanup wake on LAN defines

This change just cleans up a few defines in ixgbe_type.h related to wake on LAN.

Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbevf: Fix Compiler Warnings
Greg Rose [Fri, 25 Feb 2011 03:34:18 +0000 (03:34 +0000)]
ixgbevf: Fix Compiler Warnings

Fix Compiler warnings of variables that are initialized but not used.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: Fix strncpy calls to be safe per source code review tools
Carolyn Wyborny [Wed, 2 Mar 2011 01:11:26 +0000 (01:11 +0000)]
igb: Fix strncpy calls to be safe per source code review tools

This fix changes the remaining calls to strncpy that have not yet
been changed to use the "sizeof(buf) - 1" syntax rather than just
a number for buffer size.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: Fix reg pattern test in ethtool for i350 devices
Carolyn Wyborny [Thu, 24 Feb 2011 03:12:15 +0000 (03:12 +0000)]
igb: Fix reg pattern test in ethtool for i350 devices

This fixes the reg_pattern_test so that the test does not fail
on i350 parts.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoigb: warn if max_vfs limit is exceeded
Stefan Assmann [Thu, 24 Feb 2011 20:03:31 +0000 (20:03 +0000)]
igb: warn if max_vfs limit is exceeded

Currently there's no warning printed when max_vfs > 7 is specified with
igb and the maximum of 7 is silently enforced. This patch prints a
warning and informs the user of the actions taken.

Signed-off-by: Stefan Assmann <sassmann@redhat.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agocxgb{3,4}*: improve Kconfig dependencies
Dimitris Michailidis [Mon, 28 Feb 2011 17:34:15 +0000 (17:34 +0000)]
cxgb{3,4}*: improve Kconfig dependencies

- Remove the dependency of cxgb4 and cxgb4vf on INET.  cxgb3 really
  depends on INET, keep it but add it directly to the driver's Kconfig
  entry.
- Make the iSCSI drivers cxgb3i and cxgb4i available in the SCSI menu
  without requiring any options in the net driver menu to be enabled
  first.  Add needed selects so the iSCSI drivers can build their
  corresponding net drivers.
- Remove CHELSIO_T*_DEPENDS.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Acked-by: Jan Beulich <jbeulich@novell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcbnl: add support for retrieving peer configuration - cee
Shmulik Ravid [Sun, 27 Feb 2011 05:04:38 +0000 (05:04 +0000)]
dcbnl: add support for retrieving peer configuration - cee

This patch adds the support for retrieving the remote or peer DCBX
configuration via dcbnl for embedded DCBX stacks supporting the CEE DCBX
standard.

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodcbnl: add support for retrieving peer configuration - ieee
Shmulik Ravid [Sun, 27 Feb 2011 05:04:31 +0000 (05:04 +0000)]
dcbnl: add support for retrieving peer configuration - ieee

These 2 patches add the support for retrieving the remote or peer DCBX
configuration via dcbnl for embedded DCBX stacks. The peer configuration
is part of the DCBX MIB and is useful for debugging and diagnostics of
the overall DCB configuration. The first patch add this support for IEEE
802.1Qaz standard the second patch add the same support for the older
CEE standard. Diff for v2 - the peer-app-info is CEE specific.

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdevice: make initial group visible to userspace
Vlad Dogaru [Sat, 26 Feb 2011 22:39:12 +0000 (22:39 +0000)]
netdevice: make initial group visible to userspace

INIT_NETDEV_GROUP is needed by userspace, move it outside __KERNEL__
guards.

Signed-off-by: Vlad Dogaru <ddvlad@rosedu.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: ip_route_output_key() is better as an inline.
David S. Miller [Wed, 2 Mar 2011 22:56:30 +0000 (14:56 -0800)]
ipv4: ip_route_output_key() is better as an inline.

This avoid a stack frame at zero cost.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Make output route lookup return rtable directly.
David S. Miller [Wed, 2 Mar 2011 22:31:35 +0000 (14:31 -0800)]
ipv4: Make output route lookup return rtable directly.

Instead of on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Return dst directly from xfrm_lookup()
David S. Miller [Wed, 2 Mar 2011 21:27:41 +0000 (13:27 -0800)]
xfrm: Return dst directly from xfrm_lookup()

Instead of on the stack.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6
David S. Miller [Wed, 2 Mar 2011 19:30:24 +0000 (11:30 -0800)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/kaber/nf-next-2.6

13 years agoinet: Replace left-over references to inet->cork
Herbert Xu [Wed, 2 Mar 2011 07:00:58 +0000 (23:00 -0800)]
inet: Replace left-over references to inet->cork

The patch to replace inet->cork with cork left out two spots in
__ip_append_data that can result in bogus packet construction.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopfkey: fix warning
Stephen Hemminger [Wed, 2 Mar 2011 06:51:52 +0000 (22:51 -0800)]
pfkey: fix warning

If CONFIG_NET_KEY_MIGRATE is not defined the arguments of
pfkey_migrate stub do not match causing warning.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Make icmp route lookup code a bit clearer.
David S. Miller [Wed, 2 Mar 2011 06:06:22 +0000 (22:06 -0800)]
ipv6: Make icmp route lookup code a bit clearer.

The route lookup code in icmpv6_send() is slightly tricky as a result of
having to handle all of the requirements of RFC 4301 host relookups.

Pull the route resolution into a seperate function, so that the error
handling and route reference counting is hopefully easier to see and
contained wholly within this new routine.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Make icmp route lookup code a bit clearer.
David S. Miller [Tue, 1 Mar 2011 23:49:55 +0000 (15:49 -0800)]
ipv4: Make icmp route lookup code a bit clearer.

The route lookup code in icmp_send() is slightly tricky as a result of
having to handle all of the requirements of RFC 4301 host relookups.

Pull the route resolution into a seperate function, so that the error
handling and route reference counting is hopefully easier to see and
contained wholly within this new routine.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Handle blackhole route creation via afinfo.
David S. Miller [Tue, 1 Mar 2011 22:59:04 +0000 (14:59 -0800)]
xfrm: Handle blackhole route creation via afinfo.

That way we don't have to potentially do this in every xfrm_lookup()
caller.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Normalize arguments to ip6_dst_blackhole().
David S. Miller [Tue, 1 Mar 2011 22:45:33 +0000 (14:45 -0800)]
ipv6: Normalize arguments to ip6_dst_blackhole().

Return a dst pointer which is potentitally error encoded.

Don't pass original dst pointer by reference, pass a struct net
instead of a socket, and elide the flow argument since it is
unnecessary.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Kill XFRM_LOOKUP_WAIT flag.
David S. Miller [Tue, 1 Mar 2011 22:36:37 +0000 (14:36 -0800)]
xfrm: Kill XFRM_LOOKUP_WAIT flag.

This can be determined from the flow flags instead.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Change final dst lookup arg name to "can_sleep"
David S. Miller [Tue, 1 Mar 2011 22:32:04 +0000 (14:32 -0800)]
ipv6: Change final dst lookup arg name to "can_sleep"

Since it indicates whether we are invoked from a sleepable
context or not.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Kill can_sleep arg to ip_route_output_flow()
David S. Miller [Tue, 1 Mar 2011 22:27:04 +0000 (14:27 -0800)]
ipv4: Kill can_sleep arg to ip_route_output_flow()

This boolean state is now available in the flow flags.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Add FLOWI_FLAG_CAN_SLEEP.
David S. Miller [Tue, 1 Mar 2011 22:22:19 +0000 (14:22 -0800)]
net: Add FLOWI_FLAG_CAN_SLEEP.

And set is in contexts where the route resolution can sleep.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Make final arg to ip_route_output_flow to be boolean "can_sleep"
David S. Miller [Tue, 1 Mar 2011 22:19:23 +0000 (14:19 -0800)]
ipv4: Make final arg to ip_route_output_flow to be boolean "can_sleep"

Since that is what the current vague "flags" argument means.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv4: Can final ip_route_connect() arg to boolean "can_sleep".
David S. Miller [Tue, 1 Mar 2011 22:15:24 +0000 (14:15 -0800)]
ipv4: Can final ip_route_connect() arg to boolean "can_sleep".

Since that's what the current vague "flags" thing means.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Consolidate route lookup sequences.
David S. Miller [Tue, 1 Mar 2011 21:19:07 +0000 (13:19 -0800)]
ipv6: Consolidate route lookup sequences.

Route lookups follow a general pattern in the ipv6 code wherein
we first find the non-IPSEC route, potentially override the
flow destination address due to ipv6 options settings, and then
finally make an IPSEC search using either xfrm_lookup() or
__xfrm_lookup().

__xfrm_lookup() is used when we want to generate a blackhole route
if the key manager needs to resolve the IPSEC rules (in this case
-EREMOTE is returned and the original 'dst' is left unchanged).

Otherwise plain xfrm_lookup() is used and when asynchronous IPSEC
resolution is necessary, we simply fail the lookup completely.

All of these cases are encapsulated into two routines,
ip6_dst_lookup_flow and ip6_sk_dst_lookup_flow.  The latter of which
handles unconnected UDP datagram sockets.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoudp: Add lockless transmit path
Herbert Xu [Tue, 1 Mar 2011 02:36:48 +0000 (02:36 +0000)]
udp: Add lockless transmit path

The UDP transmit path has been running under the socket lock
for a long time because of the corking feature.  This means that
transmitting to the same socket in multiple threads does not
scale at all.

However, as most users don't actually use corking, the locking
can be removed in the common case.

This patch creates a lockless fast path where corking is not used.

Please note that this does create a slight inaccuracy in the
enforcement of socket send buffer limits.  In particular, we
may exceed the socket limit by up to (number of CPUs) * (packet
size) because of the way the limit is computed.

As the primary purpose of socket buffers is to indicate congestion,
this should not be a great problem for now.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoudp: Switch to ip_finish_skb
Herbert Xu [Tue, 1 Mar 2011 02:36:48 +0000 (02:36 +0000)]
udp: Switch to ip_finish_skb

This patch converts UDP to use the new ip_finish_skb API.  This
would then allows us to more easily use ip_make_skb which allows
UDP to run without a socket lock.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinet: Add ip_make_skb and ip_finish_skb
Herbert Xu [Tue, 1 Mar 2011 02:36:47 +0000 (02:36 +0000)]
inet: Add ip_make_skb and ip_finish_skb

This patch adds the helper ip_make_skb which is like ip_append_data
and ip_push_pending_frames all rolled into one, except that it does
not send the skb produced.  The sending part is carried out by
ip_send_skb, which the transport protocol can call after it has
tweaked the skb.

It is meant to be called in cases where corking is not used should
have a one-to-one correspondence to sendmsg.

This patch also adds the helper ip_finish_skb which is meant to
be replace ip_push_pending_frames when corking is required.
Previously the protocol stack would peek at the socket write
queue and add its header to the first packet.  With ip_finish_skb,
the protocol stack can directly operate on the final skb instead,
just like the non-corking case with ip_make_skb.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinet: Remove explicit write references to sk/inet in ip_append_data
Herbert Xu [Tue, 1 Mar 2011 02:36:47 +0000 (02:36 +0000)]
inet: Remove explicit write references to sk/inet in ip_append_data

In order to allow simultaneous calls to ip_append_data on the same
socket, it must not modify any shared state in sk or inet (other
than those that are designed to allow that such as atomic counters).

This patch abstracts out write references to sk and inet_sk in
ip_append_data and its friends so that we may use the underlying
code in parallel.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinet: Remove unused sk_sndmsg_* from UFO
Herbert Xu [Tue, 1 Mar 2011 02:36:47 +0000 (02:36 +0000)]
inet: Remove unused sk_sndmsg_* from UFO

UFO doesn't really use the sk_sndmsg_* parameters so touching
them is pointless.  It can't use them anyway since the whole
point of UFO is to use the original pages without copying.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Tue, 1 Mar 2011 20:24:04 +0000 (12:24 -0800)]
Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-next-2.6

13 years agomac80211: make rate control Kconfig warning depend on mac80211 master-2011-03-01
Johannes Berg [Tue, 1 Mar 2011 16:18:26 +0000 (17:18 +0100)]
mac80211: make rate control Kconfig warning depend on mac80211

... Otherwise it is displayed when mac80211 isn't
even turned on, which is completely pointless.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agob43: N-PHY: rev3+: add static tables
Rafał Miłecki [Tue, 1 Mar 2011 12:28:36 +0000 (13:28 +0100)]
b43: N-PHY: rev3+: add static tables

This finally makes TX on OFDM rates possible on my dev with PHY rev 4.
We still have lower performance than wl, but at least speeds around 15M
become possible.

Signed-off-by: Rafał Miłecki <zajec5@gmail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Fix error registering rate-control
Chaoming Li [Mon, 28 Feb 2011 22:40:28 +0000 (16:40 -0600)]
rtlwifi: Fix error registering rate-control

When a second module such as rtl8192ce or rtl8192cu links to rtlwifi, the attempt
to register a rate-control mechanism fails with the warning shown below. The fix is to
select the RC mechanism when rtlwifi is initialized.

WARNING: at net/mac80211/rate.c:42 ieee80211_rate_control_register+0xc9/0x100 [mac80211]()
Hardware name: HP Pavilion dv2700 Notebook PC
Modules linked in: arc4 ecb rtl8192ce rtl8192cu(+) rtl8192c_common rtlwifi snd_hda_codec_conexant amd74xx(+) ide_core sg mac80211 snd_hda_intel snd_hda_codec i2c_nforce2 snd_pcm snd_timer cfg80211 snd k8temp hwmon serio_raw joydev i2c_core soundcore snd_page_alloc rfkill forcedeth video ac battery button ext3 jbd mbcache sd_mod ohci_hcd ahci libahci libata scsi_mod ehci_hcd usbcore fan processor thermal
Pid: 2227, comm: modprobe Not tainted 2.6.38-rc6-wl+ #468
Call Trace:
 [<ffffffff8104a3da>] ? warn_slowpath_common+0x7a/0xb0
 [<ffffffff8104a425>] ? warn_slowpath_null+0x15/0x20
 [<ffffffffa02de409>] ? ieee80211_rate_control_register+0xc9/0x100 [mac80211]
 [<ffffffffa03b3790>] ? rtl_rate_control_register+0x10/0x20 [rtlwifi]
 [<ffffffffa03ab9c9>] ? rtl_init_core+0x189/0x620 [rtlwifi]
 [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
 [<ffffffffa03b9dea>] ? rtl_usb_probe+0x709/0x82e [rtlwifi]
 [<ffffffffa002a7fd>] ? usb_match_one_id+0x3d/0xc0 [usbcore]
 [<ffffffffa002aae9>] ? usb_probe_interface+0xb9/0x160 [usbcore]
 [<ffffffff8126ed19>] ? driver_probe_device+0x89/0x1a0
 [<ffffffff8126eed3>] ? __driver_attach+0xa3/0xb0
 [<ffffffff8126ee30>] ? __driver_attach+0x0/0xb0
 [<ffffffff8126dd4e>] ? bus_for_each_dev+0x5e/0x90
 [<ffffffff8126e9d9>] ? driver_attach+0x19/0x20
 [<ffffffff8126e5e8>] ? bus_add_driver+0x158/0x290
 [<ffffffff8126f151>] ? driver_register+0x71/0x140
 [<ffffffff811cfff8>] ? __raw_spin_lock_init+0x38/0x70
 [<ffffffffa002a2cc>] ? usb_register_driver+0xdc/0x190 [usbcore]
 [<ffffffffa0013000>] ? rtl8192cu_init+0x0/0x20 [rtl8192cu]
 [<ffffffffa001301e>] ? rtl8192cu_init+0x1e/0x20 [rtl8192cu]
 [<ffffffff810002cf>] ? do_one_initcall+0x3f/0x180
 [<ffffffff8108fd4b>] ? sys_init_module+0xbb/0x200
 [<ffffffff81002c7b>] ? system_call_fastpath+0x16/0x1b
 ---[ end trace 726271c07a47439e ]---
rtlwifi:rtl_init_core():<0-0> rtl: Unable to register rtl_rc,use default RC !!
ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'

Signed-off-by: Chaoming Li <chaoming_li@realsil.com.cn>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agomac80211: add support for showing the last rx bitrate
Felix Fietkau [Sun, 27 Feb 2011 21:08:01 +0000 (22:08 +0100)]
mac80211: add support for showing the last rx bitrate

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agocfg80211: add a field for the bitrate of the last rx data packet from a station
Felix Fietkau [Sun, 27 Feb 2011 21:08:00 +0000 (22:08 +0100)]
cfg80211: add a field for the bitrate of the last rx data packet from a station

Also fix a typo in the STATION_INFO_TX_BITRATE description

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k_htc: Handle BSSID/AID for multiple interfaces
Sujith Manoharan [Sun, 27 Feb 2011 03:50:40 +0000 (09:20 +0530)]
ath9k_htc: Handle BSSID/AID for multiple interfaces

The AID and BSSID should be set in the HW only for the
first station interface or adhoc interface. Also, cancel
the ANI timer in stop() for multi-STA scenario. And finally
configure the HW beacon timers only for the first station
interface.

Signed-off-by: Sujith Manoharan <Sujith.Manoharan@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agosfc: Bump version to 3.1
Ben Hutchings [Fri, 25 Feb 2011 00:04:42 +0000 (00:04 +0000)]
sfc: Bump version to 3.1

All features originally planned for version 3.1 (and some that
weren't) have been implemented.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Remove configurable FIFO thresholds for pause frame generation
Ben Hutchings [Thu, 24 Feb 2011 19:30:41 +0000 (19:30 +0000)]
sfc: Remove configurable FIFO thresholds for pause frame generation

In Falcon we can configure the fill levels of the RX data FIFO which
trigger the generation of pause frames (if enabled), and we have
module parameters for this.

Siena does not allow the levels to be configured (or, if it does, this
is done by the MC firmware and is not configurable by drivers).

So far as I can tell, the module parameters are not used by our
internal scripts and have not been documented (with the exception of
the short parameter descriptions).  Therefore, remove them and always
initialise Falcon with the default values.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Expose TX push and TSO counters through ethtool statistics
Ben Hutchings [Fri, 18 Feb 2011 19:14:13 +0000 (19:14 +0000)]
sfc: Expose TX push and TSO counters through ethtool statistics

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Update copyright dates
Ben Hutchings [Fri, 25 Feb 2011 00:01:34 +0000 (00:01 +0000)]
sfc: Update copyright dates

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Do not read STAT1.FAULT in efx_mdio_check_mmd()
Ben Hutchings [Thu, 24 Feb 2011 23:59:15 +0000 (23:59 +0000)]
sfc: Do not read STAT1.FAULT in efx_mdio_check_mmd()

This field does not exist in all MMDs we want to check, and all
callers allow it to be set (fault_fatal = 0).

Remove the loopback condition, as STAT2.DEVPRST should be valid
regardless of any fault.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Read MC firmware version when requested through ethtool
Ben Hutchings [Thu, 24 Feb 2011 23:57:47 +0000 (23:57 +0000)]
sfc: Read MC firmware version when requested through ethtool

We currently make no use of siena_nic_data::fw_{version,build} except
to format the firmware version for ethtool_get_drvinfo().  Since we
only read the version at start of day, this information is incorrect
after an MC firmware update.  Remove the cached version information
and read it via MCDI whenever it is requested.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Reduce size of efx_rx_buffer further by removing data member
Steve Hodgson [Thu, 24 Feb 2011 23:45:16 +0000 (23:45 +0000)]
sfc: Reduce size of efx_rx_buffer further by removing data member

Instead calculate the KVA of receive data. It's not like it's a hard sum.

[bwh: Fixed to work with GRO.]
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agosfc: Reduce size of efx_rx_buffer by unionising skb and page
Steve Hodgson [Thu, 24 Feb 2011 23:36:01 +0000 (23:36 +0000)]
sfc: Reduce size of efx_rx_buffer by unionising skb and page

[bwh: Forward-ported to net-next-2.6.]
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
13 years agobonding: use the correct size for _simple_hash()
Amerigo Wang [Sun, 27 Feb 2011 23:34:28 +0000 (23:34 +0000)]
bonding: use the correct size for _simple_hash()

Clearly it should be the size of ->ip_dst here.
Although this is harmless, but it still reads odd.

Signed-off-by: WANG Cong <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Flush driver cache of registered addr lists during port profile disassociate
Roopa Prabhu [Wed, 23 Feb 2011 15:16:01 +0000 (15:16 +0000)]
enic: Flush driver cache of registered addr lists during port profile disassociate

During a port profile disassociate all address registrations for the interface
are blown away from the adapter. This patch resets the driver cache of
registered address lists to zero after a port profile disassociate.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoDM9000: Allow randomised ethernet address
Ben Dooks [Thu, 24 Feb 2011 03:17:12 +0000 (03:17 +0000)]
DM9000: Allow randomised ethernet address

Allow randomised ethernet address if the device does not have a valid
EEPROM or pre-set MAC address.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqla3xxx: add missing __iomem annotation
stephen hemminger [Wed, 23 Feb 2011 07:54:27 +0000 (07:54 +0000)]
qla3xxx: add missing __iomem annotation

Add necessary annotations about pointer to io memory space
that is checked by sparse.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: fix sparse warning
stephen hemminger [Wed, 23 Feb 2011 07:40:33 +0000 (07:40 +0000)]
bonding: fix sparse warning

Fix use of zero where NULL expected. And wrap long line.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: TX timestamps for IPv6 UDP packets
Anders Berggren [Mon, 28 Feb 2011 20:32:11 +0000 (12:32 -0800)]
net: TX timestamps for IPv6 UDP packets

Enabling TX timestamps (SO_TIMESTAMPING) for IPv6 UDP packets, in
the same fashion as for IPv4. Necessary in order for NICs such as
Intel 82580 to timestamp IPv6 packets.

Signed-off-by: Anders Berggren <anders@halon.se>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosis900: use pci_dev->revision
Sergei Shtylyov [Mon, 28 Feb 2011 20:29:34 +0000 (12:29 -0800)]
sis900: use pci_dev->revision

This driver uses PCI_CLASS_REVISION instead of PCI_REVISION_ID, so it wasn't
converted by commit 44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (PCI: Change all
drivers to use pci_device->revision).

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agollc: avoid skb_clone() if there is only one handler
Changli Gao [Tue, 22 Feb 2011 01:55:18 +0000 (01:55 +0000)]
llc: avoid skb_clone() if there is only one handler

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: use dcb_setapp to manage negotiated application tlvs
Shmulik Ravid [Mon, 28 Feb 2011 20:19:55 +0000 (12:19 -0800)]
bnx2x: use dcb_setapp to manage negotiated application tlvs

With this patch the bnx2x uses the generic dcbnl application tlv list
instead of implementing its own get-app handler. When the driver is
alerted to a change in the DCB negotiated parameters, it calls
dcb_setapp to update the dcbnl application tlvs list making it available
to user mode applications and registered notifiers.

Signed-off-by: Shmulik Ravid <shmulikr@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: use pci_dev->revision, again
Sergei Shtylyov [Mon, 28 Feb 2011 19:57:33 +0000 (11:57 -0800)]
net: use pci_dev->revision, again

Several more network drivers that read the device's revision ID
from the PCI configuration register were merged after the commit
44c10138fd4bbc4b6d6bff0873c24902f2a9da65 (PCI: Change all drivers
to use pci_device->revision), so it's time to do another pass of
conversion to using the 'revision' field of 'struct pci_dev'...

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Acked-by: "John W. Linville" <linville@tuxdriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoiwlwifi: move remaining iwl-agn-rx.c code into iwl-rx.c master-2011-02-28
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:17 +0000 (14:33 +0100)]
iwlwifi: move remaining iwl-agn-rx.c code into iwl-rx.c

There is no need to have separate iwl-agn-rx.c file after iwlegacy
split.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: move check health code into iwl-rx.c
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:16 +0000 (14:33 +0100)]
iwlwifi: move check health code into iwl-rx.c

Remove check_plcp_health and check_ack_health ops methods, they are
unneeded after iwlegacy driver split. Merge check health code into to
iwl-rx.c and make functions static.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: add {ack,plpc}_check module parameters
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:15 +0000 (14:33 +0100)]
iwlwifi: add {ack,plpc}_check module parameters

Add module ack_check, and plcp_check parameters. Ack_check is disabled
by default since is proved that check ack health can cause troubles.
Plcp_check is enabled by default.

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlegacy: fix dma mappings and skbs leak
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:14 +0000 (14:33 +0100)]
iwlegacy: fix dma mappings and skbs leak

Fix possible dma mappings and skbs introduced by commit
470058e0ad82fcfaaffd57307d8bf8c094e8e9d7 "iwlwifi: avoid Tx queue
memory allocation in interface down".

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: fix dma mappings and skbs leak
Stanislaw Gruszka [Mon, 28 Feb 2011 13:33:13 +0000 (14:33 +0100)]
iwlwifi: fix dma mappings and skbs leak

Since commit commit 470058e0ad82fcfaaffd57307d8bf8c094e8e9d7
"iwlwifi: avoid Tx queue memory allocation in interface down" we do
not unmap dma and free skbs when down device and there is pending
transfer. What in consequence may cause that system hung (waiting
for free skb's) when performing shutdown at iptables module unload.

DMA leak manifest itself following warning:

WARNING: at lib/dma-debug.c:689 dma_debug_device_change+0x15a/0x1b0()
Hardware name: HP xw8600 Workstation
pci 0000:80:00.0: DMA-API: device driver has pending DMA allocations while released from device [count=240]
Modules linked in: iwlagn(-) aes_x86_64 aes_generic fuse cpufreq_ondemand acpi_cpufreq freq_table mperf xt_physdev ipt_REJECT nf_conntrack_ipv4 nf_defrag_ipv4 iptable_filter ip_tables ip6t_REJECT nf_conntrack_ipv6 nf_defrag_ipv6 xt_state nf_conntrack ip6table_filter ip6_tables ipv6 ext3 jbd dm_mirror dm_region_hash dm_log dm_mod uinput hp_wmi sparse_keymap sg wmi microcode serio_raw tg3 arc4 ecb shpchp mac80211 cfg80211 rfkill ext4 mbcache jbd2 sr_mod cdrom sd_mod crc_t10dif firewire_ohci firewire_core crc_itu_t mptsas mptscsih mptbase scsi_transport_sas pata_acpi ata_generic ata_piix ahci libahci floppy nouveau ttm drm_kms_helper drm i2c_algo_bit i2c_core video [last unloaded: iwlagn]
Pid: 9131, comm: rmmod Tainted: G        W   2.6.38-rc6-wl+ #33
Call Trace:
 [<ffffffff810649ef>] ? warn_slowpath_common+0x7f/0xc0
 [<ffffffff81064ae6>] ? warn_slowpath_fmt+0x46/0x50
 [<ffffffff812320ab>] ? dma_debug_device_change+0xdb/0x1b0
 [<ffffffff8123212a>] ? dma_debug_device_change+0x15a/0x1b0
 [<ffffffff8149dc18>] ? notifier_call_chain+0x58/0xb0
 [<ffffffff8108e370>] ? __blocking_notifier_call_chain+0x60/0x90
 [<ffffffff8108e3b6>] ? blocking_notifier_call_chain+0x16/0x20
 [<ffffffff812f570c>] ? __device_release_driver+0xbc/0xe0
 [<ffffffff812f5808>] ? driver_detach+0xd8/0xe0
 [<ffffffff812f45d1>] ? bus_remove_driver+0x91/0x100
 [<ffffffff812f6022>] ? driver_unregister+0x62/0xa0
 [<ffffffff8123d5d4>] ? pci_unregister_driver+0x44/0xa0
 [<ffffffffa05632d1>] ? iwl_exit+0x15/0x1c [iwlagn]
 [<ffffffff810ab492>] ? sys_delete_module+0x1a2/0x270
 [<ffffffff81498da9>] ? trace_hardirqs_on_thunk+0x3a/0x3f
 [<ffffffff8100bf42>] ? system_call_fastpath+0x16/0x1b

I still can observe above warning after apply patch, but it is very
hard to reproduce it, and have count=1. Whereas that one is easy to
reproduce using debugfs force_reset while transmitting data, and have
very big counts eg. 240, like quoted here. So count=1 WARNING seems
to be different issue that need to be resolved separately.

v1 -> v2: fix infinity loop bug I made during "for" to "while" loop transition.
v2 -> v3: remove unneeded EXPORT_SYMBOL

Signed-off-by: Stanislaw Gruszka <sgruszka@redhat.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: Fix incorrect GPIO LED pin for AR9485
Senthil Balasubramanian [Mon, 28 Feb 2011 09:46:47 +0000 (15:16 +0530)]
ath9k: Fix incorrect GPIO LED pin for AR9485

AR9485 doesn't use the default GPIO pin for LED and GPIO 6 is actually
used for this.

Signed-off-by: Senthil Balasubramanian <senthilkumar@atheros.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoath9k: use generic mac80211 LED blinking code
Felix Fietkau [Sun, 27 Feb 2011 21:26:40 +0000 (22:26 +0100)]
ath9k: use generic mac80211 LED blinking code

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agop54: fix a NULL pointer dereference bug
Felix Fietkau [Sun, 27 Feb 2011 21:19:22 +0000 (22:19 +0100)]
p54: fix a NULL pointer dereference bug

If the RSSI calibration table was not found or not parsed properly,
priv->rssi_db will be NULL, p54_rssi_find needs to be able to deal
with that.

Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Acked-by: Christian Lamparter <chunkeey@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: fix places where uninitialized data is used
Alessio Igor Bogani [Mon, 28 Feb 2011 08:11:55 +0000 (09:11 +0100)]
rtlwifi: fix places where uninitialized data is used

drivers/net/wireless/rtlwifi/rtl8192ce/trx.c: In function ‘rtl92ce_rx_query_desc’:
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:255:5: warning: ‘rf_rx_num’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:257:12: warning: ‘total_rssi’ may be used uninitialized in this function
drivers/net/wireless/rtlwifi/rtl8192ce/trx.c:466:6: warning: ‘weighting’ may be used uninitialized in this function

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agortlwifi: Add the missing rcu_read_lock/unlock
Alessio Igor Bogani [Mon, 28 Feb 2011 17:46:44 +0000 (18:46 +0100)]
rtlwifi: Add the missing rcu_read_lock/unlock

===================================================
[ INFO: suspicious rcu_dereference_check() usage. ]
---------------------------------------------------
net/mac80211/sta_info.c:125 invoked rcu_dereference_check() without protection!

other info that might help us debug this:

rcu_scheduler_active = 1, debug_locks = 0
5 locks held by wpa_supplicant/468:
 #0:  (rtnl_mutex){+.+.+.}, at: [<c1465d84>] rtnl_lock+0x14/0x20
 #1:  (&rdev->mtx){+.+.+.}, at: [<f84b8c2b>] cfg80211_mgd_wext_siwfreq+0x6b/0x170 [cfg80211]
 #2:  (&rdev->devlist_mtx){+.+.+.}, at: [<f84b8c37>] cfg80211_mgd_wext_siwfreq+0x77/0x170 [cfg80211]
 #3:  (&wdev->mtx){+.+.+.}, at: [<f84b8c44>] cfg80211_mgd_wext_siwfreq+0x84/0x170 [cfg80211]
 #4:  (&rtlpriv->locks.conf_mutex){+.+.+.}, at: [<f8506476>] rtl_op_bss_info_changed+0x26/0xc10 [rtlwifi]

stack backtrace:
Pid: 468, comm: wpa_supplicant Not tainted 2.6.38-rc6+ #79
Call Trace:
 [<c108806a>] ? lockdep_rcu_dereference+0xaa/0xb0
 [<f8523d2c>] ? sta_info_get_bss+0x19c/0x1b0 [mac80211]
 [<f8523d62>] ? ieee80211_find_sta+0x22/0x40 [mac80211]
 [<f850661c>] ? rtl_op_bss_info_changed+0x1cc/0xc10 [rtlwifi]
 [<c153671c>] ? __mutex_unlock_slowpath+0x14c/0x160
 [<c153673d>] ? mutex_unlock+0xd/0x10
 [<f8507180>] ? rtl_op_config+0x120/0x310 [rtlwifi]
 [<c10896db>] ? trace_hardirqs_on+0xb/0x10
 [<f8522169>] ? ieee80211_bss_info_change_notify+0xf9/0x1f0 [mac80211]
 [<f8506450>] ? rtl_op_bss_info_changed+0x0/0xc10 [rtlwifi]
 [<f853646f>] ? ieee80211_set_channel+0xbf/0xd0 [mac80211]
 [<f84b5f41>] ? cfg80211_set_freq+0x121/0x180 [cfg80211]
 [<f85363b0>] ? ieee80211_set_channel+0x0/0xd0 [mac80211]
 [<f84b8ceb>] ? cfg80211_mgd_wext_siwfreq+0x12b/0x170 [cfg80211]
 [<f84b87eb>] ? cfg80211_wext_siwfreq+0x9b/0x100 [cfg80211]
 [<c153b98b>] ? sub_preempt_count+0x7b/0xb0
 [<c150f874>] ? ioctl_standard_call+0x74/0x3b0
 [<c1465d84>] ? rtnl_lock+0x14/0x20
 [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
 [<c14568bd>] ? __dev_get_by_name+0x8d/0xb0
 [<c150fddb>] ? wext_handle_ioctl+0x16b/0x180
 [<f84b8750>] ? cfg80211_wext_siwfreq+0x0/0x100 [cfg80211]
 [<c145bc7a>] ? dev_ioctl+0x5ba/0x720
 [<c108a947>] ? __lock_acquire+0x3e7/0x19b0
 [<c1443b0b>] ? sock_ioctl+0x1eb/0x290
 [<c108bfa5>] ? lock_release_non_nested+0x95/0x2f0
 [<c1443920>] ? sock_ioctl+0x0/0x290
 [<c114d74d>] ? do_vfs_ioctl+0x7d/0x5c0
 [<c1112232>] ? might_fault+0x62/0xb0
 [<c113e3c6>] ? fget_light+0x226/0x390
 [<c1112278>] ? might_fault+0xa8/0xb0
 [<c114dd17>] ? sys_ioctl+0x87/0x90
 [<c1002f9f>] ? sysenter_do_call+0x12/0x38

This work was supported by a hardware donation from the CE Linux Forum.

Signed-off-by: Alessio Igor Bogani <abogani@kernel.org>
Signed-off-by: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoiwlwifi: remove duplicate initialization
Dan Carpenter [Sat, 26 Feb 2011 01:56:53 +0000 (04:56 +0300)]
iwlwifi: remove duplicate initialization

rate_mask is initialized again later so this can be removed.  Btw, if
rate_control_send_low(sta, priv_sta, txrc) returns false, that means
that "sta" is non-NULL.  That's why the second initialization of
rate_mask is a little simpler than the first.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Acked-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoBluetooth: Fix BT_L2CAP and BT_SCO in Kconfig
Gustavo F. Padovan [Sat, 26 Feb 2011 01:41:25 +0000 (22:41 -0300)]
Bluetooth: Fix BT_L2CAP and BT_SCO in Kconfig

If we want something "bool" built-in in something "tristate" it can't
"depend on" the tristate config option.

Report by DaveM:

   I give it 'y' just to make it happen, for both, and afterways no
   matter how many times I rerun "make oldconfig" I keep seeing things
   like this in my build:

scripts/kconfig/conf --silentoldconfig Kconfig
include/config/auto.conf:986:warning: symbol value 'm' invalid for BT_SCO
include/config/auto.conf:3156:warning: symbol value 'm' invalid for BT_L2CAP

Reported-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Gustavo F. Padovan <padovan@profusion.mobi>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agoMerge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git...
John W. Linville [Mon, 28 Feb 2011 19:05:38 +0000 (14:05 -0500)]
Merge branch 'wireless-next-2.6' of git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/iwlwifi-2.6

13 years agoat76c50x-usb: fix warning caused by at76_mac80211_tx now returning void
John W. Linville [Fri, 25 Feb 2011 20:38:09 +0000 (15:38 -0500)]
at76c50x-usb: fix warning caused by at76_mac80211_tx now returning void

  CC [M]  drivers/net/wireless/at76c50x-usb.o
drivers/net/wireless/at76c50x-usb.c: In function ‘at76_mac80211_tx’:
drivers/net/wireless/at76c50x-usb.c:1759:4: warning: ‘return’ with a value, in function returning void

This is fallout from commit 7bb4568372856688bc070917265bce0b88bb7d4d
("mac80211: make tx() operation return void").

Signed-off-by: John W. Linville <linville@tuxdriver.com>
13 years agonet: Forgot to commit net/core/dev.c part of Jiri's ->rx_handler patch.
David S. Miller [Mon, 28 Feb 2011 18:48:59 +0000 (10:48 -0800)]
net: Forgot to commit net/core/dev.c part of Jiri's ->rx_handler patch.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetfilter: nf_ct_tcp: fix out of sync scenario while in SYN_RECV
Pablo Neira Ayuso [Mon, 28 Feb 2011 16:59:15 +0000 (17:59 +0100)]
netfilter: nf_ct_tcp: fix out of sync scenario while in SYN_RECV

This patch fixes the out of sync scenarios while in SYN_RECV state.

Quoting Jozsef, what it happens if we are out of sync if the
following:

> > b. conntrack entry is outdated, new SYN received
> >    - (b1) we ignore it but save the initialization data from it
> >    - (b2) when the reply SYN/ACK receives and it matches the saved data,
> >      we pick up the new connection
This is what it should happen if we are in SYN_RECV state. Initially,
the SYN packet hits b1, thus we save data from it. But the SYN/ACK
packet is considered a retransmission given that we're in SYN_RECV
state. Therefore, we never hit b2 and we don't get in sync. To fix
this, we ignore SYN/ACK if we are in SYN_RECV. If the previous packet
was a SYN, then we enter the ignore case that get us in sync.

This patch helps a lot to conntrackd in stress scenarios (assumming a
client that generates lots of small TCP connections). During the failover,
consider that the new primary has injected one outdated flow in SYN_RECV
state (this is likely to happen if the conntrack event rate is high
because the backup will be a bit delayed from the primary). With the
current code, if the client starts a new fresh connection that matches
the tuple, the SYN packet will be ignored without updating the state
tracking, and the SYN+ACK in reply will blocked as it will not pass
checkings III or IV (since all state tracking in the original direction
is not initialized because of the SYN packet was ignored and the ignore
case that get us in sync is not applied).

I posted a couple of patches before this one. Changli Gao spotted
a simpler way to fix this problem. This patch implements his idea.

Cc: Changli Gao <xiaosuo@gmail.com>
Cc: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Signed-off-by: Patrick McHardy <kaber@trash.net>
13 years agonet: convert bonding to use rx_handler
Jiri Pirko [Wed, 23 Feb 2011 09:05:42 +0000 (09:05 +0000)]
net: convert bonding to use rx_handler

This patch converts bonding to use rx_handler. Results in cleaner
__netif_receive_skb() with much less exceptions needed. Also
bond-specific work is moved into bond code.

Did performance test using pktgen and counting incoming packets by
iptables. No regression noted.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Reviewed-by: Nicolas de Pesloüan <nicolas.2p.debian@free.fr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Pass const xfrm_mark to xfrm_mark_put().
David S. Miller [Mon, 28 Feb 2011 07:20:19 +0000 (23:20 -0800)]
xfrm: Pass const xfrm_mark to xfrm_mark_put().

Signed-off-by: David S. Miller <davem@davemloft.net>