Commit graph

132768 commits

Author SHA1 Message Date
Hannes Eder
cf80063a7d drivers/isdn/act2000: fix sparse warning: symbol shadows an earlier one
Impact: Rename local variable 'c' to 't'.

Fix this sparse warning:
  drivers/isdn/act2000/act2000_isa.c:260:70: warning: symbol 'c' shadows an earlier one

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-27 01:00:41 -08:00
Hannes Eder
dfe925e8e9 drivers/isdn/capi: fix sparse warning: context imbalance
Impact: Attribute functions with __acquires(...) resp. __releases(...).

Fix this sparse warnings:
  drivers/isdn/capi/kcapi_proc.c:241:13: warning: context imbalance in 'capi_driver_start' - wrong count at exit
  drivers/isdn/capi/kcapi_proc.c:252:13: warning: context imbalance in 'capi_driver_stop' - unexpected unlock

Signed-off-by: Hannes Eder <hannes@hanneseder.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-27 01:00:41 -08:00
Andy Grover
fe17f84f5f RDS: Kconfig and Makefile
Add RDS Kconfig and Makefile, and modify net/'s to add
us to the build.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:43:35 -08:00
Andy Grover
a09ed661f7 RDS: Add MAINTAINERS entry
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:43:34 -08:00
Andy Grover
cbd151bfc7 RDS: Add RDS to AF key strings
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:43:19 -08:00
Andy Grover
db49b9d26c RDS: Add userspace header
Applications include this header in order to use RDS sockets.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:42:11 -08:00
Andy Grover
8a7c4c7726 RDS: Add AF and PF #defines for RDS sockets
RDS is a reliable datagram protocol used for IPC on Oracle
database clusters. This adds address and protocol family numbers
for it.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:41:38 -08:00
Andy Grover
0c5f9b8830 RDS: Documentation
This file documents the specifics of the RDS sockets API,
as well as covering some of the details of its internal
implementation.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:34 -08:00
Andy Grover
55b7ed0b58 RDS: Common RDMA transport code
Although most of IB and iWARP are separated from each other,
there is some common code required to handle their shared
CM listen port. This code listens for CM events and then
dispatches the event to the appropriate transport, either
IB or iWARP.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:33 -08:00
Andy Grover
fcd8b7c0ec RDS: Add iWARP support
Support for iWARP NICs is implemented as a separate
RDS transport from IB. The code, however, is very
similar to IB (it was forked, basically.) so let's keep
it in one changeset.

The reason for this duplicationis that despite its similarity
to IB, there are a number of places where it has different
semantics. iwarp zcopy support is still under development,
and giving it its own sandbox ensures that IB code isn't
disrupted while iwarp changes. Over time these transports
will re-converge.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:33 -08:00
Andy Grover
e6babe4cc4 RDS/IB: Stats and sysctls
IB-specific stats and sysctls.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:32 -08:00
Andy Grover
1e23b3ee0e RDS/IB: Receive datagrams via IB
Header parsing, ring refill. It puts the incoming data into an
rds_incoming struct, which is passed up to rds-core.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:32 -08:00
Andy Grover
6a0979df32 RDS/IB: Implement IB-specific datagram send.
Specific to IB is a credits-based flow control mechanism, in
addition to the expected usage of the IB API to package outgoing
data into work requests.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:31 -08:00
Andy Grover
08b48a1ed8 RDS/IB: Implement RDMA ops using FMRs
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:31 -08:00
Andy Grover
f528efe276 RDS/IB: Ring-handling code.
Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:30 -08:00
Andy Grover
ec16227e14 RDS/IB: Infiniband transport
Registers as an RDS transport and an IB client, and uses IB CM
API to allocate ids, queue pairs, and the rest of that fun stuff.

Signed-off-by: Andy Grover <andy.grover@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2009-02-26 23:39:30 -08:00
Andy Grover
eff5f53bef 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>
2009-02-26 23:39:29 -08:00
Andy Grover
bdbe6fbc6a 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>
2009-02-26 23:39:29 -08:00
Andy Grover
5c11559046 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>
2009-02-26 23:39:28 -08:00
Andy Grover
7875e18e09 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>
2009-02-26 23:39:28 -08:00
Andy Grover
3e5048495c 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>
2009-02-26 23:39:26 -08:00
Andy Grover
13796bf9ed 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>
2009-02-26 23:39:26 -08:00
Andy Grover
00e0f34c61 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>
2009-02-26 23:39:25 -08:00
Andy Grover
a8c879a7ee 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>
2009-02-26 23:39:25 -08:00
Andy Grover
0fbc78cbf5 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>
2009-02-26 23:39:24 -08:00
Andy Grover
922cb17a5c 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>
2009-02-26 23:39:24 -08:00
Andy Grover
39de828179 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>
2009-02-26 23:39:23 -08:00
Andy Grover
639b321b4d 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>
2009-02-26 23:39:23 -08:00
Ben Hutchings
b775a750c3 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>
2009-02-26 23:21:23 -08:00
Ben Hutchings
06e1f9ffa0 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>
2009-02-26 23:20:56 -08:00
Matt Carlson
1318136fcd 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>
2009-02-26 23:16:41 -08:00
Matt Carlson
0d2a5068aa 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>
2009-02-26 23:16:41 -08:00
Matt Carlson
a6f6cb1cf8 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>
2009-02-26 23:16:40 -08:00
Matt Carlson
7fd764455a 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>
2009-02-26 23:16:39 -08:00
Matt Carlson
ff3a7cb252 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>
2009-02-26 23:16:38 -08:00
Matt Carlson
acd9c119cc 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>
2009-02-26 23:16:38 -08:00
Matt Carlson
6d348f2c1e 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>
2009-02-26 23:16:37 -08:00
Matt Carlson
a9dc529dcd 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>
2009-02-26 23:16:36 -08:00
Matt Carlson
e4f341103e 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>
2009-02-26 23:16:36 -08:00
Matt Carlson
ffbcfed441 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>
2009-02-26 23:16:35 -08:00
Matt Carlson
844b3eed8a 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>
2009-02-26 23:16:33 -08:00
Matt Carlson
7e5856bd96 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>
2009-02-26 23:16:32 -08:00
Matt Carlson
f7b493e021 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>
2009-02-26 23:16:31 -08:00
Matt Carlson
a6435f3a53 tg3: Fix 5906 link problems
Commit 6833c043f9 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>
2009-02-26 23:16:29 -08:00
Hannes Eder
9ee62630fd 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>
2009-02-26 23:13:36 -08:00
Hannes Eder
56bca31ff1 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>
2009-02-26 23:13:35 -08:00
Hannes Eder
e57c624be8 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>
2009-02-26 23:13:35 -08:00
Hannes Eder
8521c27ee7 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>
2009-02-26 23:13:34 -08:00
Hannes Eder
63d819caeb 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>
2009-02-26 23:13:34 -08:00
Hannes Eder
2db096086e 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>
2009-02-26 23:13:33 -08:00