]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/log
mirror_ubuntu-bionic-kernel.git
14 years agotg3: Update version to 3.108
Matt Carlson [Wed, 17 Feb 2010 15:17:05 +0000 (15:17 +0000)]
tg3: Update version to 3.108

This patch updates the tg3 version to 3.108.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Push phylib definitions to phylib
Matt Carlson [Wed, 17 Feb 2010 15:17:04 +0000 (15:17 +0000)]
tg3: Push phylib definitions to phylib

This patch pushes phylib definitions out to phylib headers.  For phy
IDs, this removes some code duplication.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Rename tg3 phy ID preprocessor definitions
Matt Carlson [Wed, 17 Feb 2010 15:17:03 +0000 (15:17 +0000)]
tg3: Rename tg3 phy ID preprocessor definitions

The phylib presents the phy ID in a different format than the one tg3
has traditionally used.  To highlight the distinction, this patch
prepends the tg3 native phy ID format with TG3.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Reformat SSID to phy ID table
Matt Carlson [Wed, 17 Feb 2010 15:17:02 +0000 (15:17 +0000)]
tg3: Reformat SSID to phy ID table

This patch reformats the SSID to phy ID table, replacing constants with
preprocessor definitions.  This patch is also prep work for the
following patch, which will push line lengths beyond 80 chars.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Discover phy address once
Matt Carlson [Wed, 17 Feb 2010 15:17:01 +0000 (15:17 +0000)]
tg3: Discover phy address once

The phy address will not change after it has been identified.  Move the
discovery code to a location that only gets executed once.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Reduce indent level of tg3_rx_prodring_alloc
Matt Carlson [Wed, 17 Feb 2010 15:17:00 +0000 (15:17 +0000)]
tg3: Reduce indent level of tg3_rx_prodring_alloc

This patch adds an inverted "jumbo ring enable" test and jumps to the exit
if it succeeds.  The change reduces the indent level of the remaining
code making it more readable.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Rename TG3_FLG3_RGMII_STD_IBND_DISABLE
Matt Carlson [Wed, 17 Feb 2010 15:16:59 +0000 (15:16 +0000)]
tg3: Rename TG3_FLG3_RGMII_STD_IBND_DISABLE

The STD part of this preprocessor definition is a bit of a misnomer.
This flag is a coarse control of the RGMII inband status facilities.
This patch renames the definition to be more accurate.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add more partno entries for fallback path
Matt Carlson [Wed, 17 Feb 2010 15:16:58 +0000 (15:16 +0000)]
tg3: Add more partno entries for fallback path

This patch adds 57765 asic partno entries for the path executed if VPD
is not present in NVRAM.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Allow phylib flowctrl changes anytime
Matt Carlson [Wed, 17 Feb 2010 15:16:57 +0000 (15:16 +0000)]
tg3: Allow phylib flowctrl changes anytime

This patch loosens the restriction that the phylib interface must be up
and running to change the flow control parameters.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Add support for 2 new selfboot formats
Matt Carlson [Wed, 17 Feb 2010 15:16:56 +0000 (15:16 +0000)]
tg3: Add support for 2 new selfboot formats

This patch adds new offsets to the bootcode version extraction code to
support NVRAM format versions 4 and 5.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Make 57791 and 57795 10/100 only
Matt Carlson [Wed, 17 Feb 2010 15:16:55 +0000 (15:16 +0000)]
tg3: Make 57791 and 57795 10/100 only

This patch adds the 57791 and 57795 to the list of devices that only
support 10 and 100 Mbps speeds.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Reviewed-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agotg3: Enforce DMA mapping / skb assignment ordering
Matt Carlson [Wed, 17 Feb 2010 15:16:54 +0000 (15:16 +0000)]
tg3: Enforce DMA mapping / skb assignment ordering

Michael Chan noted that there is nothing in the code that would prevent
the compiler from delaying the access of the "mapping" member of the
newly arrived packet until much later.  If this happened after the
skb = NULL assignment, it is possible for the driver to pass a bad
dma_addr value to pci_unmap_single().  To enforce this ordering, we need
a write memory barrier.  The pairing read memory barrier already exists
in tg3_rx_prodring_xfer() under the comments starting with
"Ensure that updates to the...".

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>
14 years agotun: socket filter support
Michael S. Tsirkin [Sun, 14 Feb 2010 01:01:10 +0000 (01:01 +0000)]
tun: socket filter support

This patch adds Linux Socket Filter support to
tun driver.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: export attach/detach filter routines
Michael S. Tsirkin [Sun, 14 Feb 2010 01:01:00 +0000 (01:01 +0000)]
net: export attach/detach filter routines

Export sk_attach_filter/sk_detach_filter routines,
so that tun module can use them.

Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agochelsio: convert to use netdev_for_each_mc_addr
Jiri Pirko [Wed, 17 Feb 2010 11:56:45 +0000 (11:56 +0000)]
chelsio: convert to use netdev_for_each_mc_addr

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb3: convert to use netdev_for_each_addr
Jiri Pirko [Wed, 17 Feb 2010 12:27:14 +0000 (12:27 +0000)]
cxgb3: convert to use netdev_for_each_addr

Removed whole t3_rx_mode structure and appropriate helpers cause they are no
longer needed.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsc911x: replace manual phy lookup.
kirjanov@gmail.com [Tue, 16 Feb 2010 21:54:58 +0000 (21:54 +0000)]
smsc911x: replace manual phy lookup.

Use phy_find_first() function instead of manual lookup.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Reviewed-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: bug fix for vlan + gro issue
Ajit Khaparde [Tue, 16 Feb 2010 20:25:43 +0000 (20:25 +0000)]
net: bug fix for vlan + gro issue

Traffic (tcp) doesnot start on a vlan interface when gro is enabled.
Even the tcp handshake was not taking place.
This is because, the eth_type_trans call before the netif_receive_skb
in napi_gro_finish() resets the skb->dev to napi->dev from the previously
set vlan netdev interface. This causes the ip_route_input to drop the
incoming packet considering it as a packet coming from a martian source.

I could repro this on 2.6.32.7 (stable) and 2.6.33-rc7.
With this fix, the traffic starts and the test runs fine on both vlan
and non-vlan interfaces.

CC: Herbert Xu <herbert@gondor.apana.org.au>
CC: Patrick McHardy <kaber@trash.net>
Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomv643xx_eth: fix missing validate_addr hook
kirjanov@gmail.com [Tue, 16 Feb 2010 20:40:11 +0000 (20:40 +0000)]
mv643xx_eth: fix missing validate_addr hook

Fix missing validate_addr hook.

Signed-off-by: Denis Kirjanov <kirjanov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver
Kristoffer Glembo [Mon, 15 Feb 2010 03:33:44 +0000 (03:33 +0000)]
net: Add Aeroflex Gaisler 10/100/1G Ethernet MAC driver

Adds device driver for Aeroflex Gaisler 10/100 and 10/100/1G Ethernet
MAC IP cores.

Signed-off-by: Kristoffer Glembo <kristoffer@gaisler.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agovia-velocity: Enable scatter/gather IO by default
Simon Kagstrom [Thu, 11 Feb 2010 05:39:55 +0000 (05:39 +0000)]
via-velocity: Enable scatter/gather IO by default

Reduces CPU utilization significantly with sendfile for example.

Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipg: Remove device claimed by dl2k from pci id table
Jeff Mahoney [Thu, 11 Feb 2010 10:26:38 +0000 (10:26 +0000)]
ipg: Remove device claimed by dl2k from pci id table

This patch removes D-Link DGE-550T PCI ID (1186:4000) from the ipg
driver. The ipg driver is for IP2000-based cards and the DGE-550T is
a DL2000-based card. The driver loads and works for a few moments, but
once a real workload is applied it stops operating. The ipg driver
claimed this ID since it was introduced in 2.6.24 and it's forced many
users to blacklist it.

The correct driver for this hardware is the dl2k driver, which has been
claiming this PCI ID since the 2.4 days.

Signed-off-by: Jeff Mahoney <jeffm@suse.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxfrm: Revert false event eliding commits.
David S. Miller [Wed, 17 Feb 2010 21:41:40 +0000 (13:41 -0800)]
xfrm: Revert false event eliding commits.

As reported by Alexey Dobriyan:

--------------------
setkey now takes several seconds to run this simple script
and it spits "recv: Resource temporarily unavailable" messages.

#!/usr/sbin/setkey -f
flush;
spdflush;

add A B ipcomp 44 -m tunnel -C deflate;
add B A ipcomp 45 -m tunnel -C deflate;

spdadd A B any -P in ipsec
        ipcomp/tunnel/192.168.1.2-192.168.1.3/use;
spdadd B A any -P out ipsec
        ipcomp/tunnel/192.168.1.3-192.168.1.2/use;
--------------------

Obviously applications want the events even when the table
is empty.  So we cannot make this behavioral change.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoSiS190/191 half-duplex initialization fix
Riccardo Ghetta [Wed, 17 Feb 2010 09:28:58 +0000 (09:28 +0000)]
SiS190/191 half-duplex initialization fix

Adds half-duplex specific setup code (taken from SiS own GPL driver).
Without those, half-duplex connections are very unreliable, often
working on small transfers and failing after a while.

Signed-off-by: Riccardo Ghetta <birrachiara@tin.it>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoethtool: Don't flush n-tuple list from ethtool_reset()
Ben Hutchings [Wed, 17 Feb 2010 09:26:54 +0000 (09:26 +0000)]
ethtool: Don't flush n-tuple list from ethtool_reset()

The n-tuple list should be flushed if and only if the ETH_RESET_FILTER
flag is set and the driver is able to reset filtering/flow direction
hardware without also resetting a component whose flag is not set.
This test is best left to the driver.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobnx2x: version number and date
Vladislav Zolotarov [Wed, 17 Feb 2010 02:05:54 +0000 (02:05 +0000)]
bnx2x: version number and date

Updated release version and date: 1.52.1-6 and 2010/02/16

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>
14 years agobnx2x: Use firmware 5.2.13
Vladislav Zolotarov [Wed, 17 Feb 2010 21:35:01 +0000 (13:35 -0800)]
bnx2x: Use firmware 5.2.13

Switch to the new firmware version (5.2.13).

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>
14 years agobnx2x: FW 5.2.13
Vladislav Zolotarov [Wed, 17 Feb 2010 21:33:02 +0000 (13:33 -0800)]
bnx2x: FW 5.2.13

New firmware version (5.2.13).

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>
14 years agobnx2x: fix in 57710 self-test
Vladislav Zolotarov [Wed, 17 Feb 2010 02:04:00 +0000 (02:04 +0000)]
bnx2x: fix in 57710 self-test

Bug fix: Use the last unicast entry in CAM in bnx2x_test_int(). Relevant for 57710 only.

Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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>
14 years agobnx2x: Do not allow enabling LRO if disable_tpa=1
Vladislav Zolotarov [Wed, 17 Feb 2010 02:03:40 +0000 (02:03 +0000)]
bnx2x: Do not allow enabling LRO if disable_tpa=1

Bug fix: Do not allow enabling LRO if disable_tpa=1.

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>
14 years agobnx2x: clean up in case of error in bnx2x_init_hw()
Vladislav Zolotarov [Wed, 17 Feb 2010 02:03:33 +0000 (02:03 +0000)]
bnx2x: clean up in case of error in bnx2x_init_hw()

Bug fix: clean up MCP state in case of error in bnx2x_init_hw().

Author: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
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>
14 years agobnx2x: Properly release allocated MSI-X/MSI vectors
Vladislav Zolotarov [Wed, 17 Feb 2010 02:03:27 +0000 (02:03 +0000)]
bnx2x: Properly release allocated MSI-X/MSI vectors

Bug fix: Properly release allocated MSI-X/MSI vectors if ifup failed
due to lack of memory.

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>
14 years agodrivers/net/usb: Use netif_<level> logging facilities
Joe Perches [Wed, 17 Feb 2010 10:30:24 +0000 (10:30 +0000)]
drivers/net/usb: Use netif_<level> logging facilities

Convert from:
if (netif_msg_<foo>(priv))
dev_<level>(dev...
to
netif_<level>(priv, foo, dev...

Also convert a few:

if (i < REG_TIMEOUT) {
etc...
return ret;
       }
to
if (i >= REG_TIMEOUT)
goto fail;
etc...
return ret;

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agousbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>
Joe Perches [Wed, 17 Feb 2010 10:30:23 +0000 (10:30 +0000)]
usbnet: Convert dev(dbg|err|warn|info) macros to netdev_<level>

These macros are too similar to the dev_<level> equivalents
but take a usbnet * argument.  Convert them to the recently
introduced netdev_<level> macros and remove the old macros.

The old macros had "\n" appended to the format string.
Add the "\n" to the converted uses.

Some existing uses of the dev<foo> macros in cdc_eem.c
probably mistakenly had trailing "\n".  No "\n" added there.

Fix net1080 this/other log message inversion.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: implement pci shutdown handler
Sathya Perla [Wed, 17 Feb 2010 01:35:37 +0000 (01:35 +0000)]
be2net: implement pci shutdown handler

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: fix rx-path to ignore a flush completion
Sathya Perla [Wed, 17 Feb 2010 01:35:26 +0000 (01:35 +0000)]
be2net: fix rx-path to ignore a flush completion

The flush compl (compl with numfrags == 0; no data) is rcvd
from hw to indicate completion of RXQ destory operation. Fix
the RX path to not process it as RX data.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: don't rearm mcc cq when device is not open
Sathya Perla [Wed, 17 Feb 2010 01:35:11 +0000 (01:35 +0000)]
be2net: don't rearm mcc cq when device is not open

When an MCC cmd is issued (via a netdev/ethtool op)
while the device is not open, the MCC CQ gets processed but the EQ
is not processed (as isr is not registered.) This can cause the EQ
to become full. So, while the device is not open, CQ must not be re-armed
to prevent EQ entries.

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: a mini optimization in rx_compl_process() code
Sathya Perla [Wed, 17 Feb 2010 01:34:22 +0000 (01:34 +0000)]
be2net: a mini optimization in rx_compl_process() code

Introduce unlikely() for skb alloc failure and vlanf checks...

Signed-off-by: Sathya Perla <sathyap@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix occasional loopback test failure.
Ron Mercer [Wed, 17 Feb 2010 06:41:23 +0000 (06:41 +0000)]
qlge: Fix occasional loopback test failure.

On some servers we see the cleaning of the RX queue finish before all
the loopback packets are sent out.  This delay allows the queues to
settle before checking for successful completion.
Also, delay completion so link has time to come back up.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix bonding mac address bug.
Ron Mercer [Wed, 17 Feb 2010 06:41:22 +0000 (06:41 +0000)]
qlge: Fix bonding mac address bug.

Use local copy of current mac address when initializing.  In bonding
testing we saw cases where dev_addr was out of data causing failover
errors.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlge: Fix dropping of large non-TCP/UDP frames.
Ron Mercer [Wed, 17 Feb 2010 06:41:21 +0000 (06:41 +0000)]
qlge: Fix dropping of large non-TCP/UDP frames.

This was found with pings that were large enough to span multiple rx
buffers.  The split frame logic handles this case nicely.

Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoll_temac: Fix MAC address configuration from userland
Steven J. Magnani [Wed, 17 Feb 2010 07:55:07 +0000 (07:55 +0000)]
ll_temac: Fix MAC address configuration from userland

A userland command to set the LLTEMAC MAC address,
i.e. "ifconfig eth0 hw addr xx:yy:zz:pp:dd:qq",
results in a device address of 00:01:xx:yy:zz:pp.
Correct this.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoll_temac: Add support for V2 LLTEMAC core
Steven J. Magnani [Wed, 17 Feb 2010 07:14:20 +0000 (07:14 +0000)]
ll_temac: Add support for V2 LLTEMAC core

LLTEMAC V1 cores place only received packet length in the app4 word.
V2 cores place additional information in app4.
Mask out the additional information when retrieving the packet length.

Signed-off-by: Steven J. Magnani <steve@digidescorp.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: convert multiple drivers to use netdev_for_each_mc_addr
Jiri Pirko [Wed, 17 Feb 2010 11:09:31 +0000 (11:09 +0000)]
net: convert multiple drivers to use netdev_for_each_mc_addr

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocassini: convert to use netdev_for_each_mc_addr
Jiri Pirko [Wed, 17 Feb 2010 10:43:33 +0000 (10:43 +0000)]
cassini: convert to use netdev_for_each_mc_addr

Introduced a new function to do the mc list processing, makes code
clearer after transition.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: use kasprintf() for socket cache names
Alexey Dobriyan [Wed, 17 Feb 2010 09:34:12 +0000 (09:34 +0000)]
net: use kasprintf() for socket cache names

kasprintf() makes code smaller.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoxt_hashlimit: fix locking
Eric Dumazet [Wed, 17 Feb 2010 06:43:47 +0000 (06:43 +0000)]
xt_hashlimit: fix locking

Commit 2eff25c18c3d332d3c4dd98f2ac9b7114e9771b0
(netfilter: xt_hashlimit: fix race condition and simplify locking)
added a mutex deadlock :
htable_create() is called with hashlimit_mutex already locked

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipmr: remove useless checks from ipmr_device_event
Pavel Emelyanov [Wed, 17 Feb 2010 01:19:32 +0000 (01:19 +0000)]
ipmr: remove useless checks from ipmr_device_event

The net being checked there is dev_net(dev) and thus this if
is always false.

Fits both net and net-next trees.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: update tx DMA mapping error handling
Nick Nunley [Wed, 17 Feb 2010 01:06:16 +0000 (01:06 +0000)]
igb: update tx DMA mapping error handling

This updates the tx DMA mapping error handling code to
resemble e1000e/ixgbe.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: change descriptor control thresholds
Nick Nunley [Wed, 17 Feb 2010 01:05:56 +0000 (01:05 +0000)]
igb: change descriptor control thresholds

This change simplifies the code by setting RX_PTHRESH to 8 for
all devices, as it was unlikely that there was any advantage to
set it at 16 for earlier cards. Additionally TX_WTHRESH is
set to 1 for the 82576 NIC to improve performance by enabling
a minimal amount of write combining when writing back descriptors.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: use igb_free_q_vectors to cleanup failure in igb_alloc_q_vectors
Nick Nunley [Wed, 17 Feb 2010 01:05:35 +0000 (01:05 +0000)]
igb: use igb_free_q_vectors to cleanup failure in igb_alloc_q_vectors

This change makes it so that igb_free_q_vectors is reused in
igb_alloc_q_vectors to handle the cleanup instead of unwinding
through the allocations.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: remove unused vmolr value
Nick Nunley [Wed, 17 Feb 2010 01:05:15 +0000 (01:05 +0000)]
igb: remove unused vmolr value

In an earlier version of igb_write_mc_addr_list() the vmolr register
was modified. This register is no longer accessed, although the variable
still exists. This patch removes it from the function.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: minor type cleanups
Nick Nunley [Wed, 17 Feb 2010 01:04:56 +0000 (01:04 +0000)]
igb: minor type cleanups

This change cleans up some instances where unsigned int and u32
were being used interchangeably, and cleans up hdr_len which
was being set to 0 twice.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: move gso_segs into buffer_info structure
Nick Nunley [Wed, 17 Feb 2010 01:04:37 +0000 (01:04 +0000)]
igb: move gso_segs into buffer_info structure

This change moves gso_segs into the buffer_info structure to avoid
a possible cache line miss in clean_tx_irq.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: inline igb_maybe_stop_tx
Nick Nunley [Wed, 17 Feb 2010 01:04:18 +0000 (01:04 +0000)]
igb: inline igb_maybe_stop_tx

igb_maybe_stop_tx() is extremely small and appears in several spots in
the tx hotpath. This change inlines the function for a possible
performance boost.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: only read phy specific stats if in internal phy mode
Nick Nunley [Wed, 17 Feb 2010 01:03:58 +0000 (01:03 +0000)]
igb: only read phy specific stats if in internal phy mode

There are a couple statistics registers that are not meant to
be read when in SGMII/serdes mode. This patch adds a check to
verify mode before reading and updating these statistics.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: only support SRRCTL_DROP_EN when using multiple queues
Nick Nunley [Wed, 17 Feb 2010 01:03:38 +0000 (01:03 +0000)]
igb: only support SRRCTL_DROP_EN when using multiple queues

The SRRCTL.DROP_EN bit should only be set when we are supporting
multiple queues. This bit is meant to prevent head of line blocking
and is unnecessary in the single queue case.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: cap interrupts at 20K per queue when in itr mode 3
Nick Nunley [Wed, 17 Feb 2010 01:03:19 +0000 (01:03 +0000)]
igb: cap interrupts at 20K per queue when in itr mode 3

In order to maintain similar performance between MSI-X and
legacy/MSI interrupts, this patch reduces the number of interrupts
when receiving small packets to 20K when in interrupt throttle
rate mode 3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: remove adaptive IFS from driver
Nick Nunley [Wed, 17 Feb 2010 01:02:59 +0000 (01:02 +0000)]
igb: remove adaptive IFS from driver

Adaptive IFS support has been included in the igb driver since its
initial release, but it is not a feature on any igb NICs. This patch
removes it from the driver.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: Allocate rings seperately instead of as a block
Alexander Duyck [Wed, 17 Feb 2010 01:02:39 +0000 (01:02 +0000)]
igb: Allocate rings seperately instead of as a block

This change makes it so that the rings are allocated seperately.  As a
result we can allocate them on seperate nodes at some point in the future
if we so desire.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: call pci_save_state after pci_restore_state
Nick Nunley [Wed, 17 Feb 2010 01:02:19 +0000 (01:02 +0000)]
igb: call pci_save_state after pci_restore_state

This patch adds calls to pci_save_state() immediately after
calls to pci_restore_state(). Due to a change in the behavior
of pci_restore_state() it is necessary to call pci_save_state()
to keep the state_saved flag. This patch is based on a similar
patch for ixgbe.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: Power down link when interface is down
Nick Nunley [Wed, 17 Feb 2010 01:01:59 +0000 (01:01 +0000)]
igb: Power down link when interface is down

This changes the behavior of the driver to power down the link
when the associated interface is down, unless management is enabled.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: ignore EEPROM APME check when shutting down serdes link
Nick Nunley [Wed, 17 Feb 2010 01:01:40 +0000 (01:01 +0000)]
igb: ignore EEPROM APME check when shutting down serdes link

Checking the EEPROM APME state unnecessarily prevents the link from
shutting down. The standard power down routines should be
sufficient to determine whether the serdes link can power down
when going into D3.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: Report link status in ethtool when interface is down
Nick Nunley [Wed, 17 Feb 2010 01:01:21 +0000 (01:01 +0000)]
igb: Report link status in ethtool when interface is down

With this change ethtool will correctly report link status when
the interface is down. Currently ethtool reports the link as not
detected when the interface is down.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: add support for wake-on-link
Nick Nunley [Wed, 17 Feb 2010 01:01:01 +0000 (01:01 +0000)]
igb: add support for wake-on-link

This adds support for wake-on-link/phy activity to the ethtool
interface.

Signed-off-by: Nicholas Nunley <nicholasx.d.nunley@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoigb: remove unecessary q_vector declarations and remove itr_shift
Alexander Duyck [Wed, 17 Feb 2010 01:00:41 +0000 (01:00 +0000)]
igb: remove unecessary q_vector declarations and remove itr_shift

This change removes the use of itr_shift since a mac type call can be
used just as easily to identify the only HW that needs to have the itr
shifted.

In addition it removes two unecessary declarations of a q_vector
pointer from the initialization path.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6.h: reassembly: replace calculated magic number with multiplication
Joe Perches [Tue, 16 Feb 2010 18:40:04 +0000 (18:40 +0000)]
ipv6.h: reassembly: replace calculated magic number with multiplication

On Tue, 2010-02-16 at 16:47 +0100, Patrick McHardy wrote:
> Joe Perches wrote:
> >> @@ -246,6 +246,8 @@ extern int ipv6_opt_accepted(struct sock *sk, struct sk_buff *skb);
> >>  int ip6_frag_nqueues(struct net *net);
> >>  int ip6_frag_mem(struct net *net);
> >>
> >> +#define IPV6_FRAG_HIGH_THRESH 262144 /* == 256*1024 */
> >> +#define IPV6_FRAG_LOW_THRESH 196608 /* == 192*1024 */
> >>  #define IPV6_FRAG_TIMEOUT (60*HZ) /* 60 seconds */
> >
> > 196608 isn't a number I want to remember.
> > Is this better as:
> >
> > #define IPV6_FRAG_HIGH_THRESH (256 * 1024) /* 262144 */
> > #define IPV6_FRAG_LOW_THRESH (192 * 1024) /* 196608 */
>
> Please send a patch, I'll apply it once these patches are in Dave's
> tree.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: remove INIT_RCU_HEAD() usage
Alexey Dobriyan [Fri, 12 Feb 2010 11:41:39 +0000 (11:41 +0000)]
net: remove INIT_RCU_HEAD() usage

call_rcu() will unconditionally reinitialize RCU head anyway.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agob44: Ratelimit timeout error message.
Jochen Friedrich [Fri, 12 Feb 2010 10:11:54 +0000 (10:11 +0000)]
b44: Ratelimit timeout error message.

Signed-off-by: Jochen Friedrich <jochen@scram.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopercpu: add __percpu sparse annotations to net drivers
Tejun Heo [Tue, 16 Feb 2010 15:21:08 +0000 (15:21 +0000)]
percpu: add __percpu sparse annotations to net drivers

Add __percpu sparse annotations to net drivers.

These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors.  This patch doesn't affect normal builds.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agopercpu: add __percpu sparse annotations to net
Tejun Heo [Tue, 16 Feb 2010 15:20:26 +0000 (15:20 +0000)]
percpu: add __percpu sparse annotations to net

Add __percpu sparse annotations to net.

These annotations are to make sparse consider percpu variables to be
in a different address space and warn if accessed without going
through percpu accessors.  This patch doesn't affect normal builds.

The macro and type tricks around snmp stats make things a bit
interesting.  DEFINE/DECLARE_SNMP_STAT() macros mark the target field
as __percpu and SNMP_UPD_PO_STATS() macro is updated accordingly.  All
snmp_mib_*() users which used to cast the argument to (void **) are
updated to cast it to (void __percpu **).

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: David S. Miller <davem@davemloft.net>
Cc: Patrick McHardy <kaber@trash.net>
Cc: Arnaldo Carvalho de Melo <acme@ghostprotocols.net>
Cc: Vlad Yasevich <vladislav.yasevich@hp.com>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 17 Feb 2010 06:09:29 +0000 (22:09 -0800)]
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6

14 years agoxfrm: avoid spinlock in get_acqseq() used by xfrm user
jamal [Tue, 16 Feb 2010 02:01:22 +0000 (02:01 +0000)]
xfrm: avoid spinlock in get_acqseq() used by xfrm user

Eric's version fixed it for pfkey. This one is for xfrm user.
I thought about amortizing those two get_acqseq()s but it seems
reasonable to have two of these sequence spaces for the two different
interfaces.

cheers,
jamal
commit d5168d5addbc999c94aacda8f28a4a173756a72b
Author: Jamal Hadi Salim <hadi@cyberus.ca>
Date:   Tue Feb 16 06:51:22 2010 -0500

    xfrm: avoid spinlock in get_acqseq() used by xfrm user

    This is in the same spirit as commit 28aecb9d7728dc26bf03ce7925fe622023a83a2a
    by Eric Dumazet.
    Use atomic_inc_return() in get_acqseq() to avoid taking a spinlock

Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev: bfin_mac: drop experimental markings on RMII support
Mike Frysinger [Mon, 15 Feb 2010 14:32:50 +0000 (14:32 +0000)]
netdev: bfin_mac: drop experimental markings on RMII support

The code has been around for a long time now and is known to work on a
bunch of different parts/boards.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6
Linus Torvalds [Wed, 17 Feb 2010 00:56:21 +0000 (16:56 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty-2.6:
  serial: 8250: add serial transmitter fully empty test

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
Linus Torvalds [Wed, 17 Feb 2010 00:55:39 +0000 (16:55 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: gadget: fix EEM gadget CRC usage
  USB: otg Kconfig: let USB_OTG_UTILS select USB_ULPI option
  USB: g_multi: fix CONFIG_USB_G_MULTI_RNDIS usage
  kfifo: Don't use integer as NULL pointer
  USB: FHCI: Fix build after kfifo rework
  kfifo: Make kfifo_initialized work after kfifo_free
  USB: serial: add usbid for dell wwan card to sierra.c
  USB: SIS USB2VGA DRIVER: support KAIREN's USB VGA adaptor USB20SVGA-MB-PLUS
  USB: ehci: phy low power mode bug fixing
  USB: s3c-hsotg: Export usb_gadget_register_driver()
  USB: r8a66597-udc: Prototype IS_ERR() and PTR_ERR()
  USB: ftdi_sio: add device IDs (several ELV, one Mindstorms NXT)
  USB: storage: Remove unneeded SC/PR from unusual_devs.h
  USB: ftdi_sio: new device id for papouch AD4USB
  USB: usbfs: properly clean up the as structure on error paths
  USB: usbfs: only copy the actual data received

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6
Linus Torvalds [Wed, 17 Feb 2010 00:55:13 +0000 (16:55 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core-2.6:
  class: Free the class private data in class_release
  sysfs: sysfs_sd_setattr set iattrs unconditionally

14 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6
Linus Torvalds [Wed, 17 Feb 2010 00:52:04 +0000 (16:52 -0800)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-2.6: (22 commits)
  be2net: set proper value to version field in req hdr
  xfrm: Fix xfrm_state_clone leak
  ipcomp: Avoid duplicate calls to ipcomp_destroy
  ethtool: allow non-admin user to read GRO settings.
  ixgbe: fix WOL register setup for 82599
  ixgbe: Fix - Do not allow Rx FC on 82598 at 1G due to errata
  sfc: Fix SFE4002 initialisation
  mac80211: fix handling of null-rate control in rate_control_get_rate
  inet: Remove bogus IGMPv3 report handling
  iwlwifi: fix AMSDU Rx after paged Rx patch
  tcp: fix ICMP-RTO war
  via-velocity: Fix races on shared interrupts
  via-velocity: Take spinlock on set coalesce
  via-velocity: Remove unused IRQ status parameter from rx_srv and tx_srv
  rtl8187: Add new device ID
  iwmc3200wifi: Test of wrong pointer after kzalloc in iwm_mlme_update_bss_table()
  ath9k: Fix sequence numbers for PAE frames
  mac80211: fix deferred hardware scan requests
  iwlwifi: Fix to set correct ht configuration
  mac80211: Fix probe request filtering in IBSS mode
  ...

14 years agoCAPI: Remove experimental tag from middleware feature
Jan Kiszka [Mon, 8 Feb 2010 10:12:45 +0000 (10:12 +0000)]
CAPI: Remove experimental tag from middleware feature

Despite all its bugs, the middleware support of our CAPI stack was
already in use for many, many moons. And after going through its code,
fixing all issues I found, I feel it deserves to officially become a
non-experimental feature.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Schedule capifs for removal
Jan Kiszka [Mon, 8 Feb 2010 10:12:44 +0000 (10:12 +0000)]
CAPI: Schedule capifs for removal

With dynamic TTY nodes and the help of udev, we no longer need this
special filesystem. Schedule it for removal in one year from now.

As a last duty to this feature, move its help to right option so that
users can read the rationale.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop special controller lookup from capi20_put_message
Jan Kiszka [Mon, 8 Feb 2010 10:12:43 +0000 (10:12 +0000)]
CAPI: Drop special controller lookup from capi20_put_message

This strange special rule to fall back to controller 1 cannot be derived
from the CAPI specs and looks a lot like it was once dedicated to some
out-of-tree driver, probably AVM's broken fcdsl2 (FRITZ!Card DSL v2.0).
I found no in-tree user that needs this check, and I'm now taking care
of the fcdsl2. So drop these bits from our stack.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop return value of handle_minor_send
Jan Kiszka [Mon, 8 Feb 2010 10:12:42 +0000 (10:12 +0000)]
CAPI: Drop return value of handle_minor_send

We did not evaluate handle_minor_send's return value, just (void)'ed it
away. Time for a cleanup.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Clean up capiminor_*_ack
Jan Kiszka [Mon, 8 Feb 2010 10:12:41 +0000 (10:12 +0000)]
CAPI: Clean up capiminor_*_ack

No need for irqsave acquisition of acklock, bh-safe is sufficient.
Moverover, move kfree out of the lock and do not take acklock at all
in capiminor_del_all_ack as we are the last user of the list here.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Fix locking around capiminor's output queue and drop workaround_lock
Jan Kiszka [Mon, 8 Feb 2010 10:12:40 +0000 (10:12 +0000)]
CAPI: Fix locking around capiminor's output queue and drop workaround_lock

Introduce outlock as a spin lock that protects capiminor's outqueue,
outbytes and outskb (formerly known as ttyskb). outlock can be acquired
from soft-IRQ context via capinc_write, so make it bh-safe.

This finally removes the last reason for keeping the workaround lock
around (which was incomplete and partly broken anyway). And as we no
longer call handle_recv_skb in atomic context, gen_data_b3_resp_for can
use non-atomic allocation now.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop capiminor's unused inbytes counter
Jan Kiszka [Mon, 8 Feb 2010 10:12:39 +0000 (10:12 +0000)]
CAPI: Drop capiminor's unused inbytes counter

The inbytes counter was only updated but never read.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use atomics for capiminor's datahandle and msgid
Jan Kiszka [Mon, 8 Feb 2010 10:12:38 +0000 (10:12 +0000)]
CAPI: Use atomics for capiminor's datahandle and msgid

The capiminor members datahandle and msgid are incremented outside any
lock, so better do this atomically.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rename datahandle_queue -> ackqueue_entry
Jan Kiszka [Mon, 8 Feb 2010 10:12:37 +0000 (10:12 +0000)]
CAPI: Rename datahandle_queue -> ackqueue_entry

This struct is describing a queue entry, not the queue itself.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Rework capiminor RX handler
Jan Kiszka [Mon, 8 Feb 2010 10:12:36 +0000 (10:12 +0000)]
CAPI: Rework capiminor RX handler

Avoid re-queuing skbs unless the error detected in handle_recv_skb is
expected to be recoverable such as lacking memory, a full CAPI queue, a
full TTY input buffer, or a not yet existing TTY.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop handle_minor_recv from capinc_tty_write
Jan Kiszka [Mon, 8 Feb 2010 10:12:35 +0000 (10:12 +0000)]
CAPI: Drop handle_minor_recv from capinc_tty_write

Sending a message down the CAPI stack may trigger the reception of an
answer, but this will go through capi_recv_message and call
handle_minor_recv from there. There is no need to walk the receive queue
on capinc_tty_write.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop atomic ttyopencount
Jan Kiszka [Mon, 8 Feb 2010 10:12:34 +0000 (10:12 +0000)]
CAPI: Drop atomic ttyopencount

Not needed, tty->count keeps track of this information. At this chance,
drop traces of ancient attempts to debug this logic via _DEBUG_REFCOUNT.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Clean up capiminors_lock
Jan Kiszka [Mon, 8 Feb 2010 10:12:33 +0000 (10:12 +0000)]
CAPI: Clean up capiminors_lock

Use a plain spin lock for capiminors_lock, drop inconsistent irqsafe
acquisitions (it's only used in process context anyway).

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop obsolete nccip from capiminor struct
Jan Kiszka [Mon, 8 Feb 2010 10:12:32 +0000 (10:12 +0000)]
CAPI: Drop obsolete nccip from capiminor struct

The nccip in capiminor used to serve as an indicator that the NCCI was
close. But we don't need this, we issue a hangup on capincci_free_minor.
So drop this legacy.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Issue synchronous hangup on capincci_free_minor
Jan Kiszka [Mon, 8 Feb 2010 10:12:31 +0000 (10:12 +0000)]
CAPI: Issue synchronous hangup on capincci_free_minor

capincci_free and, thus, capincci_free_minor runs in process context, so
we can issue the hangup of the associated TTY synchronously.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Drop remaining NULL checks on tty->driver_data
Jan Kiszka [Mon, 8 Feb 2010 10:12:30 +0000 (10:12 +0000)]
CAPI: Drop remaining NULL checks on tty->driver_data

tty_struct's driver_data cannot be NULL, no need to test for it.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use tty_port to keep track of capiminor's tty
Jan Kiszka [Mon, 8 Feb 2010 10:12:29 +0000 (10:12 +0000)]
CAPI: Use tty_port to keep track of capiminor's tty

Use the reference management features of tty_port to look up and drop
again the tty_struct associated with a capiminor.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Establish install/cleanup handlers for capiminor TTYs
Jan Kiszka [Mon, 8 Feb 2010 10:12:28 +0000 (10:12 +0000)]
CAPI: Establish install/cleanup handlers for capiminor TTYs

Properly associate/disassociate a capiminor object with its TTY via the
install/cleanup handlers instead of trying to guess first open and last
close.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use kref on capiminor
Jan Kiszka [Mon, 8 Feb 2010 10:12:27 +0000 (10:12 +0000)]
CAPI: Use kref on capiminor

Install a reference counter for capiminor objects. Acquire it when
obtaining a capiminor from the array during capinc_tty_open, drop it
when closing the tty again. Another reference is held for the hook-up
with capincci.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Use dynamic major for NCCI TTYs by default
Jan Kiszka [Mon, 8 Feb 2010 10:12:26 +0000 (10:12 +0000)]
CAPI: Use dynamic major for NCCI TTYs by default

No need to allocate a fixed major for this TTY, both capifs and udev
make this transparent to the user.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Dynamically register minor devices
Jan Kiszka [Mon, 8 Feb 2010 10:12:25 +0000 (10:12 +0000)]
CAPI: Dynamically register minor devices

Register capiminors dynamically with the TTY core so that udev can make
them show up as the NCCIs appear or disappear. This removes the need to
check if the capiminor requested in capinc_tty_open actually exists.

And this completely obsoletes capifs which will be scheduled for removal
in a later patch.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoCAPI: Clean up capinc_tty_init/exit
Jan Kiszka [Mon, 8 Feb 2010 10:12:24 +0000 (10:12 +0000)]
CAPI: Clean up capinc_tty_init/exit

Return proper error code if tty_register_driver fails. In contrast,
tty_unregister_driver cannot practically fail, so drop that error
handling. Finally, mark capinc_tty_init/exit with __init/__exit.

Signed-off-by: Jan Kiszka <jan.kiszka@web.de>
Signed-off-by: David S. Miller <davem@davemloft.net>