Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 192b6041 authored by Russ Gorby's avatar Russ Gorby Committed by Greg Kroah-Hartman
Browse files

n_gsm: uplink SKBs accumulate on list



gsm_dlci_data_kick will not call any output function if tx_bytes > THRESH_LO
furthermore it will call the output function only once if tx_bytes == 0
If the size of the IP writes are on the order of THRESH_LO
we can get into a situation where skbs accumulate on the outbound list
being starved for events to call the output function.

gsm_dlci_data_kick now calls the sweep function when tx_bytes==0

Signed-off-by: default avatarRuss Gorby <russ.gorby@intel.com>
Tested-by: default avatarKappel, LaurentX <laurentx.kappel@intel.com>
Signed-off-by: default avatarAlan Cox <alan@linux.intel.com>
Cc: Hay and Water <stable@vger.kernel.org>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 7e8ac7b2
Loading
Loading
Loading
Loading
+5 −2
Original line number Diff line number Diff line
@@ -971,15 +971,18 @@ static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
{
	unsigned long flags;
	int sweep;

	spin_lock_irqsave(&dlci->gsm->tx_lock, flags);
	/* If we have nothing running then we need to fire up */
	sweep = (dlci->gsm->tx_bytes < TX_THRESH_LO);
	if (dlci->gsm->tx_bytes == 0) {
		if (dlci->net)
			gsm_dlci_data_output_framed(dlci->gsm, dlci);
		else
			gsm_dlci_data_output(dlci->gsm, dlci);
	} else if (dlci->gsm->tx_bytes < TX_THRESH_LO)
	}
	if (sweep)
 		gsm_dlci_data_sweep(dlci->gsm);
	spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags);
}