diff options
author | Tyrel Datwyler <tyreld@linux.vnet.ibm.com> | 2019-05-02 19:50:57 -0500 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2019-06-18 19:46:22 -0400 |
commit | 6e40de8b6b3cfa7288bb4a1fee2c7173f53b7345 (patch) | |
tree | 6f10eb57dfa2a5f0e0d46a1b13bd3ebac7a6d203 /drivers/scsi/ibmvscsi/ibmvscsi.h | |
parent | 2e22520475037f97b5a3234591183105ecf9845b (diff) |
scsi: ibmvscsi: redo driver work thread to use enum action states
The current implemenation relies on two flags in the driver's private host
structure to signal the need for a host reset or to reenable the CRQ after
a LPAR migration. This patch does away with those flags and introduces a
single action flag and defined enums for the supported kthread work
actions. Lastly, the if/else logic is replaced with a switch statement.
Signed-off-by: Tyrel Datwyler <tyreld@linux.ibm.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvscsi.h')
-rw-r--r-- | drivers/scsi/ibmvscsi/ibmvscsi.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.h b/drivers/scsi/ibmvscsi/ibmvscsi.h index 3a7875575616..04bcbc832dc9 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.h +++ b/drivers/scsi/ibmvscsi/ibmvscsi.h @@ -88,13 +88,18 @@ struct event_pool { dma_addr_t iu_token; }; +enum ibmvscsi_host_action { + IBMVSCSI_HOST_ACTION_NONE = 0, + IBMVSCSI_HOST_ACTION_RESET, + IBMVSCSI_HOST_ACTION_REENABLE, +}; + /* all driver data associated with a host adapter */ struct ibmvscsi_host_data { struct list_head host_list; atomic_t request_limit; int client_migrated; - int reset_crq; - int reenable_crq; + enum ibmvscsi_host_action action; struct device *dev; struct event_pool pool; struct crq_queue queue; |