<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/sys/dev/evdev/cdev.c, branch release/13.1.0</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>evdev: Multitouch code style changes.</title>
<updated>2021-09-07T23:55:12+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2021-08-24T22:43:41+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=a437dfa5ca9698d8226f71f4d6f50fa49ea9ee3e'/>
<id>a437dfa5ca9698d8226f71f4d6f50fa49ea9ee3e</id>
<content type='text'>
1. Move touch count reporting helpers to utils. They are not multitouch.
2. Use evdev_mt prefix for private multitouch support routines.
3. Use int instead of int32_t where fixed size is not required.
4. Export some internal functions.

This change should be no-op.

(cherry picked from commit 98a7606b85e05132f328a2498dccab78df31cb7e)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Move touch count reporting helpers to utils. They are not multitouch.
2. Use evdev_mt prefix for private multitouch support routines.
3. Use int instead of int32_t where fixed size is not required.
4. Export some internal functions.

This change should be no-op.

(cherry picked from commit 98a7606b85e05132f328a2498dccab78df31cb7e)
</pre>
</div>
</content>
</entry>
<entry>
<title>evdev: Make variable-size ioctls return actual length of copyouted data</title>
<updated>2021-01-20T20:10:07+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2021-01-20T20:10:07+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7a810290b8f6c6885fdb9917cf590d46fa270a61'/>
<id>7a810290b8f6c6885fdb9917cf590d46fa270a61</id>
<content type='text'>
on success instead of 0 to match Linux.
Imprivata binary depends on this.

Submitted by:	Shunchao Hu &lt;ankohuu_outlook.com&gt;
Reviewed by:	wulf
Differential revision:	https://reviews.freebsd.org/D28218
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
on success instead of 0 to match Linux.
Imprivata binary depends on this.

Submitted by:	Shunchao Hu &lt;ankohuu_outlook.com&gt;
Reviewed by:	wulf
Differential revision:	https://reviews.freebsd.org/D28218
</pre>
</div>
</content>
</entry>
<entry>
<title>hid:  Add missing input enter/exit epoch pairs.</title>
<updated>2021-01-14T20:04:47+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2021-01-14T19:48:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b360682ac940a4cef1c922c33d685db24a67c96b'/>
<id>b360682ac940a4cef1c922c33d685db24a67c96b</id>
<content type='text'>
This was affecting unloading keyboard driver and kdb-related code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was affecting unloading keyboard driver and kdb-related code.
</pre>
</div>
</content>
</entry>
<entry>
<title>evdev: Allow open() handler to be interrupted by a signal</title>
<updated>2021-01-07T23:18:42+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2020-04-21T22:38:14+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=3b8c8b35de3a1a8a24169d144189b6a4db82ce10'/>
<id>3b8c8b35de3a1a8a24169d144189b6a4db82ce10</id>
<content type='text'>
It is possible that the client list lock is taken by other process for too
long due to e.g. IO timeouts. Allow user to terminate open() in this case.

Reviewed by:	markj (as part of D27865)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It is possible that the client list lock is taken by other process for too
long due to e.g. IO timeouts. Allow user to terminate open() in this case.

Reviewed by:	markj (as part of D27865)
</pre>
</div>
</content>
</entry>
<entry>
<title>evdev: Make open(2) and close(3) handlers sleepable.</title>
<updated>2021-01-07T23:18:41+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2020-04-21T10:26:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d276eae674d22214d6a58d1f4871053ceb0cb9f5'/>
<id>d276eae674d22214d6a58d1f4871053ceb0cb9f5</id>
<content type='text'>
At the beginning of evdev there was a LOR between hardware driver's and
evdev client list locks as they were taken in different order at
driver's interrupt and evdev open()/close() handlers.

The LOR was fixed with introduction of evdev_register_mtx() function
which allowed to use a hardware driver's lock as evdev client list lock.
While this works good with PS/2 and USB, this does not work with I2C.
Unlike PS/2 and USB, I2C open()/close() handlers do unbound sleeps
while waiting for I2C bus to release and while performing IO.
This change uses epoch(9) for traversing evdev client list in interrupt
handler to avoid the LOR thus making possible to convert evdev client
list lock to sleepable sx.

While here add brief locking protocol description.

Reviewed by:	markj
Differential revision:	https://reviews.freebsd.org/D27865
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
At the beginning of evdev there was a LOR between hardware driver's and
evdev client list locks as they were taken in different order at
driver's interrupt and evdev open()/close() handlers.

The LOR was fixed with introduction of evdev_register_mtx() function
which allowed to use a hardware driver's lock as evdev client list lock.
While this works good with PS/2 and USB, this does not work with I2C.
Unlike PS/2 and USB, I2C open()/close() handlers do unbound sleeps
while waiting for I2C bus to release and while performing IO.
This change uses epoch(9) for traversing evdev client list in interrupt
handler to avoid the LOR thus making possible to convert evdev client
list lock to sleepable sx.

While here add brief locking protocol description.

Reviewed by:	markj
Differential revision:	https://reviews.freebsd.org/D27865
</pre>
</div>
</content>
</entry>
<entry>
<title>evdev: return error rather than zero-length data on blocked read()</title>
<updated>2020-03-29T23:01:36+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2020-03-29T23:01:36+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=006eb44926d6949e0b60b21920f1ea93f03efd2f'/>
<id>006eb44926d6949e0b60b21920f1ea93f03efd2f</id>
<content type='text'>
if blocked process has been woken up by evdev device destruction.

MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
if blocked process has been woken up by evdev device destruction.

MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>evdev: Add COMPAT_FREEBSD32 support for amd64 arch</title>
<updated>2020-03-29T23:00:33+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2020-03-29T23:00:33+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=80ddbddfd70fbf6e99d9be0d0572e9206f8ec139'/>
<id>80ddbddfd70fbf6e99d9be0d0572e9206f8ec139</id>
<content type='text'>
Incompatibility between i386 and amd64 evdev ABIs was caused by presence of
'struct timeval' in evdev protocol. Replace it with 'struct timeval32' for
32 bit binaries.

Big-endian platforms may require additional work due to bitstr_t (array of
unsigned longs) usage in ioctl interface.

MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Incompatibility between i386 and amd64 evdev ABIs was caused by presence of
'struct timeval' in evdev protocol. Replace it with 'struct timeval32' for
32 bit binaries.

Big-endian platforms may require additional work due to bitstr_t (array of
unsigned longs) usage in ioctl interface.

MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
<entry>
<title>evdev: disable evdev if it is invoked from KDB or panic context</title>
<updated>2018-10-27T21:04:34+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2018-10-27T21:04:34+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=5ef2488947aacf30ce897230b8bf20be543e7447'/>
<id>5ef2488947aacf30ce897230b8bf20be543e7447</id>
<content type='text'>
This allow to prevent deadlock on entering KDB if one of evdev locks is
already taken by userspace process.

Also this change discards all but LED console events produced by KDB as
unrelated to userspace.

Tested by:	dumbbell (as part of D15070)
Objected by:	bde (as 'KDB lock an already locked mutex' problem solution)
MFC after:	1 month
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This allow to prevent deadlock on entering KDB if one of evdev locks is
already taken by userspace process.

Also this change discards all but LED console events produced by KDB as
unrelated to userspace.

Tested by:	dumbbell (as part of D15070)
Objected by:	bde (as 'KDB lock an already locked mutex' problem solution)
MFC after:	1 month
</pre>
</div>
</content>
</entry>
<entry>
<title>evdev: remove soft context from evdev methods parameter list.</title>
<updated>2018-08-13T19:00:42+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2018-08-13T19:00:42+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=911aed94fa3a6b7c99aae26c48c0724ada8ab787'/>
<id>911aed94fa3a6b7c99aae26c48c0724ada8ab787</id>
<content type='text'>
Now softc should be retrieved from struct edvev * pointer
with evdev_get_softc() helper.

wmt(4) is a sample of driver that support both KPI.

Reviewed by:	hselasky, gonzo
Differential Revision:	https://reviews.freebsd.org/D16614
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Now softc should be retrieved from struct edvev * pointer
with evdev_get_softc() helper.

wmt(4) is a sample of driver that support both KPI.

Reviewed by:	hselasky, gonzo
Differential Revision:	https://reviews.freebsd.org/D16614
</pre>
</div>
</content>
</entry>
<entry>
<title>Change my email address to wulf@FreeBSD.org in copyright headers.</title>
<updated>2017-07-23T20:41:58+00:00</updated>
<author>
<name>Vladimir Kondratyev</name>
<email>wulf@FreeBSD.org</email>
</author>
<published>2017-07-23T20:41:58+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=e6502802828f0d9b5b54f673135f7d4079ae3b86'/>
<id>e6502802828f0d9b5b54f673135f7d4079ae3b86</id>
<content type='text'>
Approved by:	gonzo (mentor)
MFC after:	2 weeks
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Approved by:	gonzo (mentor)
MFC after:	2 weeks
</pre>
</div>
</content>
</entry>
</feed>
