summaryrefslogtreecommitdiff
path: root/drivers/net/xen-netback/interface.c
diff options
context:
space:
mode:
authorMichael Chan <michael.chan@broadcom.com>2016-05-15 03:04:47 -0400
committerDavid S. Miller <davem@davemloft.net>2016-05-15 13:35:48 -0400
commita11fa2be6d1564375dc57530680268ad569c2632 (patch)
tree7804963efefe6d270c5d285726a228dac8f15416 /drivers/net/xen-netback/interface.c
parentd0a42d6fc8eaf1b64f62b0bbc3b829b756eacf57 (diff)
bnxt_en: Improve the delay logic for firmware response.
The current code has 2 problems: 1. The maximum wait time is not long enough. It is about 60% of the duration specified by the firmware. It is calling usleep_range(600, 800) for every 1 msec we are supposed to wait. 2. The granularity of the delay is too coarse. Many simple firmware commands finish in 25 usec or less. We fix these 2 issues by multiplying the original 1 msec loop counter by 40 and calling usleep_range(25, 40) for each iteration. There is also a second delay loop to wait for the last DMA word to complete. This delay loop should be a very short 5 usec wait. This change results in much faster bring-up/down time: Before the patch: time ip link set p4p1 up real 0m0.120s user 0m0.001s sys 0m0.009s After the patch: time ip link set p4p1 up real 0m0.030s user 0m0.000s sys 0m0.010s Signed-off-by: Michael Chan <michael.chan@broadcom.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/xen-netback/interface.c')
0 files changed, 0 insertions, 0 deletions