From: Kashyap Desai <kashyap.desai@avagotech.com>
To: Hannes Reinecke <hare@suse.de>,
Sumit Saxena <sumit.saxena@avagotech.com>
Cc: "PDL,MEGARAIDLINUX" <megaraidlinux.pdl@avagotech.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
James Bottomley <james.bottomley@hansenpartnership.com>,
linux-scsi@vger.kernel.org, Hannes Reinecke <hare@suse.com>
Subject: RE: [PATCH] megaraid_sas: boot hangs while LD is offline
Date: Mon, 18 Jan 2016 11:18:14 +0530 [thread overview]
Message-ID: <4e96fb90476261bae709ac7abfe21e93@mail.gmail.com> (raw)
In-Reply-To: <1452865396-9887-1-git-send-email-hare@suse.de>
> -----Original Message-----
> From: Hannes Reinecke [mailto:hare@suse.de]
> Sent: Friday, January 15, 2016 7:13 PM
> To: Sumit Saxena
> Cc: Kashyap Desai; megaraidlinux.pdl@avagotech.com; Martin K. Petersen;
> James Bottomley; linux-scsi@vger.kernel.org; Hannes Reinecke; Hannes
> Reinecke
> Subject: [PATCH] megaraid_sas: boot hangs while LD is offline
>
> Offline Logical drives (LDs) should not allowed to be visible to the OS,
as the
> OS will hang trying to send commands to it.
> This patch skips offline LDs like it already does for non-system
physical
> drives (PDs).
>
> Signed-off-by: Hannes Reinecke <hare@suse.com>
> ---
> drivers/scsi/megaraid/megaraid_sas_base.c | 7 ++++++-
> 1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/megaraid/megaraid_sas_base.c
> b/drivers/scsi/megaraid/megaraid_sas_base.c
> index 97a1c1c..f32831b 100644
> --- a/drivers/scsi/megaraid/megaraid_sas_base.c
> +++ b/drivers/scsi/megaraid/megaraid_sas_base.c
> @@ -1760,7 +1760,7 @@ static void megasas_set_dma_alignment(struct
> scsi_device *sdev)
>
> static int megasas_slave_configure(struct scsi_device *sdev) {
> - u16 pd_index = 0;
> + u16 pd_index = 0, ld_index;
> struct megasas_instance *instance;
>
> instance = megasas_lookup_instance(sdev->host->host_no);
> @@ -1772,6 +1772,11 @@ static int megasas_slave_configure(struct
> scsi_device *sdev)
> if (instance->pd_list[pd_index].driveState !=
> MR_PD_STATE_SYSTEM)
> return -ENXIO;
> + } else {
> + ld_index = ((sdev->channel -
> MEGASAS_MAX_PD_CHANNELS) *
> + MEGASAS_MAX_DEV_PER_CHANNEL) +
> sdev->id;
> + if (instance->ld_ids[ld_index] == 0xff)
> + return -ENXIO;
Hannes - We attempted this code change for one of the issue in past. This
code drop was just a quick workaround to unblock that customer issue.
Avago provided FW fix for this issue as new FW (again fix was done 2 years
before, so many latest FW will have this fix) return below sense key for
TUR.
SenseKey=0x2, asc=0x4, ascq=0x3(LOGICAL UNIT NOT READY, MANUAL
INTERVENTION REQUIRED)
Have you seen any issue w.r.t VD Offline or trying to optimize code in
megaraid driver ?
> }
> }
> megasas_set_dma_alignment(sdev);
> --
> 1.8.5.6
next prev parent reply other threads:[~2016-01-18 5:48 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 13:43 [PATCH] megaraid_sas: boot hangs while LD is offline Hannes Reinecke
2016-01-18 5:48 ` Kashyap Desai [this message]
2016-01-18 6:54 ` Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2017-08-15 11:59 Hannes Reinecke
2017-08-16 13:05 ` Sumit Saxena
2017-08-16 13:06 ` Hannes Reinecke
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=4e96fb90476261bae709ac7abfe21e93@mail.gmail.com \
--to=kashyap.desai@avagotech.com \
--cc=hare@suse.com \
--cc=hare@suse.de \
--cc=james.bottomley@hansenpartnership.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=megaraidlinux.pdl@avagotech.com \
--cc=sumit.saxena@avagotech.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.