aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRuss Gorby <russ.gorby@intel.com>2012-08-13 08:43:36 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2012-08-16 15:03:30 -0400
commit192b6041e75bb4a2aae73834037038cea139a92d (patch)
treeaffe4de8d3822377296054ecd0a5b6d911a072b8
parent7e8ac7b23b67416700dfb8b4136a4e81ce675b48 (diff)
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: Russ Gorby <russ.gorby@intel.com> Tested-by: Kappel, LaurentX <laurentx.kappel@intel.com> Signed-off-by: Alan Cox <alan@linux.intel.com> Cc: Hay and Water <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/tty/n_gsm.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/tty/n_gsm.c b/drivers/tty/n_gsm.c
index 0988aaaf2670..c028f3570246 100644
--- a/drivers/tty/n_gsm.c
+++ b/drivers/tty/n_gsm.c
@@ -971,16 +971,19 @@ static void gsm_dlci_data_sweep(struct gsm_mux *gsm)
971static void gsm_dlci_data_kick(struct gsm_dlci *dlci) 971static void gsm_dlci_data_kick(struct gsm_dlci *dlci)
972{ 972{
973 unsigned long flags; 973 unsigned long flags;
974 int sweep;
974 975
975 spin_lock_irqsave(&dlci->gsm->tx_lock, flags); 976 spin_lock_irqsave(&dlci->gsm->tx_lock, flags);
976 /* If we have nothing running then we need to fire up */ 977 /* If we have nothing running then we need to fire up */
978 sweep = (dlci->gsm->tx_bytes < TX_THRESH_LO);
977 if (dlci->gsm->tx_bytes == 0) { 979 if (dlci->gsm->tx_bytes == 0) {
978 if (dlci->net) 980 if (dlci->net)
979 gsm_dlci_data_output_framed(dlci->gsm, dlci); 981 gsm_dlci_data_output_framed(dlci->gsm, dlci);
980 else 982 else
981 gsm_dlci_data_output(dlci->gsm, dlci); 983 gsm_dlci_data_output(dlci->gsm, dlci);
982 } else if (dlci->gsm->tx_bytes < TX_THRESH_LO) 984 }
983 gsm_dlci_data_sweep(dlci->gsm); 985 if (sweep)
986 gsm_dlci_data_sweep(dlci->gsm);
984 spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags); 987 spin_unlock_irqrestore(&dlci->gsm->tx_lock, flags);
985} 988}
986 989