Commit e94a5d16 authored by David S. Miller's avatar David S. Miller

Merge branch 'ibmvnic-Harden-device-commands-and-queries'

Thomas Falcon says:

====================
ibmvnic: Harden device commands and queries

This patch series fixes some shortcomings with the current
VNIC device command implementation. The first patch fixes
the initialization of driver completion structures used
for device commands. Additionally, all waits for device
commands are bounded with a timeout in the event that the
device does not respond or becomes inoperable. Finally,
serialize queries to retain the integrity of device return
codes.

Changes in v2:

 - included header comment for ibmvnic_wait_for_completion
 - removed open-coded loop in patch 3/4, suggested by Jakub
 - ibmvnic_wait_for_completion accepts timeout value in milliseconds
   instead of jiffies
 - timeout calculations cleaned up and completed before wait loop
 - included missing mutex_destroy calls, suggested by Jakub
 - included comment before mutex declaration
====================
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parents fb822388 ff25dcb9
This diff is collapsed.
...@@ -1026,6 +1026,8 @@ struct ibmvnic_adapter { ...@@ -1026,6 +1026,8 @@ struct ibmvnic_adapter {
int init_done_rc; int init_done_rc;
struct completion fw_done; struct completion fw_done;
/* Used for serialization of device commands */
struct mutex fw_lock;
int fw_done_rc; int fw_done_rc;
struct completion reset_done; struct completion reset_done;
......
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