nfp: checking parameter process for rx-usecs/tx-usecs is invalid
[ Upstream commit3bd6b2a838] Use nn->tlv_caps.me_freq_mhz instead of nn->me_freq_mhz to check whether rx-usecs/tx-usecs is valid. This is because nn->tlv_caps.me_freq_mhz represents the clock_freq (MHz) of the flow processing cores (FPC) on the NIC. While nn->me_freq_mhz is not be set. Fixes:ce991ab666("nfp: read ME frequency from vNIC ctrl memory") Signed-off-by: Diana Wang <na.wang@corigine.com> Signed-off-by: Simon Horman <simon.horman@corigine.com> Reviewed-by: Jakub Kicinski <kuba@kernel.org> Signed-off-by: David S. Miller <davem@davemloft.net> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
9b44cb67d3
commit
cc301ad312
@@ -557,7 +557,6 @@ struct nfp_net_dp {
|
|||||||
* @exn_name: Name for Exception interrupt
|
* @exn_name: Name for Exception interrupt
|
||||||
* @shared_handler: Handler for shared interrupts
|
* @shared_handler: Handler for shared interrupts
|
||||||
* @shared_name: Name for shared interrupt
|
* @shared_name: Name for shared interrupt
|
||||||
* @me_freq_mhz: ME clock_freq (MHz)
|
|
||||||
* @reconfig_lock: Protects @reconfig_posted, @reconfig_timer_active,
|
* @reconfig_lock: Protects @reconfig_posted, @reconfig_timer_active,
|
||||||
* @reconfig_sync_present and HW reconfiguration request
|
* @reconfig_sync_present and HW reconfiguration request
|
||||||
* regs/machinery from async requests (sync must take
|
* regs/machinery from async requests (sync must take
|
||||||
@@ -640,8 +639,6 @@ struct nfp_net {
|
|||||||
irq_handler_t shared_handler;
|
irq_handler_t shared_handler;
|
||||||
char shared_name[IFNAMSIZ + 8];
|
char shared_name[IFNAMSIZ + 8];
|
||||||
|
|
||||||
u32 me_freq_mhz;
|
|
||||||
|
|
||||||
bool link_up;
|
bool link_up;
|
||||||
spinlock_t link_status_lock;
|
spinlock_t link_status_lock;
|
||||||
|
|
||||||
|
|||||||
@@ -1347,7 +1347,7 @@ static int nfp_net_set_coalesce(struct net_device *netdev,
|
|||||||
* ME timestamp ticks. There are 16 ME clock cycles for each timestamp
|
* ME timestamp ticks. There are 16 ME clock cycles for each timestamp
|
||||||
* count.
|
* count.
|
||||||
*/
|
*/
|
||||||
factor = nn->me_freq_mhz / 16;
|
factor = nn->tlv_caps.me_freq_mhz / 16;
|
||||||
|
|
||||||
/* Each pair of (usecs, max_frames) fields specifies that interrupts
|
/* Each pair of (usecs, max_frames) fields specifies that interrupts
|
||||||
* should be coalesced until
|
* should be coalesced until
|
||||||
|
|||||||
Reference in New Issue
Block a user