FreeBSD Bugzilla – Attachment 225595 Details for
Bug 254974
Corsair K95 RGB PLATINUM gaming keyboard not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
ukbd_multipacket_frames.patch
ukbd.patch (text/plain), 1.79 KB, created by
Vladimir Kondratyev
on 2021-06-06 12:45:20 UTC
(
hide
)
Description:
ukbd_multipacket_frames.patch
Filename:
MIME Type:
Creator:
Vladimir Kondratyev
Created:
2021-06-06 12:45:20 UTC
Size:
1.79 KB
patch
obsolete
>commit 6b08712708632dfeae6a191766562221829fc5fa >Author: Vladimir Kondratyev <wulf@FreeBSD.org> >Date: Sun Jun 6 05:20:10 2021 +0300 > > ukbd(4): Calculate USB frame size based on report descriptor > > rather then on wMaxPacketSize parameter of endpoint descriptor. > >diff --git a/sys/dev/usb/input/ukbd.c b/sys/dev/usb/input/ukbd.c >index 48bac46ab08..453fccf58fd 100644 >--- a/sys/dev/usb/input/ukbd.c >+++ b/sys/dev/usb/input/ukbd.c >@@ -768,7 +768,7 @@ ukbd_intr_callback(struct usb_xfer *xfer, usb_error_t error) > case USB_ST_SETUP: > tr_setup: > if (sc->sc_inputs < UKBD_IN_BUF_FULL) { >- usbd_xfer_set_frame_len(xfer, 0, usbd_xfer_max_len(xfer)); >+ usbd_xfer_set_frame_len(xfer, 0, sc->sc_kbd_size); > usbd_transfer_submit(xfer); > } else { > DPRINTF("input queue is full!\n"); >@@ -898,7 +898,7 @@ static const struct usb_config ukbd_config[UKBD_N_TRANSFER] = { > .endpoint = UE_ADDR_ANY, > .direction = UE_DIR_IN, > .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, >- .bufsize = 0, /* use wMaxPacketSize */ >+ .bufsize = UKBD_BUFFER_SIZE, > .callback = &ukbd_intr_callback, > }, > >@@ -907,7 +907,7 @@ static const struct usb_config ukbd_config[UKBD_N_TRANSFER] = { > .endpoint = UE_ADDR_ANY, > .direction = UE_DIR_IN, > .flags = {.pipe_bof = 1,.short_xfer_ok = 1,}, >- .bufsize = 0, /* use wMaxPacketSize */ >+ .bufsize = UKBD_BUFFER_SIZE, > .callback = &ukbd_intr_callback, > }, > >@@ -1182,6 +1182,13 @@ ukbd_attach(device_t dev) > ukbd_parse_hid(sc, ukbd_boot_desc, sizeof(ukbd_boot_desc)); > } > >+ if (sc->sc_kbd_size > UKBD_BUFFER_SIZE) { >+ DPRINTF("input size is too large, " >+ "%d bytes (truncating)\n", >+ sc->sc_kbd_size); >+ sc->sc_kbd_size = UKBD_BUFFER_SIZE; >+ } >+ > /* ignore if SETIDLE fails, hence it is not crucial */ > usbd_req_set_idle(sc->sc_udev, NULL, sc->sc_iface_index, 0, 0); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 254974
:
224012
|
224013
|
224180
|
224186
|
225562
|
225563
|
225564
| 225595 |
225919