From: Alexander Duyck Date: Fri, 25 May 2012 01:45:38 +0000 (+0000) Subject: ixgbe: Use num_tcs.pg_tcs as upper limit for TC when checking based on UP X-Git-Tag: v3.6-rc1~125^2~35^2~5 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b92ad72dea9925359e9dfa70c4cbf8db6f1b2d65;p=pandora-kernel.git ixgbe: Use num_tcs.pg_tcs as upper limit for TC when checking based on UP 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 Acked-by: Greg Rose Tested-by: Stephen Ko Tested-by: Ross Brattain Signed-off-by: Jeff Kirsher --- Reading git-diff-tree failed