[PATCH net 5/5] ibmvnic: init completion struct before requesting long term mapped buffers
Thomas Falcon
tlfalcon at linux.vnet.ibm.com
Thu Jan 26 08:02:23 AEDT 2017
Initialize this completion structure before requesting that
a buffer be long-term mapped . This fix resolves a bug where firmware
sends a response before the structure is initialized.
Signed-off-by: John Allen <jallen at linux.vnet.ibm.com>
Signed-off-by: Nathan Fontenot <nfont at linux.vnet.ibm.com>
Signed-off-by: Thomas Falcon <tlfalcon at linux.vnet.ibm.com>
---
drivers/net/ethernet/ibm/ibmvnic.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/ibm/ibmvnic.c b/drivers/net/ethernet/ibm/ibmvnic.c
index ec6c5fe..d1ffc61 100644
--- a/drivers/net/ethernet/ibm/ibmvnic.c
+++ b/drivers/net/ethernet/ibm/ibmvnic.c
@@ -189,9 +189,9 @@ static int alloc_long_term_buff(struct ibmvnic_adapter *adapter,
}
ltb->map_id = adapter->map_id;
adapter->map_id++;
+ init_completion(&adapter->fw_done);
send_request_map(adapter, ltb->addr,
ltb->size, ltb->map_id);
- init_completion(&adapter->fw_done);
wait_for_completion(&adapter->fw_done);
return 0;
}
--
1.8.3.1
More information about the Linuxppc-dev
mailing list