linux/drivers/net/ethernet/broadcom
Michael Chan a11fa2be6d 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>
2016-05-15 13:35:48 -04:00
..
bnx2x bnx2x: Prevent false warning for lack of FC NPIV 2016-03-18 19:17:16 -04:00
bnxt bnxt_en: Improve the delay logic for firmware response. 2016-05-15 13:35:48 -04:00
genet treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
b44.c phy: Add API for {un}registering an mdio device to a bus. 2016-01-07 14:31:26 -05:00
b44.h b44: Utilize BRCM_PSEUDO_PHY_ADDR 2015-06-10 23:33:58 -07:00
bcm63xx_enet.c mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00
bcm63xx_enet.h bcm63xx_enet: add support Broadcom BCM6345 Ethernet 2013-06-13 17:22:08 -07:00
bcmsysport.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
bcmsysport.h net: systemport: Pre-calculate and utilize cb->bd_addr 2015-05-30 23:51:09 -07:00
bgmac.c bgmac: reset & enable Ethernet core before using it 2016-04-14 17:15:55 -04:00
bgmac.h bgmac: fix MAC soft-reset bit for corerev > 4 2016-04-14 21:17:14 -04:00
bnx2_fw.h bnx2-cnic: Driver Rebranding Changes 2015-02-20 15:46:49 -05:00
bnx2.c BNX2: free temp_stats_blk on error path 2015-10-12 19:33:46 -07:00
bnx2.h BNX2: fix a Null Pointer for stats_blk 2015-10-11 05:06:21 -07:00
cnic_defs.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
cnic_if.h cnic: Add the interfaces to get FC-NPIV table. 2015-08-06 21:54:12 -07:00
cnic.c cnic: call cp->stop_hw() in cnic_start_hw() on allocation failure 2016-05-06 15:44:54 -04:00
cnic.h cnic: Rebranding cnic driver. 2014-06-25 16:27:27 -07:00
Kconfig bnx2x: add a separate GENEVE Kconfig symbol 2016-02-24 22:48:54 -05:00
Makefile bnxt_en: New Broadcom ethernet driver. 2015-10-22 19:30:33 -07:00
sb1250-mac.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
tg3.c treewide: replace dev->trans_start update with helper 2016-05-04 14:16:49 -04:00
tg3.h mdio: Move allocation of interrupts into core 2016-01-07 14:31:26 -05:00