firefly-linux-kernel-4.4.55.git
14 years agoqeth: fix page breaks in hw headers
Frank Blaschka [Mon, 21 Jun 2010 22:57:10 +0000 (22:57 +0000)]
qeth: fix page breaks in hw headers

Turning on memory debugging showed there could be page breaks in
hardware headers. OSA does not allow this so we had to add code
to bounce the header in case there is a page break. This patch also
fixes a problem in case the skb->data part of a fragmented skb
spreads multiple pages.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: fix use after free for qeths debug area
Carsten Otte [Mon, 21 Jun 2010 22:57:09 +0000 (22:57 +0000)]
qeth: fix use after free for qeths debug area

The function qeth_free_buffer_pool is called _after_ the per-card
debug area has been released. This debug message is not all that
usefull anyway, and thus gets removed.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Fold qeth_qerr debug area
Carsten Otte [Mon, 21 Jun 2010 22:57:08 +0000 (22:57 +0000)]
qeth: Fold qeth_qerr debug area

This patch removes the qerr debug area. Most info that goes in here is logged
to the card's local debug area already, those duplicates are removed. All other
elements are moved to the card's local debug area.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Fold qeth_misc debug area
Carsten Otte [Mon, 21 Jun 2010 22:57:07 +0000 (22:57 +0000)]
qeth: Fold qeth_misc debug area

This patch removes the misc debug area. Instead of logging the entire skb
we just log a pointer to it into the card's local debug area in
qeth_core_get_next_skb. Other then that, this debug area is not used anywhere.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Fold qeth_sense debug area
Carsten Otte [Mon, 21 Jun 2010 22:57:06 +0000 (22:57 +0000)]
qeth: Fold qeth_sense debug area

This patch removes the sense debug area completely. Despite the name this
debug area makes no sense at all because it's unused completely. Ouch.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Fold qeth_trace debug area
Carsten Otte [Mon, 21 Jun 2010 22:57:05 +0000 (22:57 +0000)]
qeth: Fold qeth_trace debug area

This patch removes the qeth_trace debug area. All relevant data is logged into
either qeth_setup or into each card's own debug area. Superfluous information
(such as the card number when logging into the card's own debug area) is
removed without replacement.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Add new s390 debug feature for each qeth card
Carsten Otte [Mon, 21 Jun 2010 22:57:04 +0000 (22:57 +0000)]
qeth: Add new s390 debug feature for each qeth card

This patch adds a debug area for each qeth card. This debug area will replace
various other debug areas that are global for all cards handled by the device
driver. On crash dump analysis this makes life easier when trying to find out
what's going on with an interface. Also, the forest of debug areas for this
device driver is significantly cleared up.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqeth: Rework qeth_dbf_longtext
Carsten Otte [Mon, 21 Jun 2010 22:57:03 +0000 (22:57 +0000)]
qeth: Rework qeth_dbf_longtext

This patch decouples qeth_dbf_longtext from qeth's static debug array. The
function only uses one member anyway.

Signed-off-by: Carsten Otte <cotte@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosmsgiucv: guarantee single iucv connect in thaw
Ursula Braun [Mon, 21 Jun 2010 22:57:02 +0000 (22:57 +0000)]
smsgiucv: guarantee single iucv connect in thaw

If another smsgiucv_app device exists, suspend / resume fails with
iucv path list corruption, because the same iucv_path_connect is
called twice.
The patch introduces a flag to save connect status of the smsgiucv
path to make sure iucv_path_connect in smsg_pm_restore_thaw is
called only once.

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>
14 years agoqlcnic: update version to 5.0.6
Amit Kumar Salecha [Tue, 22 Jun 2010 03:19:05 +0000 (03:19 +0000)]
qlcnic: update version to 5.0.6

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: mark context state freed after destroy
Amit Kumar Salecha [Tue, 22 Jun 2010 03:19:04 +0000 (03:19 +0000)]
qlcnic: mark context state freed after destroy

After destroying recv ctx, context state remain same.
Fix it by marking as FREED.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: offload tx timeout recovery
Amit Kumar Salecha [Tue, 22 Jun 2010 03:19:03 +0000 (03:19 +0000)]
qlcnic: offload tx timeout recovery

Offload tx timeout recovery to fw recovery func(check_health).
In check_health, first check health of device, if it its ok, then
do tx timeout recovery otherwise device recovery.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: dont free host resources during fw recovery
Amit Kumar Salecha [Tue, 22 Jun 2010 03:19:02 +0000 (03:19 +0000)]
qlcnic: dont free host resources during fw recovery

There is no need to free/alloc host resources during firmware
recovery.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: release device resources during interface down
Amit Kumar Salecha [Tue, 22 Jun 2010 03:19:01 +0000 (03:19 +0000)]
qlcnic: release device resources during interface down

Previously we were allocating device resources during probe and
release them during remove.
Now alloc during interface up and release in interface down.
This helps in device performance, as it doesn't need to keep
track of inactive resources.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix mac address mgmt
Amit Kumar Salecha [Tue, 22 Jun 2010 03:19:00 +0000 (03:19 +0000)]
qlcnic: fix mac address mgmt

We first add mac address in driver local list and then send command to
fw to add same. There are checks in driver to ensure send command doesn't fail
before adding mac address in local list.

But instead fix should be:
Add mac address in fw and if it succeeds, add it in driver local list.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: handshake with card after fw load
Amit Kumar Salecha [Tue, 22 Jun 2010 03:18:59 +0000 (03:18 +0000)]
qlcnic: handshake with card after fw load

Instead of delaying rcv handshake till interface comes up,
do it just after fw load.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: cleanup skb allocation
Amit Kumar Salecha [Tue, 22 Jun 2010 03:18:58 +0000 (03:18 +0000)]
qlcnic: cleanup skb allocation

No need to maintian separate state for alloced and freed skb.
This can be done by null check.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: 64bit rx/tx counters
Eric Dumazet [Wed, 23 Jun 2010 20:00:48 +0000 (13:00 -0700)]
bridge: 64bit rx/tx counters

Use u64_stats_sync infrastructure to provide 64bit rx/tx
counters even on 32bit hosts.

It is safe to use a single u64_stats_sync for rx and tx,
because BH is disabled on both, and we use per_cpu data.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Introduce u64_stats_sync infrastructure
Eric Dumazet [Tue, 22 Jun 2010 17:22:17 +0000 (10:22 -0700)]
net: Introduce u64_stats_sync infrastructure

To properly implement 64bits network statistics on 32bit or 64bit hosts,
we provide one new type and four methods, to ease conversions.

Stats producer should use following template granted it already got an
exclusive access to counters (include/linux/u64_stats_sync.h contains
some documentation about details)

    u64_stats_update_begin(&stats->syncp);
    stats->bytes64 += len;
    stats->packets64++;
    u64_stats_update_end(&stats->syncp);

While a consumer should use following template to get consistent
snapshot :

    u64 tbytes, tpackets;
    unsigned int start;

    do {
        start = u64_stats_fetch_begin(&stats->syncp);
        tbytes = stats->bytes64;
        tpackets = stats->packets64;
    } while (u64_stats_fetch_retry(&stats->lock, syncp));

Suggested by David Miller, and comments courtesy of Nick Piggin.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: consolidate netif_needs_gso() checks
John Fastabend [Wed, 16 Jun 2010 14:18:12 +0000 (14:18 +0000)]
net: consolidate netif_needs_gso() checks

netif_needs_gso() is checked twice in the TX path once,
before submitting the skb to the qdisc and once after
it is dequeued from the qdisc just before calling
ndo_hard_start().  This opens a window for a user to
change the gso/tso or tx checksum settings that can
cause netif_needs_gso to be true in one check and false
in the other.

Specifically, changing TX checksum setting may cause
the warning in skb_gso_segment() to be triggered if
the checksum is calculated earlier.

This consolidates the netif_needs_gso() calls so that
the stack only checks if gso is needed in
dev_hard_start_xmit().

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Cc: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Fix a typo in netlink.h
Justin P. Mattock [Mon, 21 Jun 2010 20:45:42 +0000 (13:45 -0700)]
net: Fix a typo in netlink.h

Fix a typo in include/net/netlink.h
should be finalize instead of finanlize

Signed-off-by: Justin P. Mattock <justinmattock@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: disable gig speed when in S0->Sx transition
Bruce Allan [Thu, 17 Jun 2010 18:59:48 +0000 (18:59 +0000)]
e1000e: disable gig speed when in S0->Sx transition

Most of this workaround is necessary for all ICHx/PCH parts so one of
the two MAC-type checks can be removed.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: packet split should not be used with early receive
Bruce Allan [Thu, 17 Jun 2010 18:59:27 +0000 (18:59 +0000)]
e1000e: packet split should not be used with early receive

Originally it was thought there were issues with ICHx/PCH parts with packet
split when jumbo frames were enabled but in fact it is really only when
early-receive is enabled (via ERT register) on these parts.  Use packet
split with jumbos but only when early-receive is not enabled.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: do not touch PHY page 800 registers when link speed is 1000Mbps
Bruce Allan [Thu, 17 Jun 2010 18:59:06 +0000 (18:59 +0000)]
e1000e: do not touch PHY page 800 registers when link speed is 1000Mbps

The PHY on 82577/82578 has issues when the registers on page 800 are
accessed when in gigabit mode.  Do not clear the Wakeup Control register
when resetting the part since it is on page 800 (and will be cleared on
reset anyway).

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: avoid polling h/w registers during link negotiation
Bruce Allan [Thu, 17 Jun 2010 18:58:43 +0000 (18:58 +0000)]
e1000e: avoid polling h/w registers during link negotiation

Avoid touching hardware registers when possible, otherwise link negotiation
can get messed up when user-level scripts are rapidly polling the driver to
see if/when link is up.  Use the saved link state information instead when
possible.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocaif: Add debug connection type for CAIF.
Sjur Braendeland [Thu, 17 Jun 2010 06:55:41 +0000 (06:55 +0000)]
caif: Add debug connection type for CAIF.

Added new CAIF protocol type CAIFPROTO_DEBUG for accessing
CAIF debug on the ST Ericsson modems.

There are two debug servers on the modem, one for radio related
debug (CAIF_RADIO_DEBUG_SERVICE) and the other for
communication/application related debug (CAIF_COM_DEBUG_SERVICE).

The debug connection can contain trace debug printouts or
interactive debug used for debugging and test.

Debug connections can be of type STREAM or SEQPACKET.

Signed-off-by: Sjur Braendeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocaif: Use link layer MTU instead of fixed MTU
Sjur Braendeland [Thu, 17 Jun 2010 06:55:40 +0000 (06:55 +0000)]
caif: Use link layer MTU instead of fixed MTU

Previously CAIF supported maximum transfer size of ~4050.
The transfer size is now calculated dynamically based on the
link layers mtu size.

Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocaif: Bugfix - RFM must support segmentation.
Sjur Braendeland [Thu, 17 Jun 2010 06:55:39 +0000 (06:55 +0000)]
caif: Bugfix - RFM must support segmentation.

CAIF Remote File Manager may send or receive more than 4050 bytes.
Due to this The CAIF RFM service have to support segmentation.

Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocaif: Bugfix not all services uses flow-ctrl.
Sjur Braendeland [Thu, 17 Jun 2010 06:55:38 +0000 (06:55 +0000)]
caif: Bugfix not all services uses flow-ctrl.

Flow control is not used by all CAIF services.
The usage of flow control is now part of the gerneal
initialization function for CAIF Services.

Signed-off-by: Sjur Braendeland@stericsson.com
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: update driver version number
Bruce Allan [Wed, 16 Jun 2010 13:28:34 +0000 (13:28 +0000)]
e1000e: update driver version number

Also separate out an _EXTRAVERSION similar to the core kernel.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: update copyright information
Bruce Allan [Wed, 16 Jun 2010 13:28:11 +0000 (13:28 +0000)]
e1000e: update copyright information

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: enable support for EEE on 82579
Bruce Allan [Wed, 16 Jun 2010 13:27:49 +0000 (13:27 +0000)]
e1000e: enable support for EEE on 82579

This patch enables IEEE802.3az (a.k.a. Energy Efficient Ethernet) on the
new 82579 LOMs.  An optional module parameter is provided to disable the
feature if desired.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: initial support for 82579 LOMs
Bruce Allan [Wed, 16 Jun 2010 13:27:28 +0000 (13:27 +0000)]
e1000e: initial support for 82579 LOMs

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: fix check for manageability on ICHx/PCH
Bruce Allan [Wed, 16 Jun 2010 13:27:05 +0000 (13:27 +0000)]
e1000e: fix check for manageability on ICHx/PCH

Do not check for all the bits in E1000_FWSM_MODE_MASK when checking for
manageability on 82577/82578; only check if iAMT is enabled.  Both of the
manageability checks (for 82577/82578 and ICHx) must check the firmware
valid bit too since the other bits are only valid when the latter is set.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: separate out PHY statistics register updates
Bruce Allan [Wed, 16 Jun 2010 13:26:41 +0000 (13:26 +0000)]
e1000e: separate out PHY statistics register updates

The 82577/82578 parts have half-duplex statistics in PHY registers.  These
need only be read when in half-duplex and should all be read at once rather
than one at a time to prevent excessive cycles of acquiring/releasing the
PHY semaphore.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: cleanup e1000_sw_lcd_config_ich8lan()
Bruce Allan [Wed, 16 Jun 2010 13:26:17 +0000 (13:26 +0000)]
e1000e: cleanup e1000_sw_lcd_config_ich8lan()

Do not acquire and release the PHY unnecessarily for parts that return
from this workaround without actually accessing the PHY registers.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoe1000e: cleanup ethtool loopback setup code
Bruce Allan [Wed, 16 Jun 2010 13:25:55 +0000 (13:25 +0000)]
e1000e: cleanup ethtool loopback setup code

Refactor the loopback setup code to first handle the only 10/100 PHY
supported by the driver if applicable and then handle the 1Gig PHYs in a
switch statement for PHY-specific setups.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: minor cleanup
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:35 +0000 (10:05 +0000)]
cxgb4: minor cleanup

Remove an unused flag and replace couple constants with enums.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: update FW definitions
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:34 +0000 (10:05 +0000)]
cxgb4: update FW definitions

Update to latest FW API.  Most changes here pertain to port types and
querying FW for parameter values.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: add a missing error interrupt
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:33 +0000 (10:05 +0000)]
cxgb4: add a missing error interrupt

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: propagate link initialization errors to .ndo_open's callers
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:32 +0000 (10:05 +0000)]
cxgb4: propagate link initialization errors to .ndo_open's callers

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: switch to 64 bit inteface statistics
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:31 +0000 (10:05 +0000)]
cxgb4: switch to 64 bit inteface statistics

Implement ndo_get_stats64, remove ndo_get_stats.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: set dev_id to the port number
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:30 +0000 (10:05 +0000)]
cxgb4: set dev_id to the port number

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: implement EEH
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:29 +0000 (10:05 +0000)]
cxgb4: implement EEH

Implement the pci_error_handlers methods for EEH.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: rearrange initialization code in preparation for EEH
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:28 +0000 (10:05 +0000)]
cxgb4: rearrange initialization code in preparation for EEH

Split some existing initialization code into a separate function for use
by EEH next.  No functional changes.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agocxgb4: dynamically determine flash size and FW image location
Dimitris Michailidis [Fri, 18 Jun 2010 10:05:27 +0000 (10:05 +0000)]
cxgb4: dynamically determine flash size and FW image location

Handle the larger flash memories on newer boards:

- get the size and number of sectors by probing the flash
- writes and erases can take longer, adjust the timeouts for these operations
- the FW image can be at different locations depending on flash size,
  find its location dynamically as well.

Signed-off-by: Dimitris Michailidis <dm@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
David S. Miller [Thu, 17 Jun 2010 21:19:06 +0000 (14:19 -0700)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next-2.6

14 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Thu, 17 Jun 2010 20:21:14 +0000 (16:21 -0400)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-2.6

Conflicts:
net/mac80211/mlme.c

14 years agoqlcnic: fix register access
Amit Kumar Salecha [Thu, 17 Jun 2010 02:56:42 +0000 (02:56 +0000)]
qlcnic: fix register access

For certain set of register, base window addresses are not defined.
In such cases window should not set.
Return with error for such cases to avoid NMI.

Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix race in tx stop queue
Rajesh K Borundia [Thu, 17 Jun 2010 02:56:41 +0000 (02:56 +0000)]
qlcnic: fix race in tx stop queue

There is a race between netif_stop_queue and netif_stopped_queue
check. So check once again if buffers are available to avoid race.
With above logic we can also get rid of tx lock in process_cmd_ring.

Signed-off-by: Rajesh K Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: seperate interrupt for TX
schacko [Thu, 17 Jun 2010 02:56:40 +0000 (02:56 +0000)]
qlcnic: seperate interrupt for TX

Earlier all poll routine can process rx and tx, But now
one poll routine to process rx + tx and other for rx only.
Last msix vector will be used for separate tx interrupt.

o This is supported from fw version 4.4.2.
o Bump version 5.0.5

Signed-off-by: Sony Chacko <schacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: change driver description
Sritej Velaga [Thu, 17 Jun 2010 02:56:39 +0000 (02:56 +0000)]
qlcnic: change driver description

o Remove extra printing of mac address
o This driver also supports NIC only Qlogic adapters.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: fix device soft reset
Sucheta Chakraborty [Thu, 17 Jun 2010 02:56:38 +0000 (02:56 +0000)]
qlcnic: fix device soft reset

During device soft reset, don't halt every device block.
Access to some blocks is required during recovery.

Signed-off-by: Sucheta Chakraborty <sucheta@dut4145.unminc.com>
Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobe2net: enable ipv6 tso support
Ajit Khaparde [Mon, 14 Jun 2010 04:56:07 +0000 (04:56 +0000)]
be2net: enable ipv6 tso support

Add ipv6 support to the be2net driver.

Signed-off-by: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoudp: Add UFO to NETIF_F_SOFTWARE_GSO
Herbert Xu [Mon, 14 Jun 2010 20:21:04 +0000 (20:21 +0000)]
udp: Add UFO to NETIF_F_SOFTWARE_GSO

This patch adds UFO to the list of GSO features with a software
fallback.  This allows UFO to be used even if the hardware does
not support it.

In particular, this allows us to test the UFO fallback, as it
has been reported to not work in some cases.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Export cred_to_ucred to modules.
David S. Miller [Wed, 16 Jun 2010 23:18:25 +0000 (16:18 -0700)]
net: Export cred_to_ucred to modules.

AF_UNIX references this, and can be built as a module,
so...

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_unix: Allow connecting to sockets in other network namespaces.
Eric W. Biederman [Sun, 13 Jun 2010 03:35:48 +0000 (03:35 +0000)]
af_unix: Allow connecting to sockets in other network namespaces.

Remove the restriction that only allows connecting to a unix domain
socket identified by unix path that is in the same network namespace.

Crossing network namespaces is always tricky and we did not support
this at first, because of a strict policy of don't mix the namespaces.
Later after Pavel proposed this we did not support this because no one
had performed the audit to make certain using unix domain sockets
across namespaces is safe.

What fundamentally makes connecting to af_unix sockets in other
namespaces is safe is that you have to have the proper permissions on
the unix domain socket inode that lives in the filesystem.  If you
want strict isolation you just don't create inodes where unfriendlys
can get at them, or with permissions that allow unfriendlys to open
them.  All nicely handled for us by the mount namespace and other
standard file system facilities.

I looked through unix domain sockets and they are a very controlled
environment so none of the work that goes on in dev_forward_skb to
make crossing namespaces safe appears needed, we are not loosing
controll of the skb and so do not need to set up the skb to look like
it is comming in fresh from the outside world.  Further the fields in
struct unix_skb_parms should not have any problems crossing network
namespaces.

Now that we handle SCM_CREDENTIALS in a way that gives useable values
across namespaces.  There does not appear to be any operational
problems with encouraging the use of unix domain sockets across
containers either.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_unix: Allow credentials to work across user and pid namespaces.
Eric W. Biederman [Sun, 13 Jun 2010 03:34:33 +0000 (03:34 +0000)]
af_unix: Allow credentials to work across user and pid namespaces.

In unix_skb_parms store pointers to struct pid and struct cred instead
of raw uid, gid, and pid values, then translate the credentials on
reception into values that are meaningful in the receiving processes
namespaces.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoscm: Capture the full credentials of the scm sender.
Eric W. Biederman [Sun, 13 Jun 2010 03:32:34 +0000 (03:32 +0000)]
scm: Capture the full credentials of the scm sender.

Start capturing not only the userspace pid, uid and gid values of the
sending process but also the struct pid and struct cred of the sending
process as well.

This is in preparation for properly supporting SCM_CREDENTIALS for
sockets that have different uid and/or pid namespaces at the different
ends.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Serge E. Hallyn <serge@hallyn.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_netlink: Add needed scm_destroy after scm_send.
Eric W. Biederman [Sun, 13 Jun 2010 03:31:06 +0000 (03:31 +0000)]
af_netlink: Add needed scm_destroy after scm_send.

scm_send occasionally allocates state in the scm_cookie, so I have
modified netlink_sendmsg to guarantee that when scm_send succeeds
scm_destory will be called to free that state.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Reviewed-by: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoaf_unix: Allow SO_PEERCRED to work across namespaces.
Eric W. Biederman [Sun, 13 Jun 2010 03:30:14 +0000 (03:30 +0000)]
af_unix: Allow SO_PEERCRED to work across namespaces.

Use struct pid and struct cred to store the peer credentials on struct
sock.  This gives enough information to convert the peer credential
information to a value relative to whatever namespace the socket is in
at the time.

This removes nasty surprises when using SO_PEERCRED on socket
connetions where the processes on either side are in different pid and
user namespaces.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Daniel Lezcano <daniel.lezcano@free.fr>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosock: Introduce cred_to_ucred
Eric W. Biederman [Sun, 13 Jun 2010 03:28:59 +0000 (03:28 +0000)]
sock: Introduce cred_to_ucred

To keep the coming code clear and to allow both the sock
code and the scm code to share the logic introduce a
fuction to translate from struct cred to struct ucred.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agouser_ns: Introduce user_nsmap_uid and user_ns_map_gid.
Eric W. Biederman [Sun, 13 Jun 2010 03:28:03 +0000 (03:28 +0000)]
user_ns: Introduce user_nsmap_uid and user_ns_map_gid.

Define what happens when a we view a uid from one user_namespace
in another user_namepece.

- If the user namespaces are the same no mapping is necessary.

- For most cases of difference use overflowuid and overflowgid,
  the uid and gid currently used for 16bit apis when we have a 32bit uid
  that does fit in 16bits.  Effectively the situation is the same,
  we want to return a uid or gid that is not assigned to any user.

- For the case when we happen to be mapping the uid or gid of the
  creator of the target user namespace use uid 0 and gid as confusing
  that user with root is not a problem.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoscm: Reorder scm_cookie.
Eric W. Biederman [Sun, 13 Jun 2010 03:27:04 +0000 (03:27 +0000)]
scm: Reorder scm_cookie.

Reorder the fields in scm_cookie so they pack better on 64bit.

Signed-off-by: Eric W. Biederman <ebiederm@xmission.com>
Acked-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: Bumped up version number
Anirban Chakraborty [Wed, 16 Jun 2010 09:07:36 +0000 (09:07 +0000)]
qlcnic: Bumped up version number

Changed the driver version number to 5.0.4

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoqlcnic: Fix a bug in setting up NIC partitioning mode
Anirban Chakraborty [Wed, 16 Jun 2010 09:07:27 +0000 (09:07 +0000)]
qlcnic: Fix a bug in setting up NIC partitioning mode

The driver was not detecting the presence of NIC partitioning capability of the
firmware properly. Now, it checks the eswitch set bit in the FW capabilities
register and accordingly sets the driver mode as NPAR capable or not.

Signed-off-by: Anirban Chakraborty <anirban.chakraborty@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agosyncookies: check decoded options against sysctl settings
Florian Westphal [Wed, 16 Jun 2010 21:42:15 +0000 (14:42 -0700)]
syncookies: check decoded options against sysctl settings

Discard the ACK if we find options that do not match current sysctl
settings.

Previously it was possible to create a connection with sack, wscale,
etc. enabled even if the feature was disabled via sysctl.

Also remove an unneeded call to tcp_sack_reset() in
cookie_check_timestamp: Both call sites (cookie_v4_check,
cookie_v6_check) zero "struct tcp_options_received", hand it to
tcp_parse_options() (which does not change tcp_opt->num_sacks/dsack)
and then call cookie_check_timestamp().

Even if num_sacks/dsacks were changed, the structure is allocated on
the stack and after cookie_check_timestamp returns only a few selected
members are copied to the inet_request_sock.

Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agomac80211: fix warn, enum may be used uninitialized
Christoph Fritz [Wed, 16 Jun 2010 14:37:34 +0000 (16:37 +0200)]
mac80211: fix warn, enum may be used uninitialized

regression introduced by b8d92c9c141ee3dc9b3537b1f0ffb4a54ea8d9b2

In function ‘ieee80211_work_rx_queued_mgmt’:
warning: ‘rma’ may be used uninitialized in this function

this re-adds default value WORK_ACT_NONE back to rma

Signed-off-by: Christoph Fritz <chf.fritz@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: report PHY error frames only for chips which need it
Bruno Randolf [Wed, 16 Jun 2010 10:12:39 +0000 (19:12 +0900)]
ath5k: report PHY error frames only for chips which need it

Only report PHY error frames for ANI on chipsets which do not have PHY error
counters in hardware.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: review RX descriptor functions
Bruno Randolf [Wed, 16 Jun 2010 10:12:34 +0000 (19:12 +0900)]
ath5k: review RX descriptor functions

Reviewed RX descriptor functions against the HAL sources. Some minor changes:

  - check size before making changes to the descriptor

  - whitespace

  - add comments about 5210 timestamps. this needs to be adressed later!

  - FIFO overrun error only available on 5210

  - rs_phyerr should not be OR'ed

  - clear the whole ath5k_rx_status structure before using, instead of
    zeroing specific fields.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: take descriptor differences between 5210 and 5211 into account
Bruno Randolf [Wed, 16 Jun 2010 10:12:28 +0000 (19:12 +0900)]
ath5k: take descriptor differences between 5210 and 5211 into account

There are some differences between 5210 and 5211 descriptors which we did not
take into account before.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: update 5210/5211 frame types
Bruno Randolf [Wed, 16 Jun 2010 10:12:22 +0000 (19:12 +0900)]
ath5k: update 5210/5211 frame types

Update 5210 frame types to match the HAL. We have to apply the same bitshift to
the constants as we use later.

Add 5211 specific frame types.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: review and add comments for descriptors
Bruno Randolf [Wed, 16 Jun 2010 10:12:17 +0000 (19:12 +0900)]
ath5k: review and add comments for descriptors

I carefully reviewed desh.h against the HAL sources. Added comments and made
differences between 5210, 5211 and 5212 more clear by adding _521x to the
defines which are specific to that chipset. Renamed some defines. No functional
changes.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: remove pointless rx error overlay struct
Bruno Randolf [Wed, 16 Jun 2010 10:12:12 +0000 (19:12 +0900)]
ath5k: remove pointless rx error overlay struct

ath5k_hw_rx_error was only used once, where we could easily just use
ath5k_hw_rx_status as well, so remove it.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: cosmetic changes in ath5k_hw_proc_5212_rx_status()
Bruno Randolf [Wed, 16 Jun 2010 10:12:07 +0000 (19:12 +0900)]
ath5k: cosmetic changes in ath5k_hw_proc_5212_rx_status()

Just whitespace and indentation.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: use direct function calls for descriptors when possible
Bruno Randolf [Wed, 16 Jun 2010 10:12:01 +0000 (19:12 +0900)]
ath5k: use direct function calls for descriptors when possible

Use direct function calls for ath5k_hw_setup_rx_desc() and
ath5k_hw_setup_mrr_tx_desc() instead of a function pointer which always pointed
to the same function in the case of ath5k_hw_setup_rx_desc() and which is
easily unified in the case of ath5k_hw_setup_mrr_tx_desc().

Also simplify the initialization function for the remaining function pointers.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: move checks and stats into new function
Bruno Randolf [Wed, 16 Jun 2010 10:11:56 +0000 (19:11 +0900)]
ath5k: move checks and stats into new function

Create a new function ath5k_receive_frame_ok() which checks for errors, updates
error statistics and tells us if we want to further "receive" this frame or
not. This way we can avoid a goto and have a cleaner separation between buffer
handling and other things.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: split descriptor handling and frame receive
Bruno Randolf [Wed, 16 Jun 2010 10:11:51 +0000 (19:11 +0900)]
ath5k: split descriptor handling and frame receive

Move frame reception into it's own function to have a clearer separation
between buffer and descriptor handling and things that are done when we
actually receive a frame.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: unify rx descriptor error handling
Bruno Randolf [Wed, 16 Jun 2010 10:11:46 +0000 (19:11 +0900)]
ath5k: unify rx descriptor error handling

There is no reason for a special handling (return) here, just break like we do
with the checks before.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: reset more pointers after we free skbs
Bruno Randolf [Wed, 16 Jun 2010 10:11:41 +0000 (19:11 +0900)]
ath5k: reset more pointers after we free skbs

After we free skbs for receive or transmit descriptors, make sure we have no
pointers to the now invalid memory address.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: print more errors when decriptor setup fails
Bruno Randolf [Wed, 16 Jun 2010 10:11:35 +0000 (19:11 +0900)]
ath5k: print more errors when decriptor setup fails

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix rx descriptor debugging
Bruno Randolf [Wed, 16 Jun 2010 10:11:30 +0000 (19:11 +0900)]
ath5k: fix rx descriptor debugging

In the debug ouptut rx_status_0 was printed twice instead of rx_status_1. Also
make the debug message more clear.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: fix some comment typos
Bruno Randolf [Wed, 16 Jun 2010 10:11:25 +0000 (19:11 +0900)]
ath5k: fix some comment typos

Fix comment about dma sizes, brackets were missing. Replace 'insure' with
'ensure'.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: rename ath5k_txbuf_free() to ath5k_txbuf_free_skb()
Bruno Randolf [Wed, 16 Jun 2010 10:11:17 +0000 (19:11 +0900)]
ath5k: rename ath5k_txbuf_free() to ath5k_txbuf_free_skb()

Rename ath5k_txbuf_free() to ath5k_txbuf_free_skb() since this is what it does:
it frees the skb and not the buf. Same for ath5k_rxbuf_free().

Signed-off-by: Bruno Randolf <br1@einfach.org>
Acked-by: Bob Copeland <me@bobcopeland.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoath5k: more debug prints for resets
Bruno Randolf [Wed, 16 Jun 2010 10:11:12 +0000 (19:11 +0900)]
ath5k: more debug prints for resets

Add a debug print for every case of reset.

Signed-off-by: Bruno Randolf <br1@einfach.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoipw2200: Enable LED by default
ubuntu@tjworld.net [Mon, 23 Mar 2009 20:29:28 +0000 (20:29 +0000)]
ipw2200: Enable LED by default

BugLink: http://bugs.launchpad.net/bugs/21367
Enable LED by default and update the MODULE_PARM_DESC.  The original
reason for defaulting to disabled was documented in 2005 and noted, "The
LED code has been reported to hang some systems when running ifconfig
and is therefore disabled by default."  This no longer appears
applicable and users have been requesting this be enabled for several
years.

Signed-off-by: TJ <ubuntu@tjworld.net>
Signed-off-by: Tim Gardner <tim.gardner@canonical.com>
Signed-off-by: Andy Whitcroft <apw@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agop54usb: Comment out duplicate Medion MD40900 device id
Leann Ogasawara [Tue, 15 Jun 2010 21:01:51 +0000 (14:01 -0700)]
p54usb: Comment out duplicate Medion MD40900 device id

The Medion MD40900 device id [0x0cde, 0x0006] is defined twice.
Comment out the duplicate.

Originally-by: Ben Collins <ben.collins@ubuntu.com>
Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agozd1211rw: change ZD_REGDOMAIN_JAPAN_* naming
John W. Linville [Wed, 16 Jun 2010 18:41:36 +0000 (14:41 -0400)]
zd1211rw: change ZD_REGDOMAIN_JAPAN_* naming

ZD_REGDOMAIN_JAPAN_ADD and ZD_REGDOMAIN_JAPAN_GW_US54GXS seem a little
verbose to me...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agoinetpeer: restore small inet_peer structures
Eric Dumazet [Wed, 16 Jun 2010 04:52:13 +0000 (04:52 +0000)]
inetpeer: restore small inet_peer structures

Addition of rcu_head to struct inet_peer added 16bytes on 64bit arches.

Thats a bit unfortunate, since old size was exactly 64 bytes.

This can be solved, using an union between this rcu_head an four fields,
that are normally used only when a refcount is taken on inet_peer.
rcu_head is used only when refcnt=-1, right before structure freeing.

Add a inet_peer_refcheck() function to check this assertion for a while.

We can bring back SLAB_HWCACHE_ALIGN qualifier in kmem cache creation.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agozd1211rw: add 0x49 -> JP regulatory domain map
Kouhei Sutou [Wed, 16 Jun 2010 12:53:59 +0000 (21:53 +0900)]
zd1211rw: add 0x49 -> JP regulatory domain map

0x49 is used by PLANEX GW-US54GXS (2019:5303).

Signed-off-by: Kouhei Sutou <kou@clear-code.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
14 years agogadget/rndis: dev_get_stats() now returns rtnl_link_stats64.
David S. Miller [Wed, 16 Jun 2010 04:50:14 +0000 (21:50 -0700)]
gadget/rndis: dev_get_stats() now returns rtnl_link_stats64.

Based upon a report by Stephen Rothwell.

Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoinetpeer: do not use zero refcnt for freed entries
Eric Dumazet [Wed, 16 Jun 2010 04:47:39 +0000 (21:47 -0700)]
inetpeer: do not use zero refcnt for freed entries

Followup of commit aa1039e73cc2 (inetpeer: RCU conversion)

Unused inet_peer entries have a null refcnt.

Using atomic_inc_not_zero() in rcu lookups is not going to work for
them, and slow path is taken.

Fix this using -1 marker instead of 0 for deleted entries.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetpoll: Use correct primitives for RCU dereferencing
Herbert Xu [Wed, 16 Jun 2010 04:44:29 +0000 (21:44 -0700)]
netpoll: Use correct primitives for RCU dereferencing

Now that RCU debugging checks for matching rcu_dereference calls
and rcu_read_lock, we need to use the correct primitives or face
nasty warnings.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agobridge: Add const to dummy br_netpoll_send_skb
Herbert Xu [Wed, 16 Jun 2010 04:43:48 +0000 (21:43 -0700)]
bridge: Add const to dummy br_netpoll_send_skb

The version of br_netpoll_send_skb used when netpoll is off is
missing a const thus causing a warning.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: NET_SKB_PAD should depend on L1_CACHE_BYTES
Eric Dumazet [Wed, 16 Jun 2010 01:16:43 +0000 (18:16 -0700)]
net: NET_SKB_PAD should depend on L1_CACHE_BYTES

In old kernels, NET_SKB_PAD was defined to 16.

Then commit d6301d3dd1c2 (net: Increase default NET_SKB_PAD to 32), and
commit 18e8c134f4e9 (net: Increase NET_SKB_PAD to 64 bytes) increased it
to 64.

While first patch was governed by network stack needs, second was more
driven by performance issues on current hardware. Real intent was to
align data on a cache line boundary.

So use max(32, L1_CACHE_BYTES) instead of 64, to be more generic.

Remove microblaze and powerpc own NET_SKB_PAD definitions.

Thanks to Alexander Duyck and David Miller for their comments.

Suggested-by: David Miller <davem@davemloft.net>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipfrag : frag_kfree_skb() cleanup
Eric Dumazet [Sun, 13 Jun 2010 23:22:43 +0000 (23:22 +0000)]
ipfrag : frag_kfree_skb() cleanup

Third param (work) is unused, remove it.

Remove __inline__ and inline qualifiers.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoip_frag: Remove some atomic ops
Eric Dumazet [Sun, 13 Jun 2010 23:02:24 +0000 (23:02 +0000)]
ip_frag: Remove some atomic ops

Instead of doing one atomic operation per frag, we can factorize them.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agoipv6: syncookies: do not skip ->iif initialization
Florian Westphal [Sun, 13 Jun 2010 11:29:39 +0000 (11:29 +0000)]
ipv6: syncookies: do not skip ->iif initialization

When syncookies are in effect, req->iif is left uninitialized.
In case of e.g. link-local addresses the route lookup then fails
and no syn-ack is sent.

Rearrange things so ->iif is also initialized in the syncookie case.

want_cookie can only be true when the isn was zero, thus move the want_cookie
check into the "!isn" branch.

Cc: Glenn Griffin <ggriffin.kernel@gmail.com>
Signed-off-by: Florian Westphal <fw@strlen.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonet: Fix error in comment on net_device_ops::ndo_get_stats
Ben Hutchings [Tue, 15 Jun 2010 22:08:48 +0000 (15:08 -0700)]
net: Fix error in comment on net_device_ops::ndo_get_stats

ndo_get_stats still returns struct net_device_stats *; there is
no struct net_device_stats64.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
14 years agonetdev:bfin_mac: reclaim and free tx skb as soon as possible after transfer
Sonic Zhang [Fri, 11 Jun 2010 09:44:31 +0000 (17:44 +0800)]
netdev:bfin_mac: reclaim and free tx skb as soon as possible after transfer

SKBs hold onto resources that can't be held indefinitely, such as TCP
socket references and netfilter conntrack state.  So if a packet is left
in TX ring for a long time, there might be a TCP socket that cannot be
closed and freed up.

Current blackfin EMAC driver always reclaim and free used tx skbs in future
transfers. The problem is that future transfer may not come as soon as
possible. This patch start a timer after transfer to reclaim and free skb.
There is nearly no performance drop with this patch.

TX interrupt is not enabled because of a strange behavior of the Blackfin EMAC.
If EMAC TX transfer control is turned on, endless TX interrupts are triggered
no matter if TX DMA is enabled or not. Since DMA walks down the ring automatically,
TX transfer control can't be turned off in the middle. The only way is to disable
TX interrupt completely.

Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
Signed-off-by: David S. Miller <davem@davemloft.net>