Allan Stephens [Tue, 30 Nov 2010 12:00:53 +0000 (12:00 +0000)]
tipc: Remove obsolete native API files and exports
As part of the removal of TIPC's native API support it is no longer
necessary for TIPC to export symbols for routines that can be called
by kernel-based applications, nor for it to have header files that
kernel-based applications can include to access the declarations for
those routines. This commit eliminates the exporting of symbols by
TIPC and migrates the contents of each obsolete native API include
file into its corresponding non-native API equivalent.
The code which was migrated in this commit was migrated intact, in
that there are no technical changes combined with the relocation.
Signed-off-by: Allan Stephens <Allan.Stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Mon, 29 Nov 2010 18:19:52 +0000 (18:19 +0000)]
can: EG20T PCH: Delete unnecessary spin_lock
Delete unnecessary spin_lock for accessing Message Object.
Since all message objects are divided into tx/rx area completely,
spin_lock processing is unnecessary.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Mon, 29 Nov 2010 18:11:52 +0000 (18:11 +0000)]
can: EG20T PCH: Separate Interface Register(IF1/IF2)
CAN register of Intel PCH EG20T has 2 sets of interface register.
To reduce whole of code size, separate interface register.
As a result, the number of function also can be reduced.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Thu, 2 Dec 2010 20:14:29 +0000 (12:14 -0800)]
tcp: Add timewait recycling bits to ipv6 connect code.
This will also improve handling of ipv6 tcp socket request
backlog when syncookies are not enabled. When backlog
becomes very deep, last quarter of backlog is limited to
validated destinations. Previously only ipv4 implemented
this logic, but now ipv6 does too.
Now we are only one step away from enabling timewait
recycling for ipv6, and that step is simply filling in
the implementation of tcp_v6_get_peer() and
tcp_v6_tw_get_peer().
Signed-off-by: David S. Miller <davem@davemloft.net>
If ipip is built as a module the 'ip tunnel add' command would fail because
the ipip module was not being autoloaded. Adding an alias for
the tunl0 device name cause dev_load() to autoload it when needed.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
If gre is built as a module the 'ip tunnel add' command would fail because
the ip_gre module was not being autoloaded. Adding an alias for
the gre0 device name cause dev_load() to autoload it when needed.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Mon, 29 Nov 2010 08:14:37 +0000 (08:14 +0000)]
net sched: use xps information for qdisc NUMA affinity
Allocate qdisc memory according to NUMA properties of cpus included in
xps map.
To be effective, qdisc should be (re)setup after changes
of /sys/class/net/eth<n>/queues/tx-<n>/xps_cpus
I added a numa_node field in struct netdev_queue, containing NUMA node
if all cpus included in xps_cpus share same node, else -1.
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Ben Hutchings <bhutchings@solarflare.com> Cc: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Dmitry Kravkov [Wed, 1 Dec 2010 20:39:28 +0000 (12:39 -0800)]
bnx2x: Add Nic partitioning mode (57712 devices)
NIC partitioning is another flavor of multi function - having few
PCI functions share the same physical port. Unlike the currently
supported mode of multi-function which depends on the switch
configuration and uses outer-VLAN, the NPAR mode is switch independent
and uses the MAC addresses to distribute incoming packets to the different
functions. This patch adds the specific HW setting of the NPAR mode
and some distinctions between switch dependent (SD) and
switch independent (SI) multi-function (MF) modes where the configuration
is not the same.
Advance driver version to 1.60.00-6
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 29 Nov 2010 21:37:14 +0000 (13:37 -0800)]
inet: Turn ->remember_stamp into ->get_peer in connection AF ops.
Then we can make a completely generic tcp_remember_stamp()
that uses ->get_peer() as a helper, minimizing the AF specific
code and minimizing the eventual code duplication when we implement
the ipv6 side of TW recycling.
Signed-off-by: David S. Miller <davem@davemloft.net>
Shan Wei [Mon, 29 Nov 2010 00:14:58 +0000 (00:14 +0000)]
sctp: kill unused macros in head file
1. SCTP_CMD_NUM_VERBS,SCTP_CMD_MAX
These two macros have never been used for several years since v2.6.12-rc2.
2.sctp_port_rover,sctp_port_alloc_lock
The commit 063930 abandoned global variables of port_rover and port_alloc_lock,
but still keep two macros to refer to them.
So, remove them now.
Scott J. Goldman [Sat, 27 Nov 2010 10:33:55 +0000 (10:33 +0000)]
vmxnet3: fix compilation when RSS is disabled
If RSS is disabled, we can ifdef out some RSS specific code. This fixes
the compile error found by Randy Dunlap.
Signed-off-by: Scott J. Goldman <scottjg@vmware.com> Reviewed-by: Bhavesh Davda <bhavesh@vmware.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tom Herbert [Fri, 26 Nov 2010 08:36:09 +0000 (08:36 +0000)]
xps: Add CONFIG_XPS
This patch adds XPS_CONFIG option to enable and disable XPS. This is
done in the same manner as RPS_CONFIG. This is also fixes build
failure in XPS code when SMP is not enabled.
Signed-off-by: Tom Herbert <therbert@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Ursula Braun [Fri, 26 Nov 2010 02:41:19 +0000 (02:41 +0000)]
qeth: enable interface setup if LAN is offline
Device initialization of a qeth device contains a STARTLAN step.
This step may fail, if cable is not yet plugged in. The qeth device
stays in state HARDSETUP until cable is plugged in. This prevents
further preparational initialization steps of the qeth device and
its network interface. This patch makes sure initialization of qeth
device continues, even though cable is not yet plugged in.
Once carrier is available, qeth is notified, triggers a recovery
which results in a working network interface.
Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Fri, 26 Nov 2010 02:41:18 +0000 (02:41 +0000)]
drivers/s390/net: Remove unnecessary semicolons
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Update the s390 network drivers(qeth & lcs) code to adapt to this change.
V2 : Changes based on suggestions given by Eric Dumazet
Signed-off-by: Sachin Sant <sachinp@in.ibm.com> Signed-off-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
stmmac: fix stmmac_resume removing not yet used shutdown flag
The commit to convert to use the dev_pm_ops struct
introduces a bug. The shutdown flag is not yet used
because the hibernation on memory is done by using
the freeze callback.
Thanks to Vlad for having reported it.
Reported-by: Vlad Lungu <vlad.lungu@windriver.com> Signed-off-by: Giuseppe Cavallaro <peppe.cavallaro@st.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Breno Leitao [Thu, 25 Nov 2010 07:53:55 +0000 (07:53 +0000)]
cxgb3: Removing unused return variable
Currently the ret variable is not used for anything other than
receive the value of the t3_adapter_error(), which will always be 0,
because the reset parameter is 0.
Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Jozsef Kadlecsik [Thu, 25 Nov 2010 03:15:07 +0000 (03:15 +0000)]
ipv6: Prepare the tree for un-inlined jhash.
jhash is widely used in the kernel and because the functions
are inlined, the cost in size is significant. Also, the new jhash
functions are slightly larger than the previous ones so better un-inline.
As a preparation step, the calls to the internal macros are replaced
with the plain jhash function calls.
Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu> Signed-off-by: David S. Miller <davem@davemloft.net>
Jonas Bonn [Thu, 25 Nov 2010 02:30:30 +0000 (02:30 +0000)]
ethoc: rework mdio read/write
MDIO read and write were checking whether a timeout had expired to determine
whether to recheck the result of the MDIO operation. Under heavy CPU usage,
however, it was possible for the timeout to expire before the routine got
around to be able to check a second time even, thus erroneousy returning an
-EBUSY.
This patch changes the the MDIO IO routines to try up to five times to complete
the operation before giving up, thus lessening the dependency on CPU load.
This resolves a problem whereby a ping flood would keep the CPU so busy that
the above problem would manifest itself; the MDIO command to check link status
would fail and the interface would erroneously be shut down.
Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Jonas Bonn [Thu, 25 Nov 2010 02:30:29 +0000 (02:30 +0000)]
ethoc: rework interrupt handling
The old interrupt handling was incorrect in that it did not account for the
fact that the interrupt source bits get set irregardless of whether or not
their corresponding mask is set. This patch fixes that by masking off the
source bits for masked interrupts.
Furthermore, the handling of transmission events is moved to the NAPI polling
handler alongside the reception handler, thus preventing a whole bunch of
interrupts during heavy traffic.
Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Jonas Bonn [Thu, 25 Nov 2010 02:30:28 +0000 (02:30 +0000)]
ethoc: Double check pending RX packet
An interrupt may occur between checking bd.stat and clearing the
interrupt source register which would result in the packet going totally
unnoticed as the interrupt will be missed. Double check bd.stat after
clearing the interrupt source register to guard against such an
occurrence.
Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Adam Edvardsson [Thu, 25 Nov 2010 02:30:27 +0000 (02:30 +0000)]
ethoc: enable interrupts after napi_complete
Occasionally, it seems that some race is causing the interrupts to not be
reenabled otherwise with the end result that networking just stops working.
Enabling interrupts after calling napi_complete is more in line with what
other drivers do.
Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: David S. Miller <davem@davemloft.net>
Jonas Bonn [Thu, 25 Nov 2010 02:30:25 +0000 (02:30 +0000)]
ethoc: Add device tree configuration
This patch adds the ability to describe ethernet devices via a flattened
device tree. As device tree remains an optional feature, these bits all
need to be guarded by CONFIG_OF ifdefs.
MAC address is settable via the device tree parameter "local-mac-address";
however, the selection of the phy id is limited to probing, for now.
Signed-off-by: Jonas Bonn <jonas@southpole.se> Signed-off-by: David S. Miller <davem@davemloft.net>
bnx2x: Use helpers instead of direct access to the shinfo(skb) fields
Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Michael Chan [Wed, 24 Nov 2010 13:48:55 +0000 (13:48 +0000)]
bnx2: Remove config access to non-standard registers
In KVM passthrough mode, the driver may not have config access to
non-standard registers. The BNX2_PCICFG_MISC_CONFIG config register
access to setup mailbox swapping can be done using MMIO.
Update version to 2.0.20.
Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Eddie Wai [Wed, 24 Nov 2010 13:48:54 +0000 (13:48 +0000)]
bnx2: Fix reset bug on 5709
The 5709 chip requires the BNX2_MISC_NEW_CORE_CTL_DMA_ENABLE bit to be
cleared and polling for pending DMAs to complete before chip reset.
Without this step, we've seen NMIs during repeated resets of the chip.
Signed-off-by: Eddie Wai <waie@broadcom.com> Signed-off-by: Michael Chan <mchan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Rajesh Borundia [Tue, 23 Nov 2010 03:08:27 +0000 (03:08 +0000)]
netxen: avoid using reset_devices as it may become obsolete
In kdump environment do not depend on reset_devices
parameter to reset the device as the parameter may become obsolete.
Instead use an adapter specific mechanism to determine if the device
needs a reset.
Driver maintains a count of number of pci functions probed
and decrements the count when remove handler of that pci function
is called. If the first probe, probe of function 0,
detects the count as non zero then reset the device.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Rajesh Borundia [Tue, 23 Nov 2010 01:25:21 +0000 (01:25 +0000)]
qlcnic: avoid using reset_devices as it may become obsolete.
In kdump environment do not depend upon reset_devices parameter
to reset the pci function as this parameter may become obsolete.
Instead use an adapter specific mechanism to determine if the pci
function needs to be reset.
Per function refcount is maintained in driver, which is set in probe
and reset in remove handler of adapter. If the probe detects the count
as non zero then reset the function.
Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com> Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Thomas Graf [Mon, 22 Nov 2010 01:31:54 +0000 (01:31 +0000)]
rtnl: make link af-specific updates atomic
As David pointed out correctly, updates to af-specific attributes
are currently not atomic. If multiple changes are requested and
one of them fails, previous updates may have been applied already
leaving the link behind in a undefined state.
This patch splits the function parse_link_af() into two functions
validate_link_af() and set_link_at(). validate_link_af() is placed
to validate_linkmsg() check for errors as early as possible before
any changes to the link have been made. set_link_af() is called to
commit the changes later.
This method is not fail proof, while it is currently sufficient
to make set_link_af() inerrable and thus 100% atomic, the
validation function method will not be able to detect all error
scenarios in the future, there will likely always be errors
depending on states which are f.e. not protected by rtnl_mutex
and thus may change between validation and setting.
Also, instead of silently ignoring unknown address families and
config blocks for address families which did not register a set
function the errors EAFNOSUPPORT respectively EOPNOSUPPORT are
returned to avoid comitting 4 out of 5 update requests without
notifying the user.
Signed-off-by: Thomas Graf <tgraf@infradead.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Sathya Perla [Sun, 21 Nov 2010 23:25:50 +0000 (23:25 +0000)]
be2net: adding support for Lancer family of CNAs
Key changes are:
- EQ ids are not assigned consecutively in Lancer. So, fix mapping of MSIx
vector to EQ-id.
- BAR mapping and some req locations different for Lancer.
- TCP,UDP,IP checksum fields must be compulsorily set in TX wrb for TSO in
Lancer.
- CEV_IST reg not present in Lancer; so, peek into event queue to check for
new entries
- cq_create and mcc_create cmd interface is different for Lancer; handle
accordingly
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com> Signed-off-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Categorize AR7010 & AR9287 devices based on driver_info
of usb_device_id, instead of PIDs. This avoids per-device cases
and minimize code changes for new device addition.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
ath9k_hw: Fix eeprom offset for AR9287 devices (PCI/USB)
AR9287 devices (PCI/USB) use different eeprom start location
to read nvram. New devices might endup with same devid. So use
driver_info to set offset, instead of devid. driver_info is
valid for HTC devices alone which is filled in usb_device_id.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>
The driver_info stores the device category information which
is used to load appropriate device firmware, select firmware offset
and eeprom starting location. The driver_info is accessed across
ath9k_htc and ath9k_hw. Hence placed under common structure.
Signed-off-by: Rajkumar Manoharan <rmanoharan@atheros.com> Signed-off-by: John W. Linville <linville@tuxdriver.com>