* Re: USB mouse kernel patch for Lombard gpm multiple mice support
@ 1999-09-03 13:11 Shaw Terwilliger
0 siblings, 0 replies; 3+ messages in thread
From: Shaw Terwilliger @ 1999-09-03 13:11 UTC (permalink / raw)
To: linuxppc-dev
David King wrote:
> I've been lurking on this list for tips on getting my Lombard to work
> nicely under Linux. Using the latest stable samba rsync sources I've been
> able to build a kernel which does accelerated X, ethernet, sleeping, and
> USB. The only thing left preventing me from being comfortable was one
> quirk.
I've been working towards a very similar goal (333 MHz Lombard I just
got yesterday). Unfortunately, I'm still kinda stuck on _which_
kernel tree I'm supposed to be using. I'm pretty handy with patch, and
I've become aware of the issues with the bmac driver (broken in some
2.2.10 kernels, fixed in vger) and the atyfb, but I've still got
a few things I've got to work out.
I have X working at 1024x768 at 32bpp with the cfb32 (unaccelerated
driver). It performs decently, but I'd like the accelerated driver.
I'll get that working later.
I have a 3 button USB mouse (Logitech WingMan) I'd like to use with X,
but I can't seem to find a kernel that will (1) not pull a Machine
check error when I build it (raw vger does this) and (2) FIND my
USB mouse. The lombard.vmlinux that I'm using (from linuxppc.org)
loads the USB code segments, but plugging in a mouse dumps a bunch
of stuff to the console:
get_descriptor failed, waiting
[...]
giving up
Wondered if you'd seen that and know of a fix for it. I'm building a
kernel as modules now to see if that makes a difference.
=== on to the real question ===
Feel free to ignore the USB ramblings above, I think I can figure them
out, I just want to know what kernel tree source you're using. :)
Is it paul's linux-pmac with patches, or is it vger (current CVS
from, say cvs.on.openprojects.net) with some patches, etc? Also,
would you be so kind as to send your kernel config my way, so I
can pick out the settings for the USB devices and atyfb?
Right now I'm using my own kernels from the linux-pmac 2.2.10
with a patched bmac. Ethernet works great, atyfb isn't recognizing
my devices, and USB is throwing those errors. I figure I'd
better figure out which tree is working for people. :)
--
Shaw Terwilliger (sterwill@io.nu)
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 3+ messages in thread
* USB mouse kernel patch for Lombard gpm multiple mice support
@ 1999-09-02 19:29 David King
1999-09-02 22:41 ` Shaw Terwilliger
0 siblings, 1 reply; 3+ messages in thread
From: David King @ 1999-09-02 19:29 UTC (permalink / raw)
To: linuxppc-dev
I've been lurking on this list for tips on getting my Lombard to work
nicely under Linux. Using the latest stable samba rsync sources I've been
able to build a kernel which does accelerated X, ethernet, sleeping, and
USB. The only thing left preventing me from being comfortable was one
quirk.
Unlike other mouse drivers, the USB mouse device driver can only be
openned if a mouse is attached. This makes using gpm in multiple mouse mode
on a laptop difficult as sometimes I'd like to work without the USB mouse
attached. It seemed wrong to have to restart gpm to make this change so
without further ado here is my kernel patch to drivers/usb/mouse.c
-David
dsmk@imp.bu.edu
*** mouse.c.19990902 Wed Jul 28 20:37:13 1999
--- mouse.c Thu Sep 2 14:42:45 1999
***************
*** 6,11 ****
--- 6,16 ----
*
* Brad Keryan 4/3/1999
*
+ * (dsmk) David King 9/2/1999 - rewrote mouse detect logic so that client
+ * programs such as gpm can open the mouse device even though there is
+ * currently no mouse detected. This enables one to use gpm's multiple
+ * mouse software with USB mice with hotswapping on my Powerbook G3 1999.
+ *
* version 0.20: Linus rewrote read_mouse() to do PS/2 and do it
* correctly. Events are added together, not queued, to keep the rodent sober.
*
***************
*** 128,135 ****
{
struct mouse_state *mouse = &static_mouse_state;
! if (!mouse->present)
! return -EINVAL;
if (mouse->active++)
return 0;
/* flush state */
--- 133,144 ----
{
struct mouse_state *mouse = &static_mouse_state;
! /* no longer bomb out when mouse is not present. Instead
! * we wait producing no data until a mouse is present
! * -dsmk 9/2/1999
! */
! /*if (!mouse->present)
! return -EINVAL; */
if (mouse->active++)
return 0;
/* flush state */
***************
*** 139,145 ****
MOD_INC_USE_COUNT;
/* start the usb controller's polling of the mouse */
! mouse->irq_handle = usb_request_irq(mouse->dev, usb_rcvctrlpipe(mouse->d
ev, mouse->bEndpointAddress), mouse_irq, mouse->bInterval, NULL);
return 0;
}
--- 148,158 ----
MOD_INC_USE_COUNT;
/* start the usb controller's polling of the mouse */
! /* only do this if we have a mouse already
! * -dsmk 9/2/1999
! */
! if (mouse->present)
! mouse->irq_handle = usb_request_irq(mouse->dev, usb_rcvctrlpipe(mouse-
>dev, mouse->bEndpointAddress), mouse_irq, mouse->bInterval, NULL);
return 0;
}
***************
*** 305,311 ****
--- 318,333 ----
mouse->bEndpointAddress = endpoint->bEndpointAddress;
mouse->bInterval = endpoint->bInterval;
+ /* if we did not have a mouse before then we need to set up an
+ * irq if someone already has the mouse active
+ * -dsmk 9/2/1999
+ */
+ if (! mouse->present && mouse->active) {
+ mouse->irq_handle = usb_request_irq(mouse->dev, usb_rcvctrlpipe(mouse-
>dev, mouse->bEndpointAddress), mouse_irq, mouse->bInterval, NULL);
+ }
+
mouse->present = 1;
+
return 0;
}
----
David King, Boston University Distributed Systems Programmer at large
dsmk@bu.edu
(617) 353-8250
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: USB mouse kernel patch for Lombard gpm multiple mice support
1999-09-02 19:29 David King
@ 1999-09-02 22:41 ` Shaw Terwilliger
0 siblings, 0 replies; 3+ messages in thread
From: Shaw Terwilliger @ 1999-09-02 22:41 UTC (permalink / raw)
To: David King; +Cc: linuxppc-dev
David King wrote:
> I've been lurking on this list for tips on getting my Lombard to work
> nicely under Linux. Using the latest stable samba rsync sources I've been
> able to build a kernel which does accelerated X, ethernet, sleeping, and
> USB. The only thing left preventing me from being comfortable was one
> quirk.
I've been working towards a very similar goal (333 MHz Lombard I just
got yesterday). Unfortunately, I'm still kinda stuck on _which_
kernel tree I'm supposed to be using. I'm pretty handy with patch, and
I've become aware of the issues with the bmac driver (broken in some
2.2.10 kernels, fixed in vger) and the atyfb, but I've still got
a few things I've got to work out.
I have X working at 1024x768 at 32bpp with the cfb32 (unaccelerated
driver). It performs decently, but I'd like the accelerated driver.
I'll get that working later.
I have a 3 button USB mouse (Logitech WingMan) I'd like to use with X,
but I can't seem to find a kernel that will (1) not pull a Machine
check error when I build it (raw vger does this) and (2) FIND my
USB mouse. The lombard.vmlinux that I'm using (from linuxppc.org)
loads the USB code segments, but plugging in a mouse dumps a bunch
of stuff to the console:
get_descriptor failed, waiting
[...]
giving up
Wondered if you'd seen that and know of a fix for it. I'm building a
kernel as modules now to see if that makes a difference.
=== on to the real question ===
Feel free to ignore the USB ramblings above, I think I can figure them
out, I just want to know what kernel tree source you're using. :)
Is it paul's linux-pmac with patches, or is it vger (current CVS
from, say cvs.on.openprojects.net) with some patches, etc? Also,
would you be so kind as to send your kernel config my way, so I
can pick out the settings for the USB devices and atyfb?
Right now I'm using my own kernels from the linux-pmac 2.2.10
with a patched bmac. Ethernet works great, atyfb isn't recognizing
my devices, and USB is throwing those errors. I figure I'd
better figure out which tree is working for people. :)
--
Shaw Terwilliger (sterwill@io.nu)
[[ This message was sent via the linuxppc-dev mailing list. Replies are ]]
[[ not forced back to the list, so be sure to Cc linuxppc-dev if your ]]
[[ reply is of general interest. Please check http://lists.linuxppc.org/ ]]
[[ and http://www.linuxppc.org/ for useful information before posting. ]]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~1999-09-03 13:11 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-09-03 13:11 USB mouse kernel patch for Lombard gpm multiple mice support Shaw Terwilliger
-- strict thread matches above, loose matches on Subject: below --
1999-09-02 19:29 David King
1999-09-02 22:41 ` Shaw Terwilliger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).