summaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c
Commit message (Collapse)AuthorAgeFilesLines
* ixgbe: Make return values more directMark Rustad2014-07-261-25/+14Star
| | | | | | | | | | | Make return values more direct, eliminating some gotos and otherwise unneeded conditionals. This also eliminates some local variables. Also a few minor cleanups in affected code so checkpatch won't complain. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* igb/ixgbe: remove return statements for void functionsJeff Kirsher2014-05-231-1/+0Star
| | | | | | | | | Remove useless return statements for void functions which do not need it. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Tested-by: Aaron Brown <aaron.f.brown@intel.com>
* ixgbe: clean up checkpatch warnings about CODE_INDENT and LEADING_SPACEJacob Keller2014-05-231-1/+1
| | | | | | | | | | | The contents of this patch were originally generated by "scripts/checkpatch.pl --fix-inplace --types CODE_INDENT,LEADING_SPACE drivers/net/ethernet/ixgbe/*.[ch]", and then hand verified for consistency. Signed-off-by: Jacob Keller <jacob.e.keller@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* IXGBE: Set the SW prio_tc values at initialization to the HW setting.Amir Hanania2013-05-211-0/+23
| | | | | | | | | | | | Set the SW prio_tc values at initialization to the HW setting. Setting the SW prio_tc default values to be the HW setting by reading the rtrup2tc register. For any TC change we need to reset the device. This will remove the need to reset the device at the first time we call ixgbe_dcbnl_ieee_setets. Signed-off-by: Amir Hanania <amir.hanania@intel.com> Tested-by: Jack Morgan<jack.morgan@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: update date to 2013Don Skidmore2013-02-051-1/+1
| | | | | | Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Use num_tcs.pg_tcs as upper limit for TC when checking based on UPAlexander Duyck2012-07-221-4/+8
| | | | | | | | | | | | | | | | | | | | This change makes it so the function ixgbe_dcb_get_tc_from_up will use the num_tcs.pg_tcs to determine the starting value for determining a traffic class based on a user priority. The main motivation for this change is to address possible bad configurations in which more TCs worth of data are populated then there are actual TCs. By limiting this value we can at least make certain we are not providing a map with values that are out of range. As a result any user priorities that are setup in the configuration with a traffic class mapping higher than what the hardware supports will be reported as being on TC 0. Signed-off-by: Alexander Duyck <alexander.h.duyck@intel.com> Acked-by: Greg Rose <gregory.v.rose@intel.com> Tested-by: Stephen Ko <stephen.s.ko@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Populate the prio_tc_map in ixgbe_setup_tcAlexander Duyck2012-07-141-2/+1Star
| | | | | | | | | | | | | | There were cases where the prio_tc_map was not populated when we were calling open. This will result in us incorrectly configuring the traffic classes when DCB is enabled. In order to correct this I have updated the code so that we now populate the values prior to allocating the q_vectors and calling ixgbe_open. Cc: John Fastabend <john.r.fastabend@intel.com> 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>
* ixgbe: Cleanup unpacking code for DCBAlexander Duyck2012-07-141-25/+22Star
| | | | | | | | | | | | | This is meant to be a generic clean-up of the remaining functions for unpacking data from the DCB structures. The only real changes are: replaced the variable i with tc for functions that were looping through the traffic classes, and added a pointer for tc_class instead of path since that way we only need to pull the pointer once instead of once per loop. 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>
* ixgbe: Simplify logic for getting traffic class from user priorityAlexander Duyck2012-07-141-7/+23
| | | | | | | | | | | | | | | | | This patch is meant to help simplify the logic for getting traffic classes from user priorities. To do this I am adding a function named ixgbe_dcb_get_tc_from_up that will go through the traffic classes in reverse order in order to determine which traffic class contains a bit for a given user priority. Adding a declaration for this new function to the header so that we have a centralized means for sorting out traffic classes belonging to features such as FCoE. 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>
* ixgbe: update copyright to 2012Don Skidmore2012-02-031-1/+1
| | | | | | | | New year so bump the copyright date. Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com> Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: fixup hard dependencies on supporting 8 traffic classesJohn Fastabend2011-10-061-4/+16
| | | | | | | | | This patch correctly configures DCB when less than 8 traffic classes are available in hardware. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: Fix PFC mask generationMark Rustad2011-10-061-1/+1
| | | | | | | | | Fix PFC mask generation to OR in only a single bit for each priority in the PFC mask returned via netlink. Signed-off-by: Mark Rustad <mark.d.rustad@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* ixgbe: DCB, do not call set_state() from IEEE modeJohn Fastabend2011-09-231-1/+35
| | | | | | | | | | | | | The DCB CEE command set_state() will complete successfully but is misleading because it enables IEEE mode. After this patch the command is failed. And IEEE PFC/ETS is managed from ieee paths now instead of using CEE primitives. Signed-off-by: John Fastabend <john.r.fastabend@intel.com> Tested-by: Ross Brattain <ross.b.brattain@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
* intel: Move the Intel wired LAN driversJeff Kirsher2011-08-111-0/+320
Moves the Intel wired LAN drivers into drivers/net/ethernet/intel/ and the necessary Kconfig and Makefile changes. Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>