Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 13 Feb 2021 18:20:54 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: f988d7fa050e - main - hidraw: Make HIDIOCGRDESCSIZE ioctl return report descriptor size
Message-ID:  <202102131820.11DIKsLc025903@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by wulf:

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

commit f988d7fa050e4886cdeb9483a039e75d58c31883
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2021-02-13 18:19:02 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202102131820.11DIKsLc025903>