linux-2.6-microblaze.git
11 years agonetpoll: fix an uninitialized variable
Cong Wang [Tue, 22 Jan 2013 17:39:11 +0000 (17:39 +0000)]
netpoll: fix an uninitialized variable

Fengguang reported:

   net/core/netpoll.c: In function 'netpoll_setup':
   net/core/netpoll.c:1049:6: warning: 'err' may be used uninitialized in this function [-Wmaybe-uninitialized]

in !CONFIG_IPV6 case, we may error out without initializing
'err'.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: remove duplicated declaration of ip6_fragment()
Cong Wang [Tue, 22 Jan 2013 17:22:07 +0000 (17:22 +0000)]
ipv6: remove duplicated declaration of ip6_fragment()

It is declared in:
include/net/ip6_route.h:187:int ip6_fragment(struct sk_buff *skb, int (*output)(struct sk_buff *));

and net/ip6_route.h is already included.

Cc: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Cong Wang <amwang@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'legacy-isa-delete' of git://git.kernel.org/pub/scm/linux/kernel/git...
David S. Miller [Tue, 22 Jan 2013 19:47:13 +0000 (14:47 -0500)]
Merge branch 'legacy-isa-delete' of git://git./linux/kernel/git/paulg/linux

Paul Gortmaker says:

====================
The Ethernet-HowTo was maintained for roughly 10 years, from 1993 to 2003.
Fortunately sane hardware probing and auto detection (via PCI and ISA/PnP)
largely made the document a relic of the past, hence it being abandoned
a decade ago.

However, there is one last useful thing that we can extract from the
effort made in maintaining that document.  We can use it to guide us
with respect to what rare, experimental and/or super ancient 10Mbit
ISA drivers don't make sense to maintain in-tree anymore.

Nobody will argue that ISA is obsolete.  Availability went away at about
the time Pentium3 motherboards moved from 500MHz Slot1/SECC processors
to the green 500MHz Socket 370 Pentium3 chips, at the turn of the century.

In theory, it is possible that someone could still be running one of these
12+ year old P3 machines and want 3.9+ bleeding edge kernels (but unlikely).
In light of the above (remote) possibility, we can defer the removal of some
ISA network drivers that were highly popular and well tested.  Typically
that means the stuff more from the mid to late '90s, some with ISA PnP
support, like the 3c509, the wd/SMC 8390 based stuff, PCnet/lance etc.

But a lot of other drivers, typically from the early 1990s were for rare
hardware, and experimental (to the point of requiring a cron job that would
do a test ping, and then ifconfig down/up and/or a rmmod/insmod!).  And
some of these drivers (znet, and lp486e to name two) are physically tied
to platforms with on motherboard ethernet -- of 486 machines that date
from the early 1990s and can only have single digit amounts of memory.

What I'd like to achieve here with this series, is to get rid of those old
drivers that are no longer being used.  In an earlier discussion where
I'd proposed deleting a single driver, Alan suggested we instead dump
all the historical stuff in one go, to make it "...immediately obvious
where the break point is..."[1] and that it was "perfectly reasonable it
(and a pile of other ISA cards) ought to be shown the door"[2].  So that
is the goal here - make a clear line in the sand where the really ancient
stuff finally gets kicked to the curb.

Two old parallel port drivers are considered for removal here as well,
since in early 386/486 ISA machines, the parallel port was typically found
with the UARTS on the multi-I/O ISA controller card.  These drivers also date
from the early 1990's; parallel ports are no longer found on modern boards,
and their performance was not even capable of 10% of 10Mbit bandwidth.

Allow me a preemptive justification against the inevitable comments from
well meaning bystanders who suggest "why not just leave all this alone?".
Dead drivers cost us all if they are left in tree.  If you think that
is false, then please first consider:

-every time you type "git status", you are checking to see if modifications
 have been made by you to all that dead code.

-every time you type "git grep <regex>" you are searching through files
 which contain that dead code that simply does not interest you.

-every time you build a "allyesconfig" and an "allmodconfig" (don't tell
 me you skip this step before submitting your changes to a maintainer),
 you waste CPU cycles building this dead code.

-every time there is a tree wide API change, or cleanup, or file relocation,
 we pay the cost of updating dead code, or moving dead code.

-daily regression tests (take linux-next as the most transparent
 example) spend time building (and possibly running) this dead code.

-hard working people who regularly run auditing tools looking for lurking
 bugs (sparse/coverity/smatch/coccinelle) are wasting time checking for,
 and fixing bugs in this dead code.

This last one is key.  Please take a look at the git history for the
files that are proposed for removal here.  Look at the git history for
any one of them ("git whatchanged --follow drivers/net/.../driver.c")
Mentally sort the changes into two bins -- (1) the robotic tree-wide
changes, and (2) the "look I found a real run-time bug while using this"
category.  You will see that category #2 is essentially empty.

Further to that, realize that drivers don't simply disappear.  We are
not operating in the binary-only distribution space like other OS.  All
these drivers remain in the git history forever.  If a person is an
enthusiast for extreme legacy hardware, they are probably already
customizing their kernel source and building it themselves to support
such systems.  Also keep in mind that they could still build the 3.8
kernel exactly as-is, and run it (or a 3.8.x stable variant of it) for
several more years if they were really determined to cling to these old
experimental ISA drivers for some reason.

In summary, I hope that folks can be pragmatic about this, and not
get swept up in nostalgia.  Ask yourself whether it is realistic to
expect a person would have a genuine use case where they would
need to build a 3.9+ modern kernel and install it on some legacy hardware
that has no option but to absolutely _require_ one of the drivers
that are deleted here.

The following series was created with --irreversible-delete for
ease of review (it skips showing the content of files that are
deleted); however the complete patches can be pulled as per below.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonetfilter: Use IS_ERR_OR_NULL().
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:33:09 +0000 (06:33 +0000)]
netfilter: Use IS_ERR_OR_NULL().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Use IS_ERR_OR_NULL().
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:32:54 +0000 (06:32 +0000)]
ipv6: Use IS_ERR_OR_NULL().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv4: Use IS_ERR_OR_NULL().
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:32:49 +0000 (06:32 +0000)]
ipv4: Use IS_ERR_OR_NULL().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: Use IS_ERR_OR_NULL().
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 06:32:44 +0000 (06:32 +0000)]
net: Use IS_ERR_OR_NULL().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoneigh: Keep neighbour cache entries if number of them is small enough.
YOSHIFUJI Hideaki / 吉藤英明 [Tue, 22 Jan 2013 05:20:05 +0000 (05:20 +0000)]
neigh: Keep neighbour cache entries if number of them is small enough.

Since we have removed NCE (Neighbour Cache Entry) reference from
routing entries, the only refcnt holders of an NCE are its timer
(if running) and its owner table, in usual cases.  As a result,
neigh_periodic_work() purges NCEs over and over again even for
gateways.

It does not make sense to purge entries, if number of them is
very small, so keep them.  The minimum number of entries to keep
is specified by gc_thresh1.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipmr: fix sparse warning when testing origin or group
Nicolas Dichtel [Tue, 22 Jan 2013 10:18:03 +0000 (11:18 +0100)]
ipmr: fix sparse warning when testing origin or group

mfc_mcastgrp and mfc_origin are __be32, thus we need to convert INADDR_ANY.
Because INADDR_ANY is 0, this patch just fix sparse warnings.

Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/net: delete old x86 variant of the seeq8005 driver
Paul Gortmaker [Tue, 22 Jan 2013 00:13:26 +0000 (19:13 -0500)]
drivers/net: delete old x86 variant of the seeq8005 driver

The last update to the Ethernet HowTo (over 10 years ago) listed this:

 ------------------------
   SEEQ 8005

   Status: Obsolete, Driver Name: seeq8005

   There is little information about the card included in the driver,
   and hence little information to be put here. If you have a question,
   you are probably best trying to e-mail the driver author as listed
   in the source.

   It was marked obsolete as of the 2.4 series kernels.
 ------------------------

If it was obsolete over a decade ago, the situation can not have
improved with the passage of time, so let us act on that.  Even with
today's improved search engines, I was unable to locate any real
meaningful information on the ISA implementation of this rare chip.

There are ARM and SGI variants of the driver in tree, but they do
not depend on the original x86 driver source or header file.  We
leave those non-x86 drivers to be deleted by the arch maintainers
when they decide to expire those legacy platforms as a whole.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete Digital EtherWorks-3 support.
Paul Gortmaker [Sun, 20 Jan 2013 22:14:45 +0000 (17:14 -0500)]
drivers/net: delete Digital EtherWorks-3 support.

This is another one that makes sense to target for obsolescence, since
it (a)appeared pre-1995, and (b)was rather rare, and (c)did not
really have any statistically significant active linux user base.

Removing this ISA 10Mbit driver support is unlikely to be even noticed
by the user base of 3.9+ linux kernels, especially when the documentation
clearly indicates the vintage with this text:

 "...designed to  work with all kernels > 1.1.33"

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete old DEC depca ISA drivers support.
Paul Gortmaker [Thu, 17 Jan 2013 00:32:34 +0000 (19:32 -0500)]
drivers/net: delete old DEC depca ISA drivers support.

These are old ISA 10Mbit cards from the 1st 1/2 of the 1990s and
required manual jumper settings in order to configure them.  Here
we remove them on the premise that they are no longer used in any
modern 3.9+ kernels.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete the really obsolete 8390 based 10Mbit ISA drivers
Paul Gortmaker [Tue, 15 Jan 2013 01:32:46 +0000 (20:32 -0500)]
drivers/net: delete the really obsolete 8390 based 10Mbit ISA drivers

This is an area I know all too well, after being author of several 8390
drivers, and maintainer of all 8390 drivers during a large part of their
active lifecycle.

To that end, I can say this with a reasonable degree of confidence.
The drivers deleted here represent the earliest (as in early 1990)
hardware and/or rare hardware.  The remaining hardware not deleted
here is the more modern/sane of the lot, with ISA-PnP and jumperless
"soft configuration" like the wd and smc cards had.

The original ne2000 driver (ne.c) gets a pass at this time since
AT/LANTIC based cards that could be both ne2000 or wd-like (with
shared memory) and with jumperless configuration were made in the
mid to late 1990's, and performed reasonably well for their era.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete old fujitsu based eth16i driver
Paul Gortmaker [Mon, 14 Jan 2013 00:41:14 +0000 (19:41 -0500)]
drivers/net: delete old fujitsu based eth16i driver

This is another driver for relatively rare 10Mbit hardware that
originated in the early 1990's.  So we select it for removal at
this point in time as well.

Cc: Mika Kuoppala <miku@iki.fi>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete at1700 ISA 10Mbit driver
Paul Gortmaker [Fri, 11 Jan 2013 00:19:43 +0000 (19:19 -0500)]
drivers/net: delete at1700 ISA 10Mbit driver

These Fujitsu MB86965 based ISA 10Mbit cards were another of the
relatively rare cards dating from the early 1990s that for one reason
or another didn't seem to get a lot of use in linux.  So we retire it
now with a reasonable degree of confidence that it won't impact anyone.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete old 8 bit ISA Racal ni5010 support.
Paul Gortmaker [Thu, 10 Jan 2013 23:25:04 +0000 (18:25 -0500)]
drivers/net: delete old 8 bit ISA Racal ni5010 support.

These cards were only available in 8bit format, and in addition
they only had AUI and BNC(10-Base2) interfaces (i.e. no RJ-45).

In fact, they are so rare, that an internet search on these old
cards almost comes up empty, unless the "Micom interlan" name
is used.

This puts them in the equivalent domain as the 3c501, so there
should be no strong opposition to the driver removal, as nobody
is seriously using 3.9+ with 8 bit ISA hardware.

In doing so, the whole "ethernet/racal" category becomes empty,
so we clean up the Makefile/Kconfig and subdir appropriately.

Cc: Andreas Mohr <andi@lisas.de>
Cc: Jan-Pascal van Best <janpascal@vanbest.org>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete Racal Interlan ISA ni52 (i825xx) driver
Paul Gortmaker [Thu, 10 Jan 2013 23:12:04 +0000 (18:12 -0500)]
drivers/net: delete Racal Interlan ISA ni52 (i825xx) driver

Like the other drivers that were in the ISA i825xx family, the ni52
was rather rare, not widely used, and hence perhaps not as reliable
as the more mainstream ISA drivers that were heavily used.  Given
that, it is chosen for retirement at this time as well.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete intel i825xx based znet notebook driver
Paul Gortmaker [Thu, 10 Jan 2013 23:09:44 +0000 (18:09 -0500)]
drivers/net: delete intel i825xx based znet notebook driver

This driver supported early to mid 1990's Zenith laptops, of the
2" thick variety.  The driver was already dead 10+ years ago, but
we see this in the source:

 ----------------
 /* 10/2002

 [...]

   Tested on a vintage Zenith Z-Note 433Lnp+. Probably broken on
   anything else. Testers (and detailed bug reports) are welcome :-).
 ----------------

To clarify, a 433 translates into a 486 at 33MHz, and a system with
a default of 4MB RAM.  I can't fault the noble effort to keep things
working a decade ago, but at this point in time, there is no valid
justification to continue carrying this driver along.

Note that there is no associated Space.c cleanup here since this
driver was using module_init to hook itself in.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete ISA intel eexpress and eepro i825xx drivers
Paul Gortmaker [Thu, 10 Jan 2013 02:01:40 +0000 (21:01 -0500)]
drivers/net: delete ISA intel eexpress and eepro i825xx drivers

These old drivers should not be confused with the very common PCI
cards that are supported by e100.c -- these older 10Mbit ISA only
drivers were not as commonly used as some of the other ISA drivers,
simply due to hardware availability and pricing.

Given the rarity of the hardware, and the subsequent less extensive
use of the drivers, it makes sense to obsolete them at this point
in time, along with other rare/experimental ISA drivers.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete the 3Com 3c505/3c507 intel i825xx support
Paul Gortmaker [Thu, 10 Jan 2013 01:51:58 +0000 (20:51 -0500)]
drivers/net: delete the 3Com 3c505/3c507 intel i825xx support

For those of us who were around in the early to mid 1990's, we
will remember that the i825xx ethernet support was not something
that was considered sufficiently vetted for 24/7 use.

Folks might be inclined to use *functional* ISA hardware on some
near expired P3 ISA machines for dedicated workhorse applications,
but the odds of using (and relying on) one of these old/experimental
drivers is essentially nil.  So lets remove them.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete old parallel port de600/de620 drivers
Paul Gortmaker [Thu, 10 Jan 2013 01:30:26 +0000 (20:30 -0500)]
drivers/net: delete old parallel port de600/de620 drivers

The parallel port is largely replaced by USB, and even in the
day where these drivers were current, the documented speed was
less than 100kB/s.  Let us not pretend that anyone cares about
these drivers anymore, or worse - pretend that anyone is using
them on a modern kernel.

As a side bonus, this is the end of legacy parallel port ethernet,
so we get to drop the whole chunk relating to that in the legacy
Space.c file containing the non-PCI unified probe dispatch.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete old 8bit ISA 3c501 driver.
Paul Gortmaker [Thu, 10 Jan 2013 01:25:05 +0000 (20:25 -0500)]
drivers/net: delete old 8bit ISA 3c501 driver.

It was amusing that linux was able to make use of this 1980's
technology on machines long past its intended lifespan, but
it probably should go now.

To set some context, the 3c501 was designed in the 1980's to be
used on 8088 PC-XT 8bit ISA machines.  It was built using a large
number of discrete TTL components and truly looks like a relic
of the ancient past before large scale integration was common.

But from a functional point of view, the real issue, as stated
in the (also obsolete) Ethernet-HowTo, is that "...the 3c501 can
only do one thing at a time -- while you are removing one packet
from the single-packet buffer it cannot receive another packet,
nor can it receive a packet while loading a transmit packet."

You know things are not good when the Kconfig help text suggests
you make a cron job doing a ping every minute.

Hardware that old and crippled is simply not going to be used by
anyone in a time where 10 year old 100Mbit PCI cards (that are
still functional) are largely give-away items.

Cc: Alan Cox <alan@linux.intel.com>
Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete intel 486 panther onboard ethernet support
Paul Gortmaker [Wed, 9 Jan 2013 03:11:54 +0000 (22:11 -0500)]
drivers/net: delete intel 486 panther onboard ethernet support

This driver was specific to a "professional workstation" line
of products from around 1993 that used the i82596 ethernet chip
as an on-board ethernet solution.

With a 486 processor, and the premium top of the line model maxing
out at a clock speed of 50MHz, we can safely retire this support.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agodrivers/net: delete 486 Apricot support
Paul Gortmaker [Wed, 9 Jan 2013 03:00:39 +0000 (22:00 -0500)]
drivers/net: delete 486 Apricot support

The Apricot was a 486 PC with 4MB RAM, and an on-board ethernet
via an intel i82596 hard-wired to i/o 0x300.

Those who were using linux in the 1990's will recall that the
i82596 driver was not one of the more stable or widely used
drivers of its day.  Combine that with the extremely limited
resources of the platform, and it is truly time to expire the
support for this thing.

There are some old m68k targets who were also using this chip,
so rather than poll the m68k user base, we simply cut out the
x86/Apricot support here in this commit.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
11 years agoisdn/gigaset: beautify ev-layer.c
Tilman Schmidt [Mon, 21 Jan 2013 11:57:21 +0000 (11:57 +0000)]
isdn/gigaset: beautify ev-layer.c

Cosmetic changes to drivers/isdn/gigaset/ev-layer.c and
drivers/isdn/gigaset/gigaset.h to improve readability.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoisdn/gigaset: beautify common.c
Tilman Schmidt [Mon, 21 Jan 2013 11:57:21 +0000 (11:57 +0000)]
isdn/gigaset: beautify common.c

Rearrange the gigaset_freecs() function to make it more readable,
and adapt gigaset_initcs() accordingly.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoisdn/gigaset: beautify interface.c
Tilman Schmidt [Mon, 21 Jan 2013 11:57:20 +0000 (11:57 +0000)]
isdn/gigaset: beautify interface.c

Avoid forward declarations and remove a needless initialization.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoisdn/gigaset: leave DLE mode before hanging up
Tilman Schmidt [Mon, 21 Jan 2013 11:57:20 +0000 (11:57 +0000)]
isdn/gigaset: leave DLE mode before hanging up

Some firmware releases of Gigaset M105 do not accept AT+VLS=0 command
in DLE mode, so always leave DLE mode before sending the command.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoisdn/divert: fix readability damage
Tilman Schmidt [Mon, 21 Jan 2013 11:57:20 +0000 (11:57 +0000)]
isdn/divert: fix readability damage

Fix up some of the readibility deterioration caused by last year's
ISDN whitespace coding style cleanup.
Note that the checkpatch complaints all apply to the state of the
source before this patch as well, and in many cases even more so.

Signed-off-by: Tilman Schmidt <tilman@imap.cc>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodrivers/net/ethernet/sfc/ptp.c: adjust duplicate test
Julia Lawall [Mon, 21 Jan 2013 03:02:48 +0000 (03:02 +0000)]
drivers/net/ethernet/sfc/ptp.c: adjust duplicate test

Delete successive tests to the same location.  rc was previously tested and
not subsequently updated.  efx_phc_adjtime can return an error code, so the
call is updated so that is tested instead.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@

*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
    when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
 { ... when forall
   return ...; }
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Do not try to update "updated" time if neighbour has already gone.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 09:58:50 +0000 (09:58 +0000)]
ndisc: Do not try to update "updated" time if neighbour has already gone.

Commit 2152caea ("ipv6: Do not depend on rt->n in rt6_probe().")
introduce a bug to try to update "updated" time in neighbour
structure.
Update the "updated" time only if neighbour is available.

Bug was found by Dan Carpenter <dan.carpenter@oracle.com>

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'dsa'
David S. Miller [Mon, 21 Jan 2013 20:40:47 +0000 (15:40 -0500)]
Merge branch 'dsa'

Florian Fainelli says:

====================
These two patches are non-critical bugfixes based on net-next which I
stumbled upon while working on Device Tree bindings for DSA (will comme
as a separate patch later).

====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodsa: make dsa_switch_setup check for valid port names
Florian Fainelli [Mon, 21 Jan 2013 09:58:51 +0000 (09:58 +0000)]
dsa: make dsa_switch_setup check for valid port names

This patch changes dsa_switch_setup() to ensure that at least one valid
valid port name is specified and will bail out with an error in case we
walked the maximum number of port with a valid port name found.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agodsa: use an unique and non conflicting bus name for the slave MII bus
Florian Fainelli [Mon, 21 Jan 2013 09:58:50 +0000 (09:58 +0000)]
dsa: use an unique and non conflicting bus name for the slave MII bus

The slave MII bus registered by the DSA code is using the parent MII bus
as part of its name (ds->master_mii_bus_id), in case the parent MII bus
name is already 16 characters long (such as d0072004.mdio-mi) we will
get the following WARN_ON in dsa_switch_setup() when calling
mdiobus_register():

[   79.088782] ------------[ cut here ]------------
[   79.093448] WARNING: at fs/sysfs/dir.c:536 sysfs_add_one+0x80/0xa0()
[   79.099831] sysfs: cannot create duplicate filename
'/class/mdio_bus/d0072004.mdio-mi'

This is a genuine warning, because the DSA slave MII bus will also be
named d0072004.mdio-mi, and since MII_BUS_ID_SIZE is 17 characters long
(with null-terminator) the following will truncate the slave MII bus id:

snprintf(ds->slave_mii_bus->id, MII_BUS_ID_SIZE, "%s-%d:%.2x",
                        ds->master_mii_bus->id, ds->pd->sw_addr);

Fix this by using dsa-<switch index->:<sw_add> which is guaranteed to be
unique.

Signed-off-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: move rx and tx hash functions to net/core/flow_dissector.c
Cong Wang [Mon, 21 Jan 2013 00:39:24 +0000 (00:39 +0000)]
net: move rx and tx hash functions to net/core/flow_dissector.c

__skb_tx_hash() and __skb_get_rxhash() are all for calculating hash
value based by some fields in skb, mostly used for selecting queues
by device drivers.

Meanwhile, net/core/dev.c is bloating.

Cc: "David S. Miller" <davem@davemloft.net>
Cc: Eric Dumazet <edumazet@google.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: Cong Wang <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'virtio_mac'
David S. Miller [Mon, 21 Jan 2013 19:14:09 +0000 (14:14 -0500)]
Merge branch 'virtio_mac'

Amos Kong says:

====================
Currenly mac is programmed byte by byte. This means that we
have an intermediate step where mac is wrong.

Third patch introduced a new vq control command to set mac
address, it's atomic.

V2: check return of sending command, delay eth_mac_addr()
V3: restore software address when fail to set hardware address
V4: split eth_mac_addr, fix error handle
V5: rebase patches to net-next tree
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agovirtio-net: introduce a new control to set macaddr
Amos Kong [Mon, 21 Jan 2013 01:17:23 +0000 (01:17 +0000)]
virtio-net: introduce a new control to set macaddr

Currently we write MAC address to pci config space byte by byte,
this means that we have an intermediate step where mac is wrong.
This patch introduced a new control command to set MAC address,
it's atomic.

VIRTIO_NET_F_CTRL_MAC_ADDR is a new feature bit for compatibility.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: split eth_mac_addr for better error handling
Stefan Hajnoczi [Mon, 21 Jan 2013 01:17:22 +0000 (01:17 +0000)]
net: split eth_mac_addr for better error handling

When we set mac address, software mac address in system and hardware mac
address all need to be updated. Current eth_mac_addr() doesn't allow
callers to implement error handling nicely.

This patch split eth_mac_addr() to prepare part and real commit part,
then we can prepare first, and try to change hardware address, then do
the real commit if hardware address is set successfully.

Signed-off-by: Stefan Hajnoczi <stefanha@gmail.com>
Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomove virtnet_send_command() above virtnet_set_mac_address()
Amos Kong [Mon, 21 Jan 2013 01:17:21 +0000 (01:17 +0000)]
move virtnet_send_command() above virtnet_set_mac_address()

We want to send vq command to set mac address in
virtnet_set_mac_address(), so do this function moving.
Fixed a little issue of coding style.

Signed-off-by: Amos Kong <akong@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'mcast'
David S. Miller [Mon, 21 Jan 2013 19:06:34 +0000 (14:06 -0500)]
Merge branch 'mcast'

Nicolas Dichtel says:

====================
The goal of this serie is to add the support of proxy multicast, ie being able
to build a static multicast tree. In other words, it adds the support of (*,G)
mf[6]c entries.

v2: use INADDR_ANY instead of 0 for IPv4 addresses
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomcast: add multicast proxy support (IPv4 and IPv6)
Nicolas Dichtel [Mon, 21 Jan 2013 06:00:26 +0000 (06:00 +0000)]
mcast: add multicast proxy support (IPv4 and IPv6)

This patch add the support of proxy multicast, ie being able to build a static
multicast tree. It adds the support of (*,*) and (*,G) entries.

The user should define an (*,*) entry which is not used for real forwarding.
This entry defines the upstream in iif and contains all interfaces from the
static tree in its oifs. It will be used to forward packet upstream when they
come from an interface belonging to the static tree.
Hence, the user should define (*,G) entries to build its static tree. Note that
upstream interface must be part of oifs: packets are sent to all oifs
interfaces except the input interface. This ensures to always join the whole
static tree, even if the packet is not coming from the upstream interface.

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agomcast: define and use MRT[6]_MAX in ip[6]_mroute_opt()
Nicolas Dichtel [Mon, 21 Jan 2013 06:00:25 +0000 (06:00 +0000)]
mcast: define and use MRT[6]_MAX in ip[6]_mroute_opt()

This will ease further addition of new MRT[6]_* values and avoid to update
in6.h each time.
Note that we reduce the maximum value from 210 to 209, but 210 does not match
any known value in ip[6]_mroute_setsockopt().

Signed-off-by: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Acked-by: David L Stevens <dlstevens@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoDocumentation: remove obsolete networking/multicast.txt file
Paul Gortmaker [Mon, 21 Jan 2013 06:17:41 +0000 (06:17 +0000)]
Documentation: remove obsolete networking/multicast.txt file

The original intent of this file was to list limitations in
drivers/hardware relating to multicast use, back when some
modest hardware from the early 1990s did not support things
we might take for granted today.

I was intending to delete some now-gone MCA/token ring entries
in this file, but once I opened it, I found it only contained
information on the earliest (pre-2000) linux networking drivers.

Checking the git history shows that the file hasn't been touched
since 2005.  Clearly nobody is actively consulting this file
as a meaningful reference.

Rather than add a "YES YES YES" line for all of the drivers we
currently have, lets just take advantage of the fact that nobody
is using the file to delete it.

This has the side benefit of not having to do a line-by-line
deletion of the file content as each older driver is expired.

Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'qeth'
David S. Miller [Mon, 21 Jan 2013 18:51:24 +0000 (13:51 -0500)]
Merge branch 'qeth'

Merge s390 networking changes from Frank Blaschka.

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqeth: Fix HiperSockets performance regression
Stefan Raspl [Mon, 21 Jan 2013 02:30:23 +0000 (02:30 +0000)]
qeth: Fix HiperSockets performance regression

Commit 46d3ceab "tcp: TCP Small Queues" has severly degraded
performance for single connection RR workloads on HiperSockets with
MTU >=16K due to a conflict of the TCP Small Queues approach with our
buffer scan threshold which releases buffers not frequently enough yet.
This fix restores performance to the same level as before cited commit.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqeth: Make s390dbf card entries persistent
Stefan Raspl [Mon, 21 Jan 2013 02:30:22 +0000 (02:30 +0000)]
qeth: Make s390dbf card entries persistent

As of now, s390dbf entries for the cards are discarded as soon as the
device is removed. However, this will also bar us of all chances of
getting valuable debug information after a device has been removed.
This patch will keep the s390dbf entries around until the qeth module
is removed.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqeth: Update Kconfig wording
Stefan Raspl [Mon, 21 Jan 2013 02:30:21 +0000 (02:30 +0000)]
qeth: Update Kconfig wording

Refer to virtual NICs instead of GuestLANs.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqeth: Support VEPA mode
Stefan Raspl [Mon, 21 Jan 2013 02:30:20 +0000 (02:30 +0000)]
qeth: Support VEPA mode

The existing port isolation mode 'forward' will now verify that the adjacent
switch port supports the required reflective relay (RR) mode. This patch adds
the required error handling for the cases where enabling port isolation mode
'forward' can now fail.
Furthermore, once established, we never fall back from one of the port
isolation modes to a non-isolated mode without further user-interaction.
This includes cases where the isolation mode was enabled successfully, but
ceases to work e.g. due to configuration changes at the switch port.
Finally, configuring an isolation mode with the device being offline
will make onlining the device fail permanently upon errors encountered until
either errors are resolved or the isolation mode is changed by the user to a
different mode.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqeth: Remove unused exports
Stefan Raspl [Mon, 21 Jan 2013 02:30:19 +0000 (02:30 +0000)]
qeth: Remove unused exports

Remove exports that are not used anywhere else.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoqeth: Fix retry logic in hardsetup
Stefan Raspl [Mon, 21 Jan 2013 02:30:18 +0000 (02:30 +0000)]
qeth: Fix retry logic in hardsetup

The previous code did never retry any idx setup unless retries were done
for device offline/online at the beginning of the function.

Signed-off-by: Stefan Raspl <raspl@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'ipv6_ndisc'
David S. Miller [Mon, 21 Jan 2013 18:50:10 +0000 (13:50 -0500)]
Merge branch 'ipv6_ndisc'

YOSHIFUJI Hideaki says:

====================
This series of changes basically clean up NDISC logic,
especially on sender side.

We originally do For NS/NA/RS:
 1) build temporary ICMPv6 header
 2) ndisc_build_skb() with temporary ICMPv6 header and rather
    criptic arguments.
    - Calculate total length and allocate sk_buff
    - Build IPv6 header.
    - copy ICMPv6 header, additional data and ND options.
    - Fill-in ICMPv6 checksum.
    Here, structures defined for message format was not used
    at all, it is difficult to understand what is being sent,
    and it was not generic.
 3) __ndisc_send()
    - Allocate temporary dst.
    - Send it.

Several issues:
- We could not defer decision if we should/can send some ND
  option.
- It is hard to see the packet format at a glance.
- ICMPv6 header was built as temporary variable, and then
  copied to the buffer.
- Some code path for Redirect was not shared.

With these patches, we do:
 1) Calculate (or estimate) message length and option length.
 2) Allocate skb (via new ndisc_skb_alloc()).
 3) Fill-in ICMPv6 message directly using compound literals.
 4) Fill-in ICMPv6 checksum
 5) Build IPv6 header (including length)
 6) Send the packet (via ndisc_send_skb()).
    - allocate temporary dst and send it.

- We can defer calculating real length of the packet.
  For example, we can give up filling some option at when
  filling in.
- Message is built directly without temporary buffer.
- Structures defined for message format is easier to understand
  what is being built.
- NS/NA/RS/Redirect share same logic.
- Reduced code/data size:
   text    data     bss     dec     hex filename
 265407   14133    3488  283028   45194 old/net/ipv6/ipv6.o
 264955   14109    3488  282552   44fb8 new/net/ipv6/ipv6.o
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Use compound literals to build redirect message.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:25 +0000 (06:49 +0000)]
ndisc: Use compound literals to build redirect message.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Break down ndisc_build_skb() and build message directly.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:17 +0000 (06:49 +0000)]
ndisc: Break down ndisc_build_skb() and build message directly.

Construct NS/NA/RS message directly using C99 compound literals.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Break down __ndisc_send().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:13 +0000 (06:49 +0000)]
ndisc: Break down __ndisc_send().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Fill in ICMPv6 checksum and IPv6 header in ndisc_send_skb().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:08 +0000 (06:49 +0000)]
ndisc: Fill in ICMPv6 checksum and IPv6 header in ndisc_send_skb().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Use ndisc_send_skb() for redirect.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:49:03 +0000 (06:49 +0000)]
ndisc: Use ndisc_send_skb() for redirect.

Reuse dst if one is attached with skb.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Remove icmp6h argument from ndisc_send_skb().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:58 +0000 (06:48 +0000)]
ndisc: Remove icmp6h argument from ndisc_send_skb().

skb_transport_header() (thus icmp6_hdr()) is available here,
use it.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Make ndisc_fill_xxx_option() for sk_buff.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:53 +0000 (06:48 +0000)]
ndisc: Make ndisc_fill_xxx_option() for sk_buff.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Calculate message body length and option length separately.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:49 +0000 (06:48 +0000)]
ndisc: Calculate message body length and option length separately.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Reset skb->trasport_headner inside ndisc_alloc_send_skb().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:44 +0000 (06:48 +0000)]
ndisc: Reset skb->trasport_headner inside ndisc_alloc_send_skb().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Defer building IPv6 header.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:39 +0000 (06:48 +0000)]
ndisc: Defer building IPv6 header.

Build ICMPv6 message first and make buffer management easier;
we can use skb->len when filling checksum in ICMPv6 header,
and then build IP header with length field.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Remove dev argument for ndisc_send_skb().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:34 +0000 (06:48 +0000)]
ndisc: Remove dev argument for ndisc_send_skb().

Since we have skb->dev, use it.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Set skb->dev and skb->protocol inside ndisc_alloc_skb().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:29 +0000 (06:48 +0000)]
ndisc: Set skb->dev and skb->protocol inside ndisc_alloc_skb().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Simplify arguments for ip6_nd_hdr().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:24 +0000 (06:48 +0000)]
ndisc: Simplify arguments for ip6_nd_hdr().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Unshare ip6_nd_hdr() and change return type to void.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:19 +0000 (06:48 +0000)]
ipv6: Unshare ip6_nd_hdr() and change return type to void.

- move ip6_nd_hdr() to its users' source files.
  In net/ipv6/mcast.c, it will be called ip6_mc_hdr().
- make return type to void since this function never fails.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Introduce ndisc_alloc_skb() helper.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:14 +0000 (06:48 +0000)]
ndisc: Introduce ndisc_alloc_skb() helper.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Introduce ndisc_fill_redirect_hdr_option().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:09 +0000 (06:48 +0000)]
ndisc: Introduce ndisc_fill_redirect_hdr_option().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Use skb_linearize() instead of pskb_may_pull(skb, skb->len).
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:48:03 +0000 (06:48 +0000)]
ndisc: Use skb_linearize() instead of pskb_may_pull(skb, skb->len).

Suggested by Eric Dumazet <edumazet@google.com>.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Move ndisc_opt_addr_space() to include/net/ndisc.h.
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:47:56 +0000 (06:47 +0000)]
ndisc: Move ndisc_opt_addr_space() to include/net/ndisc.h.

This also makes ndisc_opt_addr_data() and ndisc_fill_addr_option()
use ndisc_opt_addr_space().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Reduce number of arguments for ndisc_fill_addr_option().
YOSHIFUJI Hideaki / 吉藤英明 [Mon, 21 Jan 2013 06:47:50 +0000 (06:47 +0000)]
ndisc: Reduce number of arguments for ndisc_fill_addr_option().

Add pointer to struct net_device (dev) and remove
data_len (= dev->addr_len) and addr_type (= dev->type).

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: ethernet: davinci: Fix build breakage
Thierry Reding [Mon, 21 Jan 2013 09:38:39 +0000 (10:38 +0100)]
net: ethernet: davinci: Fix build breakage

The correct name of the transmit DMA channel field in struct emac_priv
is txchan, not txch.

Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofirewire net: Use LL_RESERVED_SPACE(), HH_DATA_OFF().
YOSHIFUJI Hideaki / 吉藤英明 [Sat, 19 Jan 2013 22:03:07 +0000 (22:03 +0000)]
firewire net: Use LL_RESERVED_SPACE(), HH_DATA_OFF().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agofirewire net: Ensure checksumming in upper layer.
YOSHIFUJI Hideaki / 吉藤英明 [Sat, 19 Jan 2013 21:43:40 +0000 (21:43 +0000)]
firewire net: Ensure checksumming in upper layer.

It is wrong to set skb->ip_summed to CHECKSUM_UNNECESSARY unless
the device has already checked it.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agousbnet: pegasus: set wakeup enable in set_wol
Ming Lei [Sat, 19 Jan 2013 01:32:01 +0000 (01:32 +0000)]
usbnet: pegasus: set wakeup enable in set_wol

This patch calls device_set_wakeup_enable() inside set_wol
callback, so that turning on WOL from user mode utility
can make the 'wakeup' of pegasus device to be enabled, then
remote wakeup may be enabled before putting into sleep.

Cc: Sarah Sharp <sarah.a.sharp@linux.intel.com>
Cc: Petko Manolov <petkan@users.sourceforge.net>
Signed-off-by: Ming Lei <ming.lei@canonical.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet/mlx4_en: remove redundant code
Eric Dumazet [Thu, 17 Jan 2013 05:26:07 +0000 (05:26 +0000)]
net/mlx4_en: remove redundant code

remove redundant code from build_inline_wqe()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Acked-By: Amir Vadai <amirv@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agondisc: Make several arguments for ndisc_send_na() boolean.
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 20 Jan 2013 07:39:18 +0000 (07:39 +0000)]
ndisc: Make several arguments for ndisc_send_na() boolean.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Optimize ipv6_addr_is_ll_all_{nodes,routers}().
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 20 Jan 2013 07:38:52 +0000 (07:38 +0000)]
ipv6: Optimize ipv6_addr_is_ll_all_{nodes,routers}().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Optimize ipv6_addr_is_solict_mult().
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 20 Jan 2013 07:39:07 +0000 (07:39 +0000)]
ipv6: Optimize ipv6_addr_is_solict_mult().

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Introduce ipv6_addr_is_solict_mult() to check Solicited Node Multicast Addresses.
YOSHIFUJI Hideaki / 吉藤英明 [Sun, 20 Jan 2013 07:39:00 +0000 (07:39 +0000)]
ipv6: Introduce ipv6_addr_is_solict_mult() to check Solicited Node Multicast Addresses.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoipv6: Make ipv6_addr_is_XXX() return boolean.
YOSHIFUJI Hideaki [Sun, 20 Jan 2013 17:38:38 +0000 (02:38 +0900)]
ipv6: Make ipv6_addr_is_XXX() return boolean.

ipv6_addr_is_{multicast,ll_all_nodes,ll_all_routers,isatap}()
return boolean.

Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agonet: asix: ax88772_unbind() can be static
Wu Fengguang [Fri, 18 Jan 2013 15:36:56 +0000 (15:36 +0000)]
net: asix: ax88772_unbind() can be static

Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sat, 19 Jan 2013 15:52:45 +0000 (10:52 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

Jeff Kirsher says:

====================
This series contains updates to ixgbe, ixgbevf and igb.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agoMerge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge
David S. Miller [Sat, 19 Jan 2013 15:47:47 +0000 (10:47 -0500)]
Merge tag 'batman-adv-for-davem' of git://git.open-mesh.org/linux-merge

Included changes:
- sysfs removal postponement during interface un-registration
- random32() function renaming
- struct refactoring
- kernel doc improvement
- deleyed_work initialisation clean up work
- copyright year and internal version number update
- kernel doc improvement

Signed-off-by: David S. Miller <davem@davemloft.net>
11 years agobatman-adv: Start new development cycle
Antonio Quartulli [Thu, 3 Jan 2013 11:22:10 +0000 (12:22 +0100)]
batman-adv: Start new development cycle

Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: update copyright years
Antonio Quartulli [Fri, 4 Jan 2013 02:05:31 +0000 (03:05 +0100)]
batman-adv: update copyright years

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
11 years agobatman-adv: postpone sysfs removal when unregistering
Simon Wunderlich [Fri, 11 Jan 2013 09:19:51 +0000 (10:19 +0100)]
batman-adv: postpone sysfs removal when unregistering

When processing the unregister notify for a hard interface, removing
the sysfs files may lead to a circular deadlock (rtnl mutex <->
s_active).

To overcome this problem, postpone the sysfs removal in a worker.

Reported-by: Sasha Levin <sasha.levin@oracle.com>
Reported-by: Sven Eckelmann <sven@narfation.org>
Signed-off-by: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: rename random32() to prandom_u32()
Akinobu Mita [Mon, 24 Dec 2012 02:14:07 +0000 (11:14 +0900)]
batman-adv: rename random32() to prandom_u32()

Use more preferable function name which implies using a pseudo-random
number generator.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Acked-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Cc: Simon Wunderlich <siwu@hrz.tu-chemnitz.de>
Cc: Antonio Quartulli <ordex@autistici.org>
Cc: b.a.t.m.a.n@lists.open-mesh.org
Cc: "David S. Miller" <davem@davemloft.net>
Cc: netdev@vger.kernel.org
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: kernel doc for types.h
Marek Lindner [Tue, 25 Dec 2012 13:45:12 +0000 (21:45 +0800)]
batman-adv: kernel doc for types.h

Thanks to Sven Eckelmann and Simon Wunderlich for their support.

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: rename batadv_claim struct to make clear it is used by bla
Marek Lindner [Tue, 25 Dec 2012 09:03:25 +0000 (17:03 +0800)]
batman-adv: rename batadv_claim struct to make clear it is used by bla

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: rename batadv_backbone_gw struct to make clear it is used by bla
Marek Lindner [Tue, 25 Dec 2012 09:03:24 +0000 (17:03 +0800)]
batman-adv: rename batadv_backbone_gw struct to make clear it is used by bla

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: rename batadv_recvlist_node struct to make clear it is used by vis
Marek Lindner [Tue, 25 Dec 2012 09:03:23 +0000 (17:03 +0800)]
batman-adv: rename batadv_recvlist_node struct to make clear it is used by vis

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: rename batadv_if_list_entry struct to make clear it is used by vis
Marek Lindner [Tue, 25 Dec 2012 09:03:22 +0000 (17:03 +0800)]
batman-adv: rename batadv_if_list_entry struct to make clear it is used by vis

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: group tt type definitions together
Marek Lindner [Tue, 25 Dec 2012 09:03:21 +0000 (17:03 +0800)]
batman-adv: group tt type definitions together

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: mark debug_log struct as bat_priv only struct
Marek Lindner [Tue, 25 Dec 2012 09:03:20 +0000 (17:03 +0800)]
batman-adv: mark debug_log struct as bat_priv only struct

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: align kernel doc properly
Marek Lindner [Tue, 25 Dec 2012 09:03:19 +0000 (17:03 +0800)]
batman-adv: align kernel doc properly

Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
Signed-off-by: Antonio Quartulli <ordex@autistici.org>
11 years agobatman-adv: a delayed_work has to be initialised once
Antonio Quartulli [Tue, 25 Dec 2012 12:14:37 +0000 (13:14 +0100)]
batman-adv: a delayed_work has to be initialised once

A delayed_work struct does not need to be initialized each
every time before being enqueued. Therefore the
INIT_DELAYED_WORK() macro should be used during the
initialization process only.

Signed-off-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Marek Lindner <lindner_marek@yahoo.de>
11 years agoigb: Copyright string update to year 2013
Akeem G. Abodunrin [Tue, 8 Jan 2013 18:31:12 +0000 (18:31 +0000)]
igb: Copyright string update to year 2013

This patch updates Copyright year to 2013

v2: Changed Copyright year on Makefile

Signed-off-by: Akeem G. Abodunrin <akeem.g.abodunrin@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoigb: Replace rmb in Tx cleanup with read_barrier_depends
Alexander Duyck [Tue, 8 Jan 2013 07:01:03 +0000 (07:01 +0000)]
igb: Replace rmb in Tx cleanup with read_barrier_depends

The rmb in the Tx cleanup path is a much stronger barrier than we really need.
All that is really needed is a read_barrier_depends since the location of the
EOP descriptor is dependent on the eop_desc value.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Fix statistics corruption
Greg Rose [Fri, 4 Jan 2013 07:37:31 +0000 (07:37 +0000)]
ixgbevf: Fix statistics corruption

When the physical function (PF) is reset for any reason the statistics
collection in ixgbevf_update_stats needs to wait to update until after
the reset synchronization ensures that the PF driver is up and running
and is finished with its own reset.  Go ahead and clear the link flag to
indicate this when the control message from the PF is received.  The
reset synchronization and recovery in the watchdog task will eventually
set the link flag up when the PF has resumed.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
11 years agoixgbevf: Fix link up messages
Greg Rose [Fri, 4 Jan 2013 07:37:26 +0000 (07:37 +0000)]
ixgbevf: Fix link up messages

Use dev_info to log link up/down messages.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Sibai Li <sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>