GitHub/LineageOS/android_kernel_motorola_exynos9610.git
13 years agos2io: make strings at tables const
Jon Mason [Fri, 10 Dec 2010 15:40:02 +0000 (15:40 +0000)]
s2io: make strings at tables const

Put immutable data in read/only section.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agos2io: rx_ring_sz bounds checking
Jon Mason [Fri, 10 Dec 2010 15:40:01 +0000 (15:40 +0000)]
s2io: rx_ring_sz bounds checking

modparm rx_ring_sz can be set to be greater than the maximum allowable
number of blocks.  This results in an array overrun when probing the
driver, and causes memory corruption.

Also, the MAX_RX_DESC_1 multiply the max number of rings by max number
of blocker per ring by 127, but the driver does the same calculation
with 127+1.  This results in the possibility of the value being set
being larger than the maximum allowable value.

Finally, clean-up the s2io_ethtool_gringparam code to be more
intuitive.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoigb: Add new function to read part number from EEPROM in string format
Carolyn Wyborny [Mon, 22 Nov 2010 17:17:21 +0000 (17:17 +0000)]
igb: Add new function to read part number from EEPROM in string format

New adapters will have part numbers stored in string format rather than
simple hex format. This function will read part number formats in either
hex or string.

Signed-off-by: Carolyn Wyborny <carolyn.wyborny@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: increment the driver version
Bruce Allan [Wed, 1 Dec 2010 08:45:24 +0000 (08:45 +0000)]
e1000e: increment the driver version

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: static analysis tools complain of a possible null ptr p dereference
Bruce Allan [Thu, 9 Dec 2010 23:04:25 +0000 (23:04 +0000)]
e1000e: static analysis tools complain of a possible null ptr p dereference

Adding this default case resolves the issue.

v2- Removed "break" in default case based on feedback

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: minor error message corrections
Bruce Allan [Wed, 24 Nov 2010 06:02:06 +0000 (06:02 +0000)]
e1000e: minor error message corrections

Correct error messages when setting up Rx resources and when checking
module parameters.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: prevent null ptr dereference in e1000_tx_queue()
Bruce Allan [Wed, 24 Nov 2010 07:42:43 +0000 (07:42 +0000)]
e1000e: prevent null ptr dereference in e1000_tx_queue()

tx_desc can be dereferenced as a null pointer when count is passed in
as 0.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: support new PBA format from EEPROM
Bruce Allan [Wed, 24 Nov 2010 06:01:51 +0000 (06:01 +0000)]
e1000e: support new PBA format from EEPROM

Provide support to e1000e for displaying the new format of the PBA found
in the EEPROM.  The unique PBA identifier is no longer restricted to
hexadecimal numbers and must now be read and displayed as a string.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82579 PHY incorrectly identified during init
Bruce Allan [Wed, 24 Nov 2010 06:01:46 +0000 (06:01 +0000)]
e1000e: 82579 PHY incorrectly identified during init

During init, reading the 2 PHY ID registers back-to-back in the default
fast mode could return invalid data (all F's) and in slow mode could
return data to the second read the data from the first read.  To resolve
the issue in fast mode, set to slow mode before any PHY accesses; to
resolve the issue in slow mode, put in a delay for every 82579 PHY access.
Since this PHY is currently only paired with the pch2lan MAC and the PHY
type is not known before the first PHY access which can fail this way,
check for this based on MAC-type.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82577/8/9 mis-configured OEM bits during S0->Sx
Bruce Allan [Wed, 24 Nov 2010 06:01:41 +0000 (06:01 +0000)]
e1000e: 82577/8/9 mis-configured OEM bits during S0->Sx

The LPLU (Low Power Link Up) and Gigabit Disable bits (a.k.a. OEM bits)
were being configured incorrectly when device goes to D3 state.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82571 Serdes can fail to get link
Bruce Allan [Wed, 24 Nov 2010 06:01:35 +0000 (06:01 +0000)]
e1000e: 82571 Serdes can fail to get link

When link partner is sending continuous Config symbols, the 82571 Serdes
FIFO can overflow resulting in Invalid bit getting set.  To resolve this,
if Sync and Config bits are both 1 ignore the Invalid bit and restart
auto-negotiation.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82577/8 must acquire h/w semaphore before workaround
Bruce Allan [Wed, 24 Nov 2010 06:01:30 +0000 (06:01 +0000)]
e1000e: 82577/8 must acquire h/w semaphore before workaround

The workaround function e1000_configure_k1_pchlan() assumes the h/w
semaphore is already acquired.  This was originally missed when setting up
the part for the ethtool loopback test.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82574/82583 performance improvement
Bruce Allan [Wed, 24 Nov 2010 06:01:25 +0000 (06:01 +0000)]
e1000e: 82574/82583 performance improvement

Increasing the transmit fifo by 4K (by decreasing the receive fifo size
specified in .pba by the same amount) increases Tx performance.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: 82571-based mezzanine card can fail ethtool link test
Bruce Allan [Wed, 24 Nov 2010 06:01:20 +0000 (06:01 +0000)]
e1000e: 82571-based mezzanine card can fail ethtool link test

On certain 82571-based mezzanine NICs in some blade servers, the ethtool
link test can fail due to the serdes_has_link flag not set correctly.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoe1000e: fix double initialization in blink path
Holger Eitzenberger [Wed, 17 Nov 2010 15:43:52 +0000 (15:43 +0000)]
e1000e: fix double initialization in blink path

The kernel goes BUG() at the time 'ethtool -p eth0 3' comes
back, which is due to adapter->led_blink_task initialized
several times.  At the time it is still running this results
in a corrupted task_list of the associated workqueue.

The fix is to move the workqueue initialization to the
probe function instead.

Signed-off-by: Holger Eitzenberger <holger@eitzenberger.org>
Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: cleanup string function calls to use bound checking versions.
Don Skidmore [Fri, 3 Dec 2010 09:33:54 +0000 (09:33 +0000)]
ixgbe: cleanup string function calls to use bound checking versions.

Some minor cleanup to use string calls that use bound checks just to
be extra safe.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix ntuple support
Emil Tantilov [Wed, 1 Dec 2010 05:47:05 +0000 (05:47 +0000)]
ixgbe: fix ntuple support

commit f62bbb5e62c6e4a91fb222d22bc46e8d4d7e59ef
ixgbe: Update ixgbe to use new vlan accleration.

removed ETH_FLAG_NTUPLE from the supported flags.

This patch puts it back on to allow for setting ntuple via ethtool.

CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix X540 to use it's own info struct
Don Skidmore [Thu, 9 Dec 2010 06:55:19 +0000 (06:55 +0000)]
ixgbe: fix X540 to use it's own info struct

This patch enables X540 hardware to use it's own set of support
functions.  This is useful as it has no need of SFP+ support.  A
couple minor bugs with the eeprom semaphore were also cleaned up.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgbe: fix X540 phy id to correct value
Don Skidmore [Thu, 9 Dec 2010 06:55:14 +0000 (06:55 +0000)]
ixgbe: fix X540 phy id to correct value

The existing PHY ID for X540 was from early production hardware and
is no longer correct.  This patch corrects that.

Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Tested-by: Stephen Ko <stephen.s.ko@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoixgb: Don't check for vlan group on transmit
Emil Tantilov [Sat, 4 Dec 2010 05:35:17 +0000 (05:35 +0000)]
ixgb: Don't check for vlan group on transmit

Based on a patch from Jesse Gross.

Enable vlan tag insertion even when vlan group is not configured.

For ixgb HW both CTRL0.VME and VLE bit in the Tx descriptor need to be set
in order to enable HW acceleration.

Introduced separate functions for enabling/disabling of vlan tag stripping
similar to ixgbe.

CC: Jesse Gross <jesse@nicira.com>
Signed-off-by: Emil Tantilov <emil.s.tantilov@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoIntel Wired LAN drivers: Use static const
Jeff Kirsher [Wed, 1 Dec 2010 19:59:50 +0000 (19:59 +0000)]
Intel Wired LAN drivers: Use static const

Based on work by Joe Perches <joe@perches.com>

Using static const to decrease data and overall object size.

CC: Joe Perches <joe@perches.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
13 years agoe1000: fix return value not set on error
Dean Nelson [Thu, 11 Nov 2010 05:50:25 +0000 (05:50 +0000)]
e1000: fix return value not set on error

Dean noticed that 'err' wasn't being set when the "goto err_dma"
statement is executed in the following hunk from the commit. It's value
will be zero as a result of a successful call to e1000_init_hw_struct().

This patch changes the error condition to be correctly propagated.

CC: stable@kernel.org
Signed-off-by: Dean Nelson <dnelson@redhat.com>
Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
Tested-by: Emil Tantilov <emil.s.tantilov@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoMAINTAINERS: Update Intel Wired LAN info
Jeff Kirsher [Fri, 10 Dec 2010 08:09:08 +0000 (00:09 -0800)]
MAINTAINERS: Update Intel Wired LAN info

Update with Intel Wired Ethernet public git trees.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/ixgbevf.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 08:01:44 +0000 (00:01 -0800)]
Documentation/networking/ixgbevf.txt: Update documentation

Update Intel Wired LAN ixgbevf documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/ixgbe.txt: Update ixgbe documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:55:47 +0000 (23:55 -0800)]
Documentation/networking/ixgbe.txt: Update ixgbe documentation

Update Intel Wired LAN ixgbe documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/igbvf.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:49:34 +0000 (23:49 -0800)]
Documentation/networking/igbvf.txt: Update documentation

Update Intel Wired LAN igbvf documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/igb.txt: update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:47:39 +0000 (23:47 -0800)]
Documentation/networking/igb.txt: update documentation

Update Intel Wired LAN igb documentation.

v2- Updated the ethtool support link, removed the LRO section and
    anti-spoofing sections.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/e1000e.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:44:42 +0000 (23:44 -0800)]
Documentation/networking/e1000e.txt: Update documentation

Update Intel Wired LAN e1000e documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoDocumentation/networking/e1000.txt: Update documentation
Jeff Kirsher [Fri, 10 Dec 2010 07:42:00 +0000 (23:42 -0800)]
Documentation/networking/e1000.txt: Update documentation

Update Intel Wired LAN e1000 documentation.

Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
13 years agoisdn: Fix printed out copy_from_user() return value after previous change.
David S. Miller [Sat, 11 Dec 2010 00:49:24 +0000 (16:49 -0800)]
isdn: Fix printed out copy_from_user() return value after previous change.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobonding: add the debugfs facility to the bonding driver
Taku Izumi [Thu, 9 Dec 2010 15:17:13 +0000 (15:17 +0000)]
bonding: add the debugfs facility to the bonding driver

This patch provides the debugfs facility to the bonding driver.
The "bonding" directory is created in the debugfs root and directories of
each bonding interface (like bond0, bond1...) are created in that.

 # mount -t debugfs none /sys/kernel/debug

 # ls /sys/kernel/debug/bonding
 bond0  bond1

Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: Jay Vosburgh <fubar@us.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Move enic port profile handling code to a new 802.1Qbh provisioning info type
Roopa Prabhu [Fri, 10 Dec 2010 12:02:33 +0000 (12:02 +0000)]
enic: Move enic port profile handling code to a new 802.1Qbh provisioning info type

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoisdn: return -EFAULT if copy_from_user() fails
Dan Carpenter [Fri, 10 Dec 2010 02:40:09 +0000 (02:40 +0000)]
isdn: return -EFAULT if copy_from_user() fails

We should be returning -EFAULT here.

Mostly this patch is to silence a smatch warning.  The upper levels
of this driver turn all non-zero return values from isar_load_firmware()
into 1.

Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: update driver version
Jon Mason [Fri, 10 Dec 2010 14:03:02 +0000 (14:03 +0000)]
vxge: update driver version

Update vxge driver version to 2.5.1

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: independent interrupt moderation
Jon Mason [Fri, 10 Dec 2010 14:03:01 +0000 (14:03 +0000)]
vxge: independent interrupt moderation

Configure the workload clock register and TIM register for independent
interrupt moderation based on the individual vpath utilization instead
of common link utilization.  This greatly improves latency.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: hotplug stall
Jon Mason [Fri, 10 Dec 2010 14:03:00 +0000 (14:03 +0000)]
vxge: hotplug stall

When hot-unplugging a vxge adapter while running, the driver's remove
routine prints warning and then stalls the calling thread.  This is due
to vxge_remove calling vxge_device_unregister to unregister the netdev
before calling flush_scheduled_work clear any pending work.  Swapping
the order of these two functions resolves the issue.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: transmit timeout deadlock
Jon Mason [Fri, 10 Dec 2010 14:02:59 +0000 (14:02 +0000)]
vxge: transmit timeout deadlock

Use a workqueue to handle the device reset during a transmit timeout, as
there can be a deadlock during bringup.  Also, set the netif carrier off
before the watchdog reset is started to prevent the timeout from
reoccurring while still processing the first.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: use pci_request_region()
Jon Mason [Fri, 10 Dec 2010 14:02:58 +0000 (14:02 +0000)]
vxge: use pci_request_region()

Only BAR0 is ever accessed, thus making the calls to pci_request_regions
overkill.  Change calls of pci_request_regions to pci_request_region to
reduce the size of the mapped area.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: fix crash of VF when unloading PF
Jon Mason [Fri, 10 Dec 2010 14:02:57 +0000 (14:02 +0000)]
vxge: fix crash of VF when unloading PF

Calling pci_disable_sriov when unloading a SR-IOV physical function
driver from a host when a guest is using a virtual function from that
device can cause a host crash or VM crash.  The crash is caused by the
virtual config space no longer being present when PF is removed (due to
the pci_disable_sriov).  This can be avoided by not calling
pci_disable_sriov to disable the PCI space when shutting down the PF.
Each function in the X3100 operates independently and in this case will
operate properly in the absence of the PF.

Also, added improved logic in the detection of SR-IOV initialization.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Ram Vepa <ram.vepa@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovxge: code cleanup and reorganization
Jon Mason [Fri, 10 Dec 2010 14:02:56 +0000 (14:02 +0000)]
vxge: code cleanup and reorganization

Move function locations to remove the need for internal declarations and
other misc clean-ups.

Signed-off-by: Jon Mason <jon.mason@exar.com>
Signed-off-by: Arpit Patel <arpit.patel@exar.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Use consistent NF_DROP returns in nf_pre_routing
Herbert Xu [Thu, 9 Dec 2010 17:38:11 +0000 (17:38 +0000)]
bridge: Use consistent NF_DROP returns in nf_pre_routing

The nf_pre_routing functions in bridging have collected two
distinct ways of returning NF_DROP over the years, inline and
via goto.  There is no reason for preferring either one.

So this patch arbitrarily picks the inline variant and converts
the all the gotos.

Also removes a redundant comment.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_packet: use swap() instead of the open coded macro XC()
Changli Gao [Sat, 11 Dec 2010 00:02:20 +0000 (16:02 -0800)]
af_packet: use swap() instead of the open coded macro XC()

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonetdev: Use default implementation of ethtool_ops::get_link where possible
Ben Hutchings [Thu, 9 Dec 2010 12:10:25 +0000 (12:10 +0000)]
netdev: Use default implementation of ethtool_ops::get_link where possible

Various drivers are using implementations of ethtool_ops::get_link
that are equivalent to the default ethtool_op_get_link().  Change
them to use that instead.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoethtool: Report link-down while interface is down
Ben Hutchings [Thu, 9 Dec 2010 12:08:35 +0000 (12:08 +0000)]
ethtool: Report link-down while interface is down

While an interface is down, many implementations of
ethtool_ops::get_link, including the default, ethtool_op_get_link(),
will report the last link state seen while the interface was up.  In
general the current physical link state is not available if the
interface is down.

Define ETHTOOL_GLINK to reflect whether the interface *and* any
physical port have a working link, and consistently return 0 when the
interface is down.

Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Use VF mac set by IFLA_VF_MAC in port profile provisioning data
Roopa Prabhu [Wed, 8 Dec 2010 13:54:03 +0000 (13:54 +0000)]
enic: Use VF mac set by IFLA_VF_MAC in port profile provisioning data

This patch adds support in enic 802.1Qbh port profile provisioning code
to use the mac address set by IFLA_VF_MAC. For now we handle this mac as a
special case for a VM mac address sent to us by libvirt. The VM mac address
is sent to the switch along with the rest of the port profile provisioning
data. This patch also adds calls to register and deregister the mac address
during port profile association/deassociation.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Add ndo_set_vf_mac support for enic dynamic devices
Roopa Prabhu [Wed, 8 Dec 2010 13:53:58 +0000 (13:53 +0000)]
enic: Add ndo_set_vf_mac support for enic dynamic devices

This patch implements the ndo_set_vf_mac netdev operation for enic
dynamic devices. It treats the mac address set by IFLA_VF_MAC as a
special case to use it in the port profile provisioning data.

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoenic: Add ndo_set_rx_mode support for enic vnics
Roopa Prabhu [Wed, 8 Dec 2010 13:19:58 +0000 (13:19 +0000)]
enic: Add ndo_set_rx_mode support for enic vnics

Add ndo_set_rx_mode support to register unicast and multicast
address filters for enic devices

Signed-off-by: Roopa Prabhu <roprabhu@cisco.com>
Signed-off-by: Vasanthy Kolluri <vkolluri@cisco.com>
Signed-off-by: David Wang <dwang2@cisco.com>
Signed-off-by: Christian Benvenuti <benve@cisco.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agopktgen: adding prefetchw() call
Junchang Wang [Wed, 8 Dec 2010 16:55:16 +0000 (16:55 +0000)]
pktgen: adding prefetchw() call

We know for sure pktgen is going to write skb->data right after
*_alloc_skb, causing unnecessary cache misses.

Idea is to add a prefetchw() call to prefetch the first cache line
indicated by skb->data. On systems with Adjacent Cache Line Prefetch,
it's probably two cache lines are prefetched.

With this patch, pktgen on Intel SR1625 server with two E5530
quad-core processors and a single ixgbe-based NIC went from 8.63Mpps
to 9.03Mpps, with 4.6% improvement.

Signed-off-by: Junchang Wang <junchangwang@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agosfc: convert references to LRO to GRO
stephen hemminger [Mon, 6 Dec 2010 12:33:01 +0000 (12:33 +0000)]
sfc: convert references to LRO to GRO

This driver now uses Generic Receive Offload, not the older LRO.
Change references to LRO in names and comments.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Ben Hutchings <bhutchings@solarflare.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoinet6: Remove redundant unlikely()
Tobias Klauser [Thu, 9 Dec 2010 04:37:48 +0000 (04:37 +0000)]
inet6: Remove redundant unlikely()

IS_ERR() already implies unlikely(), so it can be omitted here.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agostmmac: Remove redundant unlikely()
Tobias Klauser [Thu, 9 Dec 2010 04:50:22 +0000 (04:50 +0000)]
stmmac: Remove redundant unlikely()

IS_ERR() already implies unlikely(), so it can be omitted here.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Traffic Flow Confidentiality for IPv6 ESP
Martin Willi [Wed, 8 Dec 2010 04:37:51 +0000 (04:37 +0000)]
xfrm: Traffic Flow Confidentiality for IPv6 ESP

Add TFC padding to all packets smaller than the boundary configured
on the xfrm state. If the boundary is larger than the PMTU, limit
padding to the PMTU.

Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Traffic Flow Confidentiality for IPv4 ESP
Martin Willi [Wed, 8 Dec 2010 04:37:50 +0000 (04:37 +0000)]
xfrm: Traffic Flow Confidentiality for IPv4 ESP

Add TFC padding to all packets smaller than the boundary configured
on the xfrm state. If the boundary is larger than the PMTU, limit
padding to the PMTU.

Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoxfrm: Add Traffic Flow Confidentiality padding XFRM attribute
Martin Willi [Wed, 8 Dec 2010 04:37:49 +0000 (04:37 +0000)]
xfrm: Add Traffic Flow Confidentiality padding XFRM attribute

The XFRMA_TFCPAD attribute for XFRM state installation configures
Traffic Flow Confidentiality by padding ESP packets to a specified
length.

Signed-off-by: Martin Willi <martin@strongswan.org>
Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: use the lockless variants of skb_queue
Changli Gao [Sat, 4 Dec 2010 15:01:52 +0000 (15:01 +0000)]
ifb: use the lockless variants of skb_queue

rq and tq are both protected by tx queue lock, so we can simply use
the lockless variants of skb_queue.

skb_queue_splice_tail_init() is used instead of the open coded and slow
one.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: remove unused macro TX_TIMEOUT
Changli Gao [Fri, 3 Dec 2010 19:55:20 +0000 (19:55 +0000)]
ifb: remove unused macro TX_TIMEOUT

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: remove the useless debug stats
Changli Gao [Fri, 3 Dec 2010 19:55:19 +0000 (19:55 +0000)]
ifb: remove the useless debug stats

These debug stats are not exported, and become useless.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: buffer count imbalance
Jan Glauber [Wed, 8 Dec 2010 02:58:01 +0000 (02:58 +0000)]
qeth: buffer count imbalance

The used buffers counter is not incremented in case of an error so
the counter can become negative. Increment the used buffers counter
before checking for errors.

Signed-off-by: Jan Glauber <jang@linux.vnet.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: l3 add vlan hdr in passthru frames
Frank Blaschka [Wed, 8 Dec 2010 02:58:00 +0000 (02:58 +0000)]
qeth: l3 add vlan hdr in passthru frames

OSA l3 mode is hw accelerated VLAN only for IPv4. Take care we
add the vlan hdr to a passthru frame in the device driver.

Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: support VIPA add/del in offline mode
Einar Lueck [Wed, 8 Dec 2010 02:57:59 +0000 (02:57 +0000)]
qeth: support VIPA add/del in offline mode

Only work through the IP adddress to do list if the card is UP or
SOFTSETUP. Enables to configure VIPA add/del in offline mode.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoqeth: support ipv6 query arp cache for HiperSockets
Einar Lueck [Wed, 8 Dec 2010 02:57:58 +0000 (02:57 +0000)]
qeth: support ipv6 query arp cache for HiperSockets

Function qeth_l3_arp_query now queries for IPv6 addresses, too, if
QETH_QARP_WITH_IPV6 is passed as parameter to the ioctl. HiperSockets
and GuestLAN in HiperSockets mode provide corresponding entries.

Signed-off-by: Einar Lueck <elelueck@de.ibm.com>
Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/ipv6/udp.c: fix typo in flush_stack()
Jiri Pirko [Thu, 9 Dec 2010 03:40:30 +0000 (03:40 +0000)]
net/ipv6/udp.c: fix typo in flush_stack()

skb1 should be passed as parameter to sk_rcvqueues_full() here.

Signed-off-by: Jiri Pirko <jpirko@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoipv6: Fix 'release_it' logic in tcp_v6_get_peer()
David S. Miller [Fri, 10 Dec 2010 21:16:09 +0000 (13:16 -0800)]
ipv6: Fix 'release_it' logic in tcp_v6_get_peer()

We accidently set it to "true" for the case where we
are using a route bound peer.

Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobridge: Fix return values of br_multicast_add_group/br_multicast_new_group
Tobias Klauser [Fri, 10 Dec 2010 03:18:04 +0000 (03:18 +0000)]
bridge: Fix return values of br_multicast_add_group/br_multicast_new_group

If br_multicast_new_group returns NULL, we would return 0 (no error) to
the caller of br_multicast_add_group, which is not what we want. Instead
br_multicast_new_group should return ERR_PTR(-ENOMEM) in this case.
Also propagate the error number returned by br_mdb_rehash properly.

Signed-off-by: Tobias Klauser <tklauser@distanz.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6
David S. Miller [Fri, 10 Dec 2010 19:22:57 +0000 (11:22 -0800)]
Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc...
David S. Miller [Fri, 10 Dec 2010 18:20:43 +0000 (10:20 -0800)]
Merge branch 'for-davem' of git://git./linux/kernel/git/bwh/sfc-next-2.6

13 years agoMerge branch 'for-davem' of git://git.kernel.org/pub/scm/linux/kernel/git/linville...
David S. Miller [Fri, 10 Dec 2010 17:50:47 +0000 (09:50 -0800)]
Merge branch 'for-davem' of git://git./linux/kernel/git/linville/wireless-next-2.6

Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c

13 years agodccp: remove unused macros
Shan Wei [Fri, 10 Dec 2010 11:49:23 +0000 (12:49 +0100)]
dccp: remove unused macros

Remove macros which have been unused since the initial implementation
(commit 7c657876b63cb1d8a2ec06f8fc6c37bb8412e66c, [DCCP]: Initial
 implementation from Tue Aug 9 20:14:34 2005 -0700).

Signed-off-by: Shan Wei <shanwei@cn.fujitsu.com>
Acked-by: Gerrit Renker <gerrit@erg.abdn.ac.uk>
13 years agobnx2x: Update version number and a date.
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:37 +0000 (01:43 +0000)]
bnx2x: Update version number and a date.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Fixed a compilation warning
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:29 +0000 (01:43 +0000)]
bnx2x: Fixed a compilation warning

bnx2x_src_init_t2() is used only when BCM_CNIC is defined.
So, to avoid a compilation warning, we won't define it unless
BCM_CNIC is defined.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: Use dma_alloc_coherent() semantics for ILT memory allocation
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:17 +0000 (01:43 +0000)]
bnx2x: Use dma_alloc_coherent() semantics for ILT memory allocation

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agobnx2x: LSO code was broken on BE platforms
Vladislav Zolotarov [Wed, 8 Dec 2010 01:43:09 +0000 (01:43 +0000)]
bnx2x: LSO code was broken on BE platforms

Make the LSO code work on BE platforms: parsing_data field of
a parsing BD (PBD) for 57712 was improperly composed which made FW read wrong
values for TCP header's length and offset and, as a result, the corresponding
PCI device was performing bad DMA reads triggering EEH.

Signed-off-by: Vladislav Zolotarov <vladz@broadcom.com>
Signed-off-by: Eilon Greenstein <eilong@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofilter: use size of fetched data in __load_pointer()
Eric Dumazet [Tue, 7 Dec 2010 22:26:15 +0000 (22:26 +0000)]
filter: use size of fetched data in __load_pointer()

__load_pointer() checks data we fetch from skb is included in head
portion, but assumes we fetch one byte, instead of up to four.

This wont crash because we have extra bytes (struct skb_shared_info)
after head, but this can read uninitialized bytes.

Fix this using size of the data (1, 2, 4 bytes) in the test.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoThe new jhash implementation
Jozsef Kadlecsik [Fri, 3 Dec 2010 02:39:01 +0000 (02:39 +0000)]
The new jhash implementation

The current jhash.h implements the lookup2() hash function by Bob Jenkins.
However, lookup2() is outdated as Bob wrote a new hash function called
lookup3(). The patch replaces the lookup2() implementation of the 'jhash*'
functions with that of lookup3().

You can read a longer comparison of the two and other hash functions at
http://burtleburtle.net/bob/hash/doobs.html.

Signed-off-by: Jozsef Kadlecsik <kadlec@blackhole.kfki.hu>
Acked-by: Rusty Russell <rusty@rustcorp.com.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: optimize INET input path further
Eric Dumazet [Tue, 30 Nov 2010 19:04:07 +0000 (19:04 +0000)]
net: optimize INET input path further

Followup of commit b178bb3dfc30 (net: reorder struct sock fields)

Optimize INET input path a bit further, by :

1) moving sk_refcnt close to sk_lock.

This reduces number of dirtied cache lines by one on 64bit arches (and
64 bytes cache line size).

2) moving inet_daddr & inet_rcv_saddr at the beginning of sk

(same cache line than hash / family / bound_dev_if / nulls_node)

This reduces number of accessed cache lines in lookups by one, and dont
increase size of inet and timewait socks.
inet and tw sockets now share same place-holder for these fields.

Before patch :

offsetof(struct sock, sk_refcnt) = 0x10
offsetof(struct sock, sk_lock) = 0x40
offsetof(struct sock, sk_receive_queue) = 0x60
offsetof(struct inet_sock, inet_daddr) = 0x270
offsetof(struct inet_sock, inet_rcv_saddr) = 0x274

After patch :

offsetof(struct sock, sk_refcnt) = 0x44
offsetof(struct sock, sk_lock) = 0x48
offsetof(struct sock, sk_receive_queue) = 0x68
offsetof(struct inet_sock, inet_daddr) = 0x0
offsetof(struct inet_sock, inet_rcv_saddr) = 0x4

compute_score() (udp or tcp) now use a single cache line per ignored
item, instead of two.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: Abstract away all dst_entry metrics accesses.
David S. Miller [Thu, 9 Dec 2010 05:16:57 +0000 (21:16 -0800)]
net: Abstract away all dst_entry metrics accesses.

Use helper functions to hide all direct accesses, especially writes,
to dst_entry metrics values.

This will allow us to:

1) More easily change how the metrics are stored.

2) Implement COW for metrics.

In particular this will help us put metrics into the inetpeer
cache if that is what we end up doing.  We can make the _metrics
member a pointer instead of an array, initially have it point
at the read-only metrics in the FIB, and then on the first set
grab an inetpeer entry and point the _metrics member there.

Signed-off-by: David S. Miller <davem@davemloft.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
13 years agocan: slcan: Add missing linux/sched.h include.
David S. Miller [Thu, 9 Dec 2010 02:41:03 +0000 (18:41 -0800)]
can: slcan: Add missing linux/sched.h include.

drivers/net/can/slcan.c: In function 'slcan_open':
drivers/net/can/slcan.c:568: error: dereferencing pointer to incomplete type

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
David S. Miller [Wed, 8 Dec 2010 21:15:38 +0000 (13:15 -0800)]
Merge branch 'master' of /linux/kernel/git/davem/net-2.6

Conflicts:
drivers/net/wireless/ath/ath9k/ar9003_eeprom.c
net/llc/af_llc.c

13 years agotcp: protect sysctl_tcp_cookie_size reads
Eric Dumazet [Tue, 7 Dec 2010 12:20:47 +0000 (12:20 +0000)]
tcp: protect sysctl_tcp_cookie_size reads

Make sure sysctl_tcp_cookie_size is read once in
tcp_cookie_size_check(), or we might return an illegal value to caller
if sysctl_tcp_cookie_size is changed by another cpu.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Ben Hutchings <bhutchings@solarflare.com>
Cc: William Allen Simpson <william.allen.simpson@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: avoid a possible divide by zero
Eric Dumazet [Tue, 7 Dec 2010 12:03:55 +0000 (12:03 +0000)]
tcp: avoid a possible divide by zero

sysctl_tcp_tso_win_divisor might be set to zero while one cpu runs in
tcp_tso_should_defer(). Make sure we dont allow a divide by zero by
reading sysctl_tcp_tso_win_divisor exactly once.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoehea: Fixing LRO configuration
Breno Leitao [Wed, 8 Dec 2010 20:19:14 +0000 (12:19 -0800)]
ehea: Fixing LRO configuration

In order to set LRO on ehea, the user must set a module parameter, which
is not the standard way to do so. This patch adds a way to set LRO using
the ethtool tool.

Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: Replace time wait bucket msg by counter
Tom Herbert [Wed, 8 Dec 2010 20:16:33 +0000 (12:16 -0800)]
tcp: Replace time wait bucket msg by counter

Rather than printing the message to the log, use a mib counter to keep
track of the count of occurences of time wait bucket overflow.  Reduces
spam in logs.

Signed-off-by: Tom Herbert <therbert@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agox25: decrement netdev reference counts on unload
Apollon Oikonomopoulos [Tue, 7 Dec 2010 09:43:30 +0000 (09:43 +0000)]
x25: decrement netdev reference counts on unload

x25 does not decrement the network device reference counts on module unload.
Thus unregistering any pre-existing interface after unloading the x25 module
hangs and results in

 unregister_netdevice: waiting for tap0 to become free. Usage count = 1

This patch decrements the reference counts of all interfaces in x25_link_free,
the way it is already done in x25_link_device_down for NETDEV_DOWN events.

Signed-off-by: Apollon Oikonomopoulos <apollon@noc.grnet.gr>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agodriver/net/benet: fix be_cmd_multicast_set() memcpy bug
Joe Jin [Mon, 6 Dec 2010 03:00:59 +0000 (03:00 +0000)]
driver/net/benet: fix be_cmd_multicast_set() memcpy bug

Regarding  benet be_cmd_multicast_set() function, now using
netdev_for_each_mc_addr() helper for mac address copy, but
when copying to req->mac[] did not increase of the index.

Cc: Sathya Perla <sathyap@serverengines.com>
Cc: Subbu Seetharaman <subbus@serverengines.com>
Cc: Sarveshwar Bandi <sarveshwarb@serverengines.com>
Cc: Ajit Khaparde <ajitk@serverengines.com>
Signed-off-by: Joe Jin <joe.jin@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agol2tp: Fix modalias of l2tp_ip
Michal Marek [Mon, 6 Dec 2010 02:39:12 +0000 (02:39 +0000)]
l2tp: Fix modalias of l2tp_ip

Using the SOCK_DGRAM enum results in
"net-pf-2-proto-SOCK_DGRAM-type-115", so use the numeric value like it
is done in net/dccp.

Signed-off-by: Michal Marek <mmarek@suse.cz>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoeconet: Do the correct cleanup after an unprivileged SIOCSIFADDR.
Nelson Elhage [Wed, 8 Dec 2010 18:13:55 +0000 (10:13 -0800)]
econet: Do the correct cleanup after an unprivileged SIOCSIFADDR.

We need to drop the mutex and do a dev_put, so set an error code and break like
the other paths, instead of returning directly.

Signed-off-by: Nelson Elhage <nelhage@ksplice.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'sfc-2.6.37' of git://git.kernel.org/pub/scm/linux/kernel/git/bwh/sfc-2.6
David S. Miller [Wed, 8 Dec 2010 20:13:23 +0000 (12:13 -0800)]
Merge branch 'sfc-2.6.37' of git://git./linux/kernel/git/bwh/sfc-2.6

13 years agoisdn/hisax: fix compiler warning on hisax_pci_tbl
Namhyung Kim [Tue, 7 Dec 2010 04:49:06 +0000 (04:49 +0000)]
isdn/hisax: fix compiler warning on hisax_pci_tbl

Annotate hisax_pci_tbl as '__used' to fix following warning:

  CC      drivers/isdn/hisax/config.o
drivers/isdn/hisax/config.c:1920: warning: ‘hisax_pci_tbl’ defined but not used

Signed-off-by: Namhyung Kim <namhyung@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_packet: fix freeing pg_vec twice on error path
Changli Gao [Tue, 7 Dec 2010 05:05:18 +0000 (05:05 +0000)]
af_packet: fix freeing pg_vec twice on error path

It is introduced in:
        commit 0e3125c755445664f00ad036e4fc2cd32fd52877
        Author: Neil Horman <nhorman@tuxdriver.com>
        Date:   Tue Nov 16 10:26:47 2010 -0800

        packet: Enhance AF_PACKET implementation to not require high order contiguous memory allocation (v4)

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoaf_packet: eliminate pgv_to_page on some arches
Changli Gao [Tue, 7 Dec 2010 04:26:16 +0000 (04:26 +0000)]
af_packet: eliminate pgv_to_page on some arches

Some arches don't need flush_dcache_page(), and don't implement it, so
we can eliminate pgv_to_page() calls on those arches.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: call dev_queue_xmit_nit() after skb_dst_drop()
Eric Dumazet [Tue, 7 Dec 2010 00:30:37 +0000 (00:30 +0000)]
net: call dev_queue_xmit_nit() after skb_dst_drop()

Avoid some atomic ops on dst refcount, calling dev_queue_xmit_nit()
after skb_dst_drop() in dev_hard_start_xmit().

When queueing a packet into af_packet socket, we drop dst anyway.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agofilter: constify sk_run_filter()
Eric Dumazet [Mon, 6 Dec 2010 20:50:09 +0000 (20:50 +0000)]
filter: constify sk_run_filter()

sk_run_filter() doesnt write on skb, change its prototype to reflect
this.

Fix two af_packet comments.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agovia-rhine: hardware VLAN support
Roger Luethi [Mon, 6 Dec 2010 00:59:40 +0000 (00:59 +0000)]
via-rhine: hardware VLAN support

This patch adds VLAN hardware support for Rhine chips.

The driver uses up to 3 additional bytes of buffer space when extracting
802.1Q headers; PKT_BUF_SZ should still be sufficient.

The initial code was provided by David Lv. I reworked it to use standard
kernel facilities. Coding style clean up mostly follows via-velocity.

Adapted to new interface for VLAN acceleration (per request of Jesse Gross).

Signed-off-by: David Lv <DavidLv@viatech.com.cn>
Signed-off-by: Roger Luethi <rl@hellgate.ch>
 drivers/net/via-rhine.c |  326 +++++++++++++++++++++++++++++++++++++++++++++--
 1 files changed, 312 insertions(+), 14 deletions(-)
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: RCU conversion of dev_getbyhwaddr() and arp_ioctl()
Eric Dumazet [Sun, 5 Dec 2010 01:23:53 +0000 (01:23 +0000)]
net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()

Le dimanche 05 décembre 2010 à 09:19 +0100, Eric Dumazet a écrit :

> Hmm..
>
> If somebody can explain why RTNL is held in arp_ioctl() (and therefore
> in arp_req_delete()), we might first remove RTNL use in arp_ioctl() so
> that your patch can be applied.
>
> Right now it is not good, because RTNL wont be necessarly held when you
> are going to call arp_invalidate() ?

While doing this analysis, I found a refcount bug in llc, I'll send a
patch for net-2.6

Meanwhile, here is the patch for net-next-2.6

Your patch then can be applied after mine.

Thanks

[PATCH] net: RCU conversion of dev_getbyhwaddr() and arp_ioctl()

dev_getbyhwaddr() was called under RTNL.

Rename it to dev_getbyhwaddr_rcu() and change all its caller to now use
RCU locking instead of RTNL.

Change arp_ioctl() to use RCU instead of RTNL locking.

Note: this fix a dev refcount bug in llc

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoMerge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6
David S. Miller [Wed, 8 Dec 2010 18:01:00 +0000 (10:01 -0800)]
Merge branch 'dccp' of git://eden-feed.erg.abdn.ac.uk/net-next-2.6

13 years agollc: fix a device refcount imbalance
Eric Dumazet [Sun, 5 Dec 2010 02:03:26 +0000 (02:03 +0000)]
llc: fix a device refcount imbalance

Le dimanche 05 décembre 2010 à 12:23 +0100, Eric Dumazet a écrit :
> Le dimanche 05 décembre 2010 à 09:19 +0100, Eric Dumazet a écrit :
>
> > Hmm..
> >
> > If somebody can explain why RTNL is held in arp_ioctl() (and therefore
> > in arp_req_delete()), we might first remove RTNL use in arp_ioctl() so
> > that your patch can be applied.
> >
> > Right now it is not good, because RTNL wont be necessarly held when you
> > are going to call arp_invalidate() ?
>
> While doing this analysis, I found a refcount bug in llc, I'll send a
> patch for net-2.6

Oh well, of course I must first fix the bug in net-2.6, and wait David
pull the fix in net-next-2.6 before sending this rcu conversion.

Note: this patch should be sent to stable teams (2.6.34 and up)

[PATCH net-2.6] llc: fix a device refcount imbalance

commit abf9d537fea225 (llc: add support for SO_BINDTODEVICE) added one
refcount imbalance in llc_ui_bind(), because dev_getbyhwaddr() doesnt
take a reference on device, while dev_get_by_index() does.

Fix this using RCU locking. And since an RCU conversion will be done for
2.6.38 for dev_getbyhwaddr(), put the rcu_read_lock/unlock exactly at
their final place.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Cc: stable@kernel.org
Cc: Octavian Purdila <opurdila@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet/9p/protocol.c: Remove duplicated macros.
Thiago Farina [Sat, 4 Dec 2010 15:22:46 +0000 (15:22 +0000)]
net/9p/protocol.c: Remove duplicated macros.

Use the macros already provided by kernel.h file.

Signed-off-by: Thiago Farina <tfransosi@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agoifb: goto resched directly if error happens and dp->tq isn't empty
Changli Gao [Sat, 4 Dec 2010 14:09:08 +0000 (14:09 +0000)]
ifb: goto resched directly if error happens and dp->tq isn't empty

If we break the loop when there are still skbs in tq and no skb in
rq, the skbs will be left in txq until new skbs are enqueued into rq.
In rare cases, no new skb is queued, then these skbs will stay in rq
forever.

After this patch, if tq isn't empty when we break the loop, we goto
resched directly.

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Signed-off-by: Jamal Hadi Salim <hadi@cyberus.ca>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agonet: init ingress queue
Changli Gao [Sat, 4 Dec 2010 02:31:41 +0000 (02:31 +0000)]
net: init ingress queue

The dev field of ingress queue is forgot to initialized, then NULL
pointer dereference happens in qdisc_alloc().

Move inits of tx queues to netif_alloc_netdev_queues().

Signed-off-by: Changli Gao <xiaosuo@gmail.com>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
13 years agotcp: Bug fix in initialization of receive window.
Nandita Dukkipati [Fri, 3 Dec 2010 13:33:44 +0000 (13:33 +0000)]
tcp: Bug fix in initialization of receive window.

The bug has to do with boundary checks on the initial receive window.
If the initial receive window falls between init_cwnd and the
receive window specified by the user, the initial window is incorrectly
brought down to init_cwnd. The correct behavior is to allow it to
remain unchanged.

Signed-off-by: Nandita Dukkipati <nanditad@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>