summaryrefslogtreecommitdiffstats
path: root/drivers
AgeCommit message (Collapse)AuthorFilesLines
2014-01-06vxlan: keep original skb ownershipEric Dumazet1-21/+10
Sathya Perla posted a patch trying to address following problem : <quote> The vxlan driver sets itself as the socket owner for all the TX flows it encapsulates (using vxlan_set_owner()) and assigns it's own skb destructor. This causes all tunneled traffic to land up on only one TXQ as all encapsulated skbs refer to the vxlan socket and not the original socket. Also, the vxlan skb destructor breaks some functionality for tunneled traffic like wmem accounting and as TCP small queues and FQ/pacing packet scheduler. </quote> I reworked Sathya patch and added some explanations. vxlan_xmit() can avoid one skb_clone()/dev_kfree_skb() pair and gain better drop monitor accuracy, by calling kfree_skb() when appropriate. The UDP socket used by vxlan to perform encapsulation of xmit packets do not need to be alive while packets leave vxlan code. Its better to keep original socket ownership to get proper feedback from qdisc and NIC layers. We use skb->sk to A) control amount of bytes/packets queued on behalf of a socket, but prior vxlan code did the skb->sk transfert without any limit/control on vxlan socket sk_sndbuf. B) security purposes (as selinux) or netfilter uses, and I do not think anything is prepared to handle vxlan stacked case in this area. By not changing ownership, vxlan tunnels behave like other tunnels. As Stephen mentioned, we might do the same change in L2TP. Reported-by: Sathya Perla <sathya.perla@emulex.com> Signed-off-by: Eric Dumazet <edumazet@google.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06bonding: fix kstrtou8() return value verification in num_peer_notifVeaceslav Falico1-1/+1
It returns 0 in case of success, !0 error otherwise. Fix the improper error verification. Fixes: 2c9839c143bbc ("bonding: add num_grat_arp attribute netlink support") CC: sfeldma@cumulusnetworks.com CC: Jay Vosburgh <fubar@us.ibm.com> CC: Andy Gospodarek <andy@greyhouse.net> Signed-off-by: Veaceslav Falico <vfalico@redhat.com> Acked-by: Scott Feldman <sfeldma@cumulusnetworks.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06r8152: replace the return value of rtl_ops_inithayeswang1-9/+11
Replace the boolean value with the error code for the return value of the rtl_ops_init(). Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06r8152: move the actions of saving the information of the devicehayeswang1-3/+4
Some information of the device may be used in other functions. Move the relative code to make sure it would be initialzed correctly before using it. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06r8152: replace some tabs with spaceshayeswang1-8/+8
Replace the tabs of the variables declaration with the spaces. Signed-off-by: Hayes Wang <hayeswang@realtek.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-06i40e: Do not allow AQ calls from ndo-opsAnjali Singhai Jain1-17/+13
If the device is not in a working state avoid making admin queue (AQ) calls that rely on a working AQ. Change-Id: Ifbba6d257b3a5b51bfe92938c04088c0baa21433 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: check asq alive before notifyAnjali Singhai Jain1-1/+2
Driver needs to make sure the send queue is alive before trying to use it. Chagne-Id: I9bd1f6159c45c98e63f562e3a8dfb57edfe50e13 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: Admin queue shutdown fixesAnjali Singhai Jain4-28/+44
Always call the AQ call to shutdown the queue in the shutdown path. Check ASQ is alive before issuing the AQ command since we might be resetting to recover from a bad state in which case we should not issue the AQ command. Use the register variable for length so it can be used by PF, VF and GL AQ commands. Change-Id: Ic3d305687ea3f1a6afa84e864b7a27bd38a9af32 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: Hide the Port VLAN VLAN IDGreg Rose1-1/+1
The VF VSI Port VLAN settings still allow the user to view VLAN tag in the descriptor. Fix the settings to hide the VLAN ID from the VF. The VF is not supposed to be aware it is on a VLAN in the Port VLAN scenario. Change-Id: I976f2bacb455dbb750f8c53a781c689f02cb8907 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: use correct struct for get and update vsi paramsShannon Nelson1-6/+6
The get_vsi_params and update_vsi_params functions were using a different command struct that just happened to have an seid element in the right place and so worked correctly anyway. This patch fixes the functions to use the right data struct. There is no actual logic change. Change-Id: I513b5e1dc293dfd5b2ba4fa443cbdbfa608d9d19 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: Fix VF driver MAC address configurationGreg Rose2-13/+48
Fix a problem where the 'ip link show' command would display stale link address information after the link address was set via the 'ip link set' command. In addition, fix problem with the user being allowed to overwrite the administratively set VF MAC address. Change-Id: I669ed14e55f2b633ef7b456b713632b08468671c Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: support VFs on PFs other than 0Mitch Williams1-8/+10
When communicating with VF devices over the AQ, the FW refers to the VF by its global VF ID, not local the VF ID with reference to its parent PF. Since the global and local VF IDs are identical for PF 0, the code worked correctly on PF 0. However, we cannot just use global IDs throughout the code as most of the other references to the VF (VSI setup, register offsets, etc.) require the local VF ID. Instead, we just add or subtract our base VF ID when sending and receiving AQ messages. Change-Id: I92f4332b4876bc68b2f9af9ebf48761f63b6bd97 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: acknowledge VFLR when disabling SR-IOVMitch Williams1-2/+13
When SR-IOV is disabled, the (now nonexistent) virtual function devices undergo a VFLR event. We don't need to handle this event because the VFs are gone, but we do need to tell the HW that they are complete. This fixes an issue with a phantom VFLR and broken VFs when SR-IOV is re-enabled. Change-Id: I7580b49ded0158172a85b14661ec212af77000c8 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: don't allocate zero sizeMitch Williams1-0/+1
Shockingly, the compiler didn't flag this uninitialized variable. This fixes a potential memory corruption condition where ARQ messages are written to random memory locations. Change-Id: Iac82f4562d2bf3f42df3f3b2163d9cbed2160135 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: use struct assign instead of memcpyMitch Williams1-1/+1
Use struct assignment rather than an expensive memory copy. Change-Id: I1d18d510774dfd41a9c1250cdef238a4187528f5 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: Do not enable default port on the VEBGreg Rose1-1/+1
Enabling the default port on the VEB causes all outgoing traffic from virtual functions to be copied to the physical function. The default port is only supposed to be used if you wish to bridge the physical function to a SW switch such as Open vSwitch or the Linux bridge. That allows the SW switch to route traffic to VMs that are not using a virtual function. Eventually we'll want to implement the ndo_fdb_add, ndo_fdb_del, and ndo_fdb_dump functions. The ndo_fdb_add function would set the default port on the VEB in those cases where the MAC/VLAN address filters have overflowed. Normally we would not want to use it. Change-Id: I3990f0384fff2840c4e43bc0955dd0b701380852 Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: avoid unnecessary register readMitch Williams1-2/+1
We don't need to read the base VF id. It's already stashed in the HW struct. Change-Id: Ib81e2f76fc40b12c966e014a856b481912cafefc Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-06i40e: fix whitespaceJesse Brandeburg1-0/+1
Trivial whitespace fix. Change-Id: Ib7c70891a33c4b3d200c69367549d0dbdee0f076 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Fix SR-IOV VF port VLANGreg Rose3-5/+20
This patch fixes two different problems. 1) The port VLAN configuration was not persistent across VF driver loads and unloads. 2) The port VLAN configuration was only correct the first time it was set. Switching the port VLAN on and off would cause subsequent VLAN configurations to be corrupted in the VSI. Ensure that the correct bits are being set for the VSI port VLAN configuration. Change-Id: I7ebf5329f77eb8d73ccd3324eb346b3abeea737d Signed-off-by: Greg Rose <gregory.v.rose@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Record dma buffer info for dummy packetsAnjali Singhai Jain1-1/+8
Save information that we can use while cleaning the tx ring. Also record the time_stamp since we will need it to check tx hangs. Change-Id: Ia3f1c17f6fec9bcb7fef2542d77eac7f6c4f115c Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05net/mlx4_core: Warn if device doesn't have enough PCI bandwidthEyal Perry1-0/+84
Check if the device get enough bandwidth from the entire PCI chain to satisfy its capabilities. This patch determines the PCIe device's bandwidth capabilities by reading its PCIe Link Capabilities registers and then call the pcie_get_minimum_link function to ensure that the adapter is hooked into a slot which is capable of providing the necessary bandwidth capabilities. Signed-off-by: Eyal Perry <eyalpe@mellanox.com> Signed-off-by: Amir Vadai <amirv@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-05i40e: remove un-necessary io-writeAnjali Singhai Jain1-4/+0
Driver needs to clean PBA only when interrupts are turned off and we are polling instead. Change-Id: Ic0c1da761bd3abe7f73b1cc8bcddf8e3a232fd0f Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Remove unnecessary prototypesAnjali Singhai Jain1-7/+0
These functions don't need a prototype as they are defined in the file before they are called. Change-Id: Ie17ffad4a29a9c0df434c4ebc4681128a6095c65 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: I40E_FLAG_MQ_ENABLED is not usedNeerav Parikh2-19/+14
Remove references to I40E_FLAG_MQ_ENABLED from the code as it doesn't seem to be used anywhere. Change-Id: I4c89fb65b2cdd26fbb0c58fccbbb4b03f0e5f1b3 Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-05i40e: Fix ring allocationNeerav Parikh2-13/+4
The allocation and clearing of rings for a VSI should be using the alloc_queue_pairs and not num_queue_pairs. The alloc_queue_pairs per VSI is a pre-allocated number of queues assigned to a VSI; based on number of TCs enabled only certain number of queues may be used from that. This is mainly valid only for the LAN VSI case as that is the only VSI that may be enabled with multiple traffic classes. In the future the number of TCs may change based on DCBX configuration. The actual number of queues that are enabled/configured is based on the number of TCs enabled for a given VSI and that is stored in num_queue_pairs. With this change num_[tr]x_queues is unused so remove them. Change-Id: I9c2f84778bb25f7313c630e9b002a0caa883ce29 Signed-off-by: Neerav Parikh <Neerav.Parikh@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: catch unset q_vectorShannon Nelson1-1/+2
Don't try to free a q_vector that hasn't been set up as it can panic the kernel. Change-Id: I0650cc6c441d0779788c522c790293c276d14fbc Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: keep allocated memory in structsDavid Cassard3-69/+51
Save both a pointer to memory and the length in order to store all info about allocated kernel memory. This patch changes some adminq allocations to preserve the full i40e_dma_mem/i40e_virt_mem structs for every allocation. Change-Id: Ibcf96159aba4ba61f839d16d87d19478df28e630 Signed-off-by: David Cassard <david.g.cassard@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: fix error handling when alloc of vsi array failsShannon Nelson1-1/+2
Swap a couple lines around in the error handling if the kzalloc() for the pf->vsi array fails. This was causing a kernel BUG because the call to i40e_clear_interrupt_scheme() was assuming the pf->vsi[] array existed. In this fix it is possible that i40e_reset_interrupt_capability() will get called twice, but this is a safe action. Change-Id: I939163ccaa89baac7511556d36bc873864c35ae1 Signed-off-by: Shannon Nelson <shannon.nelson@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: reinit buffer size each timeMitch Williams1-1/+1
When cleaning the ARQ, we must reinitialize the buffer size each time we go through the loop, because i40e_clean_arq_element returns the message length in the same field. Without this change, subsequent messages can be truncated to the length of the previous message. Change-Id: Ic9c32ff843faf0fc3196d21351a1c3a60c6158eb Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: use functions to enable and disable icr 0Mitch Williams3-15/+20
Introduce i40e_irq_dynamic_disable_icr0 and use it and its previously- extant counterpart when appropriate. Change-Id: Ieb4037874fba2e96fc2354b34a97a3cb8f6490f3 Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: add header file flag _I40E_TXRX_H_Vasu Dev1-0/+4
Add an include header guard to guard against multiple includes Change-Id: I73efa03efc912d2047edab903c7caed05b444da2 Signed-off-by: Vasu Dev <vasu.dev@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: guard against vf message racesMitch Williams1-5/+18
When disabling and enabling VFs on a live system with the VF driver loaded, it's possible to receive an admin queue message from the VF driver at an inconvenient time, e.g. when the associated data structures aren't present or configured. This causes a rather inconvenient panic. To guard against this, we change the order of when we set num_alloc_vfs when turning off SR-IOV, and then gate processing of any VF messages based upon that value. Likewise, when enabling VFs, we shut off the relevant interrupt until configuration is complete. Change-Id: I0c172c056616c2bebd78bbc807ab446eb484deea Signed-off-by: Mitch Williams <mitch.a.williams@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Sibai Li <sibai.li@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: fix constant cast issuesJesse Brandeburg1-4/+4
replace __constant_htons with htons Change-Id: I123a5318bae34c8b004c71db07c56f137c685849 Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: Change the ethtool NVM read method to use AQAnjali Singhai Jain1-22/+46
Earlier we were reading Shadow RAM (copy of the NVM) which can differ from the actual NVM. Use AQ instead to read the actual NVM. Change-Id: Ia0f2773b722db77d093f738c068af872be69bbd4 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: fix mac address checkingJesse Brandeburg3-29/+1
Remove custom i40e functions around ethernet addresses that are duplicating already existing kernel functionality. Also ends up fixing a bug with multicast addresses. Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04i40e: Dump the whole NVM, not halfAnjali Singhai Jain2-3/+3
Debugfs was reading exactly half the number of words, fix it. Change-Id: Ieb217f3c6dca455d44e50a0dc61a6664c0cb2265 Signed-off-by: Anjali Singhai Jain <anjali.singhai@intel.com> Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com> Tested-by: Kavindya Deegala <kavindya.s.deegala@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2014-01-04bgmac: add support for Northstar SoC (BCM4707, BCM53018)Hauke Mehrtens2-18/+46
This adds support for the Northstar SoC. This SoC does not have a PMU in bcma and no register on it should be called. In addition it support 2.5 GBit/s Ethernet to the PHY. This GMAC core is not fully working there are still problems with the DMA controller. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bgmac: reset all cores on Northstar SoCHauke Mehrtens1-0/+21
On the Northstar SoC (BCM4707 and BCM53018) we have to enable all GMAC cores when we just want to use on. We iterate over all the cores and activate them. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bgmac: add support for new BGMAC_CMDCFG_SR position on core rev >= 4Hauke Mehrtens2-5/+7
The BGMAC_CMDCFG_SR register is at a different position on core rev >= 4 We do not know where this register is on a rev 5 or higher core, I have newer seen such a core. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bgmac: initialize the DMA controller of core rev >= 4Hauke Mehrtens2-0/+73
The DMA controller used in the device supported by GMAC with core rev >= 4 has some new options which are now set to the default values used in the Broadcom SDK. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04bcma: export bcma_find_core_unit()Hauke Mehrtens2-14/+1
This function is used to get a specific core when there is more than one core of that specific type. This is used in bgmac to reset all GMAC cores. Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de> Acked-by: Rafał Miłecki <zajec5@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04macvlan: unify macvlan_pcpu_stats and vlan_pcpu_statsLi RongQing1-4/+4
They are same, so unify them as one; since macvlan is a kind of vlan, vlan_pcpu_stats should be a proper name for vlan and macvlan. Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04net: unify the pcpu_tstats and br_cpu_netstats as oneLi RongQing1-5/+6
They are same, so unify them as one, pcpu_sw_netstats. Define pcpu_sw_netstat in netdevice.h, remove pcpu_tstats from if_tunnel and remove br_cpu_netstats from br_private.h Cc: Cong Wang <xiyou.wangcong@gmail.com> Cc: Stephen Hemminger <stephen@networkplumber.org> Signed-off-by: Li RongQing <roy.qing.li@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04Merge branch 'master' of ↵David S. Miller12-539/+715
git://git.kernel.org/pub/scm/linux/kernel/git/jkirsher/net-next Jeff Kirsher says: ==================== Intel Wired LAN Driver Updates This series contains updates to i40e and pci_regs.h. Anjali provides a patch to prevent messages from stray HMC events, except at interrupt message level, and refactors the HMC error handling. Catherine adds routines in probe to populate/check PCI bus speed and width, then verify we are in a 8GT/s x8 PCIe slot and warn when we are not. Shannon adds Wake-on-LAN support for i40e, fixes curly brace use as well as return type for i40e_vsi_clear_rings(). Joseph implements receive offload for VXLAN for i40e, where the hardware supports checksum offload/verification of the inner/outer header. Mitch provides the bulk of the changes, where he refactors the VF reset code so that it works on real hardware. Then does code cleanup by calling existing functions to enable and disable queues for VFs and remove unused functions. Removes a unnecessary log messages that are seen at every VF reset, for example complaining about disabling queues that are already disabled. Fixes an error return when the VF asks to add an invalid MAC address and if the VF sends a bad message, make it more informative about what is actually going on. Jesse refactors the LED function to flash LED lights correctly. v2: - removed patch 5 "i40e: add set settings and pauseparam" based on feedback from Ben Hutchings, will re-work that patch for later submission - Added patch "i40e: Implementation of vxlan ndo's" from Joseph to address Or Gerlitz's questions and concerns. This patch adds the implementation for the VXLAN ndo's and allows the hardware to do receive checksum offload for inner packets on the UDP ports that VXLAN notifies us about. - Added patch "i40e: using for_each_set_bit to simplify the code" from Wei Yongjun. This patch uses for_each_set_bit() to simply the code. v3: - fixed indentation issue in patch 11 based on feedback from Sergei Shtylyov. Sorry for the delayed release of v4, it was delayed to the holidays. v4: - Addressed Or Gerlitz's concerns about trying to get a hold of a mutex while holding a spin lock in patch 6 by executing the AQ commands from a subtask. - Addressed David Miller's Kconfig concerns by creating a Kconfig VXLAN option for i40e and wrapped appropriate code with the config option in patch 6. - Updated patch 7 based on the changes made in patch 6 in the above two bullets. v5: - Added the patch to pci_regs.h based on David Miller's feedback to add PCI defines for speed and width - Updated patch 3 description to better explain the changes based on feedback from David Miller - Updated patch 4 to use the newly added defines to pci_regs.h instead of local defines - Updated patch 7 to use <net/vxlan.h> in the #include based on feedback from David Miller ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04phylib: make phy_scan_fixups() staticSergei Shtylyov1-2/+1
phy_scan_fixups() isn't and shouldn't be called by the drivers directly, so unexport it. And since Florian Fainelli's recent patches, the function is only called locally, so we can make it static as well. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04phylib: remove unused adjust_state() callbackSergei Shtylyov3-17/+6
Remove adjust_state() callback from 'struct phy_device' since it seems to have never been really used from the inception: phy_start_machine() has been always called with 2nd argument equal to NULL. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04phy: kill excess empty linesSergei Shtylyov2-31/+0
Remove excess empty lines such as those between a function call and its result check and just duplicate ones between functions. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04phy: kill excess codeSergei Shtylyov2-35/+13
Remove some excess code: - convert assignments to initializers; - kill useless assignments before *return*. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04phy: kill useless local variablesSergei Shtylyov2-47/+18
A number of functions (especially in phy.c) has local variables that were hardly needed in the first place -- remove them. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2014-01-04mdio_bus: coding style fixesSergei Shtylyov1-18/+9
The recent patch from Florian Fainelli fixed all 'checkpatch.pl' errors but left some warnings like: - including <asm/io.h> instead of <linux/io.h>; - including <asm/uaccess.h> instead of <linux/uaccess.h>; - block comments using empty /* line; - 'struct dev_pm_ops' variable not being *const*. While fixing these, also fix the following style issues (some of which were found running 'checkpatch.pl --strict'): - alignment not matching open paren; - file name in the heading comment. Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> Signed-off-by: David S. Miller <davem@davemloft.net>