staging: unisys: visornic: Reorder logic in visornic_enable_with_timeout()
Moves the call to napi_enable() before the call to init_rcv_bufs(), ensuring that messages are not put into the receive queue until the guest is ready to receive interrupts. Signed-off-by: David Binder <david.binder@unisys.com> Signed-off-by: David Kershner <david.kershner@unisys.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
4b3d7b6d84
commit
6219e49333
|
@ -572,6 +572,8 @@ visornic_enable_with_timeout(struct net_device *netdev, const int timeout)
|
||||||
unsigned long flags;
|
unsigned long flags;
|
||||||
int wait = 0;
|
int wait = 0;
|
||||||
|
|
||||||
|
napi_enable(&devdata->napi);
|
||||||
|
|
||||||
/* NOTE: the other end automatically unposts the rcv buffers when it
|
/* NOTE: the other end automatically unposts the rcv buffers when it
|
||||||
* gets a disable.
|
* gets a disable.
|
||||||
*/
|
*/
|
||||||
|
@ -595,7 +597,6 @@ visornic_enable_with_timeout(struct net_device *netdev, const int timeout)
|
||||||
/* send enable and wait for ack -- don't hold lock when sending enable
|
/* send enable and wait for ack -- don't hold lock when sending enable
|
||||||
* because if the queue is full, insert might sleep.
|
* because if the queue is full, insert might sleep.
|
||||||
*/
|
*/
|
||||||
napi_enable(&devdata->napi);
|
|
||||||
send_enbdis(netdev, 1, devdata);
|
send_enbdis(netdev, 1, devdata);
|
||||||
|
|
||||||
spin_lock_irqsave(&devdata->priv_lock, flags);
|
spin_lock_irqsave(&devdata->priv_lock, flags);
|
||||||
|
|
Loading…
Reference in New Issue