Bug 248784 - Please revert r364379 - head/sys/dev/usb/controller
Summary: Please revert r364379 - head/sys/dev/usb/controller
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: CURRENT
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Hans Petter Selasky
URL:
Keywords:
: 249051 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-08-20 15:47 UTC by David Shao
Modified: 2020-09-01 13:52 UTC (History)
6 users (show)

See Also:


Attachments
dmesg for normal USB keyboard attachment (9.82 KB, text/plain)
2020-08-20 15:47 UTC, David Shao
no flags Details
Try this patch (541 bytes, patch)
2020-08-20 17:18 UTC, Hans Petter Selasky
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David Shao 2020-08-20 15:47:10 UTC
Created attachment 217387 [details]
dmesg for normal USB keyboard attachment

Redragon K552-RGB keyboard turns off when FreeBSD 13-current finishes booting and is not reactivated after replugging.  Attached is a dmesg for normal operation after r364379 - head/sys/dev/usb/controller is reverted.
Comment 1 Hans Petter Selasky freebsd_committer freebsd_triage 2020-08-20 17:18:41 UTC
Created attachment 217391 [details]
Try this patch

Hi,

Can you try this patch?

--HPS
Comment 2 Ed Maste freebsd_committer freebsd_triage 2020-08-20 17:34:29 UTC
(In reply to Hans Petter Selasky from comment #1)
The patch works for me on a Ryzen 3 3200g
Comment 3 commit-hook freebsd_committer freebsd_triage 2020-08-20 17:46:20 UTC
A commit references this bug:

Author: hselasky
Date: Thu Aug 20 17:45:55 UTC 2020
New revision: 364433
URL: https://svnweb.freebsd.org/changeset/base/364433

Log:
  Fix regression after r364379.

  The AMD's Ryzen 3 3200g XHCI controllers apparently need the evaluate
  control endpoint context command, but we don't need to issue this
  command when the bMaxPacketSize is received after the read of the USB
  device descriptor, because this part should be handled automatically.

  PR:		248784
  Tested by:	emaste, hselasky
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Changes:
  head/sys/dev/usb/controller/xhci.c
Comment 4 commit-hook freebsd_committer freebsd_triage 2020-09-01 08:15:39 UTC
A commit references this bug:

Author: hselasky
Date: Tue Sep  1 08:14:47 UTC 2020
New revision: 365029
URL: https://svnweb.freebsd.org/changeset/base/365029

Log:
  Fully revert r364379.

  The "Intel Sunrise Point-LP USB 3.0 controller" doesn't update the wMaxPacket
  field in the control endpoint context automatically causing a BABBLE error code
  on the initial first USB device descriptor read, when the bMaxPacketSize is not
  8 bytes.

  Reported by:	wulf@
  PR:		248784
  MFC after:	1 week
  Sponsored by:	Mellanox Technologies

Changes:
  head/sys/dev/usb/controller/xhci.c
  head/sys/dev/usb/controller/xhci.h
Comment 5 Hans Petter Selasky freebsd_committer freebsd_triage 2020-09-01 13:52:53 UTC
*** Bug 249051 has been marked as a duplicate of this bug. ***