Commit 3c787475 authored by Sebastian Ott's avatar Sebastian Ott Committed by David S. Miller

lcs: ensure proper ccw setup

Make sure that all ccws used for writing are initialized with
zeros - especially since the last ccw contains a TIC for which
the unused fields have to be zeros.
Signed-off-by: default avatarSebastian Ott <sebott@linux.vnet.ibm.com>
Signed-off-by: default avatarFrank Blaschka <frank.blaschka@de.ibm.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 725b9c04
...@@ -282,7 +282,7 @@ lcs_setup_write_ccws(struct lcs_card *card) ...@@ -282,7 +282,7 @@ lcs_setup_write_ccws(struct lcs_card *card)
LCS_DBF_TEXT(3, setup, "iwritccw"); LCS_DBF_TEXT(3, setup, "iwritccw");
/* Setup write ccws. */ /* Setup write ccws. */
memset(card->write.ccws, 0, sizeof(struct ccw1) * LCS_NUM_BUFFS + 1); memset(card->write.ccws, 0, sizeof(struct ccw1) * (LCS_NUM_BUFFS + 1));
for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) { for (cnt = 0; cnt < LCS_NUM_BUFFS; cnt++) {
card->write.ccws[cnt].cmd_code = LCS_CCW_WRITE; card->write.ccws[cnt].cmd_code = LCS_CCW_WRITE;
card->write.ccws[cnt].count = 0; card->write.ccws[cnt].count = 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment