mirror of https://gitee.com/openkylin/linux.git
5d4f78564c
The RX buffer pool is allocated in qeth_alloc_qdio_queues().
A subsequent pool resizing is then handled in a very simple way:
first free the current pool, then allocate a new pool of the requested
size.
There's two ways where this can go wrong:
1. if the resize action happens _before_ the initial pool was allocated,
then a subsequent initialization will call qeth_alloc_qdio_queues()
and fill the pool with a second(!) set of pages. We consume twice the
planned amount of memory.
This is easy to fix - just skip the resizing if the queues haven't
been allocated yet.
2. if the initial pool was created by qeth_alloc_qdio_queues() but a
subsequent resizing fails, then the device has no(!) RX buffer pool.
The next initialization will _not_ call qeth_alloc_qdio_queues(), and
attempting to back the RX buffers with pages in
qeth_init_qdio_queues() will fail.
Not very difficult to fix either - instead of re-allocating the whole
pool, just allocate/free as many entries to match the desired size.
Fixes:
|
||
---|---|---|
.. | ||
Kconfig | ||
Makefile | ||
ctcm_dbug.c | ||
ctcm_dbug.h | ||
ctcm_fsms.c | ||
ctcm_fsms.h | ||
ctcm_main.c | ||
ctcm_main.h | ||
ctcm_mpc.c | ||
ctcm_mpc.h | ||
ctcm_sysfs.c | ||
fsm.c | ||
fsm.h | ||
ism.h | ||
ism_drv.c | ||
lcs.c | ||
lcs.h | ||
netiucv.c | ||
qeth_core.h | ||
qeth_core_main.c | ||
qeth_core_mpc.c | ||
qeth_core_mpc.h | ||
qeth_core_sys.c | ||
qeth_ethtool.c | ||
qeth_l2.h | ||
qeth_l2_main.c | ||
qeth_l2_sys.c | ||
qeth_l3.h | ||
qeth_l3_main.c | ||
qeth_l3_sys.c | ||
smsgiucv.c | ||
smsgiucv.h | ||
smsgiucv_app.c |