public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Johannes Thumshirn <jthumshirn@suse.de>
To: Himanshu Madhani <himanshu.madhani@qlogic.com>
Cc: James.Bottomley@HansenPartnership.com,
	martin.petersen@oracle.com, giridhar.malavali@qlogic.com,
	linux-scsi@vger.kernel.org
Subject: Re: [PATCH v2 08/11] qla2xxx: Provide mbx info in BBCR data after mbx failure
Date: Thu, 28 Jan 2016 10:00:31 +0100	[thread overview]
Message-ID: <20160128090031.GM27565@c203.arch.suse.de> (raw)
In-Reply-To: <1453914218-380-9-git-send-email-himanshu.madhani@qlogic.com>

On Wed, Jan 27, 2016 at 12:03:35PM -0500, Himanshu Madhani wrote:
> From: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
> 
> Signed-off-by: Harish Zunjarrao <harish.zunjarrao@qlogic.com>
> Signed-off-by: Himanshu Madhani <himanshu.madhani@qlogic.com>
> ---
>  drivers/scsi/qla2xxx/qla_bsg.c |    9 +++++++--
>  drivers/scsi/qla2xxx/qla_bsg.h |    4 +++-
>  2 files changed, 10 insertions(+), 3 deletions(-)
> 
> diff --git a/drivers/scsi/qla2xxx/qla_bsg.c b/drivers/scsi/qla2xxx/qla_bsg.c
> index 913fef2..392c147 100644
> --- a/drivers/scsi/qla2xxx/qla_bsg.c
> +++ b/drivers/scsi/qla2xxx/qla_bsg.c
> @@ -2204,8 +2204,12 @@ qla27xx_get_bbcr_data(struct fc_bsg_job *bsg_job)
>  	if (bbcr.status == QLA_BBCR_STATUS_ENABLED) {
>  		rval = qla2x00_get_adapter_id(vha, &loop_id, &al_pa,
>  			&area, &domain, &topo, &sw_cap);
> -		if (rval != QLA_SUCCESS)
> -			return -EIO;
> +		if (rval != QLA_SUCCESS) {
> +			bbcr.status = QLA_BBCR_STATUS_UNKNOWN;
> +			bbcr.state = QLA_BBCR_STATE_OFFLINE;
> +			bbcr.mbx1 = loop_id;
> +			goto done;
> +		}
>  
>  		state = (vha->bbcr >> 12) & 0x1;
>  
> @@ -2220,6 +2224,7 @@ qla27xx_get_bbcr_data(struct fc_bsg_job *bsg_job)
>  		bbcr.configured_bbscn = vha->bbcr & 0xf;
>  	}
>  
> +done:
>  	sg_copy_from_buffer(bsg_job->reply_payload.sg_list,
>  		bsg_job->reply_payload.sg_cnt, &bbcr, sizeof(bbcr));
>  	bsg_job->reply->reply_payload_rcv_len = sizeof(bbcr);
> diff --git a/drivers/scsi/qla2xxx/qla_bsg.h b/drivers/scsi/qla2xxx/qla_bsg.h
> index c40dd8b..c80192d 100644
> --- a/drivers/scsi/qla2xxx/qla_bsg.h
> +++ b/drivers/scsi/qla2xxx/qla_bsg.h
> @@ -245,6 +245,7 @@ struct qla_flash_update_caps {
>  /* BB_CR Status */
>  #define QLA_BBCR_STATUS_DISABLED       0
>  #define QLA_BBCR_STATUS_ENABLED        1
> +#define QLA_BBCR_STATUS_UNKNOWN        2
>  
>  /* BB_CR State */
>  #define QLA_BBCR_STATE_OFFLINE         0
> @@ -262,6 +263,7 @@ struct  qla_bbcr_data {
>  	uint8_t   configured_bbscn;       /* 0-15 */
>  	uint8_t   negotiated_bbscn;       /* 0-15 */
>  	uint8_t   offline_reason_code;
> -	uint8_t   reserved[11];
> +	uint16_t  mbx1;			/* Port state */
> +	uint8_t   reserved[9];
>  } __packed;
>  #endif
> -- 
> 1.7.7
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
-- 
Johannes Thumshirn                                          Storage
jthumshirn@suse.de                                +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton
HRB 21284 (AG Nürnberg)
Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2016-01-28  9:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-27 17:03 [PATCH v2 00/11] qla2xxx: Patches for scsi "misc" branch Himanshu Madhani
2016-01-27 17:03 ` [PATCH v2 01/11] qla2xxx: Remove unneeded link offline message Himanshu Madhani
2016-01-28  8:33   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 02/11] qla2xxx: Seed init-cb login timeout from nvram exclusively Himanshu Madhani
2016-01-28  8:34   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 03/11] qla2xxx: Allow fw to hold status before sending ABTS response Himanshu Madhani
2016-01-28  8:35   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 04/11] qla2xxx: Add support for online flash update for ISP27XX Himanshu Madhani
2016-01-28  8:56   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 05/11] qla2xxx: Add support for buffer to buffer credit value " Himanshu Madhani
2016-01-28  8:57   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 06/11] qla2xxx: Add support for Private link statistics counters Himanshu Madhani
2016-01-28  8:59   ` Johannes Thumshirn
2016-01-28 17:34     ` Himanshu Madhani
2016-01-27 17:03 ` [PATCH v2 07/11] qla2xxx: Avoid side effects when using endianizer macros Himanshu Madhani
2016-01-28  9:00   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 08/11] qla2xxx: Provide mbx info in BBCR data after mbx failure Himanshu Madhani
2016-01-28  9:00   ` Johannes Thumshirn [this message]
2016-01-27 17:03 ` [PATCH v2 09/11] qla2xxx: Enable T10-DIF for ISP27XX Himanshu Madhani
2016-01-28  9:00   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 10/11] qla2xxx: Set relogin flag when we fail to queue login requests Himanshu Madhani
2016-01-28  9:01   ` Johannes Thumshirn
2016-01-27 17:03 ` [PATCH v2 11/11] qla2xxx: Update driver version to 8.07.00.33-k Himanshu Madhani
2016-01-28  9:02   ` Johannes Thumshirn
2016-01-28 22:27 ` [PATCH v2 00/11] qla2xxx: Patches for scsi "misc" branch Martin K. Petersen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20160128090031.GM27565@c203.arch.suse.de \
    --to=jthumshirn@suse.de \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=giridhar.malavali@qlogic.com \
    --cc=himanshu.madhani@qlogic.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox