All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chesnokov Gleb <Chesnokov.G@raidix.com>
To: Himanshu Madhani <himanshu.madhani@oracle.com>
Cc: "linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>
Subject: Re: [PATCH 2/2] qla2xxx: Fix missed DMA unmap for aborted cmds
Date: Wed, 20 Apr 2022 14:42:16 +0000	[thread overview]
Message-ID: <AS8PR10MB4952FA41BCC382A6464D842A9DF59@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <4FA3632A-690C-470F-8DEF-663F9AC0CFC8@oracle.com>

> Do you have a log showing this error sequence?

Yes, I have, but the problem is that I have a different target stack, not LIO. So the Call Trace basically contains code sequence from this target stack only,
except for the call of the qlt_free_cmd() that trigger BUG: BUG_ON(cmd->sg_mapped).
Regardless, I think the problem lies on the qlogic driver side, because it is responsible for management to map/unmap sgl list.

> Can you share more details?

What I am observing:

1) Command processing calls qlt_rdy_to_xfer(), maps sgl and sends a command to the firmware
2) Qlogic adapter reset occurs

qla2xxx [0000:82:00.1]-5003:13: ISP System Error - mbx1=110eh mbx2=10h mbx3=dh mbx4=0h mbx5=8a1h mbx6=0h mbx7=0h.
qla2xxx [0000:82:00.1]-d01e:13: -> fwdump no buffer
qla2xxx [0000:82:00.1]-00af:13: Performing ISP error recovery - ha=ffff9dd7d6058000.

3) Somehow the command is being aborted, so that means the command's abort flag has already been set.
I think it may happens something like this:
qla2x00_abort_isp_cleanup() --> qla2x00_abort_all_cmds()

4) The target stack calls qlt_abort_cmd(), and since aborted flag has already been set, this call ended as multiple abort.

5) The target stack calls xmit_response, and since command has already been aborted, this call starts the code sequence to release the command that ended with qlt_free_cmd()

I think I could try to reproduce the problem with LIO target stack, but I have special case with my target stack that lead to reset of qlogic adapter (ISP error recovery) and this is one important part of the error sequence. So, I think I will not be able to reproduce the problem with the LIO until I find out how to similarly reset qlogic adapter during processing active commands that have already been sent to the firmware.

  reply	other threads:[~2022-04-20 14:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-15 12:42 [PATCH 2/2] qla2xxx: Fix missed DMA unmap for aborted cmds Chesnokov Gleb
2022-04-19 19:41 ` Himanshu Madhani
2022-04-20 14:42   ` Chesnokov Gleb [this message]
2022-04-20 19:09     ` Himanshu Madhani
2022-04-25 18:49       ` Chesnokov Gleb
2022-04-27 16:52         ` Himanshu Madhani
2022-05-03  0:50 ` 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=AS8PR10MB4952FA41BCC382A6464D842A9DF59@AS8PR10MB4952.EURPRD10.PROD.OUTLOOK.COM \
    --to=chesnokov.g@raidix.com \
    --cc=himanshu.madhani@oracle.com \
    --cc=linux-scsi@vger.kernel.org \
    /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.