[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251223204359.49141a2b.michal.pecio@gmail.com>
Date: Tue, 23 Dec 2025 20:43:59 +0100
From: Michal Pecio <michal.pecio@...il.com>
To: Alan Stern <stern@...land.harvard.edu>
Cc: 胡连勤 <hulianqin@...o.com>, Greg Kroah-Hartman
<gregkh@...uxfoundation.org>, Lee Jones <lee@...nel.org>, Mathias Nyman
<mathias.nyman@...ux.intel.com>, "linux-usb@...r.kernel.org"
<linux-usb@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] usb: xhci: check Null pointer in segment alloc
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
Powered by blists - more mailing lists