Thread (15 messages) 15 messages, 2 authors, 2016-05-31

Re: [PATCH] rtl8xxxu: increase polling timeout for firmware startup

From: Daniel Lenski <hidden>
Date: 2016-05-20 20:51:19

Jes Sorensen [off-list ref] writes:
quoted
Unfortunately, I ran into a case today where even 5000 loops was not
enough after a cold boot. 5000 loops meant about 1.5 second delay
between finishing the firmware checksum poll, while waiting for the
firmware to start. It now appears to me that the number of required
polling loops must be strongly bimodal.

I added some logging, so that the driver reports to me the number of
loops required for the firmware to start.
This is bizarre, I wonder if the hardware is having issues in your
laptop?
The other bug reports I linked to seem identical to what's happening to
mine, so I doubt it is an issue with one specific instance of the hardware.
Another thing to try would be to do an additional reset of the
chip and wait a bit before trying to load the firmware?
Thanks, I will give this a shot.

Am I understanding your idea correctly? To put a loop around the 8051
reset and the firmware polling loop, with a delay between failure and retry?

for (int retry=1; ii<=MAX_RETRIES; ii++) {
    for (retry=1; retry<=5; retry++) {
        /* Reset the 8051 */
        priv->fops->reset_8051(priv);

        /* Wait for firmware to become ready */
        for (i=0; i<RTL8XXXXU_FIRMWARE_POLL_MAX; i++) {
            ...
        }

        /* On failure, insert a delay before trying again */
        if (i==RTL8XXXU_FIRMWARE_POLL_MAX)
            msleep(500);
     }
}

Thanks,
Dan
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help