NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/57531: Realtek EHCI prevents suspend on ThinkPad T495



The following reply was made to PR kern/57531; it has been noted by GNATS.

From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
To: abs%NetBSD.org@localhost
Cc: gnats-bugs%NetBSD.org@localhost
Subject: Re: kern/57531: Realtek EHCI prevents suspend on ThinkPad T495
Date: Tue, 18 Jul 2023 13:42:14 +0000

 This is a multi-part message in MIME format.
 --=_LIipI4/8TCpaNLGJjkojmsUX7yA77xBy
 
 Can you please try the attached patch and see if anything goes haywire
 with the affected EHCI device?
 
 The affected one should show something like:
 
 ehciN: unknown USB rev: 0x00000000
 
 --=_LIipI4/8TCpaNLGJjkojmsUX7yA77xBy
 Content-Type: text/plain; charset="ISO-8859-1"; name="pr57531"
 Content-Transfer-Encoding: quoted-printable
 Content-Disposition: attachment; filename="pr57531.patch"
 
 From 5a5cf7431df1ff845975e92df13befa70c1cc924 Mon Sep 17 00:00:00 2001
 From: Taylor R Campbell <riastradh%NetBSD.org@localhost>
 Date: Tue, 18 Jul 2023 13:39:54 +0000
 Subject: [PATCH] ehci(4): Accept `pre-1.0' PCI revisions in SBRA config
  register 0x60.
 
 PR kern/57531
 ---
  sys/dev/pci/ehci_pci.c | 7 +++++--
  1 file changed, 5 insertions(+), 2 deletions(-)
 
 diff --git a/sys/dev/pci/ehci_pci.c b/sys/dev/pci/ehci_pci.c
 index 96d22be0dc5b..9fc7eb51e33c 100644
 --- a/sys/dev/pci/ehci_pci.c
 +++ b/sys/dev/pci/ehci_pci.c
 @@ -212,17 +212,20 @@ ehci_pci_attach(device_t parent, device_t self, void =
 *aux)
  	aprint_normal_dev(self, "interrupting at %s\n", intrstr);
 =20
  	switch (pci_conf_read(pc, tag, PCI_USBREV) & PCI_USBREV_MASK) {
 -	case PCI_USBREV_PRE_1_0:
  	case PCI_USBREV_1_0:
  	case PCI_USBREV_1_1:
  		sc->sc.sc_bus.ub_revision =3D USBREV_UNKNOWN;
 -		aprint_verbose_dev(self, "pre-2.0 USB rev, device ignored\n");
 +		aprint_verbose_dev(self, "pre-2.0 USB rev: 0x%08x\n",
 +		    pci_conf_read(pc, tag, PCI_USBREV));
  		goto fail;
  	case PCI_USBREV_2_0:
  		sc->sc.sc_bus.ub_revision =3D USBREV_2_0;
  		break;
 +	case PCI_USBREV_PRE_1_0: /* some recent EHCIs set this inexplicably */
  	default:
  		sc->sc.sc_bus.ub_revision =3D USBREV_UNKNOWN;
 +		aprint_verbose_dev(self, "unknown USB rev: 0x%08x\n",
 +		    pci_conf_read(pc, tag, PCI_USBREV));
  		break;
  	}
 =20
 
 --=_LIipI4/8TCpaNLGJjkojmsUX7yA77xBy--
 


Home | Main Index | Thread Index | Old Index