diff options
author | Ursula Braun <ursula.braun@de.ibm.com> | 2011-02-02 01:04:33 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-02-02 18:00:00 -0500 |
commit | 8b2e18f662939fb3d9b0ffe5da953ba56d259e3a (patch) | |
tree | 3cd4bab1b27b8efdacf2818a8aaaec89fff42cec /drivers/s390 | |
parent | 9853b97bccbd2b08ce5fef497f21fa7395f68823 (diff) |
qeth: allow HiperSockets framesize change in suspend
For HiperSockets the framesize-definition determines the selected
mtu-size and the size of the allocated qdio buffers.
A framesize-change may occur while a Linux system with probed
HiperSockets device is in suspend state. This patch enables proper
resuming of a HiperSockets device in this case.
Signed-off-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/qeth_core_main.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/drivers/s390/net/qeth_core_main.c b/drivers/s390/net/qeth_core_main.c index ddeef41049ae..eca3e094031a 100644 --- a/drivers/s390/net/qeth_core_main.c +++ b/drivers/s390/net/qeth_core_main.c | |||
@@ -1887,8 +1887,16 @@ static int qeth_ulp_enable_cb(struct qeth_card *card, struct qeth_reply *reply, | |||
1887 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); | 1887 | QETH_DBF_TEXT_(SETUP, 2, " rc%d", iob->rc); |
1888 | return 0; | 1888 | return 0; |
1889 | } | 1889 | } |
1890 | card->info.max_mtu = mtu; | 1890 | if (card->info.initial_mtu && (card->info.initial_mtu != mtu)) { |
1891 | /* frame size has changed */ | ||
1892 | if (card->dev && | ||
1893 | ((card->dev->mtu == card->info.initial_mtu) || | ||
1894 | (card->dev->mtu > mtu))) | ||
1895 | card->dev->mtu = mtu; | ||
1896 | qeth_free_qdio_buffers(card); | ||
1897 | } | ||
1891 | card->info.initial_mtu = mtu; | 1898 | card->info.initial_mtu = mtu; |
1899 | card->info.max_mtu = mtu; | ||
1892 | card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE; | 1900 | card->qdio.in_buf_size = mtu + 2 * PAGE_SIZE; |
1893 | } else { | 1901 | } else { |
1894 | card->info.initial_mtu = qeth_get_initial_mtu_for_card(card); | 1902 | card->info.initial_mtu = qeth_get_initial_mtu_for_card(card); |