From 651a013649943710a900551ec6e03d2084e1a65a Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Fri, 25 Aug 2017 17:37:41 +0200 Subject: scsi: scsi_transport_sas: switch to bsg-lib for SMP passthrough Simplify the SMP passthrough code by switching it to the generic bsg-lib helpers that abstract away the details of the request code, and gets drivers out of seeing struct scsi_request. For the libsas host SMP code there is a small behavior difference in that we now always clear the residual len for successful commands, similar to the three other SMP handler implementations. Given that there is no partial command handling in the host SMP handler this should not matter in practice. [mkp: typos and checkpatch fixes] Signed-off-by: Christoph Hellwig Reviewed-by: Johannes Thumshirn Signed-off-by: Martin K. Petersen --- include/scsi/scsi_transport_sas.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'include/scsi/scsi_transport_sas.h') diff --git a/include/scsi/scsi_transport_sas.h b/include/scsi/scsi_transport_sas.h index 73d870918939..a23304b7fb2e 100644 --- a/include/scsi/scsi_transport_sas.h +++ b/include/scsi/scsi_transport_sas.h @@ -5,6 +5,7 @@ #include #include #include +#include struct scsi_transport_template; struct sas_rphy; @@ -176,7 +177,8 @@ struct sas_function_template { int (*phy_setup)(struct sas_phy *); void (*phy_release)(struct sas_phy *); int (*set_phy_speed)(struct sas_phy *, struct sas_phy_linkrates *); - int (*smp_handler)(struct Scsi_Host *, struct sas_rphy *, struct request *); + void (*smp_handler)(struct bsg_job *, struct Scsi_Host *, + struct sas_rphy *); }; -- cgit