aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390
diff options
context:
space:
mode:
authorBelinda Thompson <belindat@us.ibm.com>2012-03-06 21:06:27 -0500
committerDavid S. Miller <davem@davemloft.net>2012-03-08 01:52:25 -0500
commit205a8b649cf6c0a1e6e7512b65c72df480e2a883 (patch)
tree46beeb5c0516da4935a8f2cbe8c7c37b6445d5ea /drivers/s390
parentce1f893837afeee8aea0c5f6a32ebba16816beec (diff)
ctcm: use correct idal word list for ctcmpc
Communication Server Linux uses the ctcmpc code of the ctcm driver. Sending problems have shown up caused by a wrong idal word list for the first ccw. Function ctcmpc_chx_txdone() invokes the function to prepare the idal word list without setting an appropriate length for the first ccw, which may lead to an incomplete idal word list. This patch sets the maximum buffer size as data length of the first ccw. Thus correct idal word lists are guaranteed in all cases. Signed-off-by: Belinda Thompson <belindat@us.ibm.com> Reviewed-by: Ursula Braun <ursula.braun@de.ibm.com> Signed-off-by: Frank Blaschka <frank.blaschka@de.ibm.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/s390')
-rw-r--r--drivers/s390/net/ctcm_fsms.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/s390/net/ctcm_fsms.c b/drivers/s390/net/ctcm_fsms.c
index 2d602207541b..a69766900a17 100644
--- a/drivers/s390/net/ctcm_fsms.c
+++ b/drivers/s390/net/ctcm_fsms.c
@@ -1341,6 +1341,12 @@ static void ctcmpc_chx_txdone(fsm_instance *fi, int event, void *arg)
1341 1341
1342 spin_unlock(&ch->collect_lock); 1342 spin_unlock(&ch->collect_lock);
1343 clear_normalized_cda(&ch->ccw[1]); 1343 clear_normalized_cda(&ch->ccw[1]);
1344
1345 CTCM_PR_DBGDATA("ccwcda=0x%p data=0x%p\n",
1346 (void *)(unsigned long)ch->ccw[1].cda,
1347 ch->trans_skb->data);
1348 ch->ccw[1].count = ch->max_bufsize;
1349
1344 if (set_normalized_cda(&ch->ccw[1], ch->trans_skb->data)) { 1350 if (set_normalized_cda(&ch->ccw[1], ch->trans_skb->data)) {
1345 dev_kfree_skb_any(ch->trans_skb); 1351 dev_kfree_skb_any(ch->trans_skb);
1346 ch->trans_skb = NULL; 1352 ch->trans_skb = NULL;
@@ -1350,6 +1356,11 @@ static void ctcmpc_chx_txdone(fsm_instance *fi, int event, void *arg)
1350 fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev); 1356 fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev);
1351 return; 1357 return;
1352 } 1358 }
1359
1360 CTCM_PR_DBGDATA("ccwcda=0x%p data=0x%p\n",
1361 (void *)(unsigned long)ch->ccw[1].cda,
1362 ch->trans_skb->data);
1363
1353 ch->ccw[1].count = ch->trans_skb->len; 1364 ch->ccw[1].count = ch->trans_skb->len;
1354 fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch); 1365 fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
1355 ch->prof.send_stamp = current_kernel_time(); /* xtime */ 1366 ch->prof.send_stamp = current_kernel_time(); /* xtime */