Re: [linux-usb-devel] [PATCH] appletouch powersaving - please apply for 2.6.23-rc1 - take #4

2007-07-19 Thread Soeren Sonnenburg
On Wed, 2007-07-18 at 15:57 -0700, Andrew Morton wrote:
> On Tue, 17 Jul 2007 09:10:18 +0200
> Soeren Sonnenburg <[EMAIL PROTECTED]> wrote:
> 
> > the attached minimally intrusive patch is based on Matthew Garret's
> > patch 'Make appletouch shut up when it has nothing to say' patches (e.g.
> > http://lkml.org/lkml/2007/5/13/117): Matthews description follows /
> > second paragraph lists my additional changes.
> > 
> > The appletouch geyser3 devices found in the Intel Macs (and possibly some 
> > later 
> > PPC ones?) send a constant stream of packets after the first touch. This 
> > results in the kernel waking up around once every couple of milliseconds 
> > to process them, making it almost impossible to spend any significant 
> > period of time in C3 state on a dynamic HZ kernel. Sending the mode 
> > initialization code makes the device shut up until it's touched again. 
> > This patch does so after receiving 10 packets with no interesting 
> > content.
> > 
> > In addition it now empties the work queue via cancel_work_sync on module
> > exit, keeps all error checking and only reports BTN_LEFT presses if bit
> > 1 in the status byte (last byte in packet) is set. This fixes the random
> > left clicks issue. Furthermore it invalidates touchpad data before the
> > mode switch, which fixes the touchpad runs amok issue.
> 
> Please feed this through scripts/checkpatch.pl and consider addressing
> all the things which it reports.

So I did. Updated patch which differs in

dev->valid = 0; (note the space around =) and further removed debug code
(which never got triggered but checkpatch.pl complained about)

  
attached.

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
The attached patch is based on Matthew Garret's patch 'Make appletouch shut
up when it has nothing to say' patches (e.g. 
http://lkml.org/lkml/2007/5/13/117): Matthews description follows / second
paragraph lists my additional changes.

The appletouch geyser3 devices found in the Intel Macs (and possibly some
later PPC ones?) send a constant stream of packets after the first touch. 
This results in the kernel waking up around once every couple of
milliseconds to process them, making it almost impossible to spend any
significant period of time in C3 state on a dynamic HZ kernel.  Sending the
mode initialization code makes the device shut up until it's touched again.
 This patch does so after receiving 10 packets with no interesting content.

In addition it now empties the work queue via cancel_work_sync on module
exit, keeps all error checking and only reports BTN_LEFT presses if bit 1
in the status byte (last byte in packet) is set.  This fixes the random
left clicks issue.  Furthermore it invalidates touchpad data before the
mode switch, which fixes the touchpad runs amok issue.

Credits:
Sven Anders found out that one should only check for bit 1 for BTN_LEFT.
Matthew Garrett did the initial 'Make appletouch shut up when it has
nothing to say' so I am adding him to the signed-off lines (hope that is
the correct way).

Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>
Signed-off-by: Matthew Garrett <[EMAIL PROTECTED]>
Cc: Nicolas Boichat <[EMAIL PROTECTED]>
Cc: Michael Hanselmann <[EMAIL PROTECTED]>
Cc: Peter Osterlund <[EMAIL PROTECTED]>
Cc: Frank Arnold <[EMAIL PROTECTED]>
Cc: Stelian Pop <[EMAIL PROTECTED]>
Cc: Johannes Berg <[EMAIL PROTECTED]>
Cc: Greg Kroah-Hartman <[EMAIL PROTECTED]>
Cc: Dmitry Torokhov <[EMAIL PROTECTED]>
Signed-off-by: Andrew Morton <[EMAIL PROTECTED]>

diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index e321526..f336b7b 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -155,6 +155,8 @@ struct atp {
 	int			xy_acc[ATP_XSENSORS + ATP_YSENSORS];
 	int			overflowwarn;	/* overflow warning printed? */
 	int			datalen;	/* size of an USB urb transfer */
+	int			idlecount;  /* number of empty packets */
+	struct work_struct  work;
 };
 
 #define dbg_dump(msg, tab) \
@@ -208,6 +210,55 @@ static inline int atp_is_geyser_3(struct atp *dev)
 		(productId == GEYSER4_JIS_PRODUCT_ID);
 }
 
+/*
+ * By default Geyser 3 device sends standard USB HID mouse
+ * packets (Report ID 2). This code changes device mode, so it
+ * sends raw sensor reports (Report ID 5).
+ */
+static int atp_geyser3_init(struct usb_device *udev)
+{
+	char data[8];
+	int size;
+
+	size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
+			ATP_GEYSER3_MODE_READ_REQUEST_ID,
+			USB_DIR_IN 

Re: [linux-usb-devel] [PATCH] appletouch powersaving - please apply for 2.6.23-rc1 take #3

2007-07-18 Thread Soeren Sonnenburg
On Tue, 2007-07-17 at 21:48 -0400, Dmitry Torokhov wrote:
> On Tuesday 17 July 2007 14:16, Soeren Sonnenburg wrote:
> > On Tue, 2007-07-17 at 11:01 -0400, Dmitry Torokhov wrote:
> [...]
> > > How many boxes did you try this patch on?
> > 
> > Mine plus 1 other. However please note that Matthews patch has been
> > (which is what this patch is based on) is in the mactel-patches
> > repository for quite some time now and that the not-yet-cleanup up
> > variant of this patch was posted to mactel-devel...
> > 
> > So the modeswitch part should work...
> > 
> 
> OK, can I please get signed-off-bys for the latest version so I can
> apply it?

They are the same as in the initial patch:

Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>
Signed-off-by: Matthew Garrett <[EMAIL PROTECTED]>

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] [PATCH] appletouch powersaving - please apply for 2.6.23-rc1 take #3

2007-07-17 Thread Soeren Sonnenburg
On Tue, 2007-07-17 at 11:01 -0400, Dmitry Torokhov wrote:
> Hi,
> 
> On 7/17/07, Soeren Sonnenburg <[EMAIL PROTECTED]> wrote:
> >
> >  err_free_buffer:
> > @@ -656,6 +699,7 @@ static void atp_disconnect(struct usb_interface *iface)
> >
> >usb_set_intfdata(iface, NULL);
> >if (dev) {
> > +   cancel_work_sync(&dev->work);
> >usb_kill_urb(dev->urb);
> >input_unregister_device(dev->input);
> >usb_buffer_free(dev->udev, dev->datalen,
> >
> 
> This should go into atp_close() and I think you need to do
> cancel_work_sync after calling usb_kill_urb() otherwise you risk it
> being submitted while you gettingto kill the urb.

good catch. modified patch accordingly+attached.

> How many boxes did you try this patch on?

Mine plus 1 other. However please note that Matthews patch has been
(which is what this patch is based on) is in the mactel-patches
repository for quite some time now and that the not-yet-cleanup up
variant of this patch was posted to mactel-devel...

So the modeswitch part should work...

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index e321526..7f180f7 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -155,6 +155,8 @@ struct atp {
 	int			xy_acc[ATP_XSENSORS + ATP_YSENSORS];
 	int			overflowwarn;	/* overflow warning printed? */
 	int			datalen;	/* size of an USB urb transfer */
+	int			idlecount;  /* number of empty packets */
+	struct work_struct  work;
 };
 
 #define dbg_dump(msg, tab) \
@@ -208,6 +210,63 @@ static inline int atp_is_geyser_3(struct atp *dev)
 		(productId == GEYSER4_JIS_PRODUCT_ID);
 }
 
+/*
+ * By default Geyser 3 device sends standard USB HID mouse
+ * packets (Report ID 2). This code changes device mode, so it
+ * sends raw sensor reports (Report ID 5).
+ */
+static int atp_geyser3_init(struct usb_device *udev)
+{
+	char data[8];
+	int size;
+	int i;
+
+	size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
+ATP_GEYSER3_MODE_READ_REQUEST_ID,
+USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ATP_GEYSER3_MODE_REQUEST_VALUE,
+ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+
+	if (size != 8) {
+		printk("appletouch atp_geyser3_init READ error\n");
+		for (i=0; i<8; i++)
+			printk("appletouch[%d]: %d\n", i, (int) data[i]);
+
+		err("Could not do mode read request from device"
+		" (Geyser 3 mode)");
+		return -EIO;
+	}
+
+	/* Apply the mode switch */
+	data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE;
+
+	size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
+USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ATP_GEYSER3_MODE_REQUEST_VALUE,
+ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+
+	if (size != 8) {
+		printk("appletouch atp_geyser3_init WRITE error\n");
+		for (i=0; i<8; i++)
+			printk("appletouch[%d]: %d\n", i, (int) data[i]);
+		err("Could not do mode write request to device"
+		" (Geyser 3 mode)");
+		return -EIO;
+	}
+	return 0;
+}
+
+/* Reinitialise the device if it's a geyser 3 */
+static void atp_reinit(struct work_struct *work)
+{
+	struct atp *dev = container_of(work, struct atp, work);
+	struct usb_device *udev = dev->udev;
+
+	dev->idlecount = 0;
+	atp_geyser3_init(udev);
+}
+
 static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
 			 int *z, int *fingers)
 {
@@ -449,11 +508,21 @@ static void atp_complete(struct urb* urb)
 
 		/* reset the accumulator on release */
 		memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
-	}
 
-	input_report_key(dev->input, BTN_LEFT,
-			 !!dev->data[dev->datalen - 1]);
+		/* Geyser 3 will continue to send packets continually after
+		   the first touch unless reinitialised. Do so if it's been
+		   idle for a while in order to avoid waking the kernel up
+		   several hundred times a second */
+		if (atp_is_geyser_3(dev)) {
+			dev->idlecount++;
+			if (dev->idlecount == 10) {
+dev->valid=0;
+schedule_work (&dev->work);
+			}
+		}
+	}
 
+	input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen-1] & 1);
 	input_sync(dev->input);
 
 exit:
@@ -480,6 +549,7 @@ static void atp_close(struct input_dev *input)
 	struct atp *dev = input_get_drvdata(input);
 
 	usb_kill_urb(dev->urb);
+	cancel_work_sync(&dev->work);
 	dev->open = 0;
 }
 
@@ -528,40 +598,10 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
 		dev->datalen = 81;
 
 	if (atp_is_geyser_3(dev)) {
-		/*
-		 * By default Geyser 3 device send

Re: [linux-usb-devel] [PATCH] appletouch powersaving - please apply for 2.6.23-rc1

2007-07-17 Thread Soeren Sonnenburg
On Tue, 2007-07-17 at 15:03 +0200, Johannes Berg wrote:
> Hi,
> 
> Good stuff :)
> 
> > +   int idlecount;  /* number of empty packets */
> 
> should probably use tabs here.

fixed.

> > +   size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
> > +  ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
> > +  USB_DIR_OUT | USB_TYPE_CLASS | 
> > USB_RECIP_INTERFACE,
> > +  ATP_GEYSER3_MODE_REQUEST_VALUE,
> > +  ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
> > +   
> 
> trailing whitespace.

fixed
 
> > +   input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen-1] & 1);
> > +
> 
> 
> > @@ -449,10 +511,19 @@ static void atp_complete(struct urb* urb)
> >  
> > /* reset the accumulator on release */
> > memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
> > -   }
> >  
> > -   input_report_key(dev->input, BTN_LEFT,
> > -!!dev->data[dev->datalen - 1]);
> 
> Any hint as to why you move this? The different test, yes, ok, you
> explained that, but moving it?

OK, Sven Anders also asked why the move... and well the reason was that
when I was trying to figure out what goes wrong I memset everything
including dev->data to zero which required the move ...

Anyway as there is no goto/return inbetween I fail to see that this will
make any difference. So I moved the code back down where it was. 

The new patch containing these cleanups is attached.

Best,
Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index e321526..34c1eca 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -155,6 +155,8 @@ struct atp {
 	int			xy_acc[ATP_XSENSORS + ATP_YSENSORS];
 	int			overflowwarn;	/* overflow warning printed? */
 	int			datalen;	/* size of an USB urb transfer */
+	int			idlecount;  /* number of empty packets */
+	struct work_struct  work;
 };
 
 #define dbg_dump(msg, tab) \
@@ -208,6 +210,63 @@ static inline int atp_is_geyser_3(struct atp *dev)
 		(productId == GEYSER4_JIS_PRODUCT_ID);
 }
 
+/*
+ * By default Geyser 3 device sends standard USB HID mouse
+ * packets (Report ID 2). This code changes device mode, so it
+ * sends raw sensor reports (Report ID 5).
+ */
+static int atp_geyser3_init(struct usb_device *udev)
+{
+	char data[8];
+	int size;
+	int i;
+
+	size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
+ATP_GEYSER3_MODE_READ_REQUEST_ID,
+USB_DIR_IN | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ATP_GEYSER3_MODE_REQUEST_VALUE,
+ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+
+	if (size != 8) {
+		printk("appletouch atp_geyser3_init READ error\n");
+		for (i=0; i<8; i++)
+			printk("appletouch[%d]: %d\n", i, (int) data[i]);
+
+		err("Could not do mode read request from device"
+		" (Geyser 3 mode)");
+		return -EIO;
+	}
+
+	/* Apply the mode switch */
+	data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE;
+
+	size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
+USB_DIR_OUT | USB_TYPE_CLASS | USB_RECIP_INTERFACE,
+ATP_GEYSER3_MODE_REQUEST_VALUE,
+ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+
+	if (size != 8) {
+		printk("appletouch atp_geyser3_init WRITE error\n");
+		for (i=0; i<8; i++)
+			printk("appletouch[%d]: %d\n", i, (int) data[i]);
+		err("Could not do mode write request to device"
+		" (Geyser 3 mode)");
+		return -EIO;
+	}
+	return 0;
+}
+
+/* Reinitialise the device if it's a geyser 3 */
+static void atp_reinit(struct work_struct *work)
+{
+	struct atp *dev = container_of(work, struct atp, work);
+	struct usb_device *udev = dev->udev;
+
+	dev->idlecount = 0;
+	atp_geyser3_init(udev);
+}
+
 static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
 			 int *z, int *fingers)
 {
@@ -449,11 +508,21 @@ static void atp_complete(struct urb* urb)
 
 		/* reset the accumulator on release */
 		memset(dev->xy_acc, 0, sizeof(dev->xy_acc));
-	}
 
-	input_report_key(dev->input, BTN_LEFT,
-			 !!dev->data[dev->datalen - 1]);
+		/* Geyser 3 will continue to send packets continually after
+		   the first touch unless reinitialised. Do so if it's been
+		   idle for a while in order to avoid waking the kernel up
+		   several hundred times a second */
+		if (atp_is_geyser_3(dev)) {
+			dev->idlecount++;
+			if (dev->idlecount == 10) {
+dev->valid=0;
+schedule_work (&dev->work);
+			}
+		}
+	}
 
+	input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen-1] & 1);
 	input_sync(dev->input);
 
 exit:
@@ -528,40 +597,10 @@ static int atp_probe(struct usb_interface *iface, const struct usb_device_id *id
 		dev->datalen = 81;
 
 	if (atp_is_geyser_3(dev)) {
-		/*
-		 * By default Geyser 3 device sends standard USB HID mouse
-		 * packets (Report ID 2). This code changes device m

[linux-usb-devel] [PATCH] appletouch powersaving - please apply for 2.6.23-rc1

2007-07-17 Thread Soeren Sonnenburg
Hi,

the attached minimally intrusive patch is based on Matthew Garret's
patch 'Make appletouch shut up when it has nothing to say' patches (e.g.
http://lkml.org/lkml/2007/5/13/117): Matthews description follows /
second paragraph lists my additional changes.

The appletouch geyser3 devices found in the Intel Macs (and possibly some later 
PPC ones?) send a constant stream of packets after the first touch. This 
results in the kernel waking up around once every couple of milliseconds 
to process them, making it almost impossible to spend any significant 
period of time in C3 state on a dynamic HZ kernel. Sending the mode 
initialization code makes the device shut up until it's touched again. 
This patch does so after receiving 10 packets with no interesting 
content.

In addition it now empties the work queue via cancel_work_sync on module
exit, keeps all error checking and only reports BTN_LEFT presses if bit
1 in the status byte (last byte in packet) is set. This fixes the random
left clicks issue. Furthermore it invalidates touchpad data before the
mode switch, which fixes the touchpad runs amok issue.

Credits:
Sven Anders found out that one should only check for bit 1 for BTN_LEFT.
Matthew Garrett did the initial 'Make appletouch shut up when it has
nothing to say' so I am adding him to the signed-off lines (hope that is
the correct way).

Patch follows inline and attached.

Soeren.

Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>
Signed-off-by: Matthew Garrett <[EMAIL PROTECTED]>

diff --git a/drivers/input/mouse/appletouch.c b/drivers/input/mouse/appletouch.c
index e321526..0426054 100644
--- a/drivers/input/mouse/appletouch.c
+++ b/drivers/input/mouse/appletouch.c
@@ -155,6 +155,8 @@ struct atp {
int xy_acc[ATP_XSENSORS + ATP_YSENSORS];
int overflowwarn;   /* overflow warning printed? */
int datalen;/* size of an USB urb transfer 
*/
+   int idlecount;  /* number of empty packets */
+   struct work_struct  work;
 };
 
 #define dbg_dump(msg, tab) \
@@ -208,6 +210,64 @@ static inline int atp_is_geyser_3(struct atp *dev)
(productId == GEYSER4_JIS_PRODUCT_ID);
 }
 
+/*
+ * By default Geyser 3 device sends standard USB HID mouse
+ * packets (Report ID 2). This code changes device mode, so it
+ * sends raw sensor reports (Report ID 5).
+ */
+static int atp_geyser3_init(struct usb_device *udev)
+{
+   char data[8];
+   int size;
+   int i;
+
+   size = usb_control_msg(udev, usb_rcvctrlpipe(udev, 0),
+  ATP_GEYSER3_MODE_READ_REQUEST_ID,
+  USB_DIR_IN | USB_TYPE_CLASS | 
USB_RECIP_INTERFACE,
+  ATP_GEYSER3_MODE_REQUEST_VALUE,
+  ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+
+
+   if (size != 8) {
+   printk("appletouch atp_geyser3_init READ error\n");
+   for (i=0; i<8; i++)
+   printk("appletouch[%d]: %d\n", i, (int) data[i]);
+
+   err("Could not do mode read request from device"
+   " (Geyser 3 mode)");
+   return -EIO;
+   }
+
+   /* Apply the mode switch */
+   data[0] = ATP_GEYSER3_MODE_VENDOR_VALUE;
+
+   size = usb_control_msg(udev, usb_sndctrlpipe(udev, 0),
+  ATP_GEYSER3_MODE_WRITE_REQUEST_ID,
+  USB_DIR_OUT | USB_TYPE_CLASS | 
USB_RECIP_INTERFACE,
+  ATP_GEYSER3_MODE_REQUEST_VALUE,
+  ATP_GEYSER3_MODE_REQUEST_INDEX, &data, 8, 5000);
+   
+   if (size != 8) {
+   printk("appletouch atp_geyser3_init WRITE error\n");
+   for (i=0; i<8; i++)
+   printk("appletouch[%d]: %d\n", i, (int) data[i]);
+   err("Could not do mode write request to device"
+   " (Geyser 3 mode)");
+   return -EIO;
+   }
+   return 0;
+}
+
+/* Reinitialise the device if it's a geyser 3 */
+static void atp_reinit(struct work_struct *work)
+{
+   struct atp *dev = container_of(work, struct atp, work);
+   struct usb_device *udev = dev->udev;
+
+   dev->idlecount = 0;
+   atp_geyser3_init(udev);
+}
+
 static int atp_calculate_abs(int *xy_sensors, int nb_sensors, int fact,
 int *z, int *fingers)
 {
@@ -418,6 +478,8 @@ static void atp_complete(struct urb* urb)
y = atp_calculate_abs(dev->xy_acc + ATP_XSENSORS, ATP_YSENSORS,
  ATP_YFACT, &y_z, &y_f);
 
+   input_report_key(dev->input, BTN_LEFT, dev->data[dev->datalen-1] & 1);
+
if (x && y) {
if (dev->x_old

Re: [linux-usb-devel] [Bug 8498], [Bug 8510], and Re: Can't s2ram 22-rc2

2007-05-21 Thread Soeren Sonnenburg
On Mon, 2007-05-21 at 10:51 -0400, Alan Stern wrote:
> On Sat, 19 May 2007, Greg KH wrote:

> It turns out that the patch I originally wrote to fix this is in
> conflict with one of Raphael's patches (make freezeable workqueues
> singlethread) already added to 2.6.22-rc2.  So here's an updated
> version for that kernel.
> 
> Andrey, Soeren, and Avuton: Please try this patch with 2.6.22-rc2 or 
> later and see if it fixes your problems.
> 
> Greg, if this works then I'll send it in the proper form for a patch, 
> and you can use it to replace
> 
>   usb-make-the-autosuspend-workqueue-thread-freezable.patch


works perfect, i.e. the machine survived 3 s2ram cycles and rebooted
cleanly :-))

apply! apply!

Soeren

> Alan Stern
> 
> 
> Index: 2.6.22-rc2/drivers/usb/core/usb.c
> ===
> --- 2.6.22-rc2.orig/drivers/usb/core/usb.c
> +++ 2.6.22-rc2/drivers/usb/core/usb.c
> @@ -205,7 +205,7 @@ struct device_type usb_device_type = {
>  
>  static int ksuspend_usb_init(void)
>  {
> - ksuspend_usb_wq = create_singlethread_workqueue("ksuspend_usbd");
> + ksuspend_usb_wq = create_freezeable_workqueue("ksuspend_usbd");
>   if (!ksuspend_usb_wq)
>   return -ENOMEM;
>   return 0;
> 
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] regression 2.6.22-rc2 suspend to ram broken ( usb_hcd_pci_suspend+0x0/0x170() returns -16 )

2007-05-21 Thread Soeren Sonnenburg
I suddenly can no longer s2ram with 2.6.22-rc2, as this seems caused by
usb_hcd_pci_suspend I am CC'ing linux usb-devel.

I am attaching a dmesg and lspci.

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
Linux version 2.6.22-rc2-sonne ([EMAIL PROTECTED]) (gcc version 4.1.3 20070518 
(prerelease) (Debian 4.1.2-8)) #12 SMP PREEMPT Mon May 21 10:21:19 CEST 2007
BIOS-provided physical RAM map:
 BIOS-e820:  - 0009fc00 (usable)
 BIOS-e820: 0009fc00 - 000a (reserved)
 BIOS-e820: 000ede00 - 0010 (reserved)
 BIOS-e820: 0010 - 7efce000 (usable)
 BIOS-e820: 7efce000 - 7f1cf000 (ACPI NVS)
 BIOS-e820: 7f1cf000 - 7febf000 (ACPI data)
 BIOS-e820: 7febf000 - 7feef000 (ACPI NVS)
 BIOS-e820: 7feef000 - 7ff0 (ACPI data)
 BIOS-e820: 7ff0 - 8000 (reserved)
 BIOS-e820: e000 - f000 (reserved)
 BIOS-e820: fec0 - fec01000 (reserved)
 BIOS-e820: fed14000 - fed1a000 (reserved)
 BIOS-e820: fed1c000 - fed2 (reserved)
 BIOS-e820: fee0 - fee01000 (reserved)
 BIOS-e820: ffe0 - 0001 (reserved)
1135MB HIGHMEM available.
896MB LOWMEM available.
Entering add_active_range(0, 0, 520142) 0 entries of 256 used
Zone PFN ranges:
  DMA 0 -> 4096
  Normal   4096 ->   229376
  HighMem229376 ->   520142
early_node_map[1] active PFN ranges
0:0 ->   520142
On node 0 totalpages: 520142
  DMA zone: 32 pages used for memmap
  DMA zone: 0 pages reserved
  DMA zone: 4064 pages, LIFO batch:0
  Normal zone: 1760 pages used for memmap
  Normal zone: 223520 pages, LIFO batch:31
  HighMem zone: 2271 pages used for memmap
  HighMem zone: 288495 pages, LIFO batch:31
DMI 2.4 present.
ACPI: RSDP 000FE020, 0024 (r2 APPLE )
ACPI: XSDT 7FEFD120, 0074 (r1 APPLE   Apple00   55   113)
ACPI: FACP 7FEFB000, 00F4 (r3 APPLE   Apple00   55 Loki   5F)
ACPI: DSDT 7FEF, 48C0 (r1 APPLE  MacBookP10001 INTL 20050309)
ACPI: FACS 7FEC1000, 0040
ACPI: HPET 7FEFA000, 0038 (r1 APPLE   Apple001 Loki   5F)
ACPI: APIC 7FEF9000, 0068 (r1 APPLE   Apple001 Loki   5F)
ACPI: MCFG 7FEF8000, 003C (r1 APPLE   Apple001 Loki   5F)
ACPI: ASF! 7FEF7000, 009C (r32 APPLE   Apple001 Loki   5F)
ACPI: SBST 7FEF6000, 0030 (r1 APPLE   Apple001 Loki   5F)
ACPI: ECDT 7FEF5000, 0053 (r1 APPLE   Apple001 Loki   5F)
ACPI: SSDT 7FEBC000, 064F (r1 APPLE   SataPri 1000 INTL 20050309)
ACPI: SSDT 7FEBB000, 069C (r1 APPLE   SataSec 1000 INTL 20050309)
ACPI: SSDT 7FEEF000, 04DC (r1 APPLE CpuPm 3000 INTL 20050309)
ACPI: PM-Timer IO Port: 0x408
ACPI: Local APIC address 0xfee0
ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled)
Processor #0 6:14 APIC version 20
ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled)
Processor #1 6:14 APIC version 20
ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1])
ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1])
ACPI: IOAPIC (id[0x01] address[0xfec0] gsi_base[0])
IOAPIC[0]: apic_id 1, version 32, address 0xfec0, GSI 0-23
ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 dfl dfl)
ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level)
ACPI: IRQ0 used by override.
ACPI: IRQ2 used by override.
ACPI: IRQ9 used by override.
Enabling APIC mode:  Flat.  Using 1 I/O APICs
ACPI: HPET id: 0x8086a201 base: 0xfed0
Using ACPI (MADT) for SMP configuration information
Allocating PCI resources starting at 8800 (gap: 8000:6000)
Built 1 zonelists.  Total pages: 516079
Kernel command line: root=/dev/sda3 resume=/dev/sda5 rw S
mapped APIC to d000 (fee0)
mapped IOAPIC to c000 (fec0)
Enabling fast FPU save and restore... done.
Enabling unmasked SIMD FPU exception support... done.
Initializing CPU#0
PID hash table entries: 4096 (order: 12, 16384 bytes)
Detected 2307.138 MHz processor.
Console: colour VGA+ 80x25
Dentry cache hash table entries: 131072 (order: 7, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
Memory: 2055424k/2080568k available (2822k kernel code, 23792k reserved, 947k 
data, 252k init, 1163064k highmem)
virtual kernel memory layout:
fixmap  : 0xfff9d000 - 0xf000   ( 392 kB)
pkmap   : 0xff80 - 0xffc0   (4096 kB)
vmalloc : 0xf880 - 0xff7fe000   ( 111 MB)
lowmem  : 0xc000 - 0xf800   ( 896 MB)
  .init : 0xc04b6000 - 0xc04f5000   ( 252 kB)
  .data : 0xc03c1a0d - 0xc04ae818   ( 947 kB)
  .text : 0xc010 - 0xc03c1a0d   (2822 kB)
Checking if this processor honours the WP bit even in supervisor mode... Ok.
SLUB: Genslabs=23, HWalign=64, Order=0-1, MinObjects=4, Processors=2, Nodes=1
hpet0: at MMIO 0xfed0, IRQs 2, 8, 0
hpet0: 3 64-bit timers, 14

Re: [linux-usb-devel] 2.6.22-rc2 BUG: at include/linux/slub_def.h:77 kmalloc_index()

2007-05-21 Thread Soeren Sonnenburg
On Mon, 2007-05-21 at 10:09 +0200, Jiri Slaby wrote:
> Soeren Sonnenburg napsal(a):
> > a regression (well I switched to slub) happens on boot...

> > BUG: at include/linux/slub_def.h:77 kmalloc_index()
> >  [] get_slab+0x1c8/0x250
[...]
> Could you try this patch:
> http://lkml.org/lkml/2007/5/19/171

yes, that does fix the issue (at least I don't see the BUG: anymore on
boot). however I can no longer s2ram on 22rc2. 

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] [PATCH] Make appletouch shut up when it has nothing to say

2007-05-15 Thread Soeren Sonnenburg
On Sun, 2007-05-13 at 18:58 -0700, Pete Zaitcev wrote:
> On Sun, 13 May 2007 20:57:25 +0100, Matthew Garrett <[EMAIL PROTECTED]> wrote:
> 
> > Ok, I've tidied this up a little. [...]
> 
> Looks fine here... well, almost. Did you try rmmod (I don't even know if
> it's applicable, sorry)? Usually, when schedule_work is involved, you want
> to make sure that a scheduled work won't be run when the module is gone.
> More often, a device removal is the issue, but as I take it, such is not
> possible for a built-in device :-) . In most cases, all it takes is a
> strategically placed flush_scheduled_work().

I was using this patch for some days now and I realized that - from time
to time - the touchpad runs amok, i.e. I more or less unable to control
the mouse when that happens.

Then a rmmod appletouch (+ reload) fixes this, as well as a sleep/resume
cycle.

As I had to rmmod appletouch a lot and did not see crashes I think it
works... though this problem persists...

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] converting appletouch to usb autosuspend...

2007-05-13 Thread Soeren Sonnenburg
On Sat, 2007-05-12 at 22:47 +0100, Alistair John Strachan wrote:
> On Saturday 12 May 2007 19:51:26 Soeren Sonnenburg wrote:
> > Dear all,
[...]
> > While we are at it usb related powerhogs on this macbook pro are
> > uhci_hcd (usb keyboard) and usb_hcd_poll_rh_status (rh_timer_func)
> > too...
> 
> I've found that hci_usb also hogs power on the Macbook; blacklisting this 
> module cuts down HZ considerably. I also found appletouch consumed ticks, 

I guess without loading appletouch ? Then there really is something in
there that needs to be fixed..

> just as you did.

What did you use instead of hci_usb then ? usbkbd ? This won't give you
the special keys etc...

> uhci_hcd then drops to noise; my Macbook's sitting on 10W with the backlight 
> on minimum, which is about what it can manage in OS X on maximum life 
> settings.

Thats quite some improvement... 

Soeren.
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] [PATCH] Make appletouch shut up when it has nothing to say

2007-05-13 Thread Soeren Sonnenburg
On Sun, 2007-05-13 at 20:57 +0100, Matthew Garrett wrote:
> Ok, I've tidied this up a little. I've separated the actual mode init 
> code into a separate function in order to avoid code duplication, and no 
> longer creating a new workqueue. The only other change is something that 
> I /think/ is actually a bug in the driver to begin with, but I'd like 
> some more feedback on that first - the first packet sent after the mode 
> change has 0x20 in the final byte. This seems to be interpreted as a 
> left mouse button press. As a result, moving the touchpad sends a false 
> press after every reinitialisation, or (approximately) every time the 
> pointer is moved. As far as I can tell this also happens with the 
> existing code, but is probably not noticable there because it won't 
> appear again after the first touch on the pad. Just skipping that case 
> seems to work fine.

This patch indeed fixes the problem and I have yet to observe problems
with it... However I don't know whether a re-init is the intended way of
dealing with it...

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] converting appletouch to usb autosuspend...

2007-05-12 Thread Soeren Sonnenburg
Dear all,

I've realized using the great powertop ( http://www.linuxpowertop.org/ )
that loading the appletouch driver (and touching it once) makes consumes
about 0.3 W even when not touching the pad. As rmmod'ing appletouch
fixes this I wonder why the driver does not do this alone. So my
question is what does one have to do to convert a driver (such as
appletouch) to make use of usb autosuspend except for

 .supports_autosuspend = 1

...

While we are at it usb related powerhogs on this macbook pro are
uhci_hcd (usb keyboard) and usb_hcd_poll_rh_status (rh_timer_func)
too...

Soeren.
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] 2.6.20-rc6 SCSI error: I/O error - trouble with mass storage devices ?!

2007-01-31 Thread Soeren Sonnenburg
On Tue, 2007-01-30 at 13:08 -0500, Alan Stern wrote:
> On Sat, 27 Jan 2007, Soeren Sonnenburg wrote:

[P990 mass storage trouble]
> > Now I am clueless what could have gone wrong (as I *think* this was all
> > working at some point at least before firmware updates) and what the
> > difference between these mass storage devices is.
> 
> The log revealed that the phone's firmware returns garbage values in the 
> Residue field for some WRITEs.  This patch should take care of it.

I can confirm that this fixes the problem.

Thank you *very* much - you've made my day.

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] 2.6.20-rc6 pb_fnmode regression

2007-01-29 Thread Soeren Sonnenburg
On Mon, 2007-01-29 at 12:45 +0100, Jiri Kosina wrote:
> On Mon, 29 Jan 2007, Soeren Sonnenburg wrote:
> 
> > That sounds good for me. Breaking with what was there is not a problem 
> > as long as this feature is still there, it can be done in a more clean 
> > way this way, and the new /sys/foo/bar path is documented (basically 
> > people nowadays expect slight user interface changes between kernel 
> > versions).
> 
> So, does the patch below look OK to powerbook people? The only difference 
> is that the module taking care of pb_fnmode parameter is now hid, instead 

For me yes ... I just rebooted and checked fn_modes ... it works nicely.
So I guess this should be applied ?!

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] 2.6.20-rc6 pb_fnmode regression

2007-01-29 Thread Soeren Sonnenburg
On Mon, 2007-01-29 at 12:13 +0100, Jiri Kosina wrote:
> On Mon, 29 Jan 2007, Jiri Kosina wrote:
> 
> > Ah, now I see. The problem is that in pre-2.6.20-rc1 the pb_fnmode was 
> > setting global variable, but after the HID layer rework, this is a 
> > per-hid variable, which is of course not updated when write to sysfs 
> > triggers. I will try to fix this before I send 2.6.20-rc6 updates to 
> > Linus, thanks for pointing this out.
> 
> Actually the cleanest solution would be when I change the code in such a 
> way that pb_fnmode parameter would be passed to hid instead of usbhid 
> module, as this is where the input mapping is being done (you could 
> potentially have a keyboard which needs the very same handling of fn mode 
> as usb powerbook keyboards currently have, but on different transport
> - input mapping is logically transport independent).
> 
> But I guess you will be not OK with breaking the backward compatibility in 
> such way, because all the already existing tutorials, etc. right? 

That sounds good for me. Breaking with what was there is not a problem
as long as this feature is still there, it can be done in a more clean
way this way, and the new  /sys/foo/bar path is documented (basically
people nowadays expect slight user interface changes between kernel
versions).

> Would warning that would trigger when the module parameter is passed to 
> usbhid and would instruct user to pass the parameter to hid module 
> instead, be acceptable? (and then changing the parameter of hid module 
> through sysfs would work as expected again).

I guess this warning is not too useful, except if it is triggered on
echo  >/sys/*/pb_fnmode too (which I suspect is what most people do).

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc6

2007-01-29 Thread Soeren Sonnenburg
On Mon, 2007-01-29 at 10:38 +0100, Jiri Kosina wrote:
> On Sat, 27 Jan 2007, Soeren Sonnenburg wrote:
[...]
> Soeren - could you please submit your patch with proper Signed-off-by 
> line?

argh, sorry!

Attached!

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>
Signed-off-by: Sergey Vlasov <[EMAIL PROTECTED]>

diff -ur linux-2.6.20-rc6/drivers/usb/input/hid-core.c linux-2.6.20-rc6-sonne/drivers/usb/input/hid-core.c
--- linux-2.6.20-rc6/drivers/usb/input/hid-core.c	2007-01-25 03:19:28.0 +0100
+++ linux-2.6.20-rc6-sonne/drivers/usb/input/hid-core.c	2007-01-27 14:55:30.0 +0100
@@ -777,6 +777,7 @@
 #define USB_DEVICE_ID_APPLE_GEYSER4_JIS	0x021c
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
+#define USB_DEVICE_ID_APPLE_IR		0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -954,19 +955,21 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1072,6 +1075,11 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+		(interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+			return NULL;
+
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	(!interface->desc.bNumEndpoints ||
 	 usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {

--- linux-2.6.20-rc6/include/linux/hid.h	2007-01-25 03:19:28.0 +0100
+++ linux-2.6.20-rc6-sonne/include/linux/hid.h	2007-01-27 11:05:51.0 +0100
@@ -264,6 +264,7 @@
 #define HID_QUIRK_INVERT_HWHEEL			0x4000
 #define HID_QUIRK_POWERBOOK_ISO_KEYBOARD0x8000
 #define HID_QUIRK_BAD_RELATIVE_KEYS		0x0001
+#define HID_QUIRK

Re: [linux-usb-devel] 2.6.20-rc6 pb_fnmode regression

2007-01-29 Thread Soeren Sonnenburg
On Mon, 2007-01-29 at 10:55 +0100, Jiri Kosina wrote:
> On Sat, 27 Jan 2007, Soeren Sonnenburg wrote:
> 
> > I realized that any setting to /sys/module/usbhid/parameters/pb_fnmode 
> > is just ignored until the machine does a suspend-resume cycle.
[...]
> I would rather be inclined to just make the 
> /sys/module/usbhid/parameters/pb_fnmode read-only (which is what most of 
> the drivers do anyway), to avoid this kind of confusion.
> 
> Do you have really any strong use-case, when setting the parameter during 
> runtime would be much more useful than just do it during modprobe or 
> rmmod/modprobe cycle?

Well I need in-kernel usbhid and the way this was implemented in 2.6.19
(and before) one could change pb_fnmode on-the-fly. This is mentioned in
all the power/i/mac/book tutorials and everyone is used to switching
modes this way.

I can happily patch the kernel to use the pb_fnmode but nonetheless this
is a regression to pre 2.6.20* and will confuse others too...

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] [PATCH] usbhid quirks for macbook(pro) updated to 2.6.20-rc1

2006-12-23 Thread Soeren Sonnenburg
On Fri, 2006-12-15 at 09:56 -0800, Greg KH wrote:
> On Fri, Dec 15, 2006 at 09:36:04AM +0100, Soeren Sonnenburg wrote:
> > On Sat, 2006-12-09 at 21:08 -0500, Joseph Fannin wrote:
> > > On Fri, 2006-12-08 at 18:19 +0100, Soeren Sonnenburg wrote:
[...]
> > Greg,
> > 
> > I've noticed that this patch is not in 2.6.20-rc1. Could you please
> > comment on what is wrong with it / whether it will ever have a chance to
> > be accepted in the way it is done ? 
> 
> It's in my queue right now, sorry.  I'll catch up on it in a few hours.

Please find attached a updated version of this patch (for kernel
2.6.20-rc1)

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>
Signed-off-by: Sergey Vlasov <[EMAIL PROTECTED]>

diff -ur linux-2.6.20-rc1-orig/drivers/usb/input/hid-core.c linux-2.6.20-rc1/drivers/usb/input/hid-core.c
--- linux-2.6.20-rc1-orig/drivers/usb/input/hid-core.c	2006-12-14 02:14:23.0 +0100
+++ linux-2.6.20-rc1/drivers/usb/input/hid-core.c	2006-12-23 10:21:49.0 +0100
@@ -772,6 +772,7 @@
 #define USB_DEVICE_ID_APPLE_GEYSER4_JIS	0x021c
 #define USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY	0x030a
 #define USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY	0x030b
+#define USB_DEVICE_ID_APPLE_IR		0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -942,19 +943,19 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_FOUNTAIN_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER1_TP_ONLY, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1060,6 +1061,11 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if ((quirks & HID_QUIRK_IGNORE_MOUSE) &&
+		(interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE))
+			return NULL;
+
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	(!interface->desc.bNumEndpoints ||
 	 usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
dif

[linux-usb-devel] [PATCH] make fn_keys work again on power/macbooks on linux-2.6.20-rc1

2006-12-23 Thread Soeren Sonnenburg
Dear all,

The apple fn keys don't work anymore with 2.6.20-rc1.

The reason is that USB_HID_POWERBOOK appears in several files although
USB_HIDINPUT_POWERBOOK is the thing to be used.

the attached trivial patch fixes this.

Please apply.
Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>

diff -ur linux-2.6.20-rc1-orig/arch/i386/defconfig linux-2.6.20-rc1/arch/i386/defconfig
--- linux-2.6.20-rc1-orig/arch/i386/defconfig	2006-12-14 02:14:23.0 +0100
+++ linux-2.6.20-rc1/arch/i386/defconfig	2006-12-23 11:13:07.0 +0100
@@ -1167,7 +1167,7 @@
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-# CONFIG_USB_HID_POWERBOOK is not set
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
 # CONFIG_USB_AIPTEK is not set
diff -ur linux-2.6.20-rc1-orig/arch/sparc64/defconfig linux-2.6.20-rc1/arch/sparc64/defconfig
--- linux-2.6.20-rc1-orig/arch/sparc64/defconfig	2006-12-14 02:14:23.0 +0100
+++ linux-2.6.20-rc1/arch/sparc64/defconfig	2006-12-23 11:13:07.0 +0100
@@ -1103,7 +1103,7 @@
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-# CONFIG_USB_HID_POWERBOOK is not set
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 CONFIG_USB_HIDDEV=y
 # CONFIG_USB_AIPTEK is not set
diff -ur linux-2.6.20-rc1-orig/arch/x86_64/defconfig linux-2.6.20-rc1/arch/x86_64/defconfig
--- linux-2.6.20-rc1-orig/arch/x86_64/defconfig	2006-12-14 02:14:23.0 +0100
+++ linux-2.6.20-rc1/arch/x86_64/defconfig	2006-12-23 11:13:07.0 +0100
@@ -1191,7 +1191,7 @@
 # USB Input Devices
 #
 CONFIG_USB_HID=y
-# CONFIG_USB_HID_POWERBOOK is not set
+# CONFIG_USB_HIDINPUT_POWERBOOK is not set
 # CONFIG_HID_FF is not set
 # CONFIG_USB_HIDDEV is not set
 # CONFIG_USB_AIPTEK is not set

diff -ur linux-2.6.20-rc1-orig/drivers/usb/input/Kconfig linux-2.6.20-rc1/drivers/usb/input/Kconfig
--- linux-2.6.20-rc1-orig/drivers/usb/input/Kconfig	2006-12-14 02:14:23.0 +0100
+++ linux-2.6.20-rc1/drivers/usb/input/Kconfig	2006-12-23 11:08:28.0 +0100
@@ -28,7 +28,7 @@
 comment "Input core support is needed for USB HID input layer or HIDBP support"
 	depends on USB_HID && INPUT=n
 
-config USB_HID_POWERBOOK
+config USB_HIDINPUT_POWERBOOK
 	bool "Enable support for iBook/PowerBook special keys"
 	default n
 	depends on USB_HID
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: usb initialization order (usbhid vs. appletouch))

2006-12-15 Thread Soeren Sonnenburg
On Sat, 2006-12-09 at 21:08 -0500, Joseph Fannin wrote:
> On Fri, 2006-12-08 at 18:19 +0100, Soeren Sonnenburg wrote:
> 
> > ok, this patch was now in the mactel svn repository since about a month
> > and I've never ever seen a report about it failing. Also I asked on the
> > mailinglist for anyone having problems with that and got no answer,
> > execpt Joseph, the problem you have been seeing might have been that
> > one:
> > 
> > http://www.mail-archive.com/mactel-linux-devel@lists.sourceforge.net/msg00129.html
> > 
> > I would therefore hope it can be applied and thus appear in .20. I am
> > attaching the version that is now in mactel-svn (which also includes
> > geyser4 support).
> 
> I've since gotten my Macbook's trackpad working with the Appletouch
> driver also, now, so make that no problems, please.
> 
> I don't know what the problems I was seeing were anymore, but I
> think it was mostly the difficulty in getting it set up.  I understand
> that this should help fix that, and wish I hadn't tried to hold it up!

Greg,

I've noticed that this patch is not in 2.6.20-rc1. Could you please
comment on what is wrong with it / whether it will ever have a chance to
be accepted in the way it is done ? 

Thanks,
Soeren

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] [PATCH] usbhid quirks for macbook(pro) (was: Re: Fwd: Re: usb initialization order (usbhid vs. appletouch))

2006-12-08 Thread Soeren Sonnenburg
On Mon, 2006-10-30 at 05:12 -0500, Joseph Fannin wrote:
> On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> > On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > > From: Sergey Vlasov <[EMAIL PROTECTED]>
> > > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > > >
> > > > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > > > keyboard interface is handled by usbhid, but the mouse (really
> > > > touchpad) interface must be handled by the separate 'appletouch'
> > > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > > interface is required.
> 
> The appletouch driver doesn't work properly on the MacBook
> (non-Pro).  It claims the device, and sort of functions, but is
> basically unusable.
> 
> If this goes in, and blacklists the MacBook touchpad too, Macbook
> users will be unhappy.  I think the MacBook and the -Pro use the same
> IDs, though, which makes a problem for this patch until appletouch is
> fixed on MacBooks.

ok, this patch was now in the mactel svn repository since about a month
and I've never ever seen a report about it failing. Also I asked on the
mailinglist for anyone having problems with that and got no answer,
execpt Joseph, the problem you have been seeing might have been that
one:

http://www.mail-archive.com/mactel-linux-devel@lists.sourceforge.net/msg00129.html

I would therefore hope it can be applied and thus appear in .20. I am
attaching the version that is now in mactel-svn (which also includes
geyser4 support).

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
diff -uNr linux-2.6.19/drivers/usb/input/hid-core.c linux-2.6.19-mactel/drivers/usb/input/hid-core.c
--- linux-2.6.19/drivers/usb/input/hid-core.c	2006-11-29 22:57:37.0 +0100
+++ linux-2.6.19-mactel/drivers/usb/input/hid-core.c	2006-11-30 09:20:49.0 +0100
@@ -1627,6 +1627,16 @@
 
 #define USB_VENDOR_ID_APPLE		0x05ac
 #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE	0x0304
+#define USB_DEVICE_ID_APPLE_GEYSER_ANSI	0x0214
+#define USB_DEVICE_ID_APPLE_GEYSER_ISO	0x0215
+#define USB_DEVICE_ID_APPLE_GEYSER_JIS	0x0216
+#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI	0x0217
+#define USB_DEVICE_ID_APPLE_GEYSER3_ISO		0x0218
+#define USB_DEVICE_ID_APPLE_GEYSER3_JIS		0x0219
+#define USB_DEVICE_ID_APPLE_GEYSER4_ANSI	0x021A
+#define USB_DEVICE_ID_APPLE_GEYSER4_ISO		0x021B
+#define USB_DEVICE_ID_APPLE_GEYSER4_JIS		0x021C
+#define USB_DEVICE_ID_APPLE_IR		0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -1794,17 +1804,21 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
-	{ USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x021B, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE | HID_QUIRK_POWERBOOK_ISO_KEYBOARD},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER4_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_AP

Re: [linux-usb-devel] Fwd: Re: usb initialization order (usbhid vs. appletouch)

2006-11-01 Thread Soeren Sonnenburg
On Mon, 2006-10-30 at 15:05 -0500, Joseph Fannin wrote:
> On Mon, Oct 30, 2006 at 01:43:31PM +0100, Soeren Sonnenburg wrote:
> > On Mon, 2006-10-30 at 05:12 -0500, Joseph Fannin wrote:
> > > On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> > > > On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > > > > From: Sergey Vlasov <[EMAIL PROTECTED]>
> > > > > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > > > > >
> > > > > > Some HID devices by Apple have both keyboard and mouse interfaces; 
> > > > > > the
> > > > > > keyboard interface is handled by usbhid, but the mouse (really
> > > > > > touchpad) interface must be handled by the separate 'appletouch'
> > > > > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > > > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > > > > interface is required.
> > >
> > > The appletouch driver doesn't work properly on the MacBook
> > > (non-Pro).  It claims the device, and sort of functions, but is
> > > basically unusable.
> > >
> > > If this goes in, and blacklists the MacBook touchpad too, Macbook
> > > users will be unhappy.  I think the MacBook and the -Pro use the same
> > > IDs, though, which makes a problem for this patch until appletouch is
> > > fixed on MacBooks.
> >
> > Can you please be a bit more specific on this ? Other sites mention it
> > works http://bbbart.ulyssis.be/gentoomacbook/ ... what are you missing ?
> > Sensitivity and such can all be tweaked in xorg.conf ...
> 
> That's the first I've heard of it working on a vanilla MacBook.
> I'm glad.  I've only heard of failures before, some by people way
> smarter than me.

[lots of problems with the appletouch driver]

OK I am asking this on the mactel-linux list... Lets see if these
problems are gone and I find some happy mb appletouch user...

In the worst case this patch could be a config option or will have to be
kept separate.

Soeren.
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] Fwd: Re: usb initialization order (usbhid vs. appletouch)

2006-10-30 Thread Soeren Sonnenburg
On Mon, 2006-10-30 at 05:12 -0500, Joseph Fannin wrote:
> On Sat, Oct 28, 2006 at 10:27:46PM +0200, Soeren Sonnenburg wrote:
> > On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote:
> > > > From: Sergey Vlasov <[EMAIL PROTECTED]>
> > > > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > > >
> > > > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > > > keyboard interface is handled by usbhid, but the mouse (really
> > > > touchpad) interface must be handled by the separate 'appletouch'
> > > > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > > > interfaces, therefore a new quirk flag to ignore only the mouse
> > > > interface is required.
> 
> The appletouch driver doesn't work properly on the MacBook
> (non-Pro).  It claims the device, and sort of functions, but is
> basically unusable.
> 
> If this goes in, and blacklists the MacBook touchpad too, Macbook
> users will be unhappy.  I think the MacBook and the -Pro use the same
> IDs, though, which makes a problem for this patch until appletouch is
> fixed on MacBooks.

Can you please be a bit more specific on this ? Other sites mention it
works http://bbbart.ulyssis.be/gentoomacbook/ ... what are you missing ?
Sensitivity and such can all be tweaked in xorg.conf ...

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world oaround you, but you're still dreaming.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] Fwd: Re: usb initialization order (usbhid vs. appletouch)

2006-10-28 Thread Soeren Sonnenburg
On Sat, 2006-10-28 at 20:55 +0200, Oliver Neukum wrote: 
> > From: Sergey Vlasov <[EMAIL PROTECTED]>
> > Subject: usbhid: Add HID_QUIRK_IGNORE_MOUSE flag
> > 
> > Some HID devices by Apple have both keyboard and mouse interfaces; the
> > keyboard interface is handled by usbhid, but the mouse (really
> > touchpad) interface must be handled by the separate 'appletouch'
> > driver.  Using HID_QUIRK_IGNORE will make hiddev ignore both
> > interfaces, therefore a new quirk flag to ignore only the mouse
> > interface is required.
> 
> Exactly. Combing both patches:
> Soeren, if this works, please sign it off and send it to Greg.

OK, this works, but as the same IDs need the FN key hacks I or'ed the FN
and mouse quirk flags. Also I added the appleir (builtin infrared on the
macbook/pro) to the list of ignored IDs. Therefore the patch though very
similar is again slightly different.

But hey, it worked for me over the last hour on this mbp :-))
Please comment/apply.

Soeren.
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.
Signed-off-by: Soeren Sonnenburg <[EMAIL PROTECTED]>
Signed-off-by: Sergey Vlasov <[EMAIL PROTECTED]>

--- linux-2.6.18.1/drivers/usb/input/hid.h	2006-10-14 05:34:03.0 +0200
+++ linux-2.6.18.1-sonne/drivers/usb/input/hid.h	2006-10-28 21:44:32.0 +0200
@@ -260,6 +260,7 @@
 #define HID_QUIRK_POWERBOOK_HAS_FN		0x1000
 #define HID_QUIRK_POWERBOOK_FN_ON		0x2000
 #define HID_QUIRK_INVERT_HWHEEL			0x4000
+#define HID_QUIRK_IGNORE_MOUSE  0x8000
 
 /*
  * This is the global environment of the parser. This information is
--- linux-2.6.18.1/drivers/usb/input/hid-core.c	2006-10-14 05:34:03.0 +0200
+++ linux-2.6.18.1-sonne/drivers/usb/input/hid-core.c	2006-10-28 21:46:50.0 +0200
@@ -1585,6 +1585,13 @@
 
 #define USB_VENDOR_ID_APPLE		0x05ac
 #define USB_DEVICE_ID_APPLE_MIGHTYMOUSE	0x0304
+#define USB_DEVICE_ID_APPLE_GEYSER_ANSI	0x0214
+#define USB_DEVICE_ID_APPLE_GEYSER_ISO	0x0215
+#define USB_DEVICE_ID_APPLE_GEYSER_JIS	0x0216
+#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI	0x0217
+#define USB_DEVICE_ID_APPLE_GEYSER3_ISO		0x0218
+#define USB_DEVICE_ID_APPLE_GEYSER3_JIS		0x0219
+#define USB_DEVICE_ID_APPLE_IR  0x8240
 
 #define USB_VENDOR_ID_CHERRY		0x046a
 #define USB_DEVICE_ID_CHERRY_CYMOTION	0x0023
@@ -1731,16 +1738,18 @@
 
 	{ USB_VENDOR_ID_CHERRY, USB_DEVICE_ID_CHERRY_CYMOTION, HID_QUIRK_CYMOTION },
 
-	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0214, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0215, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0216, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0217, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0218, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x0219, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN },
-	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN },
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+	{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_POWERBOOK_HAS_FN | HID_QUIRK_IGNORE_MOUSE},
+
+	{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },
 
 	{ USB_VENDOR_ID_PANJIT, 0x0001, HID_QUIRK_IGNORE },
 	{ USB_VENDOR_ID_PANJIT, 0x0002, HID_QUIRK_IGNORE },
@@ -1837,6 +1846,10 @@
 	if (quirks & HID_QUIRK_IGNORE)
 		return NULL;
 
+	if (quirks & HID_QUIRK_IGNORE_MOUSE)
+		if (interface->desc.bInterfaceProtocol == USB_INTERFACE_PROTOCOL_MOUSE)
+			return NULL;
+
 	if (usb_get_extra_descriptor(interface, HID_DT_HID, &hdesc) &&
 	(!interface->desc.bNumEndpoints ||
 	 usb_get_extra_descriptor(&interface->endpoint[0], HID_DT_HID, &hdesc))) {
-
Using Tomcat but need to do more? Need to support web services, security?
Get 

Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)

2006-10-28 Thread Soeren Sonnenburg
On Sat, 2006-10-28 at 19:03 +0200, Oliver Neukum wrote:
> Am Samstag, 28. Oktober 2006 18:56 schrieb Soeren Sonnenburg:
> > Anyways, back to the above problem. Can one somehow tell the hid-core to
> > load the appletouch driver when it detects any of these devices and then
> > initialize on top of that ? The appletouch driver is completely ignored
> > (doesn't even enter the atp_prope function as usb_register registers
> > with device/product tuples that are already taken by hid
> > 
> > Any ideas ?
> 
> Try udev to disconnect the hid driver, then load appletouch.

I don't understand... I can disconnect the driver if I do on cmdline
libhid-detach-device 05ac: ; modprobe appletouch .
However then my keyboard is gone.

Of course there is the workaround of building both the appletouch and
hid driver as modules and then loading them in this order ... but I was
hoping to have them fix in the kernel. If this is however not doable we
should mark it in Kconfig and I will have to live with it.

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)

2006-10-28 Thread Soeren Sonnenburg
On Thu, 2006-10-26 at 14:36 +0200, Oliver Neukum wrote:
> Am Donnerstag, 26. Oktober 2006 13:49 schrieb Soeren Sonnenburg:
> > On Thu, 2006-10-26 at 12:20 +0200, Oliver Neukum wrote:
> > > Am Donnerstag, 26. Oktober 2006 11:53 schrieb Soeren Sonnenburg:
> > > > Dear all,
> > > > 
> > > > I've noticed that the appletouch driver needs to be loaded *before* the
> > > > usbhid driver to function. This is currently impossible when built into
> > > > the kernel (and not modules). So I wonder how one can change the
> > > > ordering of when the usb drivers are loaded.
> > > > 
> > > > Suggestions ?
> > > 
> > > Add a quirk to HID. Messing around with probing orders is not
> > > a sure thing.
> > 
> > what do you have in mind ? if appletouch is turned on ignore IDs that
> > appear in appletouch ?
> 
> Yes, or even make it unconditional. There is a specific driver for a device.
> It exists for a reason.

OK, so I tried adding all of them to the HID_QUIRK_IGNORE LIST, i.e.


#define USB_DEVICE_ID_APPLE_GEYSER_ANSI 0x0214
#define USB_DEVICE_ID_APPLE_GEYSER_ISO  0x0215
#define USB_DEVICE_ID_APPLE_GEYSER_JIS  0x0216
#define USB_DEVICE_ID_APPLE_GEYSER3_ANSI0x0217
#define USB_DEVICE_ID_APPLE_GEYSER3_ISO 0x0218
#define USB_DEVICE_ID_APPLE_GEYSER3_JIS 0x0219


{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ANSI, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_ISO, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER_JIS, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ANSI, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_ISO, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_GEYSER3_JIS, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, 0x020E, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, 0x020F, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, 0x030A, HID_QUIRK_IGNORE },
{ USB_VENDOR_ID_APPLE, 0x030B, HID_QUIRK_IGNORE },


however this did (and cannot) work, as the product id stands for both
keyboard AND mouse. 

It will however work for the internal infrared receiver (which is also
affected).

#define USB_DEVICE_ID_APPLE_IR  0x8240

{ USB_VENDOR_ID_APPLE, USB_DEVICE_ID_APPLE_IR, HID_QUIRK_IGNORE },

Could someone please add this to the quirk list in hid-core.c in git ?
Please note that one can even do this from userspace via

libhid-detach-device 05ac:8240
modprobe appleir


Anyways, back to the above problem. Can one somehow tell the hid-core to
load the appletouch driver when it detects any of these devices and then
initialize on top of that ? The appletouch driver is completely ignored
(doesn't even enter the atp_prope function as usb_register registers
with device/product tuples that are already taken by hid

Any ideas ?

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] usb initialization order (usbhid vs. appletouch)

2006-10-26 Thread Soeren Sonnenburg
On Thu, 2006-10-26 at 12:20 +0200, Oliver Neukum wrote:
> Am Donnerstag, 26. Oktober 2006 11:53 schrieb Soeren Sonnenburg:
> > Dear all,
> > 
> > I've noticed that the appletouch driver needs to be loaded *before* the
> > usbhid driver to function. This is currently impossible when built into
> > the kernel (and not modules). So I wonder how one can change the
> > ordering of when the usb drivers are loaded.
> > 
> > Suggestions ?
> 
> Add a quirk to HID. Messing around with probing orders is not
> a sure thing.

what do you have in mind ? if appletouch is turned on ignore IDs that
appear in appletouch ?

Soeren
-- 
Sometimes, there's a moment as you're waking, when you become aware of
the real world around you, but you're still dreaming.

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [Fwd: Re: [linux-usb-devel] [Fwd: oops on wake up using usb-keyb/mouse on powerbook]]

2004-06-11 Thread Soeren Sonnenburg
On Fri, 2004-06-11 at 17:28, Benjamin Herrenschmidt wrote:
> I fwd your message to linux-usb and David replied there, can you
> follow up ?
> 
> Ben.

ok.

> 
> -Forwarded Message-
> From: David Brownell <[EMAIL PROTECTED]>
> To: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
> Cc: Linux-USB <[EMAIL PROTECTED]>
> Subject: Re: [linux-usb-devel] [Fwd: oops on wake up using usb-keyb/mouse on 
> powerbook]
> Date: Fri, 11 Jun 2004 08:15:08 -0700
> 
> Benjamin Herrenschmidt wrote:
> > From: Soeren Sonnenburg <[EMAIL PROTECTED]>
> > To: Linux Kernel <[EMAIL PROTECTED]>
> > Cc: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
> > Subject: oops on wake up using usb-keyb/mouse on powerbook
> > Date: Thu, 10 Jun 2004 08:06:20 +0200
> > 
> > Hi!
> > 
> > I get this oops when I use a usb keyboard to wakeup the powerbook.
> > Kernel is 2.6.7-rc2, usb keyboard is infect a ps2 keyboard attached via
> > a usb->ps2 adapter.
> > 
> > Any ideas ?
> > Soeren.
> 
> The most interesting parts precede this message.  Why did
> the HC die?  Stop that, and the rest should be fine.

I don't know. I am now on *-rc3 and this oops still happened to me. Once
I woke up the computer using left mouse buttons once using the enter
key... What I've found in the logs preceding what I've send is:

Jun  8 07:04:20 kernel: ohci_hcd 0001:01:18.0: remote wakeup
Jun  8 07:04:20 kernel: radeonfb: suspending to state: 2...
Jun  8 07:04:20 kernel: agpgart: Putting AGP V2 device at :00:0b.0 into 0x mode
Jun  8 07:04:20 kernel: agpgart: Putting AGP V2 device at :00:10.0 into 0x mode
Jun  8 07:04:20 kernel: radeonfb: switching to D2 state...
Jun  8 07:04:20 kernel: cpufreq: resume failed to assert current frequency is what 
timing core thinks it is.
Jun  8 07:04:20 kernel: radeonfb: switching to D0 state...
Jun  8 07:04:20 kernel: radeonfb: resumed !
Jun  8 07:04:20 kernel: enable_irq(27) unbalanced
Jun  8 07:04:20 kernel: ohci_hcd 0001:01:18.0: HC died; cleaning up
Jun  8 07:04:20 kernel: drivers/usb/input/hid-core.c: can't resubmit intr, 
0001:01:18.0-1/input1, status -108
Jun  8 07:04:20 kernel: usb 1-1: USB disconnect, address 3
Jun  8 07:04:20 kernel: Badness in hcd_endpoint_disable at drivers/usb/core/hcd.c:1359
Jun  8 07:04:20 kernel: Call trace:

and that is really everything (machine was asleep for 1 day (I could
reason that from the date in the log)...

there is nothing else in the log... well in syslog I've found some udev
stuff but it is 1-3 seconds after the first oopses:

Jun  8 07:04:21 hal.hotplug[11256]: waiting for vc info at /class/vc/vcs63
Jun  8 07:04:21 hal.hotplug[11256]: Dont know how to wait for vc at /class/vc/vcs63; 
sleeping 1000 ms
Jun  8 07:04:23 kernel: adb: starting probe task...
Jun  8 07:04:23 kernel: adb devices: [2]: 2 c4 [3]: 3 1 [7]: 7 1f
Jun  8 07:04:23 kernel: ADB keyboard at 2, handler 1
Jun  8 07:04:23 kernel: ADB mouse at 3, handler set to 4 (trackpad)
Jun  8 07:04:23 kernel: adb: finished probe task...
Jun  8 07:04:21 hal.hotplug[11262]: waiting for vc info at /class/vc/vcsa63
Jun  8 07:04:21 hal.hotplug[11262]: Dont know how to wait for vc at /class/vc/vcsa63; 
sleeping 1000 ms
Jun  8 07:04:21 hal.hotplug[11279]: waiting for vc info at /class/vc/vcs63
Jun  8 07:04:21 hal.hotplug[11279]: Dont know how to wait for vc at /class/vc/vcs63; 
sleeping 1000 ms
Jun  8 07:04:21 hal.hotplug[11290]: waiting for vc info at /class/vc/vcsa63
Jun  8 07:04:21 hal.hotplug[11290]: Dont know how to wait for vc at /class/vc/vcsa63; 
sleeping 1000 ms
Jun  8 07:04:22 pbbuttonsd.hotplug[11168]: reloading pbbuttonsd

well reloading pbbuttonsd (rescanning for which input devices are
connected) was causing oopses in -rc2 but that seems fixed in -rc3

> > kernel: ohci_hcd 0001:01:18.0: HC died; cleaning up
> > kernel: drivers/usb/input/hid-core.c: can't resubmit intr, 0001:01:18.0-1/input1, 
> > status -108
> > kernel: usb 1-1: USB disconnect, address 3
> > kernel: Badness in hcd_endpoint_disable at drivers/usb/core/hcd.c:1359
> 
> That's just a WARN_ON(strange):
> 
>  WARN_ON (!HCD_IS_RUNNING (hcd->state) && hcd->state != USB_STATE_HALT);
> 
> If the HC died, then it sure ought to be flagged as in HALT state.

I hope that helps...

This is 100% reproducable here however I would rather not want to crash
this machine too often but will happily test patches/ put debug output
etc whereever you think it would help.

Please CC me I am not subscribed to the usb-devel list.

Regards,
Soeren.



---
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] Re: 2.6.6-rc3 still oops on unplugging usb bluetooth bcm203x dongle

2004-04-29 Thread Soeren Sonnenburg
On Thu, 2004-04-29 at 08:05, Soeren Sonnenburg wrote:
> Hi...

Maybe that additional information helps...

That is when I one by one rmmod:

history | grep rmmod
 5703  rmmod bcm203x 
 5704  rmmod firmware_class 
 5705  rmmod rfcomm
 5706  rmmod l2cap
 5707  rmmod bluetooth 
 5709  rmmod hci_usb 

that is the lsmod before I rmmod hci_usb

lsmod
Module  Size  Used by
hci_usb13824  0 
bluetooth  55932  1 hci_usb

oops occurs after the rmmod hci_usb. looks to me as if the bluetooth
module is not happy with that.

usbcore: deregistering driver hci_usb
Oops: kernel access of bad area, sig: 11 [#1]
NIP: C02134B4 LR: F2064414 SP: C5C2DD70 REGS: c5c2dcc0 TRAP: 0600Not tainted
MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 6B6B6BB7, DSISR: 0120
TASK = e1c54cf0[3957] 'rmmod' THREAD: c5c2c000Last syscall: 129 
GPR00: 0001 C5C2DD70 E1C54CF0 EE5A4244 EDFCF1DC  C12F09FC  
GPR08: FFF7 C113B2FC 0001 C0213480 22000222 10019FF0  100C 
GPR16:   10204108 102044A8 10203068 101D81E8 10001400  
GPR24: 1000   6B6B6B6B 6B6B6BB7 C8D0561C EE5A4244 EE5A4118 
NIP [c02134b4] class_device_del+0x34/0x140
LR [f2064414] hci_unregister_sysfs+0x14/0x24 [bluetooth]
Call trace:
 [f2064414] hci_unregister_sysfs+0x14/0x24 [bluetooth]
 [f205f76c] hci_unregister_dev+0x18/0xb0 [bluetooth]
 [f204ed94] hci_usb_disconnect+0x48/0x90 [hci_usb]
 [c0277a24] usb_unbind_interface+0x88/0x8c
 [c02125a4] device_release_driver+0x84/0x88
 [c02125d4] driver_detach+0x2c/0x50
 [c02128d0] bus_remove_driver+0x50/0xa8
 [c0212cb8] driver_unregister+0x18/0x78
 [c0277b20] usb_deregister+0x38/0x50
 [f204edf4] hci_usb_exit+0x18/0x4cc [hci_usb]
 [c003501c] sys_delete_module+0x1a4/0x224
 [c0005d60] ret_from_syscall+0x0/0x44

> I still get:
> 
> usb 2-1: USB disconnect, address 3
> Oops: kernel access of bad area, sig: 11 [#1]
> NIP: C02134B4 LR: F205D414 SP: EFE87DD0 REGS: efe87d20 TRAP: 0600Not tainted
> MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
> DAR: 6B6B6BB7, DSISR: 0120
> TASK = effa4030[5] 'khubd' THREAD: efe86000Last syscall: -1 
> GPR00: 0001 EFE87DD0 EFFA4030 EE77C828 6B6B6B6B  EB8EE83C  
> GPR08: 1388 EF0EE858 00010C00 C0213480 82008022    
> GPR16:      0022 0023  
> GPR24:  C040 0001 6B6B6B6B 6B6B6BB7 EF07B8A0 EE77C828 EE77C6FC 
> NIP [c02134b4] class_device_del+0x34/0x140
> LR [f205d414] hci_unregister_sysfs+0x14/0x24 [bluetooth]
> Call trace:
>  [f205d414] hci_unregister_sysfs+0x14/0x24 [bluetooth]
>  [f205876c] hci_unregister_dev+0x18/0xb0 [bluetooth]
>  [f204cd94] hci_usb_disconnect+0x48/0x90 [hci_usb]
>  [c0277a24] usb_unbind_interface+0x88/0x8c
>  [c02125a4] device_release_driver+0x84/0x88
>  [c0212744] bus_remove_device+0x74/0xd0
>  [c0211120] device_del+0xa8/0x114
>  [c02111a4] device_unregister+0x18/0x30
>  [c027e248] usb_disable_device+0x9c/0xd8
>  [c0278768] usb_disconnect+0x9c/0x134
>  [c027ab14] hub_port_connect_change+0x294/0x298
>  [c027adec] hub_events+0x2d4/0x354
>  [c027aea8] hub_thread+0x3c/0xf0
>  [c00090b0] kernel_thread+0x44/0x60
> 
> Sometimes it helps to hciconfig hci0 down the bluetooth dongle + stop
> all programs + rmmod them... However also the
> rmmod hci_usb rfcomm bluetooth firmware_class bcm203x l2cap
> 
> is very likely to cause the same oops...
> 
> Yes, this is on powerpc but quite a number of people have the same issue
> on x86 (with 2.6.5 at least... and thats around the time this oops on
> unplugging appeared).
> 
> Any ideas ?
> Soeren



---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


[linux-usb-devel] 2.6.6-rc3 still oops on unplugging usb bluetooth bcm203x dongle

2004-04-28 Thread Soeren Sonnenburg
Hi...

I still get:

usb 2-1: USB disconnect, address 3
Oops: kernel access of bad area, sig: 11 [#1]
NIP: C02134B4 LR: F205D414 SP: EFE87DD0 REGS: efe87d20 TRAP: 0600Not tainted
MSR: 9032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
DAR: 6B6B6BB7, DSISR: 0120
TASK = effa4030[5] 'khubd' THREAD: efe86000Last syscall: -1 
GPR00: 0001 EFE87DD0 EFFA4030 EE77C828 6B6B6B6B  EB8EE83C  
GPR08: 1388 EF0EE858 00010C00 C0213480 82008022    
GPR16:      0022 0023  
GPR24:  C040 0001 6B6B6B6B 6B6B6BB7 EF07B8A0 EE77C828 EE77C6FC 
NIP [c02134b4] class_device_del+0x34/0x140
LR [f205d414] hci_unregister_sysfs+0x14/0x24 [bluetooth]
Call trace:
 [f205d414] hci_unregister_sysfs+0x14/0x24 [bluetooth]
 [f205876c] hci_unregister_dev+0x18/0xb0 [bluetooth]
 [f204cd94] hci_usb_disconnect+0x48/0x90 [hci_usb]
 [c0277a24] usb_unbind_interface+0x88/0x8c
 [c02125a4] device_release_driver+0x84/0x88
 [c0212744] bus_remove_device+0x74/0xd0
 [c0211120] device_del+0xa8/0x114
 [c02111a4] device_unregister+0x18/0x30
 [c027e248] usb_disable_device+0x9c/0xd8
 [c0278768] usb_disconnect+0x9c/0x134
 [c027ab14] hub_port_connect_change+0x294/0x298
 [c027adec] hub_events+0x2d4/0x354
 [c027aea8] hub_thread+0x3c/0xf0
 [c00090b0] kernel_thread+0x44/0x60

Sometimes it helps to hciconfig hci0 down the bluetooth dongle + stop
all programs + rmmod them... However also the
rmmod hci_usb rfcomm bluetooth firmware_class bcm203x l2cap

is very likely to cause the same oops...

Yes, this is on powerpc but quite a number of people have the same issue
on x86 (with 2.6.5 at least... and thats around the time this oops on
unplugging appeared).

Any ideas ?
Soeren



---
This SF.Net email is sponsored by: Oracle 10g
Get certified on the hottest thing ever to hit the market... Oracle 10g. 
Take an Oracle 10g class now, and we'll give you the exam FREE. 
http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] Oops with bluetooth dongle

2004-04-21 Thread Soeren Sonnenburg
On Fri, 2004-04-09 at 00:14, Greg KH wrote:
> On Tue, Apr 06, 2004 at 12:49:51PM -0400, Alan Stern wrote:
> > I've seen a couple of different problems coming up with this bluetooth 
> > stuff.  One of them may be fixed by a recent patch, as David Brownell 
> > mentioned.  Below is the relevant part excerpted from that patch; maybe it 
> > will help some of you.
> 
> I'm thinking that I really need to apply this patch now, right?  It
> looks like it will also solve the cdc-acm oops a number of people are
> reporting...
> 
> Any objections to me applying this?

I just want to report that there is still this one oops happening when
the bluez-{utils,pan,sdp} programs are running and the modules are
loaded while the dongle is beeing removed.

This happens on 2.6.5 with this patch aswell as 2.6.6-{rc1,rc2}

 [f2062404] hci_unregister_sysfs+0x14/0x24 [bluetooth]
 [f205cd80] hci_unregister_dev+0x18/0xdc [bluetooth]
 [f203c324] hci_usb_disconnect+0x48/0x90 [hci_usb]
 [c0298548] usb_unbind_interface+0x88/0x8c
 [c022e524] device_release_driver+0x84/0x88
 [c022e6c4] bus_remove_device+0x74/0xd0
 [c022d0a0] device_del+0xa8/0x114
 [c022d124] device_unregister+0x18/0x30
 [c029f354] usb_disable_device+0x9c/0xd8
 [c029928c] usb_disconnect+0x9c/0x134
 [c029b7c4] hub_port_connect_change+0x294/0x298
 [c029bac0] hub_events+0x2f8/0x3a4
 [c029bba8] hub_thread+0x3c/0xf0
 [c0009470] kernel_thread+0x44/0x60

Soeren



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] Oops with bluetooth dongle

2004-04-09 Thread Soeren Sonnenburg
On Fri, 2004-04-09 at 00:14, Greg KH wrote:
> On Tue, Apr 06, 2004 at 12:49:51PM -0400, Alan Stern wrote:
> > I've seen a couple of different problems coming up with this bluetooth 
> > stuff.  One of them may be fixed by a recent patch, as David Brownell 
> > mentioned.  Below is the relevant part excerpted from that patch; maybe it 
> > will help some of you.
> 
> I'm thinking that I really need to apply this patch now, right?  It
> looks like it will also solve the cdc-acm oops a number of people are
> reporting...
> 
> Any objections to me applying this?

That patch at least fixes the oops on plugging the usb-dongle in here...

Also removing/inserting it several times seems to be stable when no
rfcomm stuff is running...

With that I get on 2.6.5-mh1 + that patch

usb 2-1: USB disconnect, address 8
kernel BUG in queue_work at kernel/workqueue.c:103!
Oops: Exception in kernel mode, sig: 5 [#1]
NIP: C00301C4 LR: C01DA564 SP: E1639EE0 REGS: e1639e30 TRAP: 0700Not tainted
MSR: 00029032 EE: 1 PR: 0 FP: 0 ME: 1 IR/DR: 11
TASK = e9548000[4275] 'krfcommd' Last syscall: -1 
GPR00: 0001 E1639EE0 E9548000  E02AB928 0001  8887 
GPR08:  E02AB92C EFFB9F1C 1FD546D4  1001D5CC  100160B8 
GPR16: F252 F252 F252 F252 F25229C4 F252 E33F73B0 C67D0A3C 
GPR24:  C67D0A2C 0067 0009 EF81C254  EF81C248 EF81C1BC 
Call trace:
 [c01da564] tty_hangup+0x14/0x24
 [f251d8c8] rfcomm_dev_state_change+0xc0/0xc4 [rfcomm]
 [f25187cc] __rfcomm_dlc_close+0x70/0x160 [rfcomm]
 [f2518e9c] rfcomm_session_close+0x58/0xac [rfcomm]
 [f251adbc] rfcomm_worker+0x44c/0x604 [rfcomm]
 [f251b1d0] rfcomm_run+0x74/0xa0 [rfcomm]
 [c000914c] kernel_thread+0x44/0x60

on device removal...

Soeren



---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel


Re: [linux-usb-devel] Oops with bluetooth dongle

2004-04-06 Thread Soeren Sonnenburg
On Tue, 2004-04-06 at 18:49, Alan Stern wrote:
> I've seen a couple of different problems coming up with this bluetooth 
> stuff.  One of them may be fixed by a recent patch, as David Brownell 
> mentioned.  Below is the relevant part excerpted from that patch; maybe it 
> will help some of you.

Yes, that fixes the problem for me. The firmware is successfully loaded
onto the dongle. I removed/plugged the dongle in a couple (>3) of times
and it always worked nicely !

Good job!

Regards,
Soeren




---
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&op=click
___
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel