Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1500453

Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly

From Steffen Maier <maier@linux.vnet.ibm.com>
Newsgroups linux.kernel
Subject Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and fc_bsg_job::reply directly
Date 2016-10-13 19:00 +0200
Message-ID <srRmF-5Xf-13@gated-at.bofh.it> (permalink)
References <srPNT-59l-3@gated-at.bofh.it> <srPXA-5cV-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


Hm, still behaves for me like I reported for v2:
http://marc.info/?l=linux-scsi&m=147637177902937&w=2

On 10/13/2016 05:00 PM, Johannes Thumshirn wrote:
> Don't use fc_bsg_job::request and fc_bsg_job::reply directly, but use
> helper variables bsg_request and bsg_reply. This will be helpfull  when
> transitioning to bsg-lib.
>
> Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
> Reviewed-by: Hannes Reinecke <hare@suse.com>
> ---
>  drivers/s390/scsi/zfcp_fc.c      |   9 +-
>  drivers/scsi/bfa/bfad_bsg.c      |  40 +++---
>  drivers/scsi/ibmvscsi/ibmvfc.c   |  22 ++--
>  drivers/scsi/libfc/fc_lport.c    |  23 ++--
>  drivers/scsi/lpfc/lpfc_bsg.c     | 194 +++++++++++++++++-----------
>  drivers/scsi/qla2xxx/qla_bsg.c   | 264 ++++++++++++++++++++++-----------------
>  drivers/scsi/qla2xxx/qla_iocb.c  |   5 +-
>  drivers/scsi/qla2xxx/qla_isr.c   |  46 ++++---
>  drivers/scsi/qla2xxx/qla_mr.c    |  10 +-
>  drivers/scsi/scsi_transport_fc.c |  37 +++---
>  10 files changed, 387 insertions(+), 263 deletions(-)

> diff --git a/drivers/scsi/scsi_transport_fc.c b/drivers/scsi/scsi_transport_fc.c
> index 8ff2067..eafc7555 100644
> --- a/drivers/scsi/scsi_transport_fc.c
> +++ b/drivers/scsi/scsi_transport_fc.c

> @@ -3973,8 +3981,9 @@ enum fc_dispatch_result {
>  		/* check if we have the msgcode value at least */
>  		if (job->request_len < sizeof(uint32_t)) {
>  			BUG_ON(job->reply_len < sizeof(uint32_t));
> -			job->reply->reply_payload_rcv_len = 0;
> -			job->reply->result = -ENOMSG;
> +			bsg_reply = job->reply;
> +			bsg_reply->reply_payload_rcv_len = 0;
> +			bsg_reply->result = -ENOMSG;
>  			job->reply_len = sizeof(uint32_t);
>  			fc_bsg_jobdone(job);
>  			spin_lock_irq(q->queue_lock);
>

-- 
Mit freundlichen Grüßen / Kind regards
Steffen Maier

Linux on z Systems Development

IBM Deutschland Research & Development GmbH
Vorsitzende des Aufsichtsrats: Martina Koederitz
Geschaeftsfuehrung: Dirk Wittkopp
Sitz der Gesellschaft: Boeblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v3 00/16] Convert FibreChannel bsg code to use bsg-lib Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-13 17:20 +0200
  [PATCH v3 04/16] scsi: Unify interfaces of fc_bsg_jobdone and bsg_job_done Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-13 17:20 +0200
  [PATCH v3 03/16] scsi: fc: Export fc_bsg_jobdone and use it in FC drivers Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-13 17:20 +0200
  Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and  fc_bsg_job::reply directly Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-13 18:50 +0200
  Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and  fc_bsg_job::reply directly Steffen Maier <maier@linux.vnet.ibm.com> - 2016-10-13 19:00 +0200
    Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and  fc_bsg_job::reply directly Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-14 09:40 +0200
      Re: [PATCH v3 02/16] scsi: don't use fc_bsg_job::request and  fc_bsg_job::reply directly Johannes Thumshirn <jthumshirn@suse.de> - 2016-10-25 09:50 +0200

csiph-web