Commit graph

254588 commits

Author SHA1 Message Date
Jon Mason
708ebb3a51 tg3: remove unnecessary read of PCI_CAP_ID_EXP
The PCIE capability offset is saved during PCI bus walking.  Use the
value from pci_dev instead of checking in the driver and saving it off
the the driver specific structure.  It will remove an unnecessary search
in the PCI configuration space if this value is referenced instead of
reacquiring it.

v2 of the patch re-adds the PCI_EXPRESS flag and adds comments
describing why it is necessary.

[ pdev->pcie_cap --> pci_pcie_cap(pdev) -DaveM ]

Signed-off-by: Jon Mason <jdmason@kudzu.us>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:38:45 -07:00
Kuninori Morimoto
ec0d75518c net: sh_eth: tidyup compile warning
This patch tidyup below warning

${LINUX}/drivers/net/sh_eth.c:1773: warning:
'mdp' may be used uninitialized in this function

Cc: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Signed-off-by: Kuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 21:03:26 -07:00
Jesse Gross
72e85c45b9 vmxnet3: Convert to new vlan model.
This converts the vmxnet3 driver to use the new vlan model.  In doing so
it fixes missing tags in tcpdump and failure to do checksum offload when
tx vlan offload is disabled.

CC: Shreyas Bhatewara <sbhatewara@vmware.com>
CC: VMware PV-Drivers <pv-drivers@vmware.com>
Signed-off-by: Jesse Gross <jesse@nicira.com>
Signed-off-by: Scott J. Goldman <scottjg@vmware.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:56:51 -07:00
Mike Frysinger
cfbf7586bc can: bfin_can: auto-calculate accessor sizes
Since we have a struct that defines the sizes of the registers, we don't
need to explicitly use the 16bit read/write helpers.  Let the code figure
out which size access to make based on the size of the C type.

There should be no functional changes here.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:42:24 -07:00
Mike Frysinger
9118f08a77 can: bfin_can: simplify xmit id1 setup
If we look closely, the 4 writes to TRANSMIT_CHL.id1 can be collapsed
down into much simpler code.  So do just that.

This also fixes a build failure due to the I/O macros no longer
getting pulled in.  Their minor (and accidental) usage here gets
dropped as part of the unification.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Kurt Van Dijck <kurt.van.dijck@eia.be>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:42:24 -07:00
Sergei Shtylyov
aca7a3acb1 mlx4: use pci_dev->revision
Commit 725c89997e (mlx4_en: Reporting HW revision
in ethtool -i) added code to read the revision ID from the PCI configuration
register while it's already stored by PCI subsystem in the 'revision' field of
'struct pci_dev'...

While at it, move the code being changed a bit in order to not break the
initialization sequence.

Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 20:30:47 -07:00
jamal
d5b8aa1d24 net_sched: fix dequeuer fairness
Results on dummy device can be seen in my netconf 2011
slides. These results are for a 10Gige IXGBE intel
nic - on another i5 machine, very similar specs to
the one used in the netconf2011 results.
It turns out - this is a hell lot worse than dummy
and so this patch is even more beneficial for 10G.

Test setup:
----------

System under test sending packets out.
Additional box connected directly dropping packets.
Installed prio qdisc on the eth device and default
netdev default length of 1000 used as is.
The 3 prio bands each were set to 100 (didnt factor in
the results).

5 packet runs were made and the middle 3 picked.

results
-------

The "cpu" column indicates the which cpu the sample
was taken on,
The "Pkt runx" carries the number of packets a cpu
dequeued when forced to be in the "dequeuer" role.
The "avg" for each run is the number of times each
cpu should be a "dequeuer" if the system was fair.

3.0-rc4      (plain)
cpu         Pkt run1        Pkt run2        Pkt run3
================================================
cpu0        21853354        21598183        22199900
cpu1          431058          473476          393159
cpu2          481975          477529          458466
cpu3        23261406        23412299        22894315
avg         11506948        11490372        11486460

3.0-rc4 with patch and default weight 64
cpu 	     Pkt run1        Pkt run2        Pkt run3
================================================
cpu0        13205312        13109359        13132333
cpu1        10189914        10159127        10122270
cpu2        10213871        10124367        10168722
cpu3        13165760        13164767        13096705
avg         11693714        11639405        11630008

As you can see the system is still not perfect but
is a lot better than what it was before...

At the moment we use the old backlog weight, weight_p
which is 64 packets. It seems to be reasonably fine
with that value.
The system could be made more fair if we reduce the
weight_p (as per my presentation), but we are going
to affect the shared backlog weight. Unless deemed
necessary, I think the default value is fine. If not
we could add yet another knob.

Signed-off-by: Jamal Hadi Salim <jhs@mojatatu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:14:10 -07:00
David S. Miller
85a43a9eda Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/jkirsher/net-next-2.6 2011-06-27 00:09:56 -07:00
Joe Perches
23efcb738e wan: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches
c75bb2c6f0 ixp4xx_hss: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches
e8c122f450 farsync: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches
09a1732bee dscc4: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches
86fb0ccf90 frame relay dlci/frad: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:47 -07:00
Joe Perches
d6810e1375 cyclom: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:46 -07:00
Joe Perches
9cbe50d423 cosa: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:46 -07:00
Joe Perches
12a3bfefc8 generic_hdlc: Update to current logging forms
Use pr_fmt, pr_<level> and netdev_<level> as appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:46 -07:00
Sathya Perla
2903dd654d be2net: fix initialization of vlan_prio_bmap
Initialization of this field to "all priorities" must be done before MCC queue
creation. As soon as the MCC queue is created, an event modifying this value
may be received.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:31 -07:00
Sathya Perla
c814fd3669 be2net: get rid of multi_rxq module param
Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:31 -07:00
Sathya Perla
6e53391cb4 be2net: fix netdev_stats_update
Problem initially reproted and fixed by Eric Dumazet <eric.dumazet@gmail.com>

netdev_stats_update() resets netdev->stats and then accumulates stats from
various rings. This is wrong as stats readers can sometimes catch zero values.
Use temporary variables instead for accumulating per-ring values.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-27 00:09:31 -07:00
John Fastabend
42532da64e ixgbe: implement DCB ops dcb_ieee_del()
Implement DCB ops dcb_ieee_del() and set FCoE to the default
priority when no priority exists.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:15:58 -07:00
John Fastabend
3b3bf3b92b ixgbe: remove unused fcoe.tc field and fcoe_setapp()
The fcoe.tc field is no longer used so remove it. After
the field is removed there is no need to keep fcoe_setapp()
around so remove it as well. And finally we can get rid
of some DCB #ifdef's in the fcoe code.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:15:42 -07:00
John Fastabend
9372453e87 ixgbe: complete FCoE initialization from setapp() routine
Commit,

commit c8ca76ebc6
Author: John Fastabend <john.r.fastabend@intel.com>
Date:   Sat Mar 12 03:50:53 2011 +0000

    ixgbe: DCB, further cleanups to app configuration

Removed the getapp() routines from ixgbe because they are no
longer needed. It also allowed the set hardware routines to
use both IEEE 802.1Qaz app types and CEE app types. This
added code to do bit shifting in the IEEE case.

This patch reverts the checks and handles the IEEE case
from the setapp entry point. I prefer this because it
keeps the two paths from having to be aware of the DCB
mode. This resolves a bug where I missed setting the
selector bit in the IEEE spec value and left it in the
CEE value. Now that they are separate routines these types
of errors should not occur.

Signed-off-by: John Fastabend <john.r.fastabend@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:15:24 -07:00
Lior Levy
7555e83df3 ixgbe: A fix to VF TX rate limit
There is a need to configure MMW_SIZE in register RTTBCNRM with a correct
value (0x4 for non jumbo frames and 0x14 for jumbo frames support).
For 82599 the value is 0x4 and for X540 the value is 0x14.

Signed-off-by: Lior Levy <lior.levy@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:10:34 -07:00
Alexander Duyck
a535c30e9e ixgbe: Update method used for determining descriptor count for an skb
This patch updates the current methods used for determining if we have
enough space to transmit a given skb.  The current method is quite wasteful
as it has us go through and determine how each page is going to be broken
up.  That only needs to be done if pages are larger than our maximum data
per TXD.  As such I have wrapped that in a page size check.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:06:51 -07:00
Alexander Duyck
897ab15606 ixgbe: Add one function that handles most of context descriptor setup
There is a significant amount of shared functionality between the checksum
and TSO offload configuration that is shared in regards to how they setup
the context descriptors.  Since so much of the functionality is shared it
makes sense to move the shared functionality into a single function and
just call that function from the two context descriptor specific routines.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:06:05 -07:00
Alexander Duyck
63544e9c00 ixgbe: Move all values that deal with count, next_to_use, next_to_clean to u16
This change updates all values dealing with count, next_to_use, and
next_to_clean so that they stay u16 values.  The advantage of this is that
there is no re-casting of type during the propagation through the stack.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:04:59 -07:00
Alexander Duyck
7d4987de75 ixgbe: Convert IXGBE_DESC_UNUSED from macro to static inline function
This change is a minor cleanup that converts the IXGBE_DESC_UNUSED macro
into a static inline function just for the case of the code being a bit
cleaner.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:04:32 -07:00
Alexander Duyck
a65151ba20 ixgbe: pass adapter struct instead of netdev for interrupt data
This change makes it so that we pass the adapter struct instead of the
netdev for most of the basic interrupts that are not associated with
q_vectors.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2011-06-25 00:04:06 -07:00
Vitaliy Ivanov
c6af9c406c net: wimax: Remove of unused 'rfkill_input' pointer
Seems like this was not cleaned during the 'rfkill: rewrite' checkin
19d337dff9.

Signed-off-by: Vitaliy Ivanov <vitalivanov@gmail.com>
Acked-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:50:44 -07:00
Shan Wei
6f9edc667d net: Kill unuseful net/TUNABLE doc in kernel source
File net/TUNABLE has never be updated since git age.

For some tunable parameters which user can control with proc file-system,
They are all in ip-sysctl.txt doc.

For tunable parameters that only at compile time, no meaning to note them.

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:43:16 -07:00
Joe Perches
572404ea6b zorro8390: Update style, neaten, restructure to eliminate prototypes
Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and standardize spacing.
Comment neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:37 -07:00
Joe Perches
3c01164e80 lib8390: Remove unnecessary extern
Already declared in 8390.h

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:37 -07:00
Joe Perches
5aedcf50e5 lib8390: Convert include <asm to include <linux
Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches
be763c940f lib8390: Normalize source code spacing
Make more conformant to normal kernel style.

Long line lengths > 80 columns ignored.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches
7340c4db81 lib8390: Indent braces appropriately
Move the braces around to conform to kernel standard style.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches
840f639339 lib8390: Use pr_<level> and netdev_<level>
Use the current logging styles.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches
747e252fa1 a2065: Use pr_fmt, pr_<level> and netdev_<level>
Use current logging styles.

Other miscellaneous cleanups:

Space removal and additions for checkpatch warnings.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
Joe Perches
7b5b0abdb6 ariadne: Update style, neaten, restructure to eliminate prototypes
Convert to current logging styles.
Move code blocks to eliminate need for prototypes.
Use tabs for code indent and sandardize spacing.
Comment neatening.

Signed-off-by: Joe Perches <joe@perches.com>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
2011-06-24 17:31:36 -07:00
David S. Miller
1897fe55e1 Merge branch 'tipc-Jun24-2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/net-next-2.6 2011-06-24 16:49:10 -07:00
David S. Miller
cd5f3e2064 Merge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next-2.6 2011-06-24 14:21:00 -07:00
Allan Stephens
e4a0aee47e tipc: Optimize creation of connection protocol messages
Simplifies the creation of connection protocol messages by eliminating
the passing of information that is no longer required, is constant,
or is contained within the port structure that is issuing the message.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:18 -04:00
Allan Stephens
f55b564054 tipc: Don't create payload message using connection protocol routine
Modifies the logic that creates a connection termination payload
message so that it no longer (mis)uses a routine that creates a
connection protocol message. The revised code is now more easily
understood, and avoids setting several fields that are either not
present in payload messages or were being set more than once.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:18 -04:00
Allan Stephens
1c1a551acb tipc: Reject connection protocol message sent to unconnected port
Restructures the logic used in tipc_port_recv_proto_msg() to ensure
that incoming connection protocol messages are handled properly. The
routine now uses a two-stage process that first ensures the message
applies on an existing connection and then processes the request.
This corrects a loophole that allowed a connection probe request to
be processed if it was sent to an unconnected port that had no names
bound to it.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:18 -04:00
Allan Stephens
e244a915ff tipc: Optimize creation of FIN messages
Speeds up the creation of the FIN message that terminates a TIPC
connection. The typical peer termination message is now created by
duplicating the terminating port's standard payload message header
and adjusting the message size, importance, and error code fields,
rather than building all fields of the message from scratch. A FIN
message that is directed to the port itself is created the same way.
but also requires swapping the origin and destination address fields.

In addition to reducing the work required to create FIN messages,
these changes eliminate several instances of duplicated code,

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:18 -04:00
Allan Stephens
741d9eb7b8 tipc: Cleanup of message header size terminology
Performs cosmetic cleanup of the symbolic names used to specify TIPC
payload message header sizes. The revised names now more accurately
reflect the payload messages in which they can appear. In addition,
several places where these payload message symbol names were being used
to create non-payload messages have been updated to use the proper
internal message symbolic name.

No functional changes are introduced by this rework.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:17 -04:00
Allan Stephens
15f4e2b303 tipc: Eliminate useless check when creating internal message
Gets rid of code that allows tipc_msg_init() to create a short
payload message header. This optimization is possible because
there are no longer any callers who require this capability.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:17 -04:00
Allan Stephens
a9948ba24f tipc: Remove unnecessary includes in socket code
Eliminates a pair of #include statements for files that are brought in
automatically by including core.h.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:16 -04:00
Allan Stephens
f01a2b6378 tipc: Eliminate unused field in bearer structure
Gets rid of counter that records the number of times a bearer has
resumed after congestion or blocking, since the value is never
referenced anywhere.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:16 -04:00
Allan Stephens
0f305bf421 tipc: Correct typo in link statistics output
Fixes a minor error in the title of one of the message size profiling
values printed as part of TIPC's link statistics.

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:16 -04:00
Allan Stephens
8af4638a29 tipc: Eliminate checks for empty zone list during name translation
Gets rid of a pair of checks to see if a name sequence entry in
TIPC's name table has an empty zone list. These checks are pointless
since the zone list can never be empty (i.e. as soon as the list
becomes empty the associated name sequence entry is deleted).

Signed-off-by: Allan Stephens <allan.stephens@windriver.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2011-06-24 16:18:16 -04:00