linux-flexiantxendom0-3.2.10.git
12 years agonetlink: add netlink_dump_control structure for netlink_dump_start()
Pablo Neira Ayuso [Fri, 24 Feb 2012 14:30:15 +0000 (14:30 +0000)]
netlink: add netlink_dump_control structure for netlink_dump_start()

Davem considers that the argument list of this interface is getting
out of control. This patch tries to address this issue following
his proposal:

struct netlink_dump_control c = { .dump = dump, .done = done, ... };

netlink_dump_start(..., &c);

Suggested by David S. Miller.

Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net...
David S. Miller [Sun, 26 Feb 2012 01:28:05 +0000 (20:28 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/jkirsher/net-next

12 years agoxfrm: remove unneeded method typedef declaration in net/xfrm.h.
Rami Rosen [Sat, 25 Feb 2012 02:09:46 +0000 (02:09 +0000)]
xfrm: remove unneeded method typedef declaration in net/xfrm.h.

The patch removes unneeded method typedef declaration (icv_update_fn_t
) and the two struct declarations which appear in its prototype
(struct hash_desc and struct scatterlist) in net/xfrm.h.

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoe1000e: rename e1000e_reload_nvm() and call as function pointer
Bruce Allan [Wed, 22 Feb 2012 09:03:14 +0000 (09:03 +0000)]
e1000e: rename e1000e_reload_nvm() and call as function pointer

Rename e1000e_reload_nvm() to e1000e_reload_nvm_generic() to signify the
function is used for more than one MAC-family type, and set and use it as a
MAC ops function pointer to be consistent with the driver design.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cleanup - remove unnecessary variable
Bruce Allan [Wed, 22 Feb 2012 09:03:09 +0000 (09:03 +0000)]
e1000e: cleanup - remove unnecessary variable

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: use true/false for boolean send_xon, do not assume always true
Bruce Allan [Wed, 22 Feb 2012 09:03:03 +0000 (09:03 +0000)]
e1000e: use true/false for boolean send_xon, do not assume always true

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cleanup comment in e1000_hash_mc_addr()
Bruce Allan [Wed, 22 Feb 2012 09:02:53 +0000 (09:02 +0000)]
e1000e: cleanup comment in e1000_hash_mc_addr()

Remove reference to non-existant function.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: rename e1000e_config_collision_dist() and call as function pointer
Bruce Allan [Wed, 22 Feb 2012 09:02:58 +0000 (09:02 +0000)]
e1000e: rename e1000e_config_collision_dist() and call as function pointer

Rename e1000e_config_collision_dist() to
e1000e_config_collision_dist_generic() to signify the function is used for
more than one MAC-family type, and set and use it as a MAC ops function
pointer to be consistent with the driver design.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: comment correction in e1000e_set_kmrn_lock_loss_workaround_ich8lan
Bruce Allan [Wed, 22 Feb 2012 09:02:47 +0000 (09:02 +0000)]
e1000e: comment correction in e1000e_set_kmrn_lock_loss_workaround_ich8lan

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cleanup calls to setup_physical_interface function pointer
Bruce Allan [Wed, 22 Feb 2012 09:02:42 +0000 (09:02 +0000)]
e1000e: cleanup calls to setup_physical_interface function pointer

Call the MAC ops setup_physical_interface function pointer instead of the
MAC-family-specific function to conform to the rest of the driver design.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cleanup use of check_reset_block function pointer
Bruce Allan [Wed, 22 Feb 2012 09:02:37 +0000 (09:02 +0000)]
e1000e: cleanup use of check_reset_block function pointer

Replace e1000_check_reset_block() inline function with calls to the PHY ops
check_reset_block function pointer.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cleanup use of check_mng_mode function pointer
Bruce Allan [Wed, 22 Feb 2012 09:02:32 +0000 (09:02 +0000)]
e1000e: cleanup use of check_mng_mode function pointer

Replace e1000_check_mng_mode() inline function with calls to the MAC ops
check_mng_mode function pointer.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cleanup: rename e1000e_setup_link() and call as function pointer
Bruce Allan [Wed, 22 Feb 2012 09:02:26 +0000 (09:02 +0000)]
e1000e: cleanup: rename e1000e_setup_link() and call as function pointer

Rename e1000e_setup_link() to e1000e_setup_link_generic() to signify the
function is used for more than one MAC-family type.  The 82571-family has
a custom setup_link function which also calls the generic function.  The
ich8lan-family has a custom function which should just be called via the
function pointer.  The 80003es2lan-family just uses the generic function.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cleanup: rename e1000e_id_led_init() and call as function pointer
Bruce Allan [Wed, 22 Feb 2012 09:02:21 +0000 (09:02 +0000)]
e1000e: cleanup: rename e1000e_id_led_init() and call as function pointer

Rename e1000e_id_led_init() to e1000e_id_led_init_generic() to signify the
function is used for more than one MAC-family type.  For the ich8lan MAC
family, some MACs use the generic function and others use the function
e1000_id_led_init_pchlan().  In all cases where e1000e_id_led_init() was
called directly, change to call the function pointer to be consistent with
the driver design.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoStaging: wlags49_h2: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 13:46:02 +0000 (14:46 +0100)]
Staging: wlags49_h2: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>

12 years agoStaging: ft1000-pcmcia: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 13:46:01 +0000 (14:46 +0100)]
Staging: ft1000-pcmcia: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>

12 years agoarch/ia64/hp/sim/simeth.c: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 13:45:52 +0000 (14:45 +0100)]
arch/ia64/hp/sim/simeth.c: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pm
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>

12 years agousb/kaweth: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:46:00 +0000 (03:46 +0000)]
usb/kaweth: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agousb/cdc_ncm: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:45:59 +0000 (03:45 +0000)]
usb/cdc_ncm: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoxscale/ixp2000/ixpdev: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:45:58 +0000 (03:45 +0000)]
xscale/ixp2000/ixpdev: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Lennert Buytenhek <kernel@wantstofly.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agosun/sunqe: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:45:57 +0000 (03:45 +0000)]
sun/sunqe: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoixgbevf: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:45:56 +0000 (03:45 +0000)]
ixgbevf: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agodec/tulip/de4x5: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:45:55 +0000 (03:45 +0000)]
dec/tulip/de4x5: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agocirrus/mac89x0: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:45:54 +0000 (03:45 +0000)]
cirrus/mac89x0: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM instead
of custom code.

Use memcpy to set the address to dev->dev_addr in set_mac_address,
instead of mxing it up in a for loop with printing a debug msg.

Check also if the given address is valid.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoamd/hplance.c: print MAC via printk format specifier
Danny Kukawka [Fri, 24 Feb 2012 03:45:53 +0000 (03:45 +0000)]
amd/hplance.c: print MAC via printk format specifier

Print MAC/dev_addr via printk extended format specifier %pM
instead of custom code.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agonet: Add missing getsockopt for SO_NOFCS.
David S. Miller [Fri, 24 Feb 2012 19:48:34 +0000 (14:48 -0500)]
net: Add missing getsockopt for SO_NOFCS.

Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agov2 e1000: Neaten e1000_dump function
Tushar Dave [Fri, 10 Feb 2012 08:06:36 +0000 (08:06 +0000)]
v2 e1000: Neaten e1000_dump function

Use pr_<level> for printk
Use temporary instead of multiple pr_conts
Coalesce formats.

Save a few bytes of object code too:

$ size drivers/net/ethernet/intel/e1000/e1000_main.o*
   text    data     bss     dec     hex filename
  60507     369   14120   74996   124f4
drivers/net/ethernet/intel/e1000/e1000_main.o.new
  60717     369   14176   75262   125fe
drivers/net/ethernet/intel/e1000/e1000_main.o.old

Removed printing of pktdata.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000: Neaten e1000_config_dsp_after_link_change
Joe Perches [Fri, 10 Feb 2012 12:07:36 +0000 (12:07 +0000)]
e1000: Neaten e1000_config_dsp_after_link_change

Separate a complicated bit of e1000_config_dsp_after_link_change
into a new static function e1000_1000Mb_check_cable_length.

Reduces indentation and adds a bit of clarity.

Signed-off-by: Joe Perches <joe@perches.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cosmetic comment changes to make lines less than 80 characters
Bruce Allan [Fri, 17 Feb 2012 09:35:33 +0000 (09:35 +0000)]
e1000e: cosmetic comment changes to make lines less than 80 characters

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: cosmetic change to boolean comparisons
Bruce Allan [Fri, 17 Feb 2012 03:17:55 +0000 (03:17 +0000)]
e1000e: cosmetic change to boolean comparisons

Recent discussions on LKML, kernel-janitors, linux-wireless and netdev
have suggested boolean comparisons should use logical operators instead of
equality comparisons with true/false.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agor8169: Support RX-FCS flag.
Ben Greear [Fri, 10 Feb 2012 15:04:34 +0000 (15:04 +0000)]
r8169: Support RX-FCS flag.

This allows the NIC to receive the Ethernet FCS
and pass it up the stack, allowing sniffers and
other interested programs to inspect the FCS.

Signed-off-by: Ben Greear <greearb@candelatech.com>

12 years agor8169: Support RX-ALL flag.
Ben Greear [Fri, 10 Feb 2012 15:04:33 +0000 (15:04 +0000)]
r8169: Support RX-ALL flag.

This allows the NIC to receive packets with bad FCS and
Runts, which can help when sniffing.

NOTE:  r8169, at least on my NIC, silently drops packets
with bad FCS instead of counting them.  It seems they are
only received in any fashion if the RxCRC flag is set
(which this patch allows).

Signed-off-by: Ben Greear <greearb@candelatech.com>

12 years ago8139too: Support RX-FCS flag.
Ben Greear [Fri, 10 Feb 2012 15:04:32 +0000 (15:04 +0000)]
8139too: Support RX-FCS flag.

This allows the NIC to pass the Ethernet FCS on up
the stack, and is useful when sniffing networks.

Signed-off-by: Ben Greear <greearb@candelatech.com>

12 years ago8139too: Support RX-ALL logic.
Ben Greear [Fri, 10 Feb 2012 15:04:31 +0000 (15:04 +0000)]
8139too: Support RX-ALL logic.

This allows the NIC to receive Runts and frames with bad
Ethernet Frame Checksums (FCS).

Useful to sniffing & diagnosing bad networks.

Signed-off-by: Ben Greear <greearb@candelatech.com>

12 years agoe1000: Support RX-FCS flag.
Ben Greear [Sat, 11 Feb 2012 15:40:11 +0000 (15:40 +0000)]
e1000: Support RX-FCS flag.

This allows the NIC to pass the Ethernet Frame Checksum
(FCS) up the stack.  Useful when sniffing packets.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000: Support sending custom Ethernet CRC.
Ben Greear [Sat, 11 Feb 2012 15:40:01 +0000 (15:40 +0000)]
e1000: Support sending custom Ethernet CRC.

Good for testing the RX logic for bad CRC handling.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: Support RXALL feature flag.
Ben Greear [Sat, 11 Feb 2012 15:39:51 +0000 (15:39 +0000)]
e1000e: Support RXALL feature flag.

This allows the NIC to receive all frames available, including
those with bad FCS, un-matched vlans, ethernet control frames,
and more.

Tested by sending frames with bad FCS.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agonet: Support RX-ALL feature flag.
Ben Greear [Sat, 11 Feb 2012 15:39:45 +0000 (15:39 +0000)]
net: Support RX-ALL feature flag.

This flag requests that network devices pass all
received frames up the stack, even ones with errors
such as invalid FCS (frame check sum).  This will
allow sniffers to see bad packets and perhaps
give the user some idea how to fix the problem.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: Support sending custom Ethernet CRC.
Ben Greear [Sat, 11 Feb 2012 15:39:40 +0000 (15:39 +0000)]
e1000e: Support sending custom Ethernet CRC.

This can aid with testing the RX logic for bad
CRCs.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agonet: Add framework to allow sending packets with customized CRC.
Ben Greear [Sat, 11 Feb 2012 15:39:30 +0000 (15:39 +0000)]
net: Add framework to allow sending packets with customized CRC.

This is useful for testing RX handling of frames with bad
CRCs.

Requires driver support to actually put the packet on the
wire properly.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agoe1000e: Support RXFCS feature flag.
Ben Greear [Sat, 11 Feb 2012 15:39:25 +0000 (15:39 +0000)]
e1000e: Support RXFCS feature flag.

This enables enabling/disabling reception of the Ethernet
FCS.  This can be useful when sniffing packets.

For e1000e, enabling RXFCS can change the default
behaviour for how the NIC handles CRC.  Disabling RXFCS
will take the NIC back to defaults, which can be configured
as part of the module options.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agonet: Support RXFCS feature flag.
Ben Greear [Sat, 11 Feb 2012 15:39:14 +0000 (15:39 +0000)]
net: Support RXFCS feature flag.

When set on hardware that supports the feature,
this causes the Ethernet FCS to be appended
to the end of the skb.

Useful for sniffing packets.

Signed-off-by: Ben Greear <greearb@candelatech.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>

12 years agodavinci_mdio: Correct bitmask for clock divider value
Christian Riesch [Wed, 22 Feb 2012 22:07:58 +0000 (22:07 +0000)]
davinci_mdio: Correct bitmask for clock divider value

The CLKDIV bitfield in the MDIO Control Register is a 16 bit field,
therefore the CLKDIV value may range from 0 to 0xffff.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agodavinci_cpdma: Fix channel number written to teardown registers
Christian Riesch [Wed, 22 Feb 2012 21:58:00 +0000 (21:58 +0000)]
davinci_cpdma: Fix channel number written to teardown registers

chan->chan_num is 0..CPDMA_MAX_CHANNELS-1 for tx channels and
CPDMA_MAX_CHANNELS..2*CPDMA_MAX_CHANNELS-1 for rx channels. However,
the rx and tx teardown registers expect zero based channel numbering.

Since the upper bits of the registers are reserved, the teardown also
worked before, this patch is cleanup only.

Signed-off-by: Christian Riesch <christian.riesch@omicron.at>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobe2net: update driver version
Sathya Perla [Thu, 23 Feb 2012 18:50:17 +0000 (18:50 +0000)]
be2net: update driver version

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobe2net: enable RSS for ipv6 pkts
Sathya Perla [Thu, 23 Feb 2012 18:50:16 +0000 (18:50 +0000)]
be2net: enable RSS for ipv6 pkts

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobe2net: reset queue address after freeing
Sathya Perla [Thu, 23 Feb 2012 18:50:15 +0000 (18:50 +0000)]
be2net: reset queue address after freeing

This will prevent double free in some cases where be_clear() is called
for cleanup when be_setup() fails half-way.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobe2net: fix tx completion cleanup
Sathya Perla [Thu, 23 Feb 2012 18:50:14 +0000 (18:50 +0000)]
be2net: fix tx completion cleanup

As a part of be_close(), instead of waiting for a max of 200ms for each TXQ,
wait for a total of 200ms for completions from all TXQs to arrive.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobe2net: cancel be_worker during EEH recovery
Sathya Perla [Thu, 23 Feb 2012 18:50:13 +0000 (18:50 +0000)]
be2net: cancel be_worker during EEH recovery

EEH recovery involves ring cleanup and re-creation. The worker
thread must not run during EEH cleanup/resume.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoStaging: et131x: unify return value of .ndo_set_mac_address if address is invalid
Danny Kukawka [Thu, 23 Feb 2012 22:11:39 +0000 (17:11 -0500)]
Staging: et131x: unify return value of .ndo_set_mac_address if address is invalid

Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobr_device: unify return value of .ndo_set_mac_address if address is invalid
Danny Kukawka [Tue, 21 Feb 2012 02:07:52 +0000 (02:07 +0000)]
br_device: unify return value of .ndo_set_mac_address if address is invalid

Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agomcs7830: unify return value of .ndo_set_mac_address if address is invalid
Danny Kukawka [Tue, 21 Feb 2012 02:07:50 +0000 (02:07 +0000)]
mcs7830: unify return value of .ndo_set_mac_address if address is invalid

Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoethernet: unify return value of .ndo_set_mac_address if address is invalid
Danny Kukawka [Tue, 21 Feb 2012 02:07:49 +0000 (02:07 +0000)]
ethernet: unify return value of .ndo_set_mac_address if address is invalid

Unify return value of .ndo_set_mac_address if the given address
isn't valid. Return -EADDRNOTAVAIL as eth_mac_addr() already does
if is_valid_ether_addr() fails.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Thu, 23 Feb 2012 19:30:46 +0000 (14:30 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/bwh/sfc-next

12 years agotg3: Create timer helper functions
Matt Carlson [Wed, 22 Feb 2012 12:35:21 +0000 (12:35 +0000)]
tg3: Create timer helper functions

This patch seeks to clean up the timer related code.  It begins by
moving one-time timer setup code from tg3_open() to tg3_init_one().
It then creates a function that encapsulates the code needed to start
the timer.  A tg3_timer_stop() function was added for parity.  Finally,
this patch moves all the timer functions to a more suitable location.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agotg3: Clear RECOVERY_PENDING with reset_task_cancel
Matt Carlson [Wed, 22 Feb 2012 12:35:20 +0000 (12:35 +0000)]
tg3: Clear RECOVERY_PENDING with reset_task_cancel

If an error happens in the tx completion thread, tg3_reset_task will be
scheduled and TX_RECOVERY_PENDING will be set.  The TX_RECOVERY_PENDING
flag causes tg3_poll[_msix] to return early before doing much of its
work.  Tg3_reset_task() gets canceled when the configuration of the
device is changing, which always results in a chip reset.  When this
happens, the TX_RECOVERY_PENDING flag may be left set, which would
unnecessarily hinder tg3_poll from doing work.  This patch fixes the
problem.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agotg3: Remove SPEED_UNKNOWN checks
Matt Carlson [Wed, 22 Feb 2012 12:35:19 +0000 (12:35 +0000)]
tg3: Remove SPEED_UNKNOWN checks

tg3_phy_copper_begin() has code that configures the link
advertisements through the use of the link_config.speed and
link_config.duplex members.  The driver does not internally use these
members in this way, nor is it (currently) permitted via the ethtool
interface.  This patch removes the dead code.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agotg3: Fix link check in tg3_adjust_link
Matt Carlson [Wed, 22 Feb 2012 12:35:18 +0000 (12:35 +0000)]
tg3: Fix link check in tg3_adjust_link

The tg3 driver tried to detect link changes by comparing the tg3 local
active_speed member with SPEED_UNKNOWN (or formerly SPEED_INVALID).
This check is not correct, since phylib will never set its speed member
to either of these two values.  The code only appeared to work because
tg3 initializes active_speed to SPEED_INVALID during tg3_init_one.  This
patch introduces a new "old_link" tg3 member and then compares the
phy_device's link member against it to detect link state changes.

Signed-off-by: Matt Carlson <mcarlson@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agosfc: Correct efx_for_each_possible_channel_tx_queue() to skip non-TX channels
Ben Hutchings [Thu, 23 Feb 2012 00:45:50 +0000 (00:45 +0000)]
sfc: Correct efx_for_each_possible_channel_tx_queue() to skip non-TX channels

efx_for_each_possible_channel_tx_queue() should do nothing for RX-only
or extra channels.  The current definition results in allocating
additional unused hardware TX queues when using the mqprio qdisc and
either separate_tx_channels or SR-IOV.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

12 years agosfc: Minor formatting cleanup
Ben Hutchings [Fri, 17 Feb 2012 00:10:45 +0000 (00:10 +0000)]
sfc: Minor formatting cleanup

Fix some indentation and line continuations.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

12 years agosfc: Reverse initial buffer table allocation to allow for later resizing
Ben Hutchings [Tue, 21 Feb 2012 23:22:00 +0000 (23:22 +0000)]
sfc: Reverse initial buffer table allocation to allow for later resizing

We have a very simple way of allocating buffer table entries to
queues, which is just to take the next one available.  The extra
channels are the highest numbered channels but they need to be
allocated the lowest entries so that the traffic channels can be
allocated new entries without any collisions.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

12 years agosfc: Correct validation of peer_page_count in efx_vfdi_set_status_page()
Ben Hutchings [Tue, 21 Feb 2012 02:57:33 +0000 (02:57 +0000)]
sfc: Correct validation of peer_page_count in efx_vfdi_set_status_page()

efx_vfdi_set_status_page() validates the peer page count by
calculating the size of a request containing that many addresses and
comparing that with the maximum valid request size (4KB).  The
calculation involves a multiplication that may overflow on a 32-bit
system.

We use kcalloc() to allocate memory to store the addresses; that also
does a multiplication and it does check for integer overflow, so any
values larger than 0x1fffffff will be rejected.  However, values in
the range [0x1fffffffc, 0x1fffffff] pass boh tests and result in an
attempt to allocate nearly 4GB on the heap.  This should be rejected
rather quickly as it's obviously impossible on a 32-bit system, and
indeed the maximum possible heap allocation is 32MB.  Still, let's
make absolutely sure by fixing the initial validation.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

12 years agosfc: Specify that the VFDI status page has page alignment and size
Ben Hutchings [Mon, 20 Feb 2012 23:22:02 +0000 (23:22 +0000)]
sfc: Specify that the VFDI status page has page alignment and size

This requirement was meant to be implied in the name 'status page'.
One out-of-tree VF driver allocates a buffer using the structure size
and not a full page - hence the current odd specification - but in
practice that allocation will be padded and aligned to at least 4KB.
Therefore, we can specify this and have the option to extend the
structure up to 4KB without worrying about VF drivers using odd-shaped
buffers.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>

12 years agoaf_unix: MSG_TRUNC support for dgram sockets
Eric Dumazet [Tue, 21 Feb 2012 23:24:55 +0000 (23:24 +0000)]
af_unix: MSG_TRUNC support for dgram sockets

Piergiorgio Beruto expressed the need to fetch size of first datagram in
queue for AF_UNIX sockets and suggested a patch against SIOCINQ ioctl.

I suggested instead to implement MSG_TRUNC support as a recv() input
flag, as already done for RAW, UDP & NETLINK sockets.

len = recv(fd, &byte, 1, MSG_PEEK | MSG_TRUNC);

MSG_TRUNC asks recv() to return the real length of the packet, even when
is was longer than the passed buffer.

There is risk that a userland application used MSG_TRUNC by accident
(since it had no effect on af_unix sockets) and this might break after
this patch.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Tested-by: Piergiorgio Beruto <piergiorgio.beruto@gmail.com>
CC: Michael Kerrisk <mtk.manpages@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agonet/ieee802154/6lowpan.c: reuse eth_mac_addr()
Danny Kukawka [Wed, 22 Feb 2012 02:36:39 +0000 (02:36 +0000)]
net/ieee802154/6lowpan.c: reuse eth_mac_addr()

Use eth_mac_addr() for .ndo_set_mac_address, remove
lowpan_set_address since it do currently the same as
eth_mac_addr(). Additional advantage: eth_mac_addr() already
checks if the given address is valid

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Dmitry Eremin-Solenikov <dbaryshkov@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years ago3com/typhoon: reuse eth_mac_addr()
Danny Kukawka [Wed, 22 Feb 2012 02:36:38 +0000 (02:36 +0000)]
3com/typhoon: reuse eth_mac_addr()

Use eth_mac_addr() for .ndo_set_mac_address, remove
typhoon_set_mac_address() since it do currently the same as
eth_mac_addr(). Additional advantage: eth_mac_addr() already
checks if the given address is valid.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Dave Dillow <dave@thedillows.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agotg3: remove IRQF_SAMPLE_RANDOM flag
Davidlohr Bueso [Wed, 22 Feb 2012 03:06:54 +0000 (03:06 +0000)]
tg3: remove IRQF_SAMPLE_RANDOM flag

This driver is the last user of the IRQF_SAMPLE_RANDOM flag for net drivers, and since add_*_randomness
interfaces have now deprecated the flag as a source of external noise, we can remove it.

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Tue, 21 Feb 2012 22:47:33 +0000 (17:47 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next

12 years agoMerge branch '20120221_isdn' of git://repo.or.cz/linux-2.6/trivial-mods
David S. Miller [Tue, 21 Feb 2012 20:25:15 +0000 (15:25 -0500)]
Merge branch '20120221_isdn' of git://repo.or.cz/linux-2.6/trivial-mods

12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Tue, 21 Feb 2012 20:06:35 +0000 (15:06 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless-next into for-davem

12 years agounix: Support peeking offset for stream sockets
Pavel Emelyanov [Tue, 21 Feb 2012 07:32:06 +0000 (07:32 +0000)]
unix: Support peeking offset for stream sockets

The same here -- we can protect the sk_peek_off manipulations with
the unix_sk->readlock mutex.

The peeking of data from a stream socket is done in the datagram style,
i.e. even if there's enough room for more data in the user buffer, only
the head skb's data is copied in there. This feature is preserved when
peeking data from a given offset -- the data is read till the nearest
skb's boundary.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agounix: Support peeking offset for datagram and seqpacket sockets
Pavel Emelyanov [Tue, 21 Feb 2012 07:31:51 +0000 (07:31 +0000)]
unix: Support peeking offset for datagram and seqpacket sockets

The sk_peek_off manipulations are protected with the unix_sk->readlock mutex.
This mutex is enough since all we need is to syncronize setting the offset
vs reading the queue head. The latter is fully covered with the mentioned lock.

The recently added __skb_recv_datagram's offset is used to pick the skb to
read the data from.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agosock: Introduce the SO_PEEK_OFF sock option
Pavel Emelyanov [Tue, 21 Feb 2012 07:31:34 +0000 (07:31 +0000)]
sock: Introduce the SO_PEEK_OFF sock option

This one specifies where to start MSG_PEEK-ing queue data from. When
set to negative value means that MSG_PEEK works as ususally -- peeks
from the head of the queue always.

When some bytes are peeked from queue and the peeking offset is non
negative it is moved forward so that the next peek will return next
portion of data.

When non-peeking recvmsg occurs and the peeking offset is non negative
is is moved backward so that the next peek will still peek the proper
data (i.e. the one that would have been picked if there were no non
peeking recv in between).

The offset is set using per-proto opteration to let the protocol handle
the locking issues and to check whether the peeking offset feature is
supported by the protocol the socket belongs to.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoskb: Add skb_peek_next helper
Pavel Emelyanov [Tue, 21 Feb 2012 07:31:18 +0000 (07:31 +0000)]
skb: Add skb_peek_next helper

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agodatagram: Add offset argument to __skb_recv_datagram
Pavel Emelyanov [Tue, 21 Feb 2012 07:30:58 +0000 (07:30 +0000)]
datagram: Add offset argument to __skb_recv_datagram

This one is only considered for MSG_PEEK flag and the value pointed by
it specifies where to start peeking bytes from. If the offset happens to
point into the middle of the returned skb, the offset within this skb is
put back to this very argument.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agodatagram: Factor out sk queue referencing
Pavel Emelyanov [Tue, 21 Feb 2012 07:30:33 +0000 (07:30 +0000)]
datagram: Factor out sk queue referencing

This makes lines shorter and simplifies further patching.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoisdn: whitespace coding style cleanup
Joe Perches [Mon, 20 Feb 2012 03:52:38 +0000 (19:52 -0800)]
isdn: whitespace coding style cleanup

isdn source code uses a not-current coding style.

Update the coding style used on a per-line basis
so that git diff -w shows only elided blank lines
at EOF.

Done with emacs and some scripts and some typing.

Built x86 allyesconfig.
No detected change in objdump -d or size.

Signed-off-by: Joe Perches <joe@perches.com>

12 years agobnx2x: update driver version to 1.72.10-0
Dmitry Kravkov [Mon, 20 Feb 2012 09:59:12 +0000 (09:59 +0000)]
bnx2x: update driver version to 1.72.10-0

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobnx2x: add gro_check
Dmitry Kravkov [Mon, 20 Feb 2012 09:59:11 +0000 (09:59 +0000)]
bnx2x: add gro_check

The patch provides workaround for BUG in FW 7.2.16,
which in GRO mode may miscalculate buffer and
place on SGE one frag less than it could.
It may happen only for some MTUs, we mark these MTUs
with gro_check flag during device initialization or
MTU change.

Next FW should include fix for the issue and the
patch could be reverted.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agocnic: update for FW 7.2.xx
Michael Chan [Mon, 20 Feb 2012 09:59:10 +0000 (09:59 +0000)]
cnic: update for FW 7.2.xx

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobnx2fc: HSI dependent changes for 7.2.xx FW
Bhanu Prakash Gollapudi [Mon, 20 Feb 2012 09:59:09 +0000 (09:59 +0000)]
bnx2fc: HSI dependent changes for 7.2.xx FW

with Tx only section for single cached SGEs.

Signed-off-by: Bhanu Prakash Gollapudi <bprakash@broadcom.com>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agouse FW 7.2.16
Dmitry Kravkov [Mon, 20 Feb 2012 09:59:08 +0000 (09:59 +0000)]
use FW 7.2.16

The patch integrates FW 7.2.16 HSI and implements driver
part of GRO flow.

FW 7.2.16 adds the ability to aggregate packets for GRO
(and not just LRO) and also fixes some bugs.

1. Added new aggregation mode: GRO. In this mode packets are aggregated
   such that the original packets can be reconstructed by the OS.
2. 57712 HW bug workaround - initialized all CAM TM registers to 0x32.
3. Adding the FCoE statistics structures to the BNX2X HSI.
4. Wrong configuration of TX HW input buffer size may cause theoretical
   performance effect. Performed configuration fix.
5. FCOE - Arrival of packets beyond task IO size can lead to crash.
   Fix firmware data-in flow.
6. iSCSI - In rare cases of on-chip termination the graceful termination
   timer hangs, and the termination doesn't complete. Firmware fix to MSL
   timer tolerance.
7. iSCSI - Chip hangs when target sends FIN out-of-order or with isles
   open at the initiator side. Firmware implementation corrected to drop
   FIN received out-of-order or with isles still open.
8. iSCSI - Chip hangs when in case of retransmission not aligned to 4-bytes
   from the beginning of iSCSI PDU. Firmware implementation corrected
   to support arbitrary aligned retransmissions.
9. iSCSI - Arrival of target-initiated NOP-IN during intense ISCSI traffic
   might lead to crash. Firmware fix to relevant flow.

Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoenic: Add support for fw init command on sriov vf's
Roopa Prabhu [Mon, 20 Feb 2012 00:12:04 +0000 (00:12 +0000)]
enic: Add support for fw init command on sriov vf's

This patch fixes enic_probe to do a fw init devcmd for sriov vfs.
This enables vf driver in the guest to get into adapter init state without
having to explicitly issue an init fw cmd with portprofile info. But a
successful init on the vf will require the port profile information to be
pre-provisioned by the hypervisor via the pf

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoenic: Fix ndo_set_vf_mac and ndo_set_vf_port to set/get the sriov vf's mac
Roopa Prabhu [Mon, 20 Feb 2012 00:11:58 +0000 (00:11 +0000)]
enic: Fix ndo_set_vf_mac and ndo_set_vf_port to set/get the sriov vf's mac

This patch fixes the ndo_set_vf_mac netdev op to set the sriov vf mac
in adapter using the new fw devcmd CMD_SET_MAC_ADDR. During port profile
associate the pf driver gets the vf mac using CMD_GET_MAC_ADDR.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoenic: Add new fw devcmd to set mac address of an interface
Roopa Prabhu [Mon, 20 Feb 2012 00:11:53 +0000 (00:11 +0000)]
enic: Add new fw devcmd to set mac address of an interface

This patch adds a new devcmd CMD_SET_MAC_ADDR to set the mac address of an
interface.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoenic: rename CMD_MAC_ADDR to CMD_GET_MAC_ADDR
Roopa Prabhu [Mon, 20 Feb 2012 00:11:48 +0000 (00:11 +0000)]
enic: rename CMD_MAC_ADDR to CMD_GET_MAC_ADDR

firmware devcmd CMD_MAC_ADDR gets the mac address of a vnic from adapter.
This patch renames it to CMD_GET_MAC_ADDR more appropriately.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Sujith Sankar <ssujith@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoll_temac: Fix build.
David S. Miller [Mon, 20 Feb 2012 05:46:06 +0000 (00:46 -0500)]
ll_temac: Fix build.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoadi: adapt to eth_hw_addr_random() and changes in arch/blackfin
Danny Kukawka [Thu, 16 Feb 2012 07:09:31 +0000 (07:09 +0000)]
adi: adapt to eth_hw_addr_random() and changes in arch/blackfin

Adapt adi ethernet driver to changes in bfin_get_ether_addr()
from arch/blackfin. bfin_get_ether_addr() returns now a state.
Set a random mac address via new eth_hw_addr_random() in case
the return value is not 0.

Reset the state to NET_ADDR_PERM as soon as the MAC get
changed via .ndo_set_mac_address.

v2: change the logic to reduce unneeded checks

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoarch/blackfin: don't generate random mac in bfin_get_ether_addr()
Danny Kukawka [Thu, 16 Feb 2012 07:09:30 +0000 (07:09 +0000)]
arch/blackfin: don't generate random mac in bfin_get_ether_addr()

Changed bfin_get_ether_addr() to return a state and to
set no random mac address if the board don't provide one.

Let the caller of bfin_get_ether_addr() set a random mac
address if the return value is not 0.

v2: don't set random mac in bfin_get_ether_addr()

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoethernet: Fix typo in lantiq_etop.c
Masanari Iida [Thu, 16 Feb 2012 03:25:19 +0000 (03:25 +0000)]
ethernet: Fix typo in lantiq_etop.c

Correct spelling "platfom" to "platform" in
drivers/net/ethernet/lantiq_etop.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agobnx2x: make bnx2x_close() static again
Michal Schmidt [Thu, 16 Feb 2012 02:38:48 +0000 (02:38 +0000)]
bnx2x: make bnx2x_close() static again

Commit 8304859a "bnx2x: add fan failure event handling" made the function
bnx2x_close() non-static unnecessarily. The function is not called from
other sources. Make it static again.

Signed-off-by: Michal Schmidt <mschmidt@redhat.com>
Acked-by: Yuval Mintz <yuvalmin@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Sun, 19 Feb 2012 21:03:15 +0000 (16:03 -0500)]
Merge git://git./linux/kernel/git/davem/net

Conflicts:
drivers/net/ethernet/broadcom/bnx2x/bnx2x_stats.c

Small minor conflict in bnx2x, wherein one commit changed how
statistics were stored in software, and another commit
fixed endianness bugs wrt. reading the values provided by
the chip in memory.

Signed-off-by: David S. Miller <davem@davemloft.net>

12 years agoLinux 3.3-rc4
Linus Torvalds [Sat, 18 Feb 2012 23:53:33 +0000 (15:53 -0800)]
Linux 3.3-rc4

12 years agoMerge tag 'fixes-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc
Linus Torvalds [Sat, 18 Feb 2012 23:40:00 +0000 (15:40 -0800)]
Merge tag 'fixes-3.3-rc4' of git://git./linux/kernel/git/arm/arm-soc

These are the bug fixes that have accumulated since 3.3-rc3 in arm-soc.
The majority of them are regression fixes for stuff that broke during
the merge 3.3 window.

The notable ones are:

* The at91 ata drivers both broke because of an earlier cleanup patch that
  some other patches were based on. Jean-Christophe decided to remove
  the legacy at91_ide driver and fix the new-style at91-pata driver while
  keeping the cleanup patch. I almost rejected the patches for being too
  late and too big but in the end decided to accept them because they
  fix a regression.

* A patch fixing build breakage from the sysdev-to-device conversion
  colliding with other changes touches a number of mach-s3c files.

b0654037 "ARM: orion: Fix Orion5x GPIO regression from MPP cleanup"
  is a mechanical change that unfortunately touches a lot of lines
  that should up in the diffstat.

* tag 'fixes-3.3-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (28 commits)
  ARM: at91: drop ide driver in favor of the pata one
  pata/at91: use newly introduced SMC accessors
  ARM: at91: add accessor to manage SMC
  ARM: at91:rtc/rtc-at91sam9: ioremap register bank
  ARM: at91: USB AT91 gadget registration for module
  ep93xx: fix build of vision_ep93xx.c
  ARM: OMAP2xxx: PM: fix OMAP2xxx-specific UART idle bug in v3.3
  ARM: orion: Fix USB phy for orion5x.
  ARM: orion: Fix Orion5x GPIO regression from MPP cleanup
  ARM: EXYNOS: Add cpu-offset property in gic device tree node
  ARM: EXYNOS: Bring exynos4-dt up to date
  ARM: OMAP3: cm-t35: fix section mismatch warning
  ARM: OMAP2: Fix the OMAP2 only build break seen with 2011+ ARM tool-chains
  ARM: tegra: paz00: fix wrong UART port on mini-pcie plug
  ARM: tegra: paz00: fix wrong SD1 power gpio
  i2c: tegra: Add devexit_p() for remove
  ARM: EXYNOS: Correct M-5MOLS sensor clock frequency on Universal C210 board
  ARM: EXYNOS: Correct framebuffer window size on Nuri board
  ARM: SAMSUNG: Fix missing api-change from subsys_interface change
  ARM: EXYNOS: Fix "warning: initialization from incompatible pointer type"
  ...

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Linus Torvalds [Sat, 18 Feb 2012 23:38:12 +0000 (15:38 -0800)]
Merge git://git./linux/kernel/git/davem/net

1) VETH_INFO_PEER netlink attribute needs to have it's size validated,
   from Thomas Graf.

2) 'poll' module option of bnx2x driver crashes the machine, just remove
   it.  From Michal Schmidt.

3) ks8851_mll driver reads the irq number from two places, but only
   initializes one of them, oops.  Use only one location and fix this
   problem, from Jan Weitzel.

4) Fix buffer overrun and unicast sterring bugs in mellanox mlx4 driver,
   from Eugenia Emantayev.

5) Swapped kcalloc() args in RxRPC and mlx4, from Axel Lin.

6) PHY MDIO device name regression fixes from Florian Fainelli.

7) If the wake event IRQ line is different from the netdevice one, we
   have to properly route it to the stmmac interrupt handler.  From
   Francesco Virlinzi.

8) Fix rwlock lock initialization ordering bug in mac80211, from
   Mohammed Shafi Shajakhan.

9) TCP lost_cnt can get out of sync, and in fact go negative, in certain
   circumstances.  Fix the way we specify what sequence range to operate
   on in tcp_sacktag_one() to fix this bug.  From Neal Cardwell.

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/net: (27 commits)
  net/ethernet: ks8851_mll fix irq handling
  veth: Enforce minimum size of VETH_INFO_PEER
  stmmac: update the driver version to Feb 2012 (v2)
  stmmac: move hw init in the probe (v2)
  stmmac: request_irq when use an ext wake irq line (v2)
  stmmac: do not discard frame on dribbling bit assert
  ipheth: Add iPhone 4S
  mlx4: add unicast steering entries to resource_tracker
  mlx4: fix QP tree trashing
  mlx4: fix buffer overrun
  3c59x: shorten timer period for slave devices
  netpoll: netpoll_poll_dev() should access dev->flags
  RxRPC: Fix kcalloc parameters swapped
  bnx2x: remove the 'poll' module option
  tcp: fix tcp_shifted_skb() adjustment of lost_cnt_hint for FACK
  ks8851: Fix NOHZ local_softirq_pending 08 warning
  bnx2x: fix bnx2x_storm_stats_update() on big endian
  ixp4xx-eth: fix PHY name to match MDIO bus name
  octeon: fix PHY name to match MDIO bus name
  fec: fix PHY name to match fixed MDIO bus name
  ...

12 years agoMerge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap
Linus Torvalds [Sat, 18 Feb 2012 23:37:25 +0000 (15:37 -0800)]
Merge tag 'for-linus' of git://git./linux/kernel/git/broonie/regmap

Fixes a bootstrapping issue for some registers when a less commonly used
method for register cache initialisation is used.  Only affects a fairly
small proportion of users that both don't use explicit register defaults
and do use the cache.

* tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/broonie/regmap:
  regmap: Fix cache defaults initialization from raw cache defaults

12 years agoMerge tag 'ecryptfs-3.3-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Sat, 18 Feb 2012 23:28:56 +0000 (15:28 -0800)]
Merge tag 'ecryptfs-3.3-rc4-fixes' of git://git./linux/kernel/git/tyhicks/ecryptfs

Fixes maximum filename length and filesystem type reporting in statfs() calls
and also fixes stale inode mode bits on eCryptfs inodes after a POSIX ACL was
set on the lower filesystem's inode.

* tag 'ecryptfs-3.3-rc4-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/tyhicks/ecryptfs:
  ecryptfs: remove the second argument of k[un]map_atomic()
  eCryptfs: Copy up lower inode attrs after setting lower xattr
  eCryptfs: Improve statfs reporting

12 years agoMerge tag 'pinctrl' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux...
Linus Torvalds [Sat, 18 Feb 2012 23:27:40 +0000 (15:27 -0800)]
Merge tag 'pinctrl' of git://git./linux/kernel/git/linusw/linux-pinctrl

pinctrl fixes for v3.3

* tag 'pinctrl-for-torvalds-20120216' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-pinctrl:
  pinctrl: restore pin naming

12 years agoMerge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
Linus Torvalds [Sat, 18 Feb 2012 23:26:37 +0000 (15:26 -0800)]
Merge branch 'merge' of git://git./linux/kernel/git/benh/powerpc

Here are a few more fixes for powerpc.  Some are regressions, the rest
is simple/obvious/nasty enough that I deemed it good to go now.

Here's also step one of deprecating legacy iSeries support: we are
removing it from the main defconfig.

Nobody seems to be using it anymore and the code is nasty to maintain,
(involves horrible hacks in various low level areas of the kernel) so we
plan to actually rip it out at some point.  For now let's just avoid
building it by default.  Stephen will proceed to do the actual removal
later (probably 3.4 or 3.5).

* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc:
  powerpc/perf: power_pmu_start restores incorrect values, breaking frequency events
  powerpc/adb: Use set_current_state()
  powerpc: Disable interrupts early in Program Check
  powerpc: Remove legacy iSeries from ppc64_defconfig
  powerpc/fsl/pci: Fix PCIe fixup regression
  powerpc: Fix kernel log of oops/panic instruction dump

12 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci
Linus Torvalds [Sat, 18 Feb 2012 23:26:11 +0000 (15:26 -0800)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jbarnes/pci

One regression fix for SR-IOV on PPC and a couple of misc fixes from
Yinghai.

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jbarnes/pci:
  PCI: Fix pci cardbus removal
  PCI: set pci sriov page size before reading SRIOV BAR
  PCI: workaround hard-wired bus number V2