dect
/
linux-2.6
Archived
13
0
Fork 0
Commit Graph

334513 Commits

Author SHA1 Message Date
Eric Dumazet 46baac38ef pkt_sched: use ns_to_ktime() helper
ns_to_ktime() seems better than ktime_set() + ktime_add_ns()

Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:21:27 -04:00
Padmanabh Ratnakar 47c1b7b95e be2net: Update driver version
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:37 -04:00
Padmanabh Ratnakar 76b735305b be2net: Fix skyhawk VF PCI Device ID
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:37 -04:00
Padmanabh Ratnakar 773a2d7c55 be2net: Fix FW flashing on Skyhawk-R
FW flash layout on Skyhawk-R is different from BE3-R.
Hence the code needs to be fixed to flash FW on Skyhawk-R.
Also cleaning up code in BE3-R flashing function.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:37 -04:00
Padmanabh Ratnakar 028991e49a be2net: Enabling Wake-on-LAN is not supported in S5 state
be_shutdown is enabling wake-on-lan by calling be_setup_wol.
Emulex adapter do not support wake-on-lan in S5 state.

Signed-off-by: Vasundhara Volam <vasundhara.volam@emulex.com>
Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:37 -04:00
Padmanabh Ratnakar dcf7ebba94 be2net: Fix VF driver load on newer Lancer FW
PF driver should enable VF so that VF goes to ready state in
new Lancer FW.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:37 -04:00
Padmanabh Ratnakar c8a541630d be2net: Fix unnecessary delay in PCI EEH
During PCI EEH, driver waits for all functions in the card.
Wait is needed only once per card. Fix is to wait only for the
first PCI function.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:36 -04:00
Padmanabh Ratnakar aa790db9a7 be2net: Fix issues in error recovery due to wrong queue state
During recovery from a FW error, destroy queue operation may fail.
Queue should be marked as destroyed so that recovery code can recreate
the queue. Also fix queue created state not getting checked at one instance.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:36 -04:00
Padmanabh Ratnakar db15dfa957 be2net: Fix ethtool get_settings output for VF
Return default values for fields for which VFs dont have privilege to get the
required information from FW.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:36 -04:00
Padmanabh Ratnakar f25b119c6c be2net: Fix error messages while driver load for VFs
VF does not have privileges to execute many commands. When VFs try
to execute those commands there are unnecessary error messages.
Fix this by executing only those commands for which VF has privilege.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:36 -04:00
Padmanabh Ratnakar a85e998681 be2net: Fix configuring VLAN for VF for Lancer
Allow adding VLANs for Lancer VF.
VLAN ID 0 should not be added to list of VLANs sent to FW.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:36 -04:00
Padmanabh Ratnakar 67297ad8a6 be2net: Wait till resources are available for VF in error recovery
After FW error, driver should wait for NO_RESOURCE error to disappear before
proceeding with recovery.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:36 -04:00
Padmanabh Ratnakar 704e4c88f0 be2net: Fix change MAC operation for VF for Lancer
For changing MAC of VF from PF, delete MAC operation needs to be done before
assigning new MAC. Also in ndo_set_mac_address operation avoid delete MAC if
it has been already deleted by PF.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:36 -04:00
Padmanabh Ratnakar d5c184731f be2net: Fix setting QoS for VF for Lancer
Use Lancer specific command to set QoS for VF.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:35 -04:00
Padmanabh Ratnakar abb9395123 be2net: Fix driver load failure for different FW configs in Lancer
Driver assumes FW resource counts and capabilities while creating queues and
using functionality like RSS. This causes driver load to fail in FW configs
where resources and capabilities are reduced. Fix this by querying FW
configuration during probe and using resources and capabilities accordingly.

Signed-off-by: Padmanabh Ratnakar <padmanabh.ratnakar@emulex.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 22:15:35 -04:00
Rami Rosen 47b70db555 net:dev: remove double indentical assignment in dev_change_net_namespace().
This patch removes double assignment of err to -EINVAL in dev_change_net_namespace().

Signed-off-by: Rami Rosen <ramirose@gmail.com>
Acked-by: Serge E. Hallyn <serge.hallyn@ubuntu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 20:44:39 -04:00
Pavel Emelyanov f7b86bfe8d sockopt: Make SO_BINDTODEVICE readable
The SO_BINDTODEVICE option is the only SOL_SOCKET one that can be set, but
cannot be get via sockopt API. The only way we can find the device id a
socket is bound to is via sock-diag interface. But the diag works only on
hashed sockets, while the opt in question can be set for yet unhashed one.

That said, in order to know what device a socket is bound to (we do want
to know this in checkpoint-restore project) I propose to make this option
getsockopt-able and report the respective device index.

Another solution to the problem might be to teach the sock-diag reporting
info on unhashed sockets. Should I go this way instead?

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Acked-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 20:42:18 -04:00
Pavel Emelyanov 0da5f7c6d2 unix: Remove unused field from unix_sock
The struct sock *other one seem to be unused. Grep and make do not object.

Signed-off-by: Pavel Emelyanov <xemul@parallels.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 20:37:06 -04:00
Joe Perches 06e3041164 pktgen: Use ipv6_addr_any
Use the standard test for a non-zero ipv6 address.

Signed-off-by: Joe Perches <joe@perches.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 20:37:05 -04:00
Haiyang Zhang 3fbca4a2fe hyperv: Remove unnecessary comments in rndis_filter_receive_data()
Checked with Windows networking team, there is only one RNDIS message
in each netvsc packet.

Signed-off-by: Haiyang Zhang <haiyangz@microsoft.com>
Reviewed-by: K. Y. Srinivasan <kys@microsoft.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-21 20:35:40 -04:00
David S. Miller 72ec301a27 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next
Jeff Kirsher says:

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

Alexander Duyck (13):
  ixgbe: Initialize q_vector cpu and affinity masks correctly
  ixgbe: Enable jumbo frames support w/ SR-IOV
  ixgbe: Move message handling routines into their own functions
  ixgbe: Add mailbox API version negotiation support to ixgbe PF
  igb: Split Rx timestamping into two separate functions
  igb: Do not use header split, instead receive all frames into a
    single buffer
  igb: Combine post-processing of skb into a single function
  igb: Map entire page and sync half instead of mapping and unmapping
    half pages
  igb: Move rx_buffer related code in Rx cleanup path into separate
    function
  igb: Lock buffer size at 2K even on systems with larger pages
  igb: Combine q_vector and ring allocation into a single function
  igb: Move the calls to set the Tx and Rx queues into igb_open
  igb: Split igb_update_dca into separate Tx and Rx functions

Tushar Dave (1):
  igb: Correcting and improving small packet check and padding
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-19 22:19:23 -04:00
David S. Miller 1b6f0f9242 Merge branch 'at91'
Joachim Eastwood says;

====================
This patch series prepares the old at91_ether driver for code sharing
with the macb driver. The hardware is similar except for DMA TX/RX, so
its not quite clear if it is practical to support both in one
driver. But stuff like MDIO and statistics should be possible to
share.

Patch 1 adds some register defines and bits that is only found on
RM9200.

Patch 2-4 uses the register defines and access functions from the macb
header. These can be squashed if it cause too much churn.

Patch 5 merges the private at91_ether struct with the private macb
struct. This makes it easier to later share code with the macb. The
private macb struct becomes quite large, but most at91_ether specific
members are removed in later patches.

Patch 8 make macb compile when we select at91_ether. Is this approach
okey?

Patch 9 makes use of MDIO code from macb. This rips out the private
phy handling code in at91_ether. One thing that is lost is the
interrupt support for phy. But this should easy to add to macb which
will then benefit both drivers.

Patch 10 makes use of the macb_set_rx_mode from macb.

Patch 11-12 makes at91_ether share the rx dma struct members from
macb. Patch also moves the rx buffer allocation into netdev open and
dealloc into netdev close.

Last patch remove the now unused rm9200 emac header from include/mach.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2012-10-19 13:47:00 -04:00
Joachim Eastwood 4fa7fc10bc ARM: AT91: remove old RM9200 EMAC register definitions
This file is unused after at91_ether was converted to use macb.h

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:30 -04:00
Joachim Eastwood 6397346162 net/at91_ether: convert to devm_* functions
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:30 -04:00
Joachim Eastwood 04879e5cb4 net/at91_ether: clean up rx buffer handling
This patch does two things:
* Use macb struct members and remove at91_ether ones
* Alloc DMA buffers on netdev start and dealloc on stop

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood fbb7a6e7d4 net/at91_ether: use macb dma description struct
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood e0da1f144a net/at91_ether: share macb_set_rx_mode with macb
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood 5e32353d31 net/at91_ether: use ethtool and mdio from macb
This rips out the at91_ether phy handling and ethtool stuff
and replace it with equivalent stuff from macb.

The only thing lost is the phy irq support from at91_ether,
but this can be added to macb and then benefit all users.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood 0112a1dac5 net/at91_ether: compile macb for exported functions
Comile macb as well as at91_ether to access exported functions.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood 0005f54102 net/macb: export some symbols for at91_ether
Export some symbols to start sharing code between
macb and at91_ether drivers.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood 54f14e4b4d net/at91_ether: use pclk member instead of ether_clk
Remove old at91_priv member and use pclk member from macb.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood b85008b702 net/at91_ether/macb: absorb at91_private in to macb private struct
This will make it easier to share code between the drivers and
eventually merge them into one driver.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:29 -04:00
Joachim Eastwood a723b98434 net/at91_ether: use macb defs for rx dma buffers
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:28 -04:00
Joachim Eastwood f8bded383e net/at91_ether: use macb access functions
Use macb read/write funtions and remove the old at91_ether ones.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:28 -04:00
Joachim Eastwood bc3bbef690 net/at91_ether: use macb register definitions
Use register and bits definitions from the macb header. This makes it
possible to have one header file for this hardware.

Process was scripted and the resulting object file has the same checksum.

Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:28 -04:00
Joachim Eastwood 1fd3ca4e14 net/macb: add AT91RM9200 specific registers and bits to header
Signed-off-by: Joachim Eastwood <manabian@gmail.com>
2012-10-19 13:18:28 -04:00
Alexander Duyck 6a05004a8a igb: Split igb_update_dca into separate Tx and Rx functions
This change makes it so that igb_update_dca is broken into two halves, one
for Rx and one for Tx.  The advantage to this is primarily readability.

In addition I am enabling relaxed ordering for reads from hardware since
this is supported on all of the igb parts.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:42:13 -07:00
Alexander Duyck 0c2cc02e57 igb: Move the calls to set the Tx and Rx queues into igb_open
This change helps to address locking issues seen with
netif_set_real_num_tx_queues and netif_set_real_num_rx_queues when used in
the igb_set_interrupt_capability function.  To resolve these locking issues
I have moved the two function calls into __igb_open so that they can be
called while the RTNL lock is held.

An added advantage to this is that the number of queues is not updated
until the last possible moment so if there are any issues in allocating
MSI-X interrupts or resources for the rings we have time to change the
values prior to updating the netdev.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:40:46 -07:00
Alexander Duyck 5536d2102a igb: Combine q_vector and ring allocation into a single function
This change combines the the allocation of q_vectors and rings into a single
function.  The advantage of this is that we are guaranteed we will avoid
overlap in the L1 cache sets.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:39:35 -07:00
Alexander Duyck de78d1f9c8 igb: Lock buffer size at 2K even on systems with larger pages
This change locks us in at 2K buffers even on a system that supports larger
frames.  The reason for this change is to make better use of pages and to
reduce the overall truesize of frames generated by igb.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:34:35 -07:00
Alexander Duyck 2e334eee9b igb: Move rx_buffer related code in Rx cleanup path into separate function
In order to try and isolate things a bit further I am moving the code
related to retrieving data from the rx_buffer_info structure into a
separate function.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:32:01 -07:00
Alexander Duyck cbc8e55f6f igb: Map entire page and sync half instead of mapping and unmapping half pages
This change makes it so that we map the entire page and just sync half of
it for the device at a time.  The advantage to this approach is that we can
avoid the locking on map/unmap seen in many IOMMU implementations.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:30:25 -07:00
Alexander Duyck db2ee5bdf5 igb: Combine post-processing of skb into a single function
This change is meant to just clean-up a number of function calls that were
made at the end of the Rx clean-up path by combining them into a single
function call.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:28:38 -07:00
Alexander Duyck 1a1c225b94 igb: Do not use header split, instead receive all frames into a single buffer
This change makes it so that we no longer use header split.  The idea is to
reduce partial cache line writes by hardware when handling frames larger
then header size.  We can compensate for the extra overhead of having to
memcpy the header buffer by avoiding the cache misses seen by leaving an
full skb allocated and sitting on the ring.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:27:30 -07:00
Alexander Duyck b534550a17 igb: Split Rx timestamping into two separate functions
In order to support page based receive we will need to split up the two
different types of timestamping into two separate functions.  The first one
will handle legacy timestamps with the value in the register, and the new
one will handle timestamps in the Rx buffer itself.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Acked-by: Matthew Vick <matthew.vick@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:25:10 -07:00
Tushar Dave ea5ceeabf5 igb: Correcting and improving small packet check and padding
Current implementation mess up the tail pointer. This patch sets skb->tail
correctly.
Also, the small packet check and padding is optimized by using unlikely and
calling skb_pad directly.

Signed-off-by: Tushar Dave <tushar.n.dave@intel.com>
Tested-by: Jeff Pieper <jeffrey.e.pieper@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:23:29 -07:00
Alexander Duyck 374c65d666 ixgbe: Add mailbox API version negotiation support to ixgbe PF
This change allows us to add a mailbox versioning API.  This will allow us
to determine the features supported by the VFs from the PF.  For example we
will be implementing a version 1.1 API for the VF that will indicate that
it can support us enabling Jumbo frames as the VF will support buffer
chaining.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Robert Garrett <RobertX.Garrett@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:08:18 -07:00
Alexander Duyck 58a02beedf ixgbe: Move message handling routines into their own functions
Instead of trying to maintain one large monolithic function that handles
most of the different messages from the VF it makes sense to break the
message handling function up so that we can just go through one switch
statement and call the correct routine for a given message.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:06:15 -07:00
Alexander Duyck 872844ddb9 ixgbe: Enable jumbo frames support w/ SR-IOV
This change makes it so that we can have limited support for jumbo frames
when SR-IOV is enabled.  In order to accomplish this it is necessary to
disable all VFs when the PF has jumbo frames enabled.  If the VFs then
request the same maximum frame size as the PF they will be re-enabled.  A
follow on patch will add a means of identifying when a VF can support
spanning buffers and does not need to be worried about the actual supported
max frame size.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Tested-by: Robert Garrett <robertx.e.garrett@intel.com>
Tested-by: Sibai Li <Sibai.li@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 04:04:14 -07:00
Alexander Duyck 245f292d71 ixgbe: Initialize q_vector cpu and affinity masks correctly
When enabling DCB the rings belonging to a q_vector on CPU 0 were not
reinitializing their DCA registers.  Upon closer inspection the issue was
that the q_vector CPU variable was left at 0 resulting in the driver not
updating the DCA registers.

In order to guarantee the DCA registers will be updated I am adding a
couple line change so that we initialize the CPU variable to -1 which will
force a DCA update the first time an interrupt fires on that q_vector.

In addition we were setting the CPU affinity hint to all CPUs when we were
not specifying a CPU.  Instead we should leave it as all zeros to avoid any
possible confusion about the fact that we shouldn't be giving a hint.

Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Tested-by: Ross Brattain <ross.b.brattain@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2012-10-19 03:52:02 -07:00