public inbox for linux-scsi@vger.kernel.org
 help / color / mirror / Atom feed
From: Douglas Gilbert <dgilbert@interlog.com>
To: jejb@linux.ibm.com, wenxiong@linux.vnet.ibm.com
Cc: linux-scsi@vger.kernel.org, brking1@linux.vnet.ibm.com,
	martin.petersen@oracle.com, wenxiong@us.ibm.com
Subject: Re: [PATCH V3 1/1] scsi/ses: Saw "Failed to get diagnostic page 0x1"
Date: Wed, 15 Sep 2021 13:55:51 -0400	[thread overview]
Message-ID: <1365506b-c31e-250e-e120-8fe54c94a068@interlog.com> (raw)
In-Reply-To: <0912982133a254770a27b780cd2c5771739ced3b.camel@linux.ibm.com>

On 2021-09-15 10:43 a.m., James Bottomley wrote:
> On Wed, 2021-09-15 at 08:04 -0500, wenxiong@linux.vnet.ibm.com wrote:
>> From: Wen Xiong <wenxiong@linux.vnet.ibm.com>
>>
>> Setting scsi logging level with error=3, we saw some errors from
>> enclosues:
>>
>> [108017.360833] ses 0:0:9:0: tag#641 Done: NEEDS_RETRY Result:
>> hostbyte=DID_ERROR driverbyte=DRIVER_OK cmd_age=0s
>> [108017.360838] ses 0:0:9:0: tag#641 CDB: Receive Diagnostic 1c 01 01
>> 00 20 00
>> [108017.427778] ses 0:0:9:0: Power-on or device reset occurred
>> [108017.427784] ses 0:0:9:0: tag#641 Done: SUCCESS Result:
>> hostbyte=DID_OK driverbyte=DRIVER_OK cmd_age=0s
>> [108017.427788] ses 0:0:9:0: tag#641 CDB: Receive Diagnostic 1c 01 01
>> 00 20 00
>> [108017.427791] ses 0:0:9:0: tag#641 Sense Key : Unit Attention
>> [current]
>> [108017.427793] ses 0:0:9:0: tag#641 Add. Sense: Bus device reset
>> function occurred
>> [108017.427801] ses 0:0:9:0: Failed to get diagnostic page 0x1
>> [108017.427804] ses 0:0:9:0: Failed to bind enclosure -19
>> [108017.427895] ses 0:0:10:0: Attached Enclosure device
>> [108017.427942] ses 0:0:10:0: Attached scsi generic sg18 type 13
>>
>> As Martin's suggestion, the patch checks to retry on NOT_READY as
>> well as
>> UNIT_ATTENTION with ASC 0x29.
> 
> This looks fine to me.  I think the reason expecting_cc_ua doesn't work
> for you is that you're getting > 1 reset per command.  expecting_cc_ua
> automatically resets after eating the first unit attention.

Rather that simply consuming UAs, what do you think of a fixed length
FIFO, say 8 entries, that holds the asc,ascq of the last 8 UAs together
with a timestamp of when it was received (with a boot time epoch).
Then allow the user space to see that FIFO via sysfs (e.g. under
/sys/class/scsi_device/<hctl>). Remembering the previous UA may also be
useful for the mid-level UA processing. For example after a firmware
upgrade, there may be UAs for both INQUIRY data change and device reset.

Also the first device reset after a reboot (power cycle) is expected,
having one later, for example when part of a disk is mounted, is a bit
more suspicious.

Doug Gilbert



  reply	other threads:[~2021-09-15 17:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-15 13:04 [PATCH V3 1/1] scsi/ses: Saw "Failed to get diagnostic page 0x1" wenxiong
2021-09-15 14:43 ` James Bottomley
2021-09-15 17:55   ` Douglas Gilbert [this message]
2021-09-16 13:01     ` James Bottomley

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=1365506b-c31e-250e-e120-8fe54c94a068@interlog.com \
    --to=dgilbert@interlog.com \
    --cc=brking1@linux.vnet.ibm.com \
    --cc=jejb@linux.ibm.com \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=wenxiong@linux.vnet.ibm.com \
    --cc=wenxiong@us.ibm.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