Andy Grover [Tue, 24 Feb 2009 15:30:29 +0000 (15:30 +0000)]
RDS: RDMA support
Some transports may support RDMA features. This handles the
non-transport-specific parts, like pinning user pages and
tracking mapped regions.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:28 +0000 (15:30 +0000)]
RDS: recv.c
Upon receiving a datagram from the transport, RDS parses the
headers and potentially queues an ACK.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:27 +0000 (15:30 +0000)]
RDS: send.c
This is the code to send an RDS datagram.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:26 +0000 (15:30 +0000)]
RDS: Message parsing
Parsing of newly-received RDS message headers (including ext.
headers) and copy-to/from-user routines.
page.c implements a per-cpu page remainder cache, to reduce the
number of allocations needed for small datagrams.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:25 +0000 (15:30 +0000)]
RDS: sysctls
RDS exposes a few tunable parameters via sysctls.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:24 +0000 (15:30 +0000)]
RDS: loopback
A simple rds transport to handle loopback connections.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:23 +0000 (15:30 +0000)]
RDS: Connection handling
While arguably the fact that the underlying transport needs a
connection to convey RDS's datagrame reliably is not important
to rds proper, the transports implemented so far (IB and TCP)
have both been connection-oriented, and so the connection
state machine-related code is in the common rds code.
This patch also includes several work items, to handle connecting,
sending, receiving, and shutdown.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:22 +0000 (15:30 +0000)]
RDS: Info and stats
RDS currently generates a lot of stats that are accessible via
the rds-info utility. This code implements the support for this.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:21 +0000 (15:30 +0000)]
RDS: Transport code
RDS supports multiple transports. While this initial submission
only supports Infiniband transport, this abstraction allows others
to be added. We're working on an iWARP transport, and also see
UDP over DCB as another possibility.
This code handles transport registration.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:20 +0000 (15:30 +0000)]
RDS: Congestion-handling code
RDS handles per-socket congestion by updating peers with a complete
congestion map (8KB). This code keeps track of these maps for itself
and ones received from peers.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:19 +0000 (15:30 +0000)]
RDS: Main header file
RDS's main data structure definitions and exported functions.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Andy Grover [Tue, 24 Feb 2009 15:30:18 +0000 (15:30 +0000)]
RDS: Socket interface
Implement the RDS (Reliable Datagram Sockets) interface.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Fri, 27 Feb 2009 07:21:23 +0000 (23:21 -0800)]
typhoon: Use request_firmware()
Based on a patch by Jaswinder Singh <jaswinder@infradead.org>.
Compile-tested only.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ben Hutchings [Fri, 27 Feb 2009 07:20:56 +0000 (23:20 -0800)]
tehuti: Use request_firmware()
Firmware blob is little endian.
Compile-tested only.
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:41:06 +0000 (14:41 +0000)]
Update TG3 MAINTAINERS entry
This patch injects myself into the TG3 MAINTAINERS entry.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:40:42 +0000 (14:40 +0000)]
tg3: Update copyright and version
This patch updates the copyright to 2009 and updates the version number
to 3.98.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:27:43 +0000 (14:27 +0000)]
tg3: Add version reporting for hardware selfboot
This patch adds version reporting for hardware selfboot.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:27:20 +0000 (14:27 +0000)]
tg3: Add DASH firmware version reporting
This patch adds code to report the DASH firmware version.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:26:58 +0000 (14:26 +0000)]
tg3: Add legacy bootcode version decoding
This patch adds code to obtain the bootcode version for versions
of bootcode that do not use the new method.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:26:33 +0000 (14:26 +0000)]
tg3: Refactor firmware version routines
This patch reorganizes the firmware version routines in preparation for
the following patches.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:25:52 +0000 (14:25 +0000)]
tg3: Eliminate tg3_nvram_read_swab()
The remaining uses of tg3_nvram_read_swab() either intended to read the
data from NVRAM exactly as tg3_nvram_read_be32() did or hide deeper
interpretations of the data. For the former case, a direct replacement
of tg3_nvram_read_swab() with tg3_nvram_read_be32() is in order. For
the latter case, we remove tg3_nvram_read_swab() and document what the
code is really doing.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:25:30 +0000 (14:25 +0000)]
tg3: Correct NVRAM stream endian notations
Any software requesting NVRAM data as it exists on NVRAM is necessarily
requesting that the results be returned as a bytestream. A bytestream
data read in from the device can also be thought to be in big endian
format. Therefore, all the LE notations in the driver are mislabeled.
This patch converts all LE notations to BE notations, carefully
evaluating the surrounding code in the process.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:25:00 +0000 (14:25 +0000)]
tg3: Invert nvram_read() and nvram_read_swab()
This patch removes the blind byteswap of NVRAM data as it is read in.
To preserve the logic at the call sites, this patch also inverts every
call to tg3_nvram_read() and tg3_nvram_read_swab(). The call swap gets
confusing within tg3_nvram_read_le() (LE is a misnomer), but the reader
should be able to convince himself / herself that the resulting behavior
is still unchanged.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:24:28 +0000 (14:24 +0000)]
tg3: Eliminate nvram routine forward declarations
This patch moves all NVRAM routines earlier in the source file to
eliminate forward declarations.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:23:56 +0000 (14:23 +0000)]
tg3: Refine tg3_vlan_rx_register()
tg3_vlan_rx_register() touches the hardware if netif_running() returns
false. This patch fixes the problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:23:01 +0000 (14:23 +0000)]
tg3: Update ethtool set_settings error checks
The ethtool interface has acquired some new enumerations since the
tg3 driver's tg3_set_settings() error checking code was written. The
error checking code is no longer complete. This patch rewrites the
error checking so that it is future-proofed.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:21:52 +0000 (14:21 +0000)]
tg3: Drop non-VLAN rx pkts larger than the MTU
The hardware's MTU is configured so that it will accept packets whose
VLAN tag is left inline. This means that the hardware will also accept
other packets larger than the desired MTU size. This patch checks for
and discards packets that are larger than the requested MTU but are not
VLAN tagged frames.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Matt Carlson [Wed, 25 Feb 2009 14:21:20 +0000 (14:21 +0000)]
tg3: Fix 5906 link problems
Commit
6833c043f9fc03696fde623914c4a0277df2a0bc introduced the phy
auto-powerdown capability. While the APD feature only works for 5761
and 5784 asic revisions, the (harmless portion of the) code was applied
to all 5705 and newer devices. However, the 5906 phy departs from the
usual design. This commit was interfering with the 5906's ability to
negotiate link against some switches. This patch corrects the problem.
Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: Benjamin Li <benli@broadcom.com>
Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:33:06 +0000 (10:33 +0000)]
wanrouter: fix sparse warnings: context imbalance
Impact: Attribute functions with __acquires(...) resp. __releases(...).
Fix this sparse warnings:
net/wanrouter/wanproc.c:82:13: warning: context imbalance in 'r_start' - wrong count at exit
net/wanrouter/wanproc.c:103:13: warning: context imbalance in 'r_stop' - unexpected unlock
net/wanrouter/wanmain.c:765:13: warning: context imbalance in 'lock_adapter_irq' - wrong count at exit
net/wanrouter/wanmain.c:771:13: warning: context imbalance in 'unlock_adapter_irq' - unexpected unlock
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:32:52 +0000 (10:32 +0000)]
inet fragments: fix sparse warning: context imbalance
Impact: Attribute function with __releases(...)
Fix this sparse warning:
net/ipv4/inet_fragment.c:276:35: warning: context imbalance in 'inet_frag_find' - unexpected unlock
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:32:39 +0000 (10:32 +0000)]
decnet: fix sparse warnings: symbol shadows an earlier one
Impact: Remove redundant variable declarations, resp. rename
inner scope variable.
Fix this sparse warnings:
net/decnet/af_decnet.c:1252:40: warning: symbol 'skb' shadows an earlier one
net/decnet/af_decnet.c:1223:24: originally declared here
net/decnet/af_decnet.c:1582:29: warning: symbol 'val' shadows an earlier one
net/decnet/af_decnet.c:1527:22: originally declared here
net/decnet/dn_dev.c:687:21: warning: symbol 'err' shadows an earlier one
net/decnet/dn_dev.c:670:13: originally declared here
net/decnet/sysctl_net_decnet.c:182:21: warning: symbol 'len' shadows an earlier one
net/decnet/sysctl_net_decnet.c:173:16: originally declared here
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:32:25 +0000 (10:32 +0000)]
decnet: fix sparse warnings: context imbalance
Impact: Attribute functions with __acquires(...) resp. __releases(...).
Fix this sparse warnings:
net/decnet/dn_dev.c:1324:13: warning: context imbalance in 'dn_dev_seq_start' - wrong count at exit
net/decnet/dn_dev.c:1366:13: warning: context imbalance in 'dn_dev_seq_stop' - unexpected unlock
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:32:14 +0000 (10:32 +0000)]
sysctl: fix sparse warning: Should it be static?
Impact: Include header file.
Fix this sparse warning:
net/core/sysctl_net_core.c:123:32: warning: symbol 'net_core_path' was not declared. Should it be static?
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:31:59 +0000 (10:31 +0000)]
appletalk: fix warning: format not a string literal and no ...
Impact: Use 'static const char[]' instead of 'static char[]', and
since the data is const now it can be placed in __initconst.
Fix this warning:
net/appletalk/ddp.c: In function 'atalk_init':
net/appletalk/ddp.c:1894: warning: format not a string literal and no format arguments
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:31:37 +0000 (10:31 +0000)]
9p: fix sparse warning: cast adds address space
Impact: Trust in the comment and add '__force' to the cast.
Fix this sparse warning:
net/9p/trans_fd.c:420:34: warning: cast adds address space to expression (<asn:1>)
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Hannes Eder [Wed, 25 Feb 2009 10:31:24 +0000 (10:31 +0000)]
net/802: fix sparse warnings: context imbalance
Impact: Attribute function with __acquires(...) resp. __releases(...).
Fix this sparse warnings:
net/802/tr.c:492:21: warning: context imbalance in 'rif_seq_start' - wrong count at exit
net/802/tr.c:519:13: warning: context imbalance in 'rif_seq_stop' - unexpected unlock
Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:47:26 +0000 (00:47 +0000)]
ns83820: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:45:09 +0000 (00:45 +0000)]
chelsio: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:42:22 +0000 (00:42 +0000)]
llc: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:41:03 +0000 (00:41 +0000)]
iucv: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:39:01 +0000 (00:39 +0000)]
decnet: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:37:32 +0000 (00:37 +0000)]
core: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:36:42 +0000 (00:36 +0000)]
packet: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:35:44 +0000 (00:35 +0000)]
can: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:34:41 +0000 (00:34 +0000)]
netlink: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:32:45 +0000 (00:32 +0000)]
unix: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:31:54 +0000 (00:31 +0000)]
pktgen: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:31:04 +0000 (00:31 +0000)]
af_key: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:22:41 +0000 (00:22 +0000)]
wan: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Acked-by: Jan "Yenya" Kasprzak <kas@fi.muni.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:20:29 +0000 (00:20 +0000)]
i2400m: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:18:12 +0000 (00:18 +0000)]
drivers/net/rionet.c: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:16:08 +0000 (00:16 +0000)]
ppp: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:14:27 +0000 (00:14 +0000)]
irda: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 00:12:09 +0000 (00:12 +0000)]
isdn: remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paulius Zaleckas [Mon, 23 Feb 2009 05:58:27 +0000 (05:58 +0000)]
hso: remove hso_free_device()
There is really no need for function just doing simple kfree()
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Cc: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paulius Zaleckas [Mon, 23 Feb 2009 05:39:34 +0000 (05:39 +0000)]
hso: remove claiming and releasing of USB interface
No need to reclaim the same USB interface beeing probed.
Releasing interface does nothing also.
This is already in for a long time in off-kernel hso driver
and no regresions were noticed for this change.
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Cc: Denis Joseph Barrow <D.Barow@option.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Paulius Zaleckas [Mon, 23 Feb 2009 04:59:43 +0000 (04:59 +0000)]
ppp_generic: Simplify tx_dropped stats
Local variable dev = ppp->dev
Signed-off-by: Paulius Zaleckas <paulius.zaleckas@teltonika.lt>
Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Fri, 27 Feb 2009 06:46:54 +0000 (22:46 -0800)]
Merge branch 'master' of git://git./linux/kernel/git/holtmann/bluetooth-next-2.6
Greg Ungerer [Fri, 27 Feb 2009 06:42:51 +0000 (22:42 -0800)]
m68knommu: remove ColdFire specific setup code from FEC driver
Remove the ColdFire CPU specific setup from here. The ColdFire
CPU platform code now sets up all this.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Greg Ungerer [Fri, 27 Feb 2009 06:40:38 +0000 (22:40 -0800)]
fec: add FEC platform support to ColdFire CPU's setup code
m68knommu: add FEC platform support to ColdFire CPU's setup code
Move the per-CPU FEC driver setup code into the actual platform
setup code for each ColdFire CPU varient.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Sesterhenn [Fri, 27 Feb 2009 06:38:15 +0000 (22:38 -0800)]
MISDN: list usage cleanup
Trivial cleanup, list_del(); list_add_tail() is equivalent
to list_move_tail(). Semantic patch for coccinelle can be
found at www.cccmz.de/~snakebyte/list_move_tail.spatch
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Acked-by: Karsten Keil <kkeil@novell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 26 Feb 2009 10:08:36 +0000 (10:08 +0000)]
qlge: Reduce debug print output.
Get rid of some noise that is for debug only.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 26 Feb 2009 10:08:35 +0000 (10:08 +0000)]
qlge: Prepare to add new device.
This organizes a few calls into a function table to enable adding new
devices.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 26 Feb 2009 10:08:34 +0000 (10:08 +0000)]
qlge: Move firmware event handler.
This is not a logical change but rather a move of the inbound firmware event
handler into it's own function as it will later be called by the outbound
path.
The addition of the mutex is to create exclusive access to the mailbox
commands between inbound and outbound handling.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 26 Feb 2009 10:08:33 +0000 (10:08 +0000)]
qlge: Clean up firmware reset path.
Add function for performing the reset rather than in-line. This function
may later be called by a core dump process.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Ron Mercer [Thu, 26 Feb 2009 10:08:32 +0000 (10:08 +0000)]
qlge: Add defines for firmware support.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:36 +0000 (10:19 +0000)]
mdio: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:35 +0000 (10:19 +0000)]
forcedeth: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:34 +0000 (10:19 +0000)]
hamachi: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:33 +0000 (10:19 +0000)]
sundance: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:32 +0000 (10:19 +0000)]
starfire: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:31 +0000 (10:19 +0000)]
via-rhine: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:30 +0000 (10:19 +0000)]
fealnx: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:29 +0000 (10:19 +0000)]
natsemi: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:28 +0000 (10:19 +0000)]
acenic: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:27 +0000 (10:19 +0000)]
yellowfin: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:26 +0000 (10:19 +0000)]
sis900: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:25 +0000 (10:19 +0000)]
ne2k-pci: fix non-constant printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:24 +0000 (10:19 +0000)]
3c59x: get rid of non-const printk warnings
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:23 +0000 (10:19 +0000)]
lapb: get rid of non-const printk warning
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Stephen Hemminger [Thu, 26 Feb 2009 10:19:22 +0000 (10:19 +0000)]
tulip: get rid of warning for non-const string literal
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Wei Yongjun [Wed, 25 Feb 2009 10:09:33 +0000 (18:09 +0800)]
Bluetooth: Remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Wei Yongjun [Wed, 25 Feb 2009 10:29:52 +0000 (18:29 +0800)]
Bluetooth: Remove some pointless conditionals before kfree_skb()
Remove some pointless conditionals before kfree_skb().
Signed-off-by: Wei Yongjun <yjwei@cn.fujitsu.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Dave Young [Sat, 21 Feb 2009 08:13:34 +0000 (16:13 +0800)]
Bluetooth: Move hci_conn_del_sysfs() back to avoid device destruct too early
The following commit introduce a regression:
commit
7d0db0a373195385a2e0b19d1f5e4b186fdcffac
Author: Marcel Holtmann <marcel@holtmann.org>
Date: Mon Jul 14 20:13:51 2008 +0200
[Bluetooth] Use a more unique bus name for connections
I get panic as following (by netconsole):
[ 2709.344034] usb 5-1: new full speed USB device using uhci_hcd and address 4
[ 2709.505776] usb 5-1: configuration #1 chosen from 1 choice
[ 2709.569207] Bluetooth: Generic Bluetooth USB driver ver 0.4
[ 2709.570169] usbcore: registered new interface driver btusb
[ 2845.742781] BUG: unable to handle kernel paging request at
6b6b6c2f
[ 2845.742958] IP: [<
c015515c>] __lock_acquire+0x6c/0xa80
[ 2845.743087] *pde =
00000000
[ 2845.743206] Oops: 0002 [#1] SMP
[ 2845.743377] last sysfs file: /sys/class/bluetooth/hci0/hci0:6/type
[ 2845.743742] Modules linked in: btusb netconsole snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss rfcomm l2cap bluetooth vfat fuse snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm pl2303 snd_timer psmouse usbserial snd 3c59x e100 serio_raw soundcore i2c_i801 intel_agp mii agpgart snd_page_alloc rtc_cmos rtc_core thermal processor rtc_lib button thermal_sys sg evdev
[ 2845.743742]
[ 2845.743742] Pid: 0, comm: swapper Not tainted (2.6.29-rc5-smp #54) Dell DM051
[ 2845.743742] EIP: 0060:[<
c015515c>] EFLAGS:
00010002 CPU: 0
[ 2845.743742] EIP is at __lock_acquire+0x6c/0xa80
[ 2845.743742] EAX:
00000046 EBX:
00000046 ECX:
6b6b6b6b EDX:
00000002
[ 2845.743742] ESI:
6b6b6b6b EDI:
00000000 EBP:
c064fd14 ESP:
c064fcc8
[ 2845.743742] DS: 007b ES: 007b FS: 00d8 GS: 0000 SS: 0068
[ 2845.743742] Process swapper (pid: 0, ti=
c064e000 task=
c05d1400 task.ti=
c064e000)
[ 2845.743742] Stack:
[ 2845.743742]
c05d1400 00000002 c05d1400 00000001 00000002 00000000 f65388dc c05d1400
[ 2845.743742]
6b6b6b6b 00000292 c064fd0c c0153732 00000000 00000000 00000001 f700fa50
[ 2845.743742]
00000046 00000000 00000000 c064fd40 c0155be6 00000000 00000002 00000001
[ 2845.743742] Call Trace:
[ 2845.743742] [<
c0153732>] ? trace_hardirqs_on_caller+0x72/0x1c0
[ 2845.743742] [<
c0155be6>] ? lock_acquire+0x76/0xa0
[ 2845.743742] [<
c03e1aad>] ? skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c046c885>] ? _spin_lock_irqsave+0x45/0x80
[ 2845.743742] [<
c03e1aad>] ? skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c03e1aad>] ? skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c03e1f94>] ? skb_queue_purge+0x14/0x20
[ 2845.743742] [<
f8171f5a>] ? hci_conn_del+0x10a/0x1c0 [bluetooth]
[ 2845.743742] [<
f81399c9>] ? l2cap_disconn_ind+0x59/0xb0 [l2cap]
[ 2845.743742] [<
f81795ce>] ? hci_conn_del_sysfs+0x8e/0xd0 [bluetooth]
[ 2845.743742] [<
f8175758>] ? hci_event_packet+0x5f8/0x31c0 [bluetooth]
[ 2845.743742] [<
c03dfe19>] ? sock_def_readable+0x59/0x80
[ 2845.743742] [<
c046c14d>] ? _read_unlock+0x1d/0x20
[ 2845.743742] [<
f8178aa9>] ? hci_send_to_sock+0xe9/0x1d0 [bluetooth]
[ 2845.743742] [<
c015388b>] ? trace_hardirqs_on+0xb/0x10
[ 2845.743742] [<
f816fa6a>] ? hci_rx_task+0x2ba/0x490 [bluetooth]
[ 2845.743742] [<
c0133661>] ? tasklet_action+0x31/0xc0
[ 2845.743742] [<
c013367c>] ? tasklet_action+0x4c/0xc0
[ 2845.743742] [<
c0132eb7>] ? __do_softirq+0xa7/0x170
[ 2845.743742] [<
c0116dec>] ? ack_apic_level+0x5c/0x1c0
[ 2845.743742] [<
c0132fd7>] ? do_softirq+0x57/0x60
[ 2845.743742] [<
c01333dc>] ? irq_exit+0x7c/0x90
[ 2845.743742] [<
c01055bb>] ? do_IRQ+0x4b/0x90
[ 2845.743742] [<
c01333d5>] ? irq_exit+0x75/0x90
[ 2845.743742] [<
c010392c>] ? common_interrupt+0x2c/0x34
[ 2845.743742] [<
c010a14f>] ? mwait_idle+0x4f/0x70
[ 2845.743742] [<
c0101c05>] ? cpu_idle+0x65/0xb0
[ 2845.743742] [<
c045731e>] ? rest_init+0x4e/0x60
[ 2845.743742] Code: 0f 84 69 02 00 00 83 ff 07 0f 87 1e 06 00 00 85 ff 0f 85 08 05 00 00 8b 4d cc 8b 49 04 85 c9 89 4d d4 0f 84 f7 04 00 00 8b 75 d4 <f0> ff 86 c4 00 00 00 89 f0 e8 56 a9 ff ff 85 c0 0f 85 6e 03 00
[ 2845.743742] EIP: [<
c015515c>] __lock_acquire+0x6c/0xa80 SS:ESP 0068:
c064fcc8
[ 2845.743742] ---[ end trace
4c985b38f022279f ]---
[ 2845.743742] Kernel panic - not syncing: Fatal exception in interrupt
[ 2845.743742] ------------[ cut here ]------------
[ 2845.743742] WARNING: at kernel/smp.c:329 smp_call_function_many+0x151/0x200()
[ 2845.743742] Hardware name: Dell DM051
[ 2845.743742] Modules linked in: btusb netconsole snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss rfcomm l2cap bluetooth vfat fuse snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm pl2303 snd_timer psmouse usbserial snd 3c59x e100 serio_raw soundcore i2c_i801 intel_agp mii agpgart snd_page_alloc rtc_cmos rtc_core thermal processor rtc_lib button thermal_sys sg evdev
[ 2845.743742] Pid: 0, comm: swapper Tainted: G D 2.6.29-rc5-smp #54
[ 2845.743742] Call Trace:
[ 2845.743742] [<
c012e076>] warn_slowpath+0x86/0xa0
[ 2845.743742] [<
c015041b>] ? trace_hardirqs_off+0xb/0x10
[ 2845.743742] [<
c0146384>] ? up+0x14/0x40
[ 2845.743742] [<
c012e661>] ? release_console_sem+0x31/0x1e0
[ 2845.743742] [<
c046c8ab>] ? _spin_lock_irqsave+0x6b/0x80
[ 2845.743742] [<
c015041b>] ? trace_hardirqs_off+0xb/0x10
[ 2845.743742] [<
c046c900>] ? _read_lock_irqsave+0x40/0x80
[ 2845.743742] [<
c012e7f2>] ? release_console_sem+0x1c2/0x1e0
[ 2845.743742] [<
c0146384>] ? up+0x14/0x40
[ 2845.743742] [<
c015041b>] ? trace_hardirqs_off+0xb/0x10
[ 2845.743742] [<
c046a3d7>] ? __mutex_unlock_slowpath+0x97/0x160
[ 2845.743742] [<
c046a563>] ? mutex_trylock+0xb3/0x180
[ 2845.743742] [<
c046a4a8>] ? mutex_unlock+0x8/0x10
[ 2845.743742] [<
c015b991>] smp_call_function_many+0x151/0x200
[ 2845.743742] [<
c010a1a0>] ? stop_this_cpu+0x0/0x40
[ 2845.743742] [<
c015ba61>] smp_call_function+0x21/0x30
[ 2845.743742] [<
c01137ae>] native_smp_send_stop+0x1e/0x50
[ 2845.743742] [<
c012e0f5>] panic+0x55/0x110
[ 2845.743742] [<
c01065a8>] oops_end+0xb8/0xc0
[ 2845.743742] [<
c010668f>] die+0x4f/0x70
[ 2845.743742] [<
c011a8c9>] do_page_fault+0x269/0x610
[ 2845.743742] [<
c011a660>] ? do_page_fault+0x0/0x610
[ 2845.743742] [<
c046cbaf>] error_code+0x77/0x7c
[ 2845.743742] [<
c015515c>] ? __lock_acquire+0x6c/0xa80
[ 2845.743742] [<
c0153732>] ? trace_hardirqs_on_caller+0x72/0x1c0
[ 2845.743742] [<
c0155be6>] lock_acquire+0x76/0xa0
[ 2845.743742] [<
c03e1aad>] ? skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c046c885>] _spin_lock_irqsave+0x45/0x80
[ 2845.743742] [<
c03e1aad>] ? skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c03e1aad>] skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c03e1f94>] skb_queue_purge+0x14/0x20
[ 2845.743742] [<
f8171f5a>] hci_conn_del+0x10a/0x1c0 [bluetooth]
[ 2845.743742] [<
f81399c9>] ? l2cap_disconn_ind+0x59/0xb0 [l2cap]
[ 2845.743742] [<
f81795ce>] ? hci_conn_del_sysfs+0x8e/0xd0 [bluetooth]
[ 2845.743742] [<
f8175758>] hci_event_packet+0x5f8/0x31c0 [bluetooth]
[ 2845.743742] [<
c03dfe19>] ? sock_def_readable+0x59/0x80
[ 2845.743742] [<
c046c14d>] ? _read_unlock+0x1d/0x20
[ 2845.743742] [<
f8178aa9>] ? hci_send_to_sock+0xe9/0x1d0 [bluetooth]
[ 2845.743742] [<
c015388b>] ? trace_hardirqs_on+0xb/0x10
[ 2845.743742] [<
f816fa6a>] hci_rx_task+0x2ba/0x490 [bluetooth]
[ 2845.743742] [<
c0133661>] ? tasklet_action+0x31/0xc0
[ 2845.743742] [<
c013367c>] tasklet_action+0x4c/0xc0
[ 2845.743742] [<
c0132eb7>] __do_softirq+0xa7/0x170
[ 2845.743742] [<
c0116dec>] ? ack_apic_level+0x5c/0x1c0
[ 2845.743742] [<
c0132fd7>] do_softirq+0x57/0x60
[ 2845.743742] [<
c01333dc>] irq_exit+0x7c/0x90
[ 2845.743742] [<
c01055bb>] do_IRQ+0x4b/0x90
[ 2845.743742] [<
c01333d5>] ? irq_exit+0x75/0x90
[ 2845.743742] [<
c010392c>] common_interrupt+0x2c/0x34
[ 2845.743742] [<
c010a14f>] ? mwait_idle+0x4f/0x70
[ 2845.743742] [<
c0101c05>] cpu_idle+0x65/0xb0
[ 2845.743742] [<
c045731e>] rest_init+0x4e/0x60
[ 2845.743742] ---[ end trace
4c985b38f02227a0 ]---
[ 2845.743742] ------------[ cut here ]------------
[ 2845.743742] WARNING: at kernel/smp.c:226 smp_call_function_single+0x8e/0x110()
[ 2845.743742] Hardware name: Dell DM051
[ 2845.743742] Modules linked in: btusb netconsole snd_seq_dummy snd_seq_oss snd_seq_midi_event snd_seq snd_seq_device snd_pcm_oss snd_mixer_oss rfcomm l2cap bluetooth vfat fuse snd_hda_codec_idt snd_hda_intel snd_hda_codec snd_hwdep snd_pcm pl2303 snd_timer psmouse usbserial snd 3c59x e100 serio_raw soundcore i2c_i801 intel_agp mii agpgart snd_page_alloc rtc_cmos rtc_core thermal processor rtc_lib button thermal_sys sg evdev
[ 2845.743742] Pid: 0, comm: swapper Tainted: G D W 2.6.29-rc5-smp #54
[ 2845.743742] Call Trace:
[ 2845.743742] [<
c012e076>] warn_slowpath+0x86/0xa0
[ 2845.743742] [<
c012e000>] ? warn_slowpath+0x10/0xa0
[ 2845.743742] [<
c015041b>] ? trace_hardirqs_off+0xb/0x10
[ 2845.743742] [<
c0146384>] ? up+0x14/0x40
[ 2845.743742] [<
c012e661>] ? release_console_sem+0x31/0x1e0
[ 2845.743742] [<
c046c8ab>] ? _spin_lock_irqsave+0x6b/0x80
[ 2845.743742] [<
c015041b>] ? trace_hardirqs_off+0xb/0x10
[ 2845.743742] [<
c046c900>] ? _read_lock_irqsave+0x40/0x80
[ 2845.743742] [<
c012e7f2>] ? release_console_sem+0x1c2/0x1e0
[ 2845.743742] [<
c0146384>] ? up+0x14/0x40
[ 2845.743742] [<
c015b7be>] smp_call_function_single+0x8e/0x110
[ 2845.743742] [<
c010a1a0>] ? stop_this_cpu+0x0/0x40
[ 2845.743742] [<
c026d23f>] ? cpumask_next_and+0x1f/0x40
[ 2845.743742] [<
c015b95a>] smp_call_function_many+0x11a/0x200
[ 2845.743742] [<
c010a1a0>] ? stop_this_cpu+0x0/0x40
[ 2845.743742] [<
c015ba61>] smp_call_function+0x21/0x30
[ 2845.743742] [<
c01137ae>] native_smp_send_stop+0x1e/0x50
[ 2845.743742] [<
c012e0f5>] panic+0x55/0x110
[ 2845.743742] [<
c01065a8>] oops_end+0xb8/0xc0
[ 2845.743742] [<
c010668f>] die+0x4f/0x70
[ 2845.743742] [<
c011a8c9>] do_page_fault+0x269/0x610
[ 2845.743742] [<
c011a660>] ? do_page_fault+0x0/0x610
[ 2845.743742] [<
c046cbaf>] error_code+0x77/0x7c
[ 2845.743742] [<
c015515c>] ? __lock_acquire+0x6c/0xa80
[ 2845.743742] [<
c0153732>] ? trace_hardirqs_on_caller+0x72/0x1c0
[ 2845.743742] [<
c0155be6>] lock_acquire+0x76/0xa0
[ 2845.743742] [<
c03e1aad>] ? skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c046c885>] _spin_lock_irqsave+0x45/0x80
[ 2845.743742] [<
c03e1aad>] ? skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c03e1aad>] skb_dequeue+0x1d/0x70
[ 2845.743742] [<
c03e1f94>] skb_queue_purge+0x14/0x20
[ 2845.743742] [<
f8171f5a>] hci_conn_del+0x10a/0x1c0 [bluetooth]
[ 2845.743742] [<
f81399c9>] ? l2cap_disconn_ind+0x59/0xb0 [l2cap]
[ 2845.743742] [<
f81795ce>] ? hci_conn_del_sysfs+0x8e/0xd0 [bluetooth]
[ 2845.743742] [<
f8175758>] hci_event_packet+0x5f8/0x31c0 [bluetooth]
[ 2845.743742] [<
c03dfe19>] ? sock_def_readable+0x59/0x80
[ 2845.743742] [<
c046c14d>] ? _read_unlock+0x1d/0x20
[ 2845.743742] [<
f8178aa9>] ? hci_send_to_sock+0xe9/0x1d0 [bluetooth]
[ 2845.743742] [<
c015388b>] ? trace_hardirqs_on+0xb/0x10
[ 2845.743742] [<
f816fa6a>] hci_rx_task+0x2ba/0x490 [bluetooth]
[ 2845.743742] [<
c0133661>] ? tasklet_action+0x31/0xc0
[ 2845.743742] [<
c013367c>] tasklet_action+0x4c/0xc0
[ 2845.743742] [<
c0132eb7>] __do_softirq+0xa7/0x170
[ 2845.743742] [<
c0116dec>] ? ack_apic_level+0x5c/0x1c0
[ 2845.743742] [<
c0132fd7>] do_softirq+0x57/0x60
[ 2845.743742] [<
c01333dc>] irq_exit+0x7c/0x90
[ 2845.743742] [<
c01055bb>] do_IRQ+0x4b/0x90
[ 2845.743742] [<
c01333d5>] ? irq_exit+0x75/0x90
[ 2845.743742] [<
c010392c>] common_interrupt+0x2c/0x34
[ 2845.743742] [<
c010a14f>] ? mwait_idle+0x4f/0x70
[ 2845.743742] [<
c0101c05>] cpu_idle+0x65/0xb0
[ 2845.743742] [<
c045731e>] rest_init+0x4e/0x60
[ 2845.743742] ---[ end trace
4c985b38f02227a1 ]---
[ 2845.743742] Rebooting in 3 seconds..
My logitec bluetooth mouse trying connect to pc, but
pc side reject the connection again and again. then panic happens.
The reason is due to hci_conn_del_sysfs now called in hci_event_packet,
the del work is done in a workqueue, so it's possible done before
skb_queue_purge called.
I move the hci_conn_del_sysfs after skb_queue_purge just as that before
marcel's commit.
Remove the hci_conn_del_sysfs in hci_conn_hash_flush as well due to
hci_conn_del will deal with the work.
Signed-off-by: Dave Young <hidave.darkstar@gmail.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Fri, 20 Feb 2009 19:54:06 +0000 (20:54 +0100)]
Bluetooth: Permit BT_SECURITY also for L2CAP raw sockets
Userspace pairing code can be simplified if it doesn't have to fall
back to using L2CAP_LM in the case of L2CAP raw sockets. This patch
allows the BT_SECURITY socket option to be used for these sockets.
Signed-off-by: Johan Hedberg <johan.hedberg@nokia.com>
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Tue, 17 Feb 2009 20:49:33 +0000 (21:49 +0100)]
Bluetooth: Fix RFCOMM usage of in-kernel L2CAP sockets
The CID value of L2CAP sockets need to be set to zero. All userspace
applications do this via memset() on the sockaddr_l2 structure. The
RFCOMM implementation uses in-kernel L2CAP sockets and so it has to
make sure that l2_cid is set to zero.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Mon, 16 Feb 2009 02:20:31 +0000 (03:20 +0100)]
Bluetooth: Disallow usage of L2CAP CID setting for now
In the future the L2CAP layer will have full support for fixed channels
and right now it already can export the channel assignment, but for the
functions bind() and connect() the usage of only CID 0 is allowed. This
allows an easy detection if the kernel supports fixed channels or not,
because otherwise it would impossible for application to tell.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Mon, 16 Feb 2009 01:59:49 +0000 (02:59 +0100)]
Bluetooth: Change RFCOMM to use BT_CONNECT2 for BT_DEFER_SETUP
When BT_DEFER_SETUP is enabled on a RFCOMM socket, then switch its
current state from BT_OPEN to BT_CONNECT2. This gives the Bluetooth
core a unified way to handle L2CAP and RFCOMM sockets. The BT_CONNECT2
state is designated for incoming connections.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Mon, 16 Feb 2009 01:57:30 +0000 (02:57 +0100)]
Bluetooth: Fix poll() misbehavior when using BT_DEFER_SETUP
When BT_DEFER_SETUP has been enabled on a Bluetooth socket it keeps
signaling POLLIN all the time. This is a wrong behavior. The POLLIN
should only be signaled if the client socket is in BT_CONNECT2 state
and the parent has been BT_DEFER_SETUP enabled.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Thu, 12 Feb 2009 15:23:03 +0000 (16:23 +0100)]
Bluetooth: Set authentication requirement before requesting it
The authentication requirement got only updated when the security level
increased. This is a wrong behavior. The authentication requirement is
read by the Bluetooth daemon to make proper decisions when handling the
IO capabilities exchange. So set the value that is currently expected by
the higher layers like L2CAP and RFCOMM.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Thu, 12 Feb 2009 15:19:45 +0000 (16:19 +0100)]
Bluetooth: Fix authentication requirements for L2CAP security check
The L2CAP layer can trigger the authentication via an ACL connection or
later on to increase the security level. When increasing the security
level it didn't use the same authentication requirements when triggering
a new ACL connection. Make sure that exactly the same authentication
requirements are used. The only exception here are the L2CAP raw sockets
which are only used for dedicated bonding.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Thu, 12 Feb 2009 13:02:50 +0000 (14:02 +0100)]
Bluetooth: Ask upper layers for HCI disconnect reason
Some of the qualification tests demand that in case of failures in L2CAP
the HCI disconnect should indicate a reason why L2CAP fails. This is a
bluntly layer violation since multiple L2CAP connections could be using
the same ACL and thus forcing a disconnect reason is not a good idea.
To comply with the Bluetooth test specification, the disconnect reason
is now stored in the L2CAP connection structure and every time a new
L2CAP channel is added it will set back to its default. So only in the
case where the L2CAP channel with the disconnect reason is really the
last one, it will propagated to the HCI layer.
The HCI layer has been extended with a disconnect indication that allows
it to ask upper layers for a disconnect reason. The upper layer must not
support this callback and in that case it will nicely default to the
existing behavior. If an upper layer like L2CAP can provide a disconnect
reason that one will be used to disconnect the ACL or SCO link.
No modification to the ACL disconnect timeout have been made. So in case
of Linux to Linux connection the initiator will disconnect the ACL link
before the acceptor side can signal the specific disconnect reason. That
is perfectly fine since Linux doesn't make use of this value anyway. The
L2CAP layer has a perfect valid error code for rejecting connection due
to a security violation. It is unclear why the Bluetooth specification
insists on having specific HCI disconnect reason.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Thu, 12 Feb 2009 04:07:45 +0000 (05:07 +0100)]
Bluetooth: Add CID field to L2CAP socket address structure
In preparation for L2CAP fixed channel support, the CID value of a
L2CAP connection needs to be accessible via the socket interface. The
CID is the connection identifier and exists as source and destination
value. So extend the L2CAP socket address structure with this field and
change getsockname() and getpeername() to fill it in.
The bind() and connect() functions have been modified to handle L2CAP
socket address structures of variable sizes. This makes them future
proof if additional fields need to be added.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Mon, 9 Feb 2009 08:18:02 +0000 (09:18 +0100)]
Bluetooth: Request L2CAP fixed channel list if available
If the extended features mask indicates support for fixed channels,
request the list of available fixed channels. This also enables the
fixed channel features bit so remote implementations can request
information about it. Currently only the signal channel will be
listed.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Mon, 9 Feb 2009 02:55:28 +0000 (03:55 +0100)]
Bluetooth: Don't enforce authentication for L2CAP PSM 1 and 3
The recommendation for the L2CAP PSM 1 (SDP) is to not use any kind
of authentication or encryption. So don't trigger authentication
for incoming and outgoing SDP connections.
For L2CAP PSM 3 (RFCOMM) there is no clear requirement, but with
Bluetooth 2.1 the initiator is required to enable authentication
and encryption first and this gets enforced. So there is no need
to trigger an additional authentication step. The RFCOMM service
security will make sure that a secure enough link key is present.
When the encryption gets enabled after the SDP connection setup,
then switch the security level from SDP to low security.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Fri, 6 Feb 2009 22:56:36 +0000 (23:56 +0100)]
Bluetooth: Fix double L2CAP connection request
If the remote L2CAP server uses authentication pending stage and
encryption is enabled it can happen that a L2CAP connection request is
sent twice due to a race condition in the connection state machine.
When the remote side indicates any kind of connection pending, then
track this state and skip sending of L2CAP commands for this period.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Fri, 6 Feb 2009 22:35:19 +0000 (23:35 +0100)]
Bluetooth: Fix race condition with L2CAP information request
When two L2CAP connections are requested quickly after the ACL link has
been established there exists a window for a race condition where a
connection request is sent before the information response has been
received. Any connection request should only be sent after an exchange
of the extended features mask has been finished.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Fri, 6 Feb 2009 18:45:36 +0000 (19:45 +0100)]
Bluetooth: Set authentication requirements if not available
When no authentication requirements are selected, but an outgoing or
incoming connection has requested any kind of security enforcement,
then set these authentication requirements.
This ensures that the userspace always gets informed about the
authentication requirements (if available). Only when no security
enforcement has happened, the kernel will signal invalid requirements.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Mon, 9 Feb 2009 01:48:38 +0000 (02:48 +0100)]
Bluetooth: Use general bonding whenever possible
When receiving incoming connection to specific services, always use
general bonding. This ensures that the link key gets stored and can be
used for further authentications.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>
Marcel Holtmann [Fri, 6 Feb 2009 08:13:37 +0000 (09:13 +0100)]
Bluetooth: Add SCO fallback for eSCO connection attempts
When attempting to setup eSCO connections it can happen that some link
manager implementations fail to properly negotiate the eSCO parameters
and thus fail the eSCO setup. Normally the link manager is responsible
for the negotiation of the parameters and actually fallback to SCO if
no agreement can be reached. In cases where the link manager is just too
stupid, then at least try to establish a SCO link if eSCO fails.
For the Bluetooth devices with EDR support this includes handling packet
types of EDR basebands. This is particular tricky since for the EDR the
logic of enabling/disabling one specific packet type is turned around.
This fix contains an extra bitmask to disable eSCO EDR packet when
trying to fallback to a SCO connection.
Signed-off-by: Marcel Holtmann <marcel@holtmann.org>