Debian Bug report logs - #499446
tslib's event interface does not work on powerpc

version graph

Package: libts-0.0-0; Maintainer for libts-0.0-0 is Debian QA Group <packages@qa.debian.org>; Source for libts-0.0-0 is src:tslib.

Reported by: Sebastian Siewior <sebastian@breakpoint.cc>

Date: Thu, 18 Sep 2008 19:30:13 UTC

Severity: normal

Tags: fixed-upstream, patch

Found in version tslib/1.0-4

Fixed in version tslib/1.0-5

Done: Neil Williams <codehelp@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Neil Williams <codehelp@debian.org>:
Bug#499446; Package tslib. Full text and rfc822 format available.

Acknowledgement sent to Sebastian Siewior <sebastian@breakpoint.cc>:
New Bug report received and forwarded. Copy sent to Neil Williams <codehelp@debian.org>. Full text and rfc822 format available.

Message #5 received at submit@bugs.debian.org (full text, mbox):

From: Sebastian Siewior <sebastian@breakpoint.cc>
To: submit@bugs.debian.org
Subject: tslib's event interface does not work on powerpc
Date: Thu, 18 Sep 2008 21:30:00 +0200
Package: tslib
Version: 1.0-4
Tags: patch

On 32 Bit PowerPC (or any other 32bit BE machine) the event module reports

|selected device is not a touchscreen I understand

and does not process any input from the device. I've sent the following
patch to upstram [1] at Thu May 8 13:14:04 CEST 2008 with no response so
far.

[1] https://lists.berlios.de/pipermail/tslib-general/2008-May/000036.html

---
The bit / absbit is defined the same way as in kernel. {EV|ABS}_CNT is
only exported in recent kernels.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 plugins/input-raw.c |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/plugins/input-raw.c b/plugins/input-raw.c
index 6b01fd8..0539473 100644
--- a/plugins/input-raw.c
+++ b/plugins/input-raw.c
@@ -49,25 +49,33 @@ struct tslib_input {
 	int	grab_events;
 };
 
+#define BITS_PER_LONG	(sizeof(long) * 8)
+#ifndef EV_CNT
+#define EV_CNT	(EV_MAX+1)
+#endif
+#ifndef ABS_CNT
+#define ABS_CNT	(ABS_MAX+1)
+#endif
+
 static int check_fd(struct tslib_input *i)
 {
 	struct tsdev *ts = i->module.dev;
 	int version;
-	u_int32_t bit;
-	u_int64_t absbit;
+	unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
+	unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
 
 	if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
 		(version == EV_VERSION) &&
-		(ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
-		(bit & (1 << EV_ABS)) &&
-		(ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
-		(absbit & (1 << ABS_X)) &&
-		(absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
+		(ioctl(ts->fd, EVIOCGBIT(0, EV_CNT), bit) >= 0) &&
+		(bit[0] & (1 << EV_ABS)) &&
+		(ioctl(ts->fd, EVIOCGBIT(EV_ABS, ABS_CNT), absbit) >= 0) &&
+		(absbit[0] & (1 << ABS_X)) &&
+		(absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
 		fprintf(stderr, "selected device is not a touchscreen I understand\n");
 		return -1;
 	}
 
-	if (bit & (1 << EV_SYN))
+	if (bit[0] & (1 << EV_SYN))
 		i->using_syn = 1;
 	
 	if (i->grab_events == GRAB_EVENTS_WANTED) {
-- 
1.6.0





Information forwarded to debian-bugs-dist@lists.debian.org, Neil Williams <codehelp@debian.org>:
Bug#499446; Package tslib. Full text and rfc822 format available.

Acknowledgement sent to Sebastian Siewior <sebastian@breakpoint.cc>:
Extra info received and forwarded to list. Copy sent to Neil Williams <codehelp@debian.org>. Full text and rfc822 format available.

Message #10 received at 499446@bugs.debian.org (full text, mbox):

From: Sebastian Siewior <sebastian@breakpoint.cc>
To: 499446@bugs.debian.org
Subject: Re: Bug#499446: Acknowledgement (tslib's event interface does not work on powerpc)
Date: Thu, 18 Sep 2008 22:25:57 +0200
After little investigation I've noticed that the patched version still
has the "size" bug which affects 2.6.27-rc1+. This is the fixed
version:

--
The bit / absbit is defined the same way as in kernel. {EV|ABS}_CNT is
only exported in recent kernels.

Signed-off-by: Sebastian Siewior <sebastian@breakpoint.cc>
---
 plugins/input-raw.c |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/plugins/input-raw.c b/plugins/input-raw.c
index 6b01fd8..0539473 100644
--- a/plugins/input-raw.c
+++ b/plugins/input-raw.c
@@ -49,25 +49,33 @@ struct tslib_input {
 	int	grab_events;
 };
 
+#define BITS_PER_LONG	(sizeof(long) * 8)
+#ifndef EV_CNT
+#define EV_CNT	(EV_MAX+1)
+#endif
+#ifndef ABS_CNT
+#define ABS_CNT	(ABS_MAX+1)
+#endif
+
 static int check_fd(struct tslib_input *i)
 {
 	struct tsdev *ts = i->module.dev;
 	int version;
-	u_int32_t bit;
-	u_int64_t absbit;
+	unsigned long bit[EV_CNT / BITS_PER_LONG + 1];
+	unsigned long absbit[ABS_MAX / BITS_PER_LONG + 1];
 
 	if (! ((ioctl(ts->fd, EVIOCGVERSION, &version) >= 0) &&
 		(version == EV_VERSION) &&
-		(ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit) * 8), &bit) >= 0) &&
-		(bit & (1 << EV_ABS)) &&
-		(ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit) * 8), &absbit) >= 0) &&
-		(absbit & (1 << ABS_X)) &&
-		(absbit & (1 << ABS_Y)) && (absbit & (1 << ABS_PRESSURE)))) {
+		(ioctl(ts->fd, EVIOCGBIT(0, sizeof(bit)), bit) >= 0) &&
+		(bit[0] & (1 << EV_ABS)) &&
+		(ioctl(ts->fd, EVIOCGBIT(EV_ABS, sizeof(absbit)), absbit) >= 0) &&
+		(absbit[0] & (1 << ABS_X)) &&
+		(absbit[0] & (1 << ABS_Y)) && (absbit[0] & (1 << ABS_PRESSURE)))) {
 		fprintf(stderr, "selected device is not a touchscreen I understand\n");
 		return -1;
 	}
 
-	if (bit & (1 << EV_SYN))
+	if (bit[0] & (1 << EV_SYN))
 		i->using_syn = 1;
 	
 	if (i->grab_events == GRAB_EVENTS_WANTED) {
-- 
1.5.6.5





Severity set to `serious' from `normal' Request was from Sebastian Andrzej Siewior <sebastian@breakpoint.cc> to control@bugs.debian.org. (Tue, 28 Oct 2008 22:18:06 GMT) Full text and rfc822 format available.

Severity set to `normal' from `serious' Request was from "Neil Williams" <neil@codehelp.co.uk> to control@bugs.debian.org. (Wed, 29 Oct 2008 20:36:05 GMT) Full text and rfc822 format available.

Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#499446; Package tslib. (Wed, 29 Oct 2008 20:39:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. (Wed, 29 Oct 2008 20:39:02 GMT) Full text and rfc822 format available.

Message #19 received at 499446@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 499446@bugs.debian.org
Subject: Not an RC bug
Date: Wed, 29 Oct 2008 20:36:19 +0000
[Message part 1 (text/plain, inline)]
I see no reason for this to be release-critical, downgrading.

Please justify such bumps in severity in future - random acts of
severity ping-pong are very unhelpful.

The bug, as originally filed, was normal severity and I'm happy with
that.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

[Message part 2 (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Neil Williams <codehelp@debian.org>:
Bug#499446; Package tslib. (Tue, 04 Nov 2008 16:12:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sebastian Andrzej Siewior <sebastian@breakpoint.cc>:
Extra info received and forwarded to list. Copy sent to Neil Williams <codehelp@debian.org>. (Tue, 04 Nov 2008 16:12:02 GMT) Full text and rfc822 format available.

Message #24 received at 499446@bugs.debian.org (full text, mbox):

From: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
To: 499446@bugs.debian.org
Subject: Re: Not an RC bug
Date: Tue, 4 Nov 2008 17:09:07 +0100
Please note that this package is not functional on any 32-bit BE
machines. I believe this classifies it as release critical as it affects
the release architectures (hppa, sparc, mips, powerpc).

Sebastian




Information forwarded to debian-bugs-dist@lists.debian.org, Neil Williams <codehelp@debian.org>:
Bug#499446; Package tslib. (Thu, 27 Nov 2008 14:48:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Sebastian Andrzej Siewior <bigeasy@breakpoint.cc>:
Extra info received and forwarded to list. Copy sent to Neil Williams <codehelp@debian.org>. (Thu, 27 Nov 2008 14:48:03 GMT) Full text and rfc822 format available.

Message #29 received at 499446@bugs.debian.org (full text, mbox):

From: Sebastian Andrzej Siewior <bigeasy@breakpoint.cc>
To: 499446@bugs.debian.org
Subject: tslib bug regarding 32bit BE machines is fixed upstream
Date: Thu, 27 Nov 2008 15:42:17 +0100
tags 499446 fixed-upstream
thanks

It seems that upstream woke up and applied a couple of patches. That
means that this bug is fixed in rev70 which I just checked.
Also, your patch 020-link-libts.dpatch is included.

Sebastian




Information forwarded to debian-bugs-dist@lists.debian.org:
Bug#499446; Package tslib. (Thu, 27 Nov 2008 14:57:06 GMT) Full text and rfc822 format available.

Acknowledgement sent to Neil Williams <codehelp@debian.org>:
Extra info received and forwarded to list. (Thu, 27 Nov 2008 14:57:06 GMT) Full text and rfc822 format available.

Message #34 received at 499446@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: Sebastian Andrzej Siewior <bigeasy@breakpoint.cc>, 499446@bugs.debian.org
Cc: 499446@bugs.debian.org
Subject: Re: Bug#499446: tslib bug regarding 32bit BE machines is fixed upstream
Date: Thu, 27 Nov 2008 15:55:05 +0100
[Message part 1 (text/plain, inline)]
On Thu, 27 Nov 2008 15:42:17 +0100
Sebastian Andrzej Siewior <bigeasy@breakpoint.cc> wrote:

> tags 499446 fixed-upstream
> thanks
> 
> It seems that upstream woke up and applied a couple of patches. That
> means that this bug is fixed in rev70 which I just checked.
> Also, your patch 020-link-libts.dpatch is included.

Thanks for letting me know - I'll consider an upload to experimental
next week sometime. I'm away at the moment.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

[Message part 2 (application/pgp-signature, inline)]

Tags added: fixed-upstream Request was from Sebastian Andrzej Siewior <bigeasy@breakpoint.cc> to control@bugs.debian.org. (Thu, 27 Nov 2008 15:06:02 GMT) Full text and rfc822 format available.

Bug reassigned from package `tslib' to `libts-0.0-0'. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Tue, 09 Dec 2008 11:27:03 GMT) Full text and rfc822 format available.

Bug marked as found in version 1.0-4. Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Tue, 09 Dec 2008 12:03:02 GMT) Full text and rfc822 format available.

Message sent on to Sebastian Siewior <sebastian@breakpoint.cc>:
Bug#499446. (Tue, 09 Dec 2008 16:12:08 GMT) Full text and rfc822 format available.

Message #43 received at 499446-submitter@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 499446-submitter@bugs.debian.org, 496759-submitter@bugs.debian.org, 497516-submitter@bugs.debian.org
Subject: Fixes going into experimental
Date: Tue, 9 Dec 2008 16:09:17 +0000
[Message part 1 (text/plain, inline)]
I've added a note to ts_calibrate (1) and a complete ts.conf (5)
manpages.

I've added a patch from ubuntu and a patch of my own to put the correct
version in the pkgconfig file. I've also added the patch for 32bit big
endian support for powerpc.

I'll be uploading to experimental fairly soon.

-- 


Neil Williams
=============
http://www.data-freedom.org/
http://www.linux.codehelp.co.uk/
http://e-mail.is-not-s.ms/

[Message part 2 (application/pgp-signature, inline)]

Tags added: pending Request was from Neil Williams <codehelp@debian.org> to control@bugs.debian.org. (Tue, 09 Dec 2008 18:12:06 GMT) Full text and rfc822 format available.

Reply sent to Neil Williams <codehelp@debian.org>:
You have taken responsibility. (Sun, 14 Dec 2008 12:18:06 GMT) Full text and rfc822 format available.

Notification sent to Sebastian Siewior <sebastian@breakpoint.cc>:
Bug acknowledged by developer. (Sun, 14 Dec 2008 12:18:06 GMT) Full text and rfc822 format available.

Message #50 received at 499446-close@bugs.debian.org (full text, mbox):

From: Neil Williams <codehelp@debian.org>
To: 499446-close@bugs.debian.org
Subject: Bug#499446: fixed in tslib 1.0-5
Date: Sun, 14 Dec 2008 11:47:10 +0000
Source: tslib
Source-Version: 1.0-5

We believe that the bug you reported is fixed in the latest version of
tslib, which is due to be installed in the Debian FTP archive:

libts-0.0-0-dbg_1.0-5_amd64.deb
  to pool/main/t/tslib/libts-0.0-0-dbg_1.0-5_amd64.deb
libts-0.0-0_1.0-5_amd64.deb
  to pool/main/t/tslib/libts-0.0-0_1.0-5_amd64.deb
libts-bin_1.0-5_amd64.deb
  to pool/main/t/tslib/libts-bin_1.0-5_amd64.deb
libts-dev_1.0-5_amd64.deb
  to pool/main/t/tslib/libts-dev_1.0-5_amd64.deb
tslib_1.0-5.diff.gz
  to pool/main/t/tslib/tslib_1.0-5.diff.gz
tslib_1.0-5.dsc
  to pool/main/t/tslib/tslib_1.0-5.dsc



A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 499446@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Neil Williams <codehelp@debian.org>, (supplier of updated tslib package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Format: 1.8
Date: Sun, 14 Dec 2008 11:08:54 +0000
Source: tslib
Binary: libts-0.0-0 libts-dev libts-bin libts-0.0-0-dbg
Architecture: source amd64
Version: 1.0-5
Distribution: experimental
Urgency: low
Maintainer: Neil Williams <codehelp@debian.org>,
Changed-By: Neil Williams <codehelp@debian.org>
Description: 
 libts-0.0-0 - touch screen library
 libts-0.0-0-dbg - touch screen library debug symbols
 libts-bin  - touch screen library utilities
 libts-dev  - touch screen library, development files
Closes: 496759 497516 499446
Changes: 
 tslib (1.0-5) experimental; urgency=low
 .
   * Add enviroment variables, including TSLIB_TSDEVICE, to manual page
     for ts_calibrate and reference as 'see also' in other pages.
     (Closes: #497516)
   * Add patch for 32bit big endian support - being tested upstream -
     to provide event interface on powerpc (Closes: #499446)
   * Patch AC_INIT to use 0.1.0 in tslib-0.0.pc (Closes: #496759)
   * Add 050-glibc2.8-ubuntu from 1.0-4ubuntu1, thanks to Michael
     Casadevall <sonicmctails@gmail.com> - Failure to build resolved due
     to glibc-2.8, resolved by modifying code to confirm to the new
     open()/O_CREAT API by adding a mode setting
   * Incorporate cross-building improvements from Emdebian
   * Add a general manpage for /etc/ts.conf in libts-0.0-0
Checksums-Sha1: 
 bab8d1d695824077c558a9b28e3668de9225ab38 1226 tslib_1.0-5.dsc
 5f854831baabc70eedc1735c1e97e69db5b6507d 10860 tslib_1.0-5.diff.gz
 f3829c54684d400e67bc0e917d0db7682355e8fa 31174 libts-0.0-0_1.0-5_amd64.deb
 7b53c357d0e4813fdcddc23b5f3288c860b88e4c 12510 libts-dev_1.0-5_amd64.deb
 ed2048e81733d9bb58649750500bb7dea3bef0dc 37242 libts-bin_1.0-5_amd64.deb
 7ac2f4c3a00aaf798d13b7948a48cb7bb6029b01 69102 libts-0.0-0-dbg_1.0-5_amd64.deb
Checksums-Sha256: 
 dd959c16768d558fc0fab96ec0ab8c9600f85f58c3af1742094a5ba65e5028bb 1226 tslib_1.0-5.dsc
 a4a889a72b64214b47bf7dbb7257ab6b713c53bfd81776347be1ef1420fe57e4 10860 tslib_1.0-5.diff.gz
 cbcea9e0eb78787052a1c90efbfc1ffb33025fbf26594e87a6d7caf738d1011b 31174 libts-0.0-0_1.0-5_amd64.deb
 f4d5789ce3f0858a6e7824ac9625a6c03890319c0b8fbb94c381ea0855d65502 12510 libts-dev_1.0-5_amd64.deb
 5d645f619fc30005e328bb5f159beee7cc16bc0092d928c7a58253eadebd0fe1 37242 libts-bin_1.0-5_amd64.deb
 8816762f12a401c0b24e5670d2db7e91788cbef7a6735864fe1b3306d40fd372 69102 libts-0.0-0-dbg_1.0-5_amd64.deb
Files: 
 142161edb801c0b455a120a2e636f12b 1226 embedded optional tslib_1.0-5.dsc
 c38d9a16cac5ef8baba968e4fb45fa7c 10860 embedded optional tslib_1.0-5.diff.gz
 4945c16174bf71e128a4521ddd60d4db 31174 libs optional libts-0.0-0_1.0-5_amd64.deb
 16848b4ba26504299b07a1171813a76e 12510 libdevel optional libts-dev_1.0-5_amd64.deb
 0ee6ab51ce0af298c33e9e6a037a37c0 37242 embedded optional libts-bin_1.0-5_amd64.deb
 b98bf3e220bbc7accf5408453611401c 69102 libs extra libts-0.0-0-dbg_1.0-5_amd64.deb

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAklE6ucACgkQiAEJSii8s+ODRQCfUg7f9Qhf0BJHSnhRTBd1JlTo
IpAAnjWIXgCT/eL88deaYQXLtXVK0McH
=UaUN
-----END PGP SIGNATURE-----





Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Tue, 14 Apr 2009 07:30:44 GMT) Full text and rfc822 format available.

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Fri Apr 25 08:31:05 2014; Machine Name: beach.debian.org

Debian Bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.