The branch main has been updated by wulf:

URL: 
https://cgit.FreeBSD.org/src/commit/?id=f988d7fa050e4886cdeb9483a039e75d58c31883

commit f988d7fa050e4886cdeb9483a039e75d58c31883
Author:     Vladimir Kondratyev <[email protected]>
AuthorDate: 2021-02-13 18:19:02 +0000
Commit:     Vladimir Kondratyev <[email protected]>
CommitDate: 2021-02-13 18:19:02 +0000

    hidraw: Make HIDIOCGRDESCSIZE ioctl return report descriptor size
    
    defined by hardware rather than cached one to match HIDIOCGRDESC ioctl.
    This fixes errors reported by hid-tools being run against /dev/hidraw#
    device node belonging to driver which overloads report descriptor.
    
    MFC after:      1 week
---
 sys/dev/hid/hidraw.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/dev/hid/hidraw.c b/sys/dev/hid/hidraw.c
index 6cc67ff14d23..e71b2e2c7d5d 100644
--- a/sys/dev/hid/hidraw.c
+++ b/sys/dev/hid/hidraw.c
@@ -703,7 +703,7 @@ hidraw_ioctl(struct cdev *dev, u_long cmd, caddr_t addr, 
int flag,
                return (0);
 
        case HIDIOCGRDESCSIZE:
-               *(int *)addr = sc->sc_rdesc->len;
+               *(int *)addr = sc->sc_hw->rdescsize;
                return (0);
 
        case HIDIOCGRDESC:
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/dev-commits-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to