aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/libsas.h
diff options
context:
space:
mode:
authorJohannes Thumshirn <jthumshirn@suse.de>2017-06-14 07:52:43 -0400
committerMartin K. Petersen <martin.petersen@oracle.com>2017-06-27 21:28:04 -0400
commit6d311fa7d2c18659d040b9beba5e41fe24c2a6f5 (patch)
treeb5bbaaeaa6bb080b2687787f05dd057f574d91bc /include/scsi/libsas.h
parentd06c587dd723882cd99c89d335b89c535079cdb1 (diff)
scsi: sas: scsi_queue_work can fail, so make callers aware
libsas uses scsi_queue_work() to queue its internal event notifications. scsi_queue_work() can return -EINVAL if the work queue doesn't exist and it does call queue_work() which can return false if the work is already queued. Make the SAS event code capable of returning errors up to the caller, which is handy when changing to dynamically allocated work in libsas as well, as discussed here: https://lkml.org/lkml/2017/6/14/121. [mkp: fixed typo] Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'include/scsi/libsas.h')
-rw-r--r--include/scsi/libsas.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/scsi/libsas.h b/include/scsi/libsas.h
index dd0f72c95abe..cfaeed256ab2 100644
--- a/include/scsi/libsas.h
+++ b/include/scsi/libsas.h
@@ -415,9 +415,9 @@ struct sas_ha_struct {
415 * their siblings when forming wide ports */ 415 * their siblings when forming wide ports */
416 416
417 /* LLDD calls these to notify the class of an event. */ 417 /* LLDD calls these to notify the class of an event. */
418 void (*notify_ha_event)(struct sas_ha_struct *, enum ha_event); 418 int (*notify_ha_event)(struct sas_ha_struct *, enum ha_event);
419 void (*notify_port_event)(struct asd_sas_phy *, enum port_event); 419 int (*notify_port_event)(struct asd_sas_phy *, enum port_event);
420 void (*notify_phy_event)(struct asd_sas_phy *, enum phy_event); 420 int (*notify_phy_event)(struct asd_sas_phy *, enum phy_event);
421 421
422 void *lldd_ha; /* not touched by sas class code */ 422 void *lldd_ha; /* not touched by sas class code */
423 423