All of lore.kernel.org
 help / color / mirror / Atom feed
From: Michal Pecio <michal.pecio@gmail.com>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: 胡连勤 <hulianqin@vivo.com>,
	"Greg Kroah-Hartman" <gregkh@linuxfoundation.org>,
	"Lee Jones" <lee@kernel.org>,
	"Mathias Nyman" <mathias.nyman@linux.intel.com>,
	"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] usb: xhci: check Null pointer in segment alloc
Date: Tue, 23 Dec 2025 20:43:59 +0100	[thread overview]
Message-ID: <20251223204359.49141a2b.michal.pecio@gmail.com> (raw)
In-Reply-To: <ce74e3b4-ec01-4d99-9080-41dc15a13977@rowland.harvard.edu>

On Tue, 23 Dec 2025 13:37:41 -0500, Alan Stern wrote:
> > So in the light of your explanation, the fact that xhci_resume()
> > sets HW_ACCESSIBLE before actually completing resume and thus
> > allows root hub resume to pretend to work, is obviously a bug.  
> 
> No, not really.  The proper time to set HW_ACCESSIBLE is when it
> becomes possible to do I/O to the HC's registers, i.e., when the
> controller changes from D3 to D0 (and maybe a few other things like 
> pci_set_master() have been done).  By the time xhci_resume() gets
> called this should already have happened, so setting the flag
> immediately is the right thing for it to do.

OK, so no problem here, thanks.

> Agreed, we can't do anything without more and better logs.  Adding 
> dev_info() lines to the start and end of the various xhci-hcd suspend 
> and resume routines, as well as xhci_mem_cleanup() and
> xhci_mem_init() and whatever else you can think of, would be a good
> start.

That code is packed with dev_dbg(), so seeing this reproduced with
dynamic debug enabled would be a good start. It was the first thing
I suggested before trying to find problems with USB or xHCI code.

Regards,
Michal

  reply	other threads:[~2025-12-23 19:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-19  7:18 [PATCH] usb: xhci: check Null pointer in segment alloc 胡连勤
2025-12-19 12:48 ` Mathias Nyman
2025-12-19 15:53   ` 答复: " 胡连勤
2025-12-20  8:08     ` Greg Kroah-Hartman
2025-12-20 11:34       ` 答复: " 胡连勤
2025-12-20 13:15     ` Michal Pecio
2025-12-21  5:48       ` 答复: " 胡连勤
2025-12-22  6:42       ` Lee Jones
2025-12-22  7:13         ` Greg Kroah-Hartman
2025-12-22  7:55           ` Michal Pecio
2025-12-22 12:21             ` 答复: " 胡连勤
2025-12-22 13:34               ` Alan Stern
2025-12-22 16:49                 ` Michal Pecio
2025-12-22 17:03                   ` Alan Stern
2025-12-22 21:03                     ` Michal Pecio
2025-12-23  3:24                       ` Alan Stern
2025-12-23 10:06                         ` Michal Pecio
2025-12-23 18:37                           ` Alan Stern
2025-12-23 19:43                             ` Michal Pecio [this message]
2025-12-22 14:00               ` 答复: " Greg Kroah-Hartman
2026-04-29  2:50                 ` 答复: " 胡连勤
2026-04-29  7:44                   ` Michal Pecio
2026-04-29 10:44                     ` Mathias Nyman
2026-04-30  2:01                       ` 答复: " 胡连勤
2026-04-30  2:18                         ` 胡连勤
2025-12-21 16:22 ` Greg Kroah-Hartman

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=20251223204359.49141a2b.michal.pecio@gmail.com \
    --to=michal.pecio@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=hulianqin@vivo.com \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@linux.intel.com \
    --cc=stern@rowland.harvard.edu \
    /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.