From: Mathias Nyman <mathias.nyman@linux.intel.com>
To: Pavankumar Kondeti <pkondeti@codeaurora.org>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Jack Pham <jackp@codeaurora.org>,
linux-usb@vger.kernel.org, stable@vger.kernel.org
Subject: Re: [PATCH] xhci: Fix command ring pointer corruption while aborting a command
Date: Mon, 4 Oct 2021 11:45:33 +0300 [thread overview]
Message-ID: <1223fbd2-ad10-a48a-32cc-d5d01faa30ec@linux.intel.com> (raw)
In-Reply-To: <8fe3756c-c927-4fd5-d5aa-163f9680fdb3@linux.intel.com>
On 4.10.2021 11.22, Mathias Nyman wrote:
> On 1.10.2021 10.22, Pavankumar Kondeti wrote:
>> The command ring pointer is located at [6:63] bits of the command
>> ring control register (CRCR). All the control bits like command stop,
>> abort are located at [0:3] bits. While aborting a command, we read the
>> CRCR and set the abort bit and write to the CRCR. The read will always
>> give command ring pointer as all zeros. So we essentially write only
>> the control bits. Since we split the 64 bit write into two 32 bit writes,
>> there is a possibility of xHC command ring stopped before the upper
>> dword (all zeros) is written. If that happens, xHC updates the upper
>> dword of its internal command ring pointer with all zeros. Next time,
>> when the command ring is restarted, we see xHC memory access failures.
>> Fix this issue by only writing to the lower dword of CRCR where all
>> control bits are located.
>>
>> Signed-off-by: Pavankumar Kondeti <pkondeti@codeaurora.org>
>
>
> Thanks, nice catch.
>
> Adding to queue
just to clarify, took v2
-Mathias
prev parent reply other threads:[~2021-10-04 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-01 7:22 [PATCH] xhci: Fix command ring pointer corruption while aborting a command Pavankumar Kondeti
2021-10-01 12:19 ` Pavankumar Kondeti
2021-10-04 8:22 ` Mathias Nyman
2021-10-04 8:45 ` Mathias Nyman [this message]
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=1223fbd2-ad10-a48a-32cc-d5d01faa30ec@linux.intel.com \
--to=mathias.nyman@linux.intel.com \
--cc=gregkh@linuxfoundation.org \
--cc=jackp@codeaurora.org \
--cc=linux-usb@vger.kernel.org \
--cc=pkondeti@codeaurora.org \
--cc=stable@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox