[patch 5/7] [PATCH] ctcm: use correct idal word list for ctcmpc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Belinda Thompson <belindat@xxxxxxxxxx>

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@xxxxxxxxxx>
Reviewed-by: Ursula Braun <ursula.braun@xxxxxxxxxx>
Signed-off-by: Frank Blaschka <frank.blaschka@xxxxxxxxxx>
---

 drivers/s390/net/ctcm_fsms.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

diff -urpN linux-2.6/drivers/s390/net/ctcm_fsms.c linux-2.6-patched/drivers/s390/net/ctcm_fsms.c
--- linux-2.6/drivers/s390/net/ctcm_fsms.c	2012-01-05 00:55:44.000000000 +0100
+++ linux-2.6-patched/drivers/s390/net/ctcm_fsms.c	2012-03-06 13:36:00.000000000 +0100
@@ -1341,6 +1341,12 @@ static void ctcmpc_chx_txdone(fsm_instan
 
 	spin_unlock(&ch->collect_lock);
 	clear_normalized_cda(&ch->ccw[1]);
+
+	CTCM_PR_DBGDATA("ccwcda=0x%p data=0x%p\n",
+			(void *)(unsigned long)ch->ccw[1].cda,
+			ch->trans_skb->data);
+	ch->ccw[1].count = ch->max_bufsize;
+
 	if (set_normalized_cda(&ch->ccw[1], ch->trans_skb->data)) {
 		dev_kfree_skb_any(ch->trans_skb);
 		ch->trans_skb = NULL;
@@ -1350,6 +1356,11 @@ static void ctcmpc_chx_txdone(fsm_instan
 		fsm_event(priv->mpcg->fsm, MPCG_EVENT_INOP, dev);
 		return;
 	}
+
+	CTCM_PR_DBGDATA("ccwcda=0x%p data=0x%p\n",
+			(void *)(unsigned long)ch->ccw[1].cda,
+			ch->trans_skb->data);
+
 	ch->ccw[1].count = ch->trans_skb->len;
 	fsm_addtimer(&ch->timer, CTCM_TIME_5_SEC, CTC_EVENT_TIMER, ch);
 	ch->prof.send_stamp = current_kernel_time(); /* xtime */

--
To unsubscribe from this list: send the line "unsubscribe linux-s390" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Kernel Development]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Info]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Samba]     [Linux Media]     [Device Mapper]

  Powered by Linux