GitHub/mt8127/android_kernel_alcatel_ttab.git
12 years agobonding: Fix misspelling of "since"
Jesper Juhl [Sun, 5 Feb 2012 13:18:57 +0000 (13:18 +0000)]
bonding: Fix misspelling of "since"

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: caifdev is never used in net/caif/caif_dev.c::transmit() - remove it.
Jesper Juhl [Sun, 5 Feb 2012 12:50:46 +0000 (12:50 +0000)]
caif: caifdev is never used in net/caif/caif_dev.c::transmit() - remove it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: remove unused variable from dn_output()
Jesper Juhl [Sun, 5 Feb 2012 12:28:57 +0000 (12:28 +0000)]
decnet: remove unused variable from dn_output()

The variable 'neigh' is assigned to, but otherwise completely
unused. So let's remove it.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: Remove the unnecessary memset in rndis_filter_send()
Haiyang Zhang [Sun, 5 Feb 2012 12:13:10 +0000 (12:13 +0000)]
net/hyperv: Remove the unnecessary memset in rndis_filter_send()

The memory has been allocated by kzalloc, so it's unnecessary to memset
again.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: Correct the assignment in netvsc_recv_callback()
Haiyang Zhang [Sun, 5 Feb 2012 12:13:09 +0000 (12:13 +0000)]
net/hyperv: Correct the assignment in netvsc_recv_callback()

The first assignment to variable "net" is wrong, but overridden by the
latter assignments. So the bug isn't manifested.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: Convert camel cased variables in rndis_filter.c to lower cases
Haiyang Zhang [Sun, 5 Feb 2012 12:13:08 +0000 (12:13 +0000)]
net/hyperv: Convert camel cased variables in rndis_filter.c to lower cases

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://gitorious.org/linux-can/linux-can-next
David S. Miller [Sat, 4 Feb 2012 21:42:19 +0000 (16:42 -0500)]
Merge branch 'master' of git://gitorious.org/linux-can/linux-can-next

Conflicts:
drivers/net/can/usb/ems_usb.c

Minor dev_warn --> netdev_warn conversion conflicts.

12 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
David S. Miller [Sat, 4 Feb 2012 21:39:32 +0000 (16:39 -0500)]
Merge git://git./linux/kernel/git/davem/net

12 years agomlx4: Fix typo in cmd.c
Masanari Iida [Fri, 3 Feb 2012 03:27:38 +0000 (03:27 +0000)]
mlx4: Fix typo in cmd.c

Correct spelling "reseting" to "resetting" in
drivers/net/ethernet/mellanox/mlx4/cmd.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetprio_cgroup: Fix obo in get_prioidx
Neil Horman [Fri, 3 Feb 2012 05:18:43 +0000 (05:18 +0000)]
netprio_cgroup: Fix obo in get_prioidx

It was recently pointed out to me that the get_prioidx function sets a bit in
the prioidx map prior to checking to see if the index being set is out of
bounds.  This patch corrects that, avoiding the possiblity of us writing beyond
the end of the array

Signed-off-by: Neil Horman <nhorman@tuxdriver.com>
Reported-by: Stanislaw Gruszka <sgruszka@redhat.com>
CC: Stanislaw Gruszka <sgruszka@redhat.com>
CC: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotms380tr: Fix cascading if/else tab abuse
Joe Perches [Sat, 4 Feb 2012 10:52:56 +0000 (10:52 +0000)]
tms380tr: Fix cascading if/else tab abuse

Cascading "if/else if"'s are ugly.

Signed-off-by: Joe Perches <joe@perches.com>
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 [Sat, 4 Feb 2012 21:10:34 +0000 (16:10 -0500)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless

12 years agobe2net: Use new implementation of get mac list command
Padmanabh Ratnakar [Fri, 3 Feb 2012 09:50:17 +0000 (09:50 +0000)]
be2net: Use new implementation of get mac list command

VFs use get mac list command to get their mac address. The format of
this command has changed. Update driver to use the new format.

Signed-off-by: Mammatha Edhala <mammatha.edhala@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: Fix link status query command
Padmanabh Ratnakar [Fri, 3 Feb 2012 09:49:46 +0000 (09:49 +0000)]
be2net: Fix link status query command

Version number in query link status command is getting overwritten in
be_wrb_cmd_hdr_prepare() routine. Move the initialization to fix this
issue. Also initialize the domain field.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif-hsi: Add RX flip buffer
sjur.brandeland@stericsson.com [Fri, 3 Feb 2012 04:36:21 +0000 (04:36 +0000)]
caif-hsi: Add RX flip buffer

Implement RX flip buffer in the cfhsi_rx_done function,
piggy-backed frames is also supported.
This gives a significant performance gain for CAIF over HSI.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: Add drop count for caif_net device.
sjur.brandeland@stericsson.com [Fri, 3 Feb 2012 04:36:20 +0000 (04:36 +0000)]
caif: Add drop count for caif_net device.

Count dropped packets in CAIF Netdevice.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: Kill debugfs vars for caif socket
sjur.brandeland@stericsson.com [Fri, 3 Feb 2012 04:36:19 +0000 (04:36 +0000)]
caif: Kill debugfs vars for caif socket

Kill off the debug-fs exposed varaibles from caif_socket.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoenic: Update enic maintainers
Neel Patel [Fri, 3 Feb 2012 08:25:25 +0000 (08:25 +0000)]
enic: Update enic maintainers

Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoenic: Check firmware capability before issuing firmware commands
Neel Patel [Fri, 3 Feb 2012 08:25:19 +0000 (08:25 +0000)]
enic: Check firmware capability before issuing firmware commands

Check if firmware supports a particular command by first checking capability
using devcmd CMD_CAPABILITY.

Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoenic: Enable support for multiple hardware receive queues
Neel Patel [Fri, 3 Feb 2012 08:25:14 +0000 (08:25 +0000)]
enic: Enable support for multiple hardware receive queues

This patch enables support for multiple receive queues. If multiple receive
queues are used ingress traffic is hashed into one of the receive queues based
on IP or TCP or both headers. The max number of supported receive queues per
vnic is 8.

Signed-off-by: Neel Patel <neepatel@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Nishank Trivedi <nistrive@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlge: Bumped driver version to 1.00.00.30.
Jitendra Kalsaria [Fri, 3 Feb 2012 14:06:52 +0000 (14:06 +0000)]
qlge: Bumped driver version to 1.00.00.30.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlge: Fix memory leak in the process of refill
Jitendra Kalsaria [Fri, 3 Feb 2012 14:06:51 +0000 (14:06 +0000)]
qlge: Fix memory leak in the process of refill

Driver was leaking memory when page allocation failures occurs.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlge: Removing needless print's which are not
Jitendra Kalsaria [Fri, 3 Feb 2012 14:06:50 +0000 (14:06 +0000)]
qlge: Removing needless print's which are not

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlge: Fixed invalid reference to ip header
Jitendra Kalsaria [Fri, 3 Feb 2012 14:06:49 +0000 (14:06 +0000)]
qlge: Fixed invalid reference to ip header

we have copied skb into addr(page), skb->data doesn't contain ip
header information.

Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlge: Updating Schultz LICENSE.qlge file.
Sritej Velaga [Fri, 3 Feb 2012 14:06:48 +0000 (14:06 +0000)]
qlge: Updating Schultz LICENSE.qlge file.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Jitendra Kalsaria <jitendra.kalsaria@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic: Fix API unlock
Manish chopra [Fri, 3 Feb 2012 13:45:44 +0000 (13:45 +0000)]
qlcnic: Fix API unlock

Log dump status.
Remove unmatched qlcnic_api_unlock call.
Update version to 5.0.26.

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic: Fix firmware abort code check.
Sritej Velaga [Fri, 3 Feb 2012 13:45:43 +0000 (13:45 +0000)]
qlcnic: Fix firmware abort code check.

Check bits 8-28 of peg_halt status register for firmware abort code.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic: report valid speed and duplex status when link is down
Sony Chacko [Fri, 3 Feb 2012 13:45:42 +0000 (13:45 +0000)]
qlcnic: report valid speed and duplex status when link is down

Report valid link statistics when link is down.

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqlcnic: Stop pause ctrl frames on fw hang.
Sritej Velaga [Fri, 3 Feb 2012 13:45:41 +0000 (13:45 +0000)]
qlcnic: Stop pause ctrl frames on fw hang.

When firmware hang is detected, fw should stop sending pause control frames.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen: report valid speed and duplex status when link is down
Sony Chacko [Fri, 3 Feb 2012 11:35:15 +0000 (11:35 +0000)]
netxen: report valid speed and duplex status when link is down

o Update version to 4.0.78

Signed-off-by: Sony Chacko <sony.chacko@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen: Fix a panic during driver unload in device_remove_file
Rajesh Borundia [Fri, 3 Feb 2012 11:35:14 +0000 (11:35 +0000)]
netxen: Fix a panic during driver unload in device_remove_file

o Pass adapter->pdev->dev instead of netdev->dev

Signed-off-by: Rajesh Borundia <rajesh.borundia@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen_nic: Error logging on firmware hang
Sritej Velaga [Fri, 3 Feb 2012 11:35:13 +0000 (11:35 +0000)]
netxen_nic: Error logging on firmware hang

Log states of essential registers on firmware hang detection.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen_nic: Fix phy link status
Sritej Velaga [Fri, 3 Feb 2012 11:35:12 +0000 (11:35 +0000)]
netxen_nic: Fix phy link status

Pass the adapter phy link status to the caller.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen_nic: fw dump support
Manish chopra [Fri, 3 Feb 2012 11:35:11 +0000 (11:35 +0000)]
netxen_nic: fw dump support

Signed-off-by: Manish Chopra <manish.chopra@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetxen_nic: fix cdrp race condition
Sritej Velaga [Fri, 3 Feb 2012 11:35:10 +0000 (11:35 +0000)]
netxen_nic: fix cdrp race condition

Reading CRB registers(if reqd) before releasing the api lock.

Signed-off-by: Sritej Velaga <sritej.velaga@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wirel...
John W. Linville [Fri, 3 Feb 2012 19:14:07 +0000 (14:14 -0500)]
Merge branch 'master' of git://git./linux/kernel/git/linville/wireless into for-davem

12 years agoixgbe: Fix typo in ixgbe_common.h
Masanari Iida [Mon, 23 Jan 2012 12:47:32 +0000 (12:47 +0000)]
ixgbe: Fix typo in ixgbe_common.h

Correct spelling "packtetbuf_num" to "packetbuf_num" in
drivers/net/ethernet/intel/ixgbe/ixgbe_common.h

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
12 years agoigbvf: change copyright date
Mitch A Williams [Tue, 17 Jan 2012 04:09:05 +0000 (04:09 +0000)]
igbvf: change copyright date

Change copyright date to 2012 in the source files.

Signed-off-by: Mitch Williams <mitch.a.williams@intel.com>
Tested-by: Robert E Garrett <robertX.e.garrett@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbevf: Update copyright notices
Greg Rose [Fri, 6 Jan 2012 02:53:30 +0000 (02:53 +0000)]
ixgbevf: Update copyright notices

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Robert E Garrett <robertX.e.garrett@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbevf: Fix mailbox interrupt ack bug
Greg Rose [Wed, 1 Feb 2012 01:28:15 +0000 (01:28 +0000)]
ixgbevf: Fix mailbox interrupt ack bug

Remove jump to out label that was skipping over code to replace the
ack bit in the mailbox cache variable.  This was causing driver mailbox
routines that poll for the PF to ack a message to time out which would
in turn cause all other mailbox messages to fail.  Also replace the
mailbox cache variable message indication bit when a message is found
so that other functions that choose to poll for a mailbox message from
the PF won't miss it.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Robert E Garrett <robertX.e.garrett@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: make ethtool strings table const
Stephen Hemminger [Thu, 5 Jan 2012 06:29:54 +0000 (06:29 +0000)]
ixgbe: make ethtool strings table const

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: Add warning when no space left for more MAC filters
Greg Rose [Thu, 5 Jan 2012 07:58:11 +0000 (07:58 +0000)]
ixgbe: Add warning when no space left for more MAC filters

Send message to system log when the VF requests another MAC filter
but there is no space left on the device for it.

Signed-off-by: Greg Rose <gregory.v.rose@intel.com>
Tested-by: Robert E Garrett <robertX.e.garrett@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agoixgbe: update copyright to 2012
Don Skidmore [Fri, 6 Jan 2012 03:24:16 +0000 (03:24 +0000)]
ixgbe: update copyright to 2012

New year so bump the copyright date.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
12 years agocan: replace the dev_dbg/info/err/... with the new netdev_xxx macros
Wolfgang Grandegger [Wed, 1 Feb 2012 10:02:05 +0000 (11:02 +0100)]
can: replace the dev_dbg/info/err/... with the new netdev_xxx macros

Cc: uclinux-dist-devel@blackfin.uclinux.org
Cc: Anant Gole <anantgole@ti.com>
Cc: Chris Elston <celston@katalix.com>
Cc: Sebastian Haas <haas@ems-wuensche.com>
Cc: Matthias Fuchs <matthias.fuchs@esd.eu>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Acked-by: Sebastian Haas <dev@sebastianhaas.info>
Acked-by: Mike Frysinger <vapier@gentoo.org>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: bfin_can/ti_hecc/mscan: add missing do_get_berr_counter callback
Wolfgang Grandegger [Wed, 1 Feb 2012 10:14:13 +0000 (11:14 +0100)]
can: bfin_can/ti_hecc/mscan: add missing do_get_berr_counter callback

Cc: Anant Gole <anantgole@ti.com>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: Kconfig: add more information about Intel EG20T PCH CAN controller
Tomoya MORINAGA [Fri, 27 Jan 2012 11:05:22 +0000 (20:05 +0900)]
can: Kconfig: add more information about Intel EG20T PCH CAN controller

Current menu description, not easy to understand what the description
means. So, add information about the device.

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
[mkl: Added space before opening parentheses in Kconfig.
      Make commit message more descriptive.]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: pch_can: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor
Tomoya MORINAGA [Fri, 27 Jan 2012 11:05:21 +0000 (20:05 +0900)]
can: pch_can: Change company name OKI SEMICONDUCTOR to LAPIS Semiconductor

On October 1 in 2011,
    OKI SEMICONDUCTOR Co., Ltd. changed the company name in to LAPIS Semiconductor

Signed-off-by: Tomoya MORINAGA <tomoya.rohm@gmail.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: plx_pci: add support for IXXAT PCI cards
James Kime [Mon, 12 Dec 2011 12:45:58 +0000 (13:45 +0100)]
can: plx_pci: add support for IXXAT PCI cards

This patch adds support for IXXAT passive CAN controllers

Signed-off-by: James Kime <kime@ixxat.de>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: ems_usb: Improved memory handling on ems_usb_start
Sebastian Haas [Thu, 22 Dec 2011 22:58:34 +0000 (23:58 +0100)]
can: ems_usb: Improved memory handling on ems_usb_start

Do not return from ems_usb_start if allocation fails. If not all URBs
could be allocated use the one already submitted.

Signed-off-by: Sebastian Haas <dev@sebastianhaas.info>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: flexcan: Fix CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK
Reuben Dowle [Mon, 31 Oct 2011 22:18:03 +0000 (11:18 +1300)]
can: flexcan: Fix CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK

Currently the flexcan driver uses hardware local echo. This blindly
echos all transmitted frames to all receiving sockets, regardless what
CAN_RAW_RECV_OWN_MSGS and CAN_RAW_LOOPBACK are set to.

This patch now submits transmitted frames to be echoed in the transmit
complete interrupt, preserving the reference to the sending
socket. This allows the can protocol to correctly handle the local
echo.

Further this patch moves tx_bytes statistic accounting into the tx_complete
handler.

Signed-off-by: Reuben Dowle <reuben.dowle@navico.com>
[mkl: move tx_bytes accounting into tx_complete handler; cleanups]
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: dev: let can_get_echo_skb() return dlc of CAN frame
Marc Kleine-Budde [Mon, 10 Oct 2011 21:43:53 +0000 (23:43 +0200)]
can: dev: let can_get_echo_skb() return dlc of CAN frame

can_get_echo_skb() is usually called in the TX complete handler.
The stats->tx_packets and stats->tx_bytes should be updated there, too.
This patch simplifies to figure out the size of the sent CAN frame.

Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: ems_usb: Removed double netif_device_detach
Sebastian Haas [Thu, 22 Dec 2011 22:57:49 +0000 (23:57 +0100)]
can: ems_usb: Removed double netif_device_detach

netif_device_attched is called twice when ems_usb_start fails with -ENODEV

Signed-off-by: Sebastian Haas <dev@sebastianhaas.info>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: peak_pci: Fix the way channels are linked together
Stephane Grosjean [Wed, 1 Feb 2012 10:05:48 +0000 (11:05 +0100)]
can: peak_pci: Fix the way channels are linked together

Change the way channels objects are linked together by peak_pci_probe()
avoiding any kernel oops when driver is removed. Side effect is that
the list is now browsed from last to first channel.

Signed-off-by: Stephane Grosjean <s.grosjean@peak-system.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: ems_usb: Removed double netif_device_detach
Sebastian Haas [Thu, 22 Dec 2011 22:57:49 +0000 (23:57 +0100)]
can: ems_usb: Removed double netif_device_detach

netif_device_attched is called twice when ems_usb_start fails with -ENODEV

Signed-off-by: Sebastian Haas <dev@sebastianhaas.info>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: pch_can: fix error passive level test
Xi Wang [Mon, 12 Dec 2011 07:16:20 +0000 (02:16 -0500)]
can: pch_can: fix error passive level test

The test (((errc & PCH_REC) >> 8) > 127) would always be false because
the receive error counter ((errc & PCH_REC) >> 8) is at most 127, where
PCH_REC is defined as 0x7f00.  To test whether the receive error counter
has reached the error passive level, the RP bit (15) should be used.

Signed-off-by: Xi Wang <xi.wang@gmail.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: ti_hecc: use netif_rx in the interrupt
Wolfgang Grandegger [Wed, 1 Feb 2012 09:50:23 +0000 (10:50 +0100)]
can: ti_hecc: use netif_rx in the interrupt

This patch fixes locking problems by using netif_rx() instead of
netif_receive_skb() in ti_hecc_error() called from the interrupt
context.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: cc770: Fix indirect access deadlock on ISA cards
Wolfgang Zarre [Sun, 15 Jan 2012 12:21:34 +0000 (13:21 +0100)]
can: cc770: Fix indirect access deadlock on ISA cards

This fix avoids a deadlock if an interrupt occurs
during consecutive port operations on ISA cards
utilising indirect access via address and data
port.

Tested on a B&R ISA card.

Cc: linux-can@vger.kernel.org
Cc: netdev@vger.kernel.org
Signed-off-by: Wolfgang Zarre <lkdev@essax.com>
Acked-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: cc770: store echo skb before starting the transfer
Wolfgang Grandegger [Mon, 12 Dec 2011 15:07:16 +0000 (16:07 +0100)]
can: cc770: store echo skb before starting the transfer

On slow systems and high CAN bitrates, the error message
"can_put_echo_skb: BUG! echo_skb is occupied!" did show up because
can_put_echo_skb() was called after starting the transfer.

Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agocan: flexcan: fix irq flooding by clearing all interrupt sources
Wolfgang Grandegger [Mon, 12 Dec 2011 15:09:28 +0000 (16:09 +0100)]
can: flexcan: fix irq flooding by clearing all interrupt sources

As pointed out by Reuben Dowle and Lothar Waßmann, the TWRN_INT,
RWRN_INT, BOFF_INT interrupt sources need to be cleared as well
to avoid interrupt flooding, at least for the Flexcan on i.MX28
SOCs. Furthermore, the interrupts are only cleared, if really one
of those interrupt sources are pending (which is not the case for
rx and tx done).

Cc: Reuben Dowle <Reuben.Dowle@navico.com>
Cc: Lothar Waßmann <LW@KARO-electronics.de>
Signed-off-by: Wolfgang Grandegger <wg@grandegger.com>
Signed-off-by: Marc Kleine-Budde <mkl@pengutronix.de>
12 years agoeicon: fix -Warray-bounds warning
Danny Kukawka [Thu, 2 Feb 2012 03:20:28 +0000 (03:20 +0000)]
eicon: fix -Warray-bounds warning

Fix for a -Warray-bounds warning. mixer_notify_update() tries to
write to ((CAPI_MSG *) msg)->info.facility_req.structs[3] while
structs is defined as byte structs[1]. Set all 'structs' which are
part of the typdefs in the info union to 'byte structs[0]'.

v2: set all info.*.structs to byte structs[0]

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoqeth: Move away from using neighbour entries in qeth_l3_fill_header()
David Miller [Wed, 1 Feb 2012 10:49:17 +0000 (10:49 +0000)]
qeth: Move away from using neighbour entries in qeth_l3_fill_header()

We've moving to a model where dst_entry objects to not have
a reference to the associated neighbour entry, instead such
neighbours must be looked up on-demand.

Here in qeth_l3_fill_header() it's actually much simpler to
use the information in the route itself.  The code is
already conditionalized upon protocol type.

Signed-off-by: David S. Miller <davem@davemloft.net>
Tested-by: Ursula Braun <ubraun@linux.vnet.ibm.com>
12 years agocaif: Bugfix double kfree_skb upon xmit failure
Dmitry Tarnyagin [Thu, 2 Feb 2012 01:21:03 +0000 (01:21 +0000)]
caif: Bugfix double kfree_skb upon xmit failure

SKB is freed twice upon send error. The Network stack consumes SKB even
when it returns error code.

Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agocaif: Bugfix list_del_rcu race in cfmuxl_ctrlcmd.
sjur.brandeland@stericsson.com [Thu, 2 Feb 2012 01:21:02 +0000 (01:21 +0000)]
caif: Bugfix list_del_rcu race in cfmuxl_ctrlcmd.

Always use cfmuxl_remove_uplayer when removing a up-layer.
cfmuxl_ctrlcmd() can be called independently and in parallel with
cfmuxl_remove_uplayer(). The race between them could cause list_del_rcu
to be called on a node which has been already taken out from the list.
That lead to a (rare) crash on accessing poisoned node->prev inside
list_del_rcu.

This fix ensures that deletion are done holding the same lock.

Reported-by: Dmitry Tarnyagin <dmitry.tarnyagin@stericsson.com>
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: Fix the page buffer when an RNDIS message goes beyond page boundary
Haiyang Zhang [Thu, 2 Feb 2012 07:18:00 +0000 (07:18 +0000)]
net/hyperv: Fix the page buffer when an RNDIS message goes beyond page boundary

There is a possible data corruption if an RNDIS message goes beyond page
boundary in the sending code path. This patch fixes the problem.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: Use netif_tx_disable() instead of netif_stop_queue() when necessary
Haiyang Zhang [Thu, 2 Feb 2012 07:17:59 +0000 (07:17 +0000)]
net/hyperv: Use netif_tx_disable() instead of netif_stop_queue() when necessary

For code path not on the xmit, use netif_tx_disable() instead of
netif_stop_queue() to ensure other CPUs are not doing xmit.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers/net/ethernet/ti: Move call to PTR_ERR after reassignment
Julia Lawall [Thu, 2 Feb 2012 04:53:01 +0000 (04:53 +0000)]
drivers/net/ethernet/ti: Move call to PTR_ERR after reassignment

PTR_ERR should be called before its argument is cleared.

The semantic match that finds this problem is as follows:
(http://coccinelle.lip6.fr/)

// <smpl>
@@
expression e,e1;
constant c;
@@

*e = c
... when != e = e1
    when != &e
    when != true IS_ERR(e)
*PTR_ERR(e)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Reported-by: Josh Triplett <josh@joshtriplett.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: fix the issue that large packets be dropped under bridge
Wei Yongjun [Wed, 1 Feb 2012 20:17:23 +0000 (20:17 +0000)]
net/hyperv: fix the issue that large packets be dropped under bridge

The packets with size larger than 1452 will be dropped by bridge
which with two hyperv netdevice ports. This cause by hyperv netvsc
driver always copy the trailer padding to the data packet, and then
the skb received from netdevice may include wrong skb->len (20 bytes
larger than the real size normally). The captured packet may like
this:

  Ethernet II, Src: Microsof_00:00:07 (00:15:5d:00:00:07),
               Dst: HewlettP_00:00:4e (00:1f:29:00:00:4e)
    Destination: HewlettP_e6:00:4e (00:1f:29:00:00:4e)
    Source: Microsof_f6:6d:07 (00:15:5d:f6:6d:07)
    Type: IP (0x0800)
    Trailer: 1415161718191A1B1C1D1E1F20212223
    Frame check sequence: 0x24252627 [incorrect, should be 0x7c2e5a5e]

The following command help to reproduction it, and the ping ICMP
packets will be dropped by bridge.
  $ ping ip -s 1453

This patch fixed it by removing the trailer padding from the data
packet.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: properly initialize tcp memory limits
Jason Wang [Thu, 2 Feb 2012 00:07:00 +0000 (00:07 +0000)]
tcp: properly initialize tcp memory limits

Commit 4acb4190 tries to fix the using uninitialized value
introduced by commit 3dc43e3,  but it would make the
per-socket memory limits too small.

This patch fixes this and also remove the redundant codes
introduced in 4acb4190.

Signed-off-by: Jason Wang <jasowang@redhat.com>
Acked-by: Glauber Costa <glommer@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobna: Implement ethtool flash_device entry point.
Krishna Gudipati [Wed, 1 Feb 2012 15:02:41 +0000 (15:02 +0000)]
bna: Implement ethtool flash_device entry point.

Incorporated review comments from Ben Hutchings.

Change details:
- Implement ethtool flash_device() entry point to write the
  firmware image to the flash firmware partition.

Signed-off-by: Krishna Gudipati <kgudipat@brocade.com>
Reviewed-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: clip: Convert over to dst_neigh_lookup().
David S. Miller [Wed, 1 Feb 2012 22:23:11 +0000 (17:23 -0500)]
atm: clip: Convert over to dst_neigh_lookup().

CLIP only support ipv4, and this is evidenced by the fact that it
is a device specific extension of arp_tbl, so this conversion is
pretty straightforward.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodecnet: Add missing neigh->ha locking to dn_neigh_output_packet()
David S. Miller [Wed, 1 Feb 2012 21:34:25 +0000 (16:34 -0500)]
decnet: Add missing neigh->ha locking to dn_neigh_output_packet()

Basically, mirror the logic in neigh_connected_output().

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoipv6: Remove never used function inet6_ac_check().
David S. Miller [Wed, 1 Feb 2012 21:14:17 +0000 (16:14 -0500)]
ipv6: Remove never used function inet6_ac_check().

It went from unused, to commented out, and never changing after
that.

Just get rid of it, if someone wants it they can unearth it from
the history.

Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoPATCH V2 net-next] net: dev: Convert printks to pr_<level>
Joe Perches [Wed, 1 Feb 2012 10:54:43 +0000 (10:54 +0000)]
PATCH V2 net-next] net: dev: Convert printks to pr_<level>

Use the current logging style.
Coalesce formats where appropriate.
Update grammar where appropriate.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomac80211: timeout a single frame in the rx reorder buffer
Eliad Peller [Wed, 1 Feb 2012 16:48:09 +0000 (18:48 +0200)]
mac80211: timeout a single frame in the rx reorder buffer

The current code checks for stored_mpdu_num > 1, causing
the reorder_timer to be triggered indefinitely, but the
frame is never timed-out (until the next packet is received)

Signed-off-by: Eliad Peller <eliad@wizery.com>
Cc: <stable@vger.kernel.org>
Acked-by: Johannes Berg <johannes@sipsolutions.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: don't mess up QoS counters with non-QoS frames
Emmanuel Grumbach [Wed, 1 Feb 2012 15:01:32 +0000 (07:01 -0800)]
iwlwifi: don't mess up QoS counters with non-QoS frames

In my AMPDU rework, I rely on the sequence numbers of frames. But
I didn't check that the frame has a valid tid before updating the
tracking counters. As a result, the Tx queues were stalled. People
who hit this bug saw that we simply didn't let any data out.

This bug was introduced in 3.3.

This patch fixes that and checks that the frame is a QoS frame before
looking at its tid and changing the counters.

Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Signed-off-by: Wey-Yi Guy <wey-yi.w.guy@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agossb: fix cardbus slot in hostmode
Hauke Mehrtens [Tue, 31 Jan 2012 23:13:53 +0000 (00:13 +0100)]
ssb: fix cardbus slot in hostmode

ssb supports one extra device on the cardbus. This results in two
devices in total, one beeing the host controller itself and the other
the external device connected to the hostcontroller over cardbus.

This makes the cardbus slot work on the Linksys WRT150N.

Reported-by: Aaron Z <aaronz@pls-net.org>
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoiwlwifi: make "Tx aggregation enabled on ra =" be at DEBUG level
John W. Linville [Tue, 31 Jan 2012 19:40:49 +0000 (14:40 -0500)]
iwlwifi: make "Tx aggregation enabled on ra =" be at DEBUG level

Average users either don't care or they think that message indicates a
problem...

Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agort2800lib: fix wrong -128dBm when signal is stronger than -12dBm
Luigi Tarenga [Tue, 31 Jan 2012 17:51:23 +0000 (18:51 +0100)]
rt2800lib: fix wrong -128dBm when signal is stronger than -12dBm

This patch correct the type of variables containing the rssi
values read from the rxwi.

In function rt2800_agc_to_rssi() 3 variables (rssi0, rssi1, rss2)
defined as int was assigned a 16bit signed values as unsigned.
From a test with a hi-gain antenna I verified that the rxwi
contains signed rssi values in the  range -13/+81 (inclusive)
with 0 as an error condition. In case of negative values a
condition is triggered and the function return -128dBm while
the signal is at its maximum. This patch correct the cast so
negative values are not treated as very high positive values
(ex. -13 does not become 243).

Signed-off-by: Luigi Tarenga <luigi.tarenga@gmail.com>
Reviewed-by: Stanislaw Gruszka <sgruszka@redhat.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agobcma: Fix mem leak in bcma_bus_scan()
Jesper Juhl [Sun, 29 Jan 2012 20:34:04 +0000 (21:34 +0100)]
bcma: Fix mem leak in bcma_bus_scan()

bcma_bus_scan() leaks 'struct bcma_device' bytes if
bcma_get_next_core() returns error.

Restructure the code so we always kfree() the memory we allocate to
the variable 'core' before it goes out of scope.

Signed-off-by: Jesper Juhl <jj@chaosbits.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
12 years agoethtool: Null-terminate filename passed to ethtool_ops::flash_device
Ben Hutchings [Wed, 1 Feb 2012 09:32:25 +0000 (09:32 +0000)]
ethtool: Null-terminate filename passed to ethtool_ops::flash_device

The parameters for ETHTOOL_FLASHDEV include a filename, which ought to
be null-terminated.  Currently the only driver that implements
ethtool_ops::flash_device attempts to add a null terminator if
necessary, but does it wrongly.  Do it in the ethtool core instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agovmxnet3: Fix typo in vmxnet3_drv.c
Masanari Iida [Wed, 1 Feb 2012 03:13:59 +0000 (03:13 +0000)]
vmxnet3: Fix typo in vmxnet3_drv.c

Correct spelling in "uncommited" to "uncommitted" in
drivers/net/vmxnet3/vmxnet3_drv.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoatm: Fix typo in lanai.c
Masanari Iida [Wed, 1 Feb 2012 03:05:13 +0000 (03:05 +0000)]
atm: Fix typo in lanai.c

Correct spelling "reseting" to resetting" in
drivers/atm/lanai.c

Signed-off-by: Masanari Iida <standby24x7@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: Disambiguate kernel message
Arun Sharma [Mon, 30 Jan 2012 22:16:06 +0000 (14:16 -0800)]
net: Disambiguate kernel message

Some of our machines were reporting:

TCP: too many of orphaned sockets

even when the number of orphaned sockets was well below the
limit.

We print a different message depending on whether we're out
of TCP memory or there are too many orphaned sockets.

Also move the check out of line and cleanup the messages
that were printed.

Signed-off-by: Arun Sharma <asharma@fb.com>
Suggested-by: Mohan Srinivasan <mohan@fb.com>
Cc: netdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Cc: David Miller <davem@davemloft.net>
Cc: Glauber Costa <glommer@parallels.com>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agohamradio: fix incompatible pointer in module parameter
Danny Kukawka [Mon, 30 Jan 2012 12:00:18 +0000 (12:00 +0000)]
hamradio: fix incompatible pointer in module parameter

Fixed 'warning: return from incompatible pointer type' related
to module parameters.

Signed-off-by: Danny Kukawka <danny.kukawka@bisect.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet/hyperv: rx_bytes should account the ether header size
Wei Yongjun [Sun, 29 Jan 2012 22:14:02 +0000 (22:14 +0000)]
net/hyperv: rx_bytes should account the ether header size

skb->len after call eth_type_trans() does not include the ether
header size, but rx_bytes should account it.

Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agobe2net: add descriptions for stat counters reported via ethtool
Sathya Perla [Sun, 29 Jan 2012 20:17:39 +0000 (20:17 +0000)]
be2net: add descriptions for stat counters reported via ethtool

Also rename a few counters appropritely and delete 2 counters that are not
implemented in HW.

vlan_mismatch_drops does not exist in BE3 and is accounted for in
address_mismatch_drops. Do the same thing for BE2 and Lancer.

Signed-off-by: Sathya Perla <sathya.perla@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoixgbe: Add module parameter to allow untested and unsafe SFP+ modules
Peter P Waskiewicz Jr [Wed, 1 Feb 2012 09:19:21 +0000 (09:19 +0000)]
ixgbe: Add module parameter to allow untested and unsafe SFP+ modules

The X520 family of network devices, with the 82599 chip, support a
small number of Intel-verified SFP+ modules on their NICs.  To maintain
stability and quality, the current devices restrict untested 3rd party
SFP+ modules.

This patch introduces a module parameter for ixgbe to allow these untested
modules at the user's peril.  It also includes a warning to the syslog
alerting users that the modules aren't supported, and results may
vary.

CC: Jesper Dangaard Brouer <hawk@comx.dk>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetpoll: Neaten MAX_SKB_SIZE macro
Joe Perches [Sun, 29 Jan 2012 15:50:44 +0000 (15:50 +0000)]
netpoll: Neaten MAX_SKB_SIZE macro

Add the types in the packet layout order.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonetpoll: Convert printks to np_<level> and add pr_fmt
Joe Perches [Sun, 29 Jan 2012 15:50:43 +0000 (15:50 +0000)]
netpoll: Convert printks to np_<level> and add pr_fmt

Use a more current message logging style.
Add pr_fmt to prefix dmesg output with "netpoll: "
Add macros to print np->name.

Signed-off-by: Joe Perches <joe@perches.com>
Reviewed-by: WANG Cong <xiyou.wangcong@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agomISDN: use memchr_inv
Akinobu Mita [Fri, 27 Jan 2012 04:24:55 +0000 (04:24 +0000)]
mISDN: use memchr_inv

Use memchr_inv to check if the data contains all same bytes.  It is
faster than looping for each byte.

Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Cc: Karsten Keil <isdn@linux-pingi.de>
Cc: netdev@vger.kernel.org
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: md5: RST: getting md5 key from listener
Shawn Lu [Tue, 31 Jan 2012 22:35:48 +0000 (22:35 +0000)]
tcp: md5: RST: getting md5 key from listener

TCP RST mechanism is broken in TCP md5(RFC2385). When
connection is gone, md5 key is lost, sending RST
without md5 hash is deem to ignored by peer. This can
be a problem since RST help protocal like bgp to fast
recove from peer crash.

In most case, users of tcp md5, such as bgp and ldp,
have listener on both sides to accept connection from peer.
md5 keys for peers are saved in listening socket.

There are two cases in finding md5 key when connection is
lost:
1.Passive receive RST: The message is send to well known port,
tcp will associate it with listner. md5 key is gotten from
listener.

2.Active receive RST (no sock): The message is send to ative
side, there is no socket associated with the message. In this
case, finding listener from source port, then find md5 key from
listener.

we are not loosing sercuriy here:
packet is checked with md5 hash. No RST is generated
if md5 hash doesn't match or no md5 key can be found.

Signed-off-by: Shawn Lu <shawn.lu@ericsson.com>
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoxfrm6: remove unneeded NULL check in __xfrm6_output()
Dan Carpenter [Tue, 31 Jan 2012 21:45:26 +0000 (21:45 +0000)]
xfrm6: remove unneeded NULL check in __xfrm6_output()

We don't check for NULL consistently in __xfrm6_output().  If "x" were
NULL here it would lead to an OOPs later.  I asked Steffen Klassert
about this and he suggested that we remove the NULL check.

On 10/29/11, Steffen Klassert <steffen.klassert@secunet.com> wrote:
>> net/ipv6/xfrm6_output.c
>>    148
>>    149 if ((x && x->props.mode == XFRM_MODE_TUNNEL) &&
>>                           ^
>
> x can't be null here. It would be a bug if __xfrm6_output() is called
> without a xfrm_state attached to the skb. I think we can just remove
> this null check.

Cc: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: md5: protects md5sig_info with RCU
Eric Dumazet [Tue, 31 Jan 2012 18:45:40 +0000 (18:45 +0000)]
tcp: md5: protects md5sig_info with RCU

This patch makes sure we use appropriate memory barriers before
publishing tp->md5sig_info, allowing tcp_md5_do_lookup() being used from
tcp_v4_send_reset() without holding socket lock (upcoming patch from
Shawn Lu)

Note we also need to respect rcu grace period before its freeing, since
we can free socket without this grace period thanks to
SLAB_DESTROY_BY_RCU

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Shawn Lu <shawn.lu@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers/net: Remove alloc_etherdev error messages
Joe Perches [Sun, 29 Jan 2012 13:47:52 +0000 (13:47 +0000)]
drivers/net: Remove alloc_etherdev error messages

alloc_etherdev has a generic OOM/unable to alloc message.
Remove the duplicative messages after alloc_etherdev calls.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agodrivers/net: Remove unnecessary k.alloc/v.alloc OOM messages
Joe Perches [Sun, 29 Jan 2012 12:56:23 +0000 (12:56 +0000)]
drivers/net: Remove unnecessary k.alloc/v.alloc OOM messages

alloc failures use dump_stack so emitting an additional
out-of-memory message is an unnecessary duplication.

Remove the allocation failure messages.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agonet: fec: correct phy_name buffer length when init phy_name
Richard Zhao [Sun, 29 Jan 2012 22:08:12 +0000 (22:08 +0000)]
net: fec: correct phy_name buffer length when init phy_name

Fix the bug that we got wrong phy_name on imx6q sabrelite board.
snprintf used wrong length of phy_name.
phy_name length is MII_BUS_ID_SIZE + 3 rather not MII_BUS_ID_SIZE.
I change it to sizeof(phy_name).

Signed-off-by: Richard Zhao <richard.zhao@linaro.org>
Acked-by: Shawn Guo <shawn.guo@linaro.org>
Acked-by: Florian Fainelli <florian@openwrt.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: md5: use sock_kmalloc() to limit md5 keys
Eric Dumazet [Tue, 31 Jan 2012 10:56:48 +0000 (10:56 +0000)]
tcp: md5: use sock_kmalloc() to limit md5 keys

There is no limit on number of MD5 keys an application can attach to a
tcp socket.

This patch adds a per tcp socket limit based
on /proc/sys/net/core/optmem_max

With current default optmem_max values, this allows about 150 keys on
64bit arches, and 88 keys on 32bit arches.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agoMerge tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream
Linus Torvalds [Tue, 31 Jan 2012 17:23:59 +0000 (09:23 -0800)]
Merge tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream

There are few important bug fixes for LogFS

* tag 'for-linus' of git://github.com/prasad-joshi/logfs_upstream:
  Logfs: Allow NULL block_isbad() methods
  logfs: Grow inode in delete path
  logfs: Free areas before calling generic_shutdown_super()
  logfs: remove useless BUG_ON
  MAINTAINERS: Add Prasad Joshi in LogFS maintiners
  logfs: Propagate page parameter to __logfs_write_inode
  logfs: set superblock shutdown flag after generic sb shutdown
  logfs: take write mutex lock during fsync and sync
  logfs: Prevent memory corruption
  logfs: update page reference count for pined pages

Fix up conflict in fs/logfs/dev_mtd.c due to semantic change in what
"mtd->block_isbad" means in commit f2933e86ad93: "Logfs: Allow NULL
block_isbad() methods" clashing with the abstraction changes in the
commits 7086c19d0742: "mtd: introduce mtd_block_isbad interface" and
d58b27ed58a3: "logfs: do not use 'mtd->block_isbad' directly".

This resolution takes the semantics from commit f2933e86ad93, and just
makes mtd_block_isbad() return zero (false) if the 'block_isbad'
function is NULL.  But that also means that now "mtd_can_have_bb()"
always returns 0.

Now, "mtd_block_markbad()" will obviously return an error if the
low-level driver doesn't support bad blocks, so this is somewhat
non-symmetric, but it actually makes sense if a NULL "block_isbad"
function is considered to mean "I assume that all my blocks are always
good".

12 years agotcp: md5: rcu conversion
Eric Dumazet [Tue, 31 Jan 2012 05:18:33 +0000 (05:18 +0000)]
tcp: md5: rcu conversion

In order to be able to support proper RST messages for TCP MD5 flows, we
need to allow access to MD5 keys without locking listener socket.

This conversion is a nice cleanup, and shrinks size of timewait sockets
by 80 bytes.

IPv6 code reuses generic code found in IPv4 instead of duplicating it.

Control path uses GFP_KERNEL allocations instead of GFP_ATOMIC.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Shawn Lu <shawn.lu@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
12 years agotcp: md5: remove obsolete md5_add() method
Eric Dumazet [Tue, 31 Jan 2012 01:04:42 +0000 (01:04 +0000)]
tcp: md5: remove obsolete md5_add() method

We no longer use md5_add() method from struct tcp_sock_af_ops

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