Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Dmitry Kravkov <dmitry@broadcom.com> Signed-off-by: Eilon Greenstein <eilong@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
bnx2x: Take the distribution range definition out of skb_tx_hash()
Move the calcualation of the Tx hash for a given hash range into a separate
function and define the skb_tx_hash(), which calculates a Tx hash for a
[0; dev->real_num_tx_queues - 1] hash values range, using this
function (__skb_tx_hash()).
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>
David S. Miller [Mon, 13 Dec 2010 20:52:14 +0000 (12:52 -0800)]
net: Abstract default ADVMSS behind an accessor.
Make all RTAX_ADVMSS metric accesses go through a new helper function,
dst_metric_advmss().
Leave the actual default metric as "zero" in the real metric slot,
and compute the actual default value dynamically via a new dst_ops
AF specific callback.
For stacked IPSEC routes, we use the advmss of the path which
preserves existing behavior.
Unlike ipv4/ipv6, DecNET ties the advmss to the mtu and thus updates
advmss on pmtu updates. This inconsistency in advmss handling
results in more raw metric accesses than I wish we ended up with.
Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Sun, 12 Dec 2010 20:24:26 +0000 (20:24 +0000)]
pch_can: Replace netif_rx to netif_receive_skb
Since this driver is implemented as NAPI,
netif_receive_skb must be used not netif_rx.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Sun, 12 Dec 2010 20:24:24 +0000 (20:24 +0000)]
pch_can: Optimize "if" condition in rx/tx processing
For reduce "if" condition, easy to read/understand the code,
optimize "if" condition in rx/tx processing.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Sun, 12 Dec 2010 20:24:22 +0000 (20:24 +0000)]
pch_can: Move MSI processing to probe/remove processing
Currently, in case this driver is integrated as module, and when this
module is re-installed, no interrupts is to be occurred.
For the above issue, move MSI processing to open/release processing.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Sun, 12 Dec 2010 20:24:19 +0000 (20:24 +0000)]
pch_can: Fix bit timing calculation issue
Modify like use calculated value directly passed by CAN core module.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Sun, 12 Dec 2010 20:24:17 +0000 (20:24 +0000)]
pch_can: Fix coding rule violation
Fix coding rule violation.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Acked-by: Marc Kleine-Budde <mkl@pengutronix.de> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Sun, 12 Dec 2010 20:24:11 +0000 (20:24 +0000)]
pch_can: Fix warnings
Currently, in case CONFIG_PM is disabled, compiler outputs warnings.
Move six functions which are used only CONFIG_PM is enabled,
into "#ifdef CONFIG_PM" area.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Tomoya [Sun, 12 Dec 2010 20:24:07 +0000 (20:24 +0000)]
pch_can: Add flow control processing
Currently, there is no flow control processing.
Thus, Add flow control processing as
when there is no empty of tx buffer,
netif_stop_queue is called.
When there is empty buffer, netif_wake_queue is called.
Signed-off-by: Tomoya MORINAGA <tomoya-linux@dsn.okisemi.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Joe Perches [Mon, 13 Dec 2010 18:05:14 +0000 (10:05 -0800)]
ehea: Use the standard logging functions
Remove ehea_error, ehea_info and ehea_debug macros.
Use pr_fmt, pr_<level>, netdev_<level> and netif_<level> as appropriate.
Fix messages to use trailing "\n", some messages had an extra one
as the old ehea_<level> macros added a trailing "\n".
Coalesced long format strings.
Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Breno Leitao <leitao@linux.vnet.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
David S. Miller [Mon, 13 Dec 2010 05:55:08 +0000 (21:55 -0800)]
ipv4: Don't pre-seed hoplimit metric.
Always go through a new ip4_dst_hoplimit() helper, just like ipv6.
This allowed several simplifications:
1) The interim dst_metric_hoplimit() can go as it's no longer
userd.
2) The sysctl_ip_default_ttl entry no longer needs to use
ipv4_doint_and_flush, since the sysctl is not cached in
routing cache metrics any longer.
3) ipv4_doint_and_flush no longer needs to be exported and
therefore can be marked static.
When ipv4_doint_and_flush_strategy was removed some time ago,
the external declaration in ip.h was mistakenly left around
so kill that off too.
We have to move the sysctl_ip_default_ttl declaration into
ipv4's route cache definition header net/route.h, because
currently net/ip.h (where the declaration lives now) has
a back dependency on net/route.h
Signed-off-by: David S. Miller <davem@davemloft.net>
Tejun Heo [Sun, 12 Dec 2010 15:45:15 +0000 (16:45 +0100)]
hostap: don't use flush_scheduled_work()
flush_scheduled_work() is on its way out. Drop flush_scheduled_work()
from prism2_free_local_data() and replace it with explicit flushing of
work items on the respective free functions. Work items in ap_data
are flushed from hostap_free_data() and the ones in local_info from
prism2_free_local_data().
Flush is used instead of cancel as some process and free items from
queue.
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
i2400m: drop i2400m_schedule_work()
i2400m implements dynamic work allocation and queueing mechanism in
i2400_schedule_work(); however, this is only used for reset and
recovery which can be served equally well with preallocated per device
works.
Replace i2400m_schedule_work() with two work structs in struct i2400m.
These works are explicitly canceled when the device is released making
calls to flush_scheduled_work(), which is being deprecated,
unnecessary.
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
sungem: update gp->reset_task flushing
gp->reset_task_pending is always set right before reset_task is
scheduled and as there is no synchronization between the setting and
scheduling, busy looping on reset_task_pending before flushing
reset_task doesn't really buy anything.
Directly flush gp->reset_task on suspend and cancel on detach.
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
iseries_veth: don't use flush_scheduled_work()
flush_scheduled_work() is on its way out. Remove its usage from
iseries_veth.
* Cancelling a delayed work, queueing it for immediate execution if
cancelled and then waiting for completion can be done by simply
calling flush_delayed_work_sync().
* Explicitly cancel cnx->statemachine_wq on module unload.
Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Santiago Leon <santil@linux.vnet.ibm.com> Cc: netdev@vger.kernel.org
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
ehea: don't use flush_scheduled_work()
Directly cancel port->reset_task from ehea_shutdown_single_port()
instead. As this cancels the work for each port on driver detach,
flushing system_wq from ehea_remove() or ehea_module_exit() is no
longer necessary.
Tejun Heo [Sun, 12 Dec 2010 15:45:14 +0000 (16:45 +0100)]
drivers/net: don't use flush_scheduled_work()
flush_scheduled_work() is on its way out. This patch contains simple
conversions to replace flush_scheduled_work() usage with direct
cancels and flushes.
Directly cancel the used works on driver detach and flush them in
other cases.
The conversions are mostly straight forward and the only dangers are,
* Forgetting to cancel/flush one or more used works.
* Cancelling when a work should be flushed (ie. the work must be
executed once scheduled whether the driver is detaching or not).
I've gone over the changes multiple times but it would be much
appreciated if you can review with the above points in mind.
Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Jay Cliburn <jcliburn@gmail.com> Cc: Michael Chan <mchan@broadcom.com> Cc: Divy Le Ray <divy@chelsio.com> Cc: e1000-devel@lists.sourceforge.net Cc: Vasanthy Kolluri <vkolluri@cisco.com> Cc: Samuel Ortiz <samuel@sortiz.org> Cc: Lennert Buytenhek <buytenh@wantstofly.org> Cc: Andrew Gallatin <gallatin@myri.com> Cc: Francois Romieu <romieu@fr.zoreil.com> Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Cc: Matt Carlson <mcarlson@broadcom.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Shreyas Bhatewara <sbhatewara@vmware.com> Cc: netdev@vger.kernel.org
janz-ican3, sh_eth, skge and vxge don't use workqueue at all and there
is no reason to flush the system_wq. Drop flush_scheduled_work()
calls and references to workqueue.
Signed-off-by: Tejun Heo <tj@kernel.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Wolfgang Grandegger <wg@grandegger.com> Cc: Stephen Hemminger <shemminger@linux-foundation.org> Cc: Ramkrishna Vepa <ramkrishna.vepa@exar.com> Cc: Sivakumar Subramani <sivakumar.subramani@exar.com> Cc: Sreenivasa Honnur <sreenivasa.honnur@exar.com> Cc: Jon Mason <jon.mason@exar.com> Cc: netdev@vger.kernel.org
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>