提交 07f5d563 编写于 作者: C Christoph Hellwig 提交者: Martin K. Petersen

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: NChristoph Hellwig <hch@lst.de>
Reviewed-by: NHannes Reinecke <hare@suse.com>
Reviewed-by: NJohannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
上级 67ec299b
...@@ -177,7 +177,7 @@ static int sas_smp_dispatch(struct bsg_job *job) ...@@ -177,7 +177,7 @@ static int sas_smp_dispatch(struct bsg_job *job)
if (!scsi_is_host_device(job->dev)) if (!scsi_is_host_device(job->dev))
rphy = dev_to_rphy(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"); dev_warn(job->dev, "space for a smp response is missing\n");
bsg_job_done(job, -EINVAL, 0); bsg_job_done(job, -EINVAL, 0);
return 0; return 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册