lkml.org 
[lkml]   [2020]   [Jan]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    From
    Subject[PATCH 5.4 036/203] s390/qeth: vnicc Fix init to default
    Date
    From: Alexandra Winter <wintera@linux.ibm.com>

    commit d1b9ae1864fc3c000e0eb4af8482d78c63e0915a upstream.

    During vnicc_init wanted_char should be compared to cur_char and not
    to QETH_VNICC_DEFAULT. Without this patch there is no way to enforce
    the default values as desired values.

    Note, that it is expected, that a card comes online with default values.
    This patch was tested with private card firmware.

    Fixes: caa1f0b10d18 ("s390/qeth: add VNICC enable/disable support")
    Signed-off-by: Alexandra Winter <wintera@linux.ibm.com>
    Signed-off-by: Julian Wiedmann <jwi@linux.ibm.com>
    Signed-off-by: David S. Miller <davem@davemloft.net>
    Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

    ---
    drivers/s390/net/qeth_l2_main.c | 4 +++-
    1 file changed, 3 insertions(+), 1 deletion(-)

    --- a/drivers/s390/net/qeth_l2_main.c
    +++ b/drivers/s390/net/qeth_l2_main.c
    @@ -2070,7 +2070,9 @@ static void qeth_l2_vnicc_init(struct qe
    /* enforce assumed default values and recover settings, if changed */
    error |= qeth_l2_vnicc_recover_timeout(card, QETH_VNICC_LEARNING,
    timeout);
    - chars_tmp = card->options.vnicc.wanted_chars ^ QETH_VNICC_DEFAULT;
    + /* Change chars, if necessary */
    + chars_tmp = card->options.vnicc.wanted_chars ^
    + card->options.vnicc.cur_chars;
    chars_len = sizeof(card->options.vnicc.wanted_chars) * BITS_PER_BYTE;
    for_each_set_bit(i, &chars_tmp, chars_len) {
    vnicc = BIT(i);

    \
     
     \ /
      Last update: 2020-01-17 00:21    [W:4.073 / U:0.568 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site