• S
    rt2x00: rt2800usb: rework txstatus code · f421111b
    Stanislaw Gruszka 提交于
    Currently we read tx status register after each urb data transfer. As
    callback procedure also trigger reading, that causing we have many
    "threads" of reading status. To prevent that introduce TX_STATUS_READING
    flags, and check if we are already in process of sequential reading
    TX_STA_FIFO, before requesting new reads.
    
    Change timer to hrtimer, that make TX_STA_FIFO overruns less possible.
    Use 200 us for initial timeout, and then reschedule in 100 us period,
    this values probably have to be tuned.
    
    Make changes on txdone work. Schedule it from
    rt2800usb_tx_sta_fifo_read_completed() callback when first valid status
    show up. Check in callback if tx status timeout happens, and schedule
    work on that condition too. That make possible to remove tx status
    timeout from generic watchdog. I moved that to rt2800usb.
    
    Loop in txdone work, that should prevent situation when we queue work,
    which is already processed, and after finish work is not rescheduled
    again.
    Signed-off-by: NStanislaw Gruszka <sgruszka@redhat.com>
    Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
    f421111b
rt2x00usb.c 21.9 KB