diff options
author | Christoph Hellwig <hch@lst.de> | 2017-10-03 12:48:41 +0200 |
---|---|---|
committer | Martin K. Petersen <martin.petersen@oracle.com> | 2017-10-17 05:40:51 +0200 |
commit | 07f5d563c6e52068cbfcd97ed79f5bb1b1d33067 (patch) | |
tree | c7cdb412769ac7313facee5fe759acd86d7dbbee /drivers/scsi/scsi_transport_sas.c | |
parent | scsi: libfc: don't assign resid_len in fc_lport_bsg_request (diff) | |
download | linux-07f5d563c6e52068cbfcd97ed79f5bb1b1d33067.tar.xz linux-07f5d563c6e52068cbfcd97ed79f5bb1b1d33067.zip |
scsi: scsi_transport_sas: check reply payload length instead of bidi request
As a user of bsg-lib the SAS transport should not poke into request
internals but use the bsg_job fields instead.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Hannes Reinecke <hare@suse.com>
Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_transport_sas.c')
-rw-r--r-- | drivers/scsi/scsi_transport_sas.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/scsi/scsi_transport_sas.c b/drivers/scsi/scsi_transport_sas.c index 319dff970237..736a1f4f9676 100644 --- a/drivers/scsi/scsi_transport_sas.c +++ b/drivers/scsi/scsi_transport_sas.c @@ -177,7 +177,7 @@ static int sas_smp_dispatch(struct bsg_job *job) if (!scsi_is_host_device(job->dev)) rphy = dev_to_rphy(job->dev); - if (!job->req->next_rq) { + if (!job->reply_payload.payload_len) { dev_warn(job->dev, "space for a smp response is missing\n"); bsg_job_done(job, -EINVAL, 0); return 0; |