Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
2.6.6_rc2-love2 aka "Seven Fishes"
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Tue Apr 27, 2004 2:14 am    Post subject: 2.6.6_rc2-love2 aka "Seven Fishes" Reply with quote

I'm trying some new things with this release. We'll see how it goes.

Code:

Patches:                        Description:
2.6.6-rc2-mm2                   Latest mm
BadRAM-2.6.5.2                  BadRam work around
Kernel-Win4Lin3-2.6.5           Win4Lin Core
acerhk                          Acer Hot Keys
acpi-dsdt-initrd-patch-v0.4     Custom DSDT tables
acx100-0.2.0pre7-linux2.6.2     ACX100 Drivers
bd-claim                        EVMS Thingy
bootsplash-3.1.4-2.6.6-rc2      Bootsplash (still doesn't work right)
cflags-selection                Obvious
config-nr-tty-devices           Change number /dev/tty
config_hz.patch                 Change internal timer frequency
gcc-3.4-rcupdate.h-warn-fix     GCC warning fix
gcloop-2.6-20040330             Compressed Loopback Device support
hrtimers-2.6.5-1.0              Hi Res Timers
iteraid_1.44                    GiGa Raid
layer7-kernelpatch-nf-0.4.0     Packet Classifier
linux-2.6.0.dxr3.20031229       DXR3/H+ Support
linux-2.6.4-Walken              Chris Walken boot logo
lirc-2.6.4-20040318             LIRC Drivers
love_ppm                        Love boot logo
lufs-0.9.7-2.6.0-test9          LUFS support
menuconfig-NAME-v1.0            Do Something with name
mki-adapter26_1_3_4             Win4Lin drivers
more-nforce-fixes               C1Halt patch
move-__this_module-to-modpost   Grrr
orinoco-0.13e-patch             Monitor Mode
packet-2.6.5                    UDF Packet Writing
patch-2.4.x-vesafb-rrc          VESAFB Hack
patch-2.6.4-am9                 Autoswappiness
patch-2.6.4-amd76x_pm           AMD power dealie
patch-2.6.6-rc2                 PrePatch
sii-3512-update                 Sii update
squashfs1.3r3                   Squashfs
supermount-2.0.4-2.6.5-love1    Supermount
via-v4l-1.4a-drm                Via DRM
viafb_02                        Via FB


Let me know how it goes.

http://www.public.iastate.edu/~jpcox
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
VirtuaSpy
n00b
n00b


Joined: 27 Feb 2004
Posts: 38
Location: Houston, TX

PostPosted: Tue Apr 27, 2004 2:22 am    Post subject: Reply with quote

Thanks for the work steel. Getting now.

Edit: Up and running smoothly. Thanks!


Last edited by VirtuaSpy on Tue Apr 27, 2004 4:17 am; edited 1 time in total
Back to top
View user's profile Send private message
kevmille
Guru
Guru


Joined: 26 Jul 2003
Posts: 311
Location: Ho Chi Minh City (Saigon), Vietnam

PostPosted: Tue Apr 27, 2004 2:58 am    Post subject: Reply with quote

I am getting some errors while trying to emerge your latest kernel:



Code:
bash-2.05b# emerge love-sources-2.6.6_rc2-r2.ebuild
Calculating dependencies ...done!
>>> emerge (1 of 1) sys-kernel/love-sources-2.6.6_rc2-r2 to /
>>> md5 src_uri ;-) patch-2.6.6-rc2.bz2
>>> md5 src_uri ;-) linux-2.6.5.tar.bz2
>>> md5 src_uri ;-) 2.6.6-rc2-mm2.bz2
>>> md5 src_uri ;-) 2.6.6-rc2-love2.bz2
>>> Preparing to unpack...
>>> Unpacking source...
>>> Unpacking linux-2.6.5.tar.bz2 to /var/tmp/portage/love-sources-2.6.6_rc2-r2/work

bzip2: Compressed file ends unexpectedly;
        perhaps it is corrupted?  *Possible* reason follows.
bzip2: Success
        Input file = /usr/portage/distfiles/2.6.6-rc2-mm2.bz2, output file = (stdout)

It is possible that the compressed file(s) have become corrupted.
You can use the -tvv option to test integrity of such files.

You can use the `bzip2recover' program to attempt to recover
data from undamaged sections of corrupted files.

 * Applying patch-2.6.6-rc2.patch...                                                                                                                         [ ok ]
 * Applying 2.6.6-rc2-mm2.patch...                                                                                                                           [ ok ]
 * Applying 2.6.6-rc2-love2.patch...                                                                                                                         [ !! ]

 * Please attach /var/tmp/portage/love-sources-2.6.6_rc2-r2/temp/2.6.6-rc2-love2.err to any bug you may post.

!!! ERROR: sys-kernel/love-sources-2.6.6_rc2-r2 failed.
!!! Function unipatch, Line 485, Exitcode 0
!!! Unable to dry-run patch.

_________________
My Company: Hakata Consulting
Back to top
View user's profile Send private message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Tue Apr 27, 2004 3:20 am    Post subject: Reply with quote

@Kevmille

rm -r files
redigest
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
kevmille
Guru
Guru


Joined: 26 Jul 2003
Posts: 311
Location: Ho Chi Minh City (Saigon), Vietnam

PostPosted: Tue Apr 27, 2004 3:33 am    Post subject: Reply with quote

steel300 wrote:
@Kevmille

rm -r files
redigest


Sorry, same results :?
_________________
My Company: Hakata Consulting
Back to top
View user's profile Send private message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Tue Apr 27, 2004 3:35 am    Post subject: Reply with quote

kevmille wrote:
steel300 wrote:
@Kevmille

rm -r files
redigest


Sorry, same results :?


delete /usr/portage/distfiles/* as well
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
kevmille
Guru
Guru


Joined: 26 Jul 2003
Posts: 311
Location: Ho Chi Minh City (Saigon), Vietnam

PostPosted: Tue Apr 27, 2004 3:49 am    Post subject: Reply with quote

steel300 wrote:
kevmille wrote:
steel300 wrote:
@Kevmille

rm -r files
redigest


Sorry, same results :?


delete /usr/portage/distfiles/* as well


Thanks. That worked. emerge was successful. Now time to compile :D

Edit:

Code:
bash-2.05b# uname -a
Linux romulan 2.6.6-rc2-love2 #2 SMP Mon Apr 26 21:48:04 PDT 2004 i686 Intel(R) Pentium(R) III Mobile CPU      1000MHz GenuineIntel GNU/Linux

_________________
My Company: Hakata Consulting


Last edited by kevmille on Tue Apr 27, 2004 4:58 am; edited 1 time in total
Back to top
View user's profile Send private message
dvc5
Guru
Guru


Joined: 06 Dec 2003
Posts: 433
Location: Sunnyvale, California

PostPosted: Tue Apr 27, 2004 4:48 am    Post subject: Reply with quote

Code:
thinkloz root # uname -a
Linux thinkloz.org 2.6.6-rc2-love2 #1 Mon Apr 26 21:37:04 PDT 2004 i686 Intel(R) Celeron(TM) CPU                1066MHz GenuineIntel GNU/Linux
thinkloz root #

Code:
thinkloz root # lsmod
Module                  Size  Used by
i830                   73924  3
ohci_hcd               17156  0
e100                   29056  0
mii                     4224  1 e100
orinoco_pci             5376  0
orinoco                42124  1 orinoco_pci
hermes                  7808  2 orinoco_pci,orinoco
uhci_hcd               29072  0
intel_agp              16412  1
agpgart                27944  4 intel_agp
usb_storage            26368  0
ehci_hcd               24964  0
usbcore                94300  6 ohci_hcd,uhci_hcd,usb_storage,ehci_hcd
thinkloz root #

Sweet, buttery goodness. Thanks steel! No big deal but is the bootsplash going to be in the next release? I was under the impression it would be in this one. :D

Edit: Didn't read the release notes yet. Hopefully they fix it soon. 8O
_________________
#define NULL rand() /*heh heh heh */

Green Is Good
Back to top
View user's profile Send private message
Pink
Veteran
Veteran


Joined: 24 Jul 2003
Posts: 1062

PostPosted: Tue Apr 27, 2004 8:03 am    Post subject: Reply with quote

Many thanks for another good'un Steel.

Possibly not the right place, especially as I can't remember the exact error message I was getting in 2.6.6-rc2-love1, but how did you get the mki/win4lin patch to compile without errors? I patched it but it was definitely something in mm2 not the love patch that was stopping it compiling (Something about P_THREAD ?)

If it is easy to answer I really would be grateful, if you can't remember or it is too difficult to explain in a post - oh well, I'll just stick with you anyway!

Cheers :D
Back to top
View user's profile Send private message
dvc5
Guru
Guru


Joined: 06 Dec 2003
Posts: 433
Location: Sunnyvale, California

PostPosted: Tue Apr 27, 2004 8:09 am    Post subject: Reply with quote

PickledOnion wrote:
Possibly not the right place, especially as I can't remember the exact error message I was getting in 2.6.6-rc2-love1, but how did you get the mki/win4lin patch to compile without errors? I patched it but it was definitely something in mm2 not the love patch that was stopping it compiling (Something about P_THREAD ?)

I configured it into my 2.6.6-rc2-love2 kernel and it compiled just fine. Maybe you can post the error you're getting?
_________________
#define NULL rand() /*heh heh heh */

Green Is Good
Back to top
View user's profile Send private message
Pink
Veteran
Veteran


Joined: 24 Jul 2003
Posts: 1062

PostPosted: Tue Apr 27, 2004 8:15 am    Post subject: Reply with quote

dvc5 wrote
Quote:
I configured it into my 2.6.6-rc2-love2 kernel and it compiled just fine. Maybe you can post the error you're getting?


Yeah, I've got it working fine in this kernel.

As said, I patched the previous love-sources (2.6.6-rc2-love1) with the win4lin patches, and although they were patched ok, it didn't compile, whereas in 2.6.6-rc1-love1, it both patched and compiled. I broke it down to the new mm patch (mm2) causing the problem and not the love patch.

Anyway, I posted my findings in a previous love-thread and Steel said he would happily put it into the next love-sources, which he has :D . I was wondering if he could tell me what he did to make it compile with the mm2 patch.
Back to top
View user's profile Send private message
nephros
Advocate
Advocate


Joined: 07 Feb 2003
Posts: 2138
Location: Graz, Austria (Europe - no kangaroos.)

PostPosted: Tue Apr 27, 2004 8:31 am    Post subject: Reply with quote

Not a big deal, but CD/DVD Packet Writing still does not compile here.
_________________
Please put [SOLVED] in your topic if you are a moron.
Back to top
View user's profile Send private message
X-Ryl669
Tux's lil' helper
Tux's lil' helper


Joined: 16 Feb 2004
Posts: 135

PostPosted: Tue Apr 27, 2004 9:12 am    Post subject: Patch to allow ALPS touchpads to work Reply with quote

I couldn't get bootsplash to work (in fact it segfaulted), as you stated above. I hope it will work again soon (say in 2.6.6).

However, here is the patch to allow ALPS touchpads to be detected and working with synaptic driver :

Synaptic driver first :
Code:

diff -r -u synaptics-0.13.0/eventcomm.c synaptics-0.13.0.new/eventcomm.c
--- synaptics-0.13.0/eventcomm.c   2004-04-22 01:05:19.000000000 +0200
+++ synaptics-0.13.0.new/eventcomm.c   2004-04-26 16:50:06.142202312 +0200
@@ -61,6 +61,13 @@
        (id.product == PSMOUSE_SYNAPTICS)) {
        return TRUE;
    }
+   else
+   xf86Msg(X_WARNING, "Synaptic: id.bustype %d (should be %d), id.vendor %d (should be %d), id.product %d (should be %d)\n", id.bustype, BUS_I8042, id.vendor, 0x0002, id.product, PSMOUSE_SYNAPTICS);
+   
+   if ((id.bustype == BUS_I8042) &&
+       (id.vendor == 0x0002) &&
+       (id.product == PSMOUSE_ALPS)) { return TRUE; }
+
     }
     return FALSE;
 }
diff -r -u synaptics-0.13.0/linux_input.h synaptics-0.13.0.new/linux_input.h
--- synaptics-0.13.0/linux_input.h   2004-04-12 12:54:20.000000000 +0200
+++ synaptics-0.13.0.new/linux_input.h   2004-04-26 16:55:34.449292048 +0200
@@ -64,6 +64,6 @@
 #define BUS_I8042      0x11
 
 #define PSMOUSE_SYNAPTICS    7
-
+#define PSMOUSE_ALPS      8
 
 #endif /* _LINUX_INPUT_H_ */


Then files to move in the sources (to /usr/src/linux/drivers/input/mouse/) :
alps.h
Code:

/*
 * ALPS touchpad PS/2 mouse driver
 *
 * Copyright (c) 2003 Peter Osterlund <petero2@telia.com>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 */

#ifndef _ALPS_H
#define _ALPS_H

int alps_detect(struct psmouse *psmouse);
int alps_init(struct psmouse *psmouse);

#endif


alps.c
Code:

/*
 * ALPS touchpad PS/2 mouse driver
 *
 * Copyright (c) 2003 Neil Brown <neilb@cse.unsw.edu.au>
 * Copyright (c) 2003 Peter Osterlund <petero2@telia.com>
 * Copyright (c) 2004 Dmitry Torokhov <dtor@mail.ru>
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License version 2 as published by
 * the Free Software Foundation.
 */

#include <linux/input.h>
#include <linux/serio.h>

#include "psmouse.h"
#include "alps.h"

/*
 * ALPS abolute Mode
 * byte 0: 1 1 1 1 1 mid0 rig0 lef0
 * byte 1: 0 x6 x5 x4 x3 x2 x1 x0
 * byte 2: 0 x10 x9 x8 x7 up1 fin ges
 * byte 3: 0 y9 y8 y7 1 mid1 rig1 lef1
 * byte 4: 0 y6 y5 y4 y3 y2 y1 y0
 * byte 5: 0 z6 z5 z4 z3 z2 z1 z0
 *
 * On a dualpoint, {mid,rig,lef}0 are the stick, 1 are the pad.
 * We just 'or' them together for now.
 *
 * We used to send 'ges'tures as BTN_TOUCH but this made it impossible
 * to disable tap events in the synaptics driver since the driver
 * was unable to distinguish a gesture tap from an actual button click.
 * A tap gesture now creates an emulated touch that the synaptics
 * driver can interpret as a tap event, if MaxTapTime=0 and
 * MaxTapMove=0 then the driver will ignore taps.
 *
 * The touchpad on an 'Acer Aspire' has 4 buttons:
 *   left,right,up,down.
 * This device always sets {mid,rig,lef}0 to 1 and
 * reflects left,right,down,up in lef1,rig1,mid1,up1.
 */

static void alps_process_packet(struct psmouse *psmouse, struct pt_regs *regs)
{
   unsigned char *packet = psmouse->packet;
   struct input_dev *dev = &psmouse->dev;
   int x, y, z;
   int left = 0, right = 0, middle = 0;

   input_regs(dev, regs);

   x = (packet[1] & 0x7f) | ((packet[2] & 0x78)<<(7-3));
   y = (packet[4] & 0x7f) | ((packet[3] & 0x70)<<(7-4));
   z = packet[5];

   if (z > 30) input_report_key(dev, BTN_TOUCH, 1);
   if (z < 25) input_report_key(dev, BTN_TOUCH, 0);

   if (z > 0) {
      input_report_abs(dev, ABS_X, x);
      input_report_abs(dev, ABS_Y, y);
   }
   input_report_abs(dev, ABS_PRESSURE, z);
   input_report_key(dev, BTN_TOOL_FINGER, z > 0);

   left  |= (packet[2]     ) & 1;
   left  |= (packet[3]     ) & 1;
   right |= (packet[3] >> 1) & 1;
   if (packet[0] == 0xff) {
      int back    = (packet[3] >> 2) & 1;
      int forward = (packet[2] >> 2) & 1;
      if (back && forward) {
         middle = 1;
         back = 0;
         forward = 0;
      }
      input_report_key(dev, BTN_BACK,    back);
      input_report_key(dev, BTN_FORWARD, forward);
   } else {
      left   |= (packet[0]     ) & 1;
      right  |= (packet[0] >> 1) & 1;
      middle |= (packet[0] >> 2) & 1;
      middle |= (packet[3] >> 2) & 1;
   }

   input_report_key(dev, BTN_LEFT, left);
   input_report_key(dev, BTN_RIGHT, right);
   input_report_key(dev, BTN_MIDDLE, middle);

   input_sync(dev);
}

static psmouse_ret_t alps_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
{
   /* ALPS absolute mode packets start with 0b11111mrl */
   if ((psmouse->packet[0] & 0xf8) != 0xf8)
      return PSMOUSE_BAD_DATA;

   /* Bytes 2 - 6 should have 0 in the highest bit */
   if (psmouse->pktcnt > 1 && psmouse->pktcnt <= 6 &&
       (psmouse->packet[psmouse->pktcnt] & 0x80))
      return PSMOUSE_BAD_DATA;

   if (psmouse->pktcnt == 6) {
      alps_process_packet(psmouse, regs);
      return PSMOUSE_FULL_PACKET;
   }

   return PSMOUSE_GOOD_DATA;
}

int alps_detect(struct psmouse *psmouse)
{
   unsigned char param[4];

   /* First try "E6 report". ALPS should return 0x00 0x00 0x0a */
   param[0] = 0;
   if (psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES) ||
       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11) ||
       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11) ||
       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE11))
      return 0;

   param[0] = param[1] = param[2] = 0xff;
   if (psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO))
      return 0;

   printk(KERN_INFO "alps.c: E6 report: %2.2x %2.2x %2.2x\n",
      param[0], param[1], param[2]);

   if (param[0] != 0x00 || param[1] != 0x00 || (param[2] != 0x0a && param[2] != 0x64))
      return 0;

   /* Now try "E7 report". ALPS should return 0x33 in byte 1 */
   param[0] = 0;
   if (psmouse_command(psmouse, param, PSMOUSE_CMD_SETRES) ||
       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE21) ||
       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE21) ||
       psmouse_command(psmouse,  NULL, PSMOUSE_CMD_SETSCALE21))
      return 0;

   param[0] = param[1] = param[2] = 0xff;
   if (psmouse_command(psmouse, param, PSMOUSE_CMD_GETINFO))
      return 0;

   printk(KERN_INFO "alps.c: E7 report: %2.2x %2.2x %2.2x\n",
      param[0], param[1], param[2]);

   return (param[0] == 0x33 || param[0] == 0x73 || param[0] == 0x53 || param[0] == 0x63 || param[0] == 0x20 || param[0] == 0x22);
}

static void alps_disconnect(struct psmouse *psmouse)
{
   psmouse_reset(psmouse);
}

int alps_init(struct psmouse *psmouse)
{
   /* Try ALPS magic knock */
   if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_DISABLE) ||
       psmouse_command(psmouse, NULL, PSMOUSE_CMD_DISABLE) ||
       psmouse_command(psmouse, NULL, PSMOUSE_CMD_DISABLE) ||
       psmouse_command(psmouse, NULL, PSMOUSE_CMD_DISABLE))
      return -1;

   psmouse->dev.evbit[LONG(EV_REL)] &= ~BIT(EV_REL);
   psmouse->dev.relbit[LONG(REL_X)] &= ~BIT(REL_X);
   psmouse->dev.relbit[LONG(REL_X)] &= ~BIT(REL_X);

   psmouse->dev.evbit[LONG(EV_ABS)] |= BIT(EV_ABS);
   input_set_abs_params(&psmouse->dev, ABS_X, 0, 0, 0, 0);
   input_set_abs_params(&psmouse->dev, ABS_Y, 0, 0, 0, 0);
   input_set_abs_params(&psmouse->dev, ABS_PRESSURE, 0, 127, 0, 0);

   psmouse->dev.keybit[LONG(BTN_TOUCH)] |= BIT(BTN_TOUCH);
   psmouse->dev.keybit[LONG(BTN_TOOL_FINGER)] |= BIT(BTN_TOOL_FINGER);
   psmouse->dev.keybit[LONG(BTN_FORWARD)] |= BIT(BTN_FORWARD);
   psmouse->dev.keybit[LONG(BTN_BACK)] |= BIT(BTN_BACK);

   psmouse->protocol_handler = alps_process_byte;
   psmouse->disconnect = alps_disconnect;

   return 0;
}


and finally psmouse-base.c.patch
Code:

--- drivers/input/mouse/psmouse-base.c   2004-04-26 11:45:05.000000000 +0200
+++ newdrivers/input/mouse/psmouse-base.c   2004-04-27 11:10:44.194100664 +0200
@@ -2,6 +2,7 @@
  * PS/2 mouse driver
  *
  * Copyright (c) 1999-2002 Vojtech Pavlik
+ * Copyright (c) 2003-2004 Dmitry Torokhov
  */
 
 /*
@@ -44,9 +45,9 @@
 module_param_named(smartscroll, psmouse_smartscroll, bool, 0);
 MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
 
-unsigned int psmouse_resetafter;
+static unsigned int psmouse_resetafter;
 module_param_named(resetafter, psmouse_resetafter, uint, 0);
-MODULE_PARM_DESC(resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
+MODULE_PARM_DESC(resetafter, "Reset device after so many bad packets (0 = never).");
 
 __obsolete_setup("psmouse_noext");
 __obsolete_setup("psmouse_resolution=");
@@ -54,18 +55,25 @@
 __obsolete_setup("psmouse_resetafter=");
 __obsolete_setup("psmouse_rate=");
 
-static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
+static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2", "AlpsPS/2" };
 
 /*
- * psmouse_process_packet() analyzes the PS/2 mouse packet contents and
- * reports relevant events to the input module.
+ * psmouse_process_byte() analyzes the PS/2 data stream and reports
+ * relevant events to the input module once full packet has arrived.
  */
 
-static void psmouse_process_packet(struct psmouse *psmouse, struct pt_regs *regs)
+static psmouse_ret_t psmouse_process_byte(struct psmouse *psmouse, struct pt_regs *regs)
 {
    struct input_dev *dev = &psmouse->dev;
    unsigned char *packet = psmouse->packet;
 
+   if (psmouse->pktcnt < 3 + (psmouse->type >= PSMOUSE_GENPS))
+      return PSMOUSE_GOOD_DATA;
+
+/*
+ * Full packet accumulated, process it
+ */
+
    input_regs(dev, regs);
 
 /*
@@ -113,6 +121,8 @@
    input_report_rel(dev, REL_Y, packet[2] ? (int) ((packet[0] << 3) & 0x100) - (int) packet[2] : 0);
 
    input_sync(dev);
+
+   return PSMOUSE_FULL_PACKET;
 }
 
 /*
@@ -124,6 +134,7 @@
       unsigned char data, unsigned int flags, struct pt_regs *regs)
 {
    struct psmouse *psmouse = serio->private;
+   psmouse_ret_t rc;
 
    if (psmouse->state == PSMOUSE_IGNORE)
       goto out;
@@ -181,7 +192,7 @@
       if (psmouse->pktcnt == 2) {
          if (psmouse->packet[1] == PSMOUSE_RET_ID) {
             psmouse->state = PSMOUSE_IGNORE;
-            serio_rescan(serio);
+            serio_reconnect(serio);
             goto out;
          }
          if (psmouse->type == PSMOUSE_SYNAPTICS) {
@@ -194,23 +205,32 @@
       }
    }
 
-   if (psmouse->type == PSMOUSE_SYNAPTICS) {
-      /*
-       * The synaptics driver has its own resync logic,
-       * so it needs to receive all bytes one at a time.
-       */
-      synaptics_process_byte(psmouse, regs);
-      goto out;
-   }
+   rc = psmouse->protocol_handler(psmouse, regs);
 
-   if ((psmouse_max_proto > PSMOUSE_PS2) &&
-       !ALPS_process_byte(psmouse, regs))
-      goto out;
+   switch (rc) {
+      case PSMOUSE_BAD_DATA:
+         printk(KERN_WARNING "psmouse.c: %s at %s lost sync at byte %d\n",
+            psmouse->name, psmouse->phys, psmouse->pktcnt);
+         psmouse->pktcnt = 0;
 
-   if (psmouse->pktcnt == 3 + (psmouse->type >= PSMOUSE_GENPS)) {
-      psmouse_process_packet(psmouse, regs);
-      psmouse->pktcnt = 0;
-      goto out;
+         if (++psmouse->out_of_sync == psmouse_resetafter) {
+            psmouse->state = PSMOUSE_IGNORE;
+            printk(KERN_NOTICE "psmouse.c: issuing reconnect request\n");
+            serio_reconnect(psmouse->serio);
+         }
+         break;
+
+      case PSMOUSE_FULL_PACKET:
+         psmouse->pktcnt = 0;
+         if (psmouse->out_of_sync) {
+            psmouse->out_of_sync = 0;
+            printk(KERN_NOTICE "psmouse.c: %s at %s - driver resynched.\n",
+               psmouse->name, psmouse->phys);
+         }
+         break;
+
+      case PSMOUSE_GOOD_DATA:
+         break;
    }
 out:
    return IRQ_HANDLED;
@@ -294,6 +314,30 @@
 
 
 /*
+ * psmouse_sliced_command() sends an extended PS/2 command to the mouse
+ * using sliced syntax, understood by advanced devices, such as Logitech
+ * or Synaptics touchpads. The command is encoded as:
+ * 0xE6 0xE8 rr 0xE8 ss 0xE8 tt 0xE8 uu where (rr*64)+(ss*16)+(tt*4)+uu
+ * is the command.
+ */
+int psmouse_sliced_command(struct psmouse *psmouse, unsigned char command)
+{
+   int i;
+
+   if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11))
+      return -1;
+
+   for (i = 6; i >= 0; i -= 2) {
+      unsigned char d = (command >> i) & 3;
+      if (psmouse_command(psmouse, &d, PSMOUSE_CMD_SETRES))
+         return -1;
+   }
+
+   return 0;
+}
+
+
+/*
  * psmouse_reset() resets the mouse into power-on state.
  */
 int psmouse_reset(struct psmouse *psmouse)
@@ -368,23 +412,23 @@
  * the mouse may have.
  */
 
-static int psmouse_extensions(struct psmouse *psmouse)
+static int psmouse_extensions(struct psmouse *psmouse,
+               unsigned int max_proto, int set_properties)
 {
    int synaptics_hardware = 0;
 
-   psmouse->vendor = "Generic";
-   psmouse->name = "Mouse";
-   psmouse->model = 0;
-
 /*
  * Try Synaptics TouchPad
  */
-   if (psmouse_max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse)) {
+   if (max_proto > PSMOUSE_PS2 && synaptics_detect(psmouse)) {
       synaptics_hardware = 1;
-      psmouse->vendor = "Synaptics";
-      psmouse->name = "TouchPad";
 
-      if (psmouse_max_proto > PSMOUSE_IMEX) {
+      if (set_properties) {
+         psmouse->vendor = "Synaptics";
+         psmouse->name = "TouchPad";
+      }
+
+      if (max_proto > PSMOUSE_IMEX) {
          if (synaptics_init(psmouse) == 0)
             return PSMOUSE_SYNAPTICS;
 /*
@@ -392,7 +436,7 @@
  * Unfortunately Logitech/Genius probes confuse some firmware versions so
  * we'll have to skip them.
  */
-         psmouse_max_proto = PSMOUSE_IMEX;
+         max_proto = PSMOUSE_IMEX;
       }
 /*
  * Make sure that touchpad is in relative mode, gestures (taps) are enabled
@@ -400,35 +444,64 @@
       synaptics_reset(psmouse);
    }
 
-   if (psmouse_max_proto > PSMOUSE_IMEX && genius_detect(psmouse)) {
-      set_bit(BTN_EXTRA, psmouse->dev.keybit);
-      set_bit(BTN_SIDE, psmouse->dev.keybit);
-      set_bit(REL_WHEEL, psmouse->dev.relbit);
+/*
+ * Try ALPS TouchPad
+ */
+   if (max_proto > PSMOUSE_PS2 && alps_detect(psmouse)) {
+
+      if (set_properties) {
+         psmouse->vendor = "ALPS";
+         psmouse->name = "TouchPad";
+      }
+
+      if (max_proto > PSMOUSE_IMEX)
+      {
+         if (alps_init(psmouse) == 0)
+            return PSMOUSE_ALPS;
+         
+         max_proto = PSMOUSE_IMEX;
+      }
+   }
+
+   if (max_proto > PSMOUSE_IMEX && genius_detect(psmouse)) {
+
+      if (set_properties) {
+         set_bit(BTN_EXTRA, psmouse->dev.keybit);
+         set_bit(BTN_SIDE, psmouse->dev.keybit);
+         set_bit(REL_WHEEL, psmouse->dev.relbit);
+         psmouse->vendor = "Genius";
+         psmouse->name = "Wheel Mouse";
+      }
 
-      psmouse->vendor = "Genius";
-      psmouse->name = "Wheel Mouse";
       return PSMOUSE_GENPS;
    }
 
-   if (psmouse_max_proto > PSMOUSE_IMEX) {
-      int type = ps2pp_detect(psmouse);
-      if (type)
+   if (max_proto > PSMOUSE_IMEX) {
+      int type = ps2pp_init(psmouse, set_properties);
+      if (type > PSMOUSE_PS2)
          return type;
    }
 
-   if (psmouse_max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse)) {
-      set_bit(REL_WHEEL, psmouse->dev.relbit);
+   if (max_proto >= PSMOUSE_IMPS && intellimouse_detect(psmouse)) {
 
-      if (psmouse_max_proto >= PSMOUSE_IMEX &&
-               im_explorer_detect(psmouse)) {
-         set_bit(BTN_SIDE, psmouse->dev.keybit);
-         set_bit(BTN_EXTRA, psmouse->dev.keybit);
+      if (set_properties) {
+         set_bit(REL_WHEEL, psmouse->dev.relbit);
+         if (!psmouse->name)
+            psmouse->name = "Wheel Mouse";
+      }
+
+      if (max_proto >= PSMOUSE_IMEX && im_explorer_detect(psmouse)) {
+
+         if (!set_properties) {
+            set_bit(BTN_SIDE, psmouse->dev.keybit);
+            set_bit(BTN_EXTRA, psmouse->dev.keybit);
+            if (!psmouse->name)
+               psmouse->name = "Explorer Mouse";
+         }
 
-         psmouse->name = "Explorer Mouse";
          return PSMOUSE_IMEX;
       }
 
-      psmouse->name = "Wheel Mouse";
       return PSMOUSE_IMPS;
    }
 
@@ -478,12 +551,7 @@
    if (psmouse_command(psmouse, NULL, PSMOUSE_CMD_RESET_DIS))
       printk(KERN_WARNING "psmouse.c: Failed to reset mouse on %s\n", psmouse->serio->phys);
 
-/*
- * And here we try to determine if it has any extensions over the
- * basic PS/2 3-button mouse.
- */
-
-   return psmouse->type = psmouse_extensions(psmouse);
+   return 0;
 }
 
 /*
@@ -547,9 +615,6 @@
  */
 
    psmouse_command(psmouse, param, PSMOUSE_CMD_SETSTREAM);
-
-   if (psmouse_max_proto > PSMOUSE_PS2)
-      ALPS_initialize(psmouse);
 }
 
 /*
@@ -624,7 +689,6 @@
    psmouse->dev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
    psmouse->dev.keybit[LONG(BTN_MOUSE)] = BIT(BTN_LEFT) | BIT(BTN_MIDDLE) | BIT(BTN_RIGHT);
    psmouse->dev.relbit[0] = BIT(REL_X) | BIT(REL_Y);
-
    psmouse->state = PSMOUSE_CMD_MODE;
    psmouse->serio = serio;
    psmouse->dev.private = psmouse;
@@ -636,13 +700,21 @@
       return;
    }
 
-   if (psmouse_probe(psmouse) <= 0) {
+   if (psmouse_probe(psmouse) < 0) {
       serio_close(serio);
       kfree(psmouse);
       serio->private = NULL;
       return;
    }
 
+   psmouse->type = psmouse_extensions(psmouse, psmouse_max_proto, 1);
+   if (!psmouse->vendor)
+      psmouse->vendor = "Generic";
+   if (!psmouse->name)
+      psmouse->name = "Mouse";
+   if (!psmouse->protocol_handler)
+      psmouse->protocol_handler = psmouse_process_byte;
+
    sprintf(psmouse->devname, "%s %s %s",
       psmouse_protocols[psmouse->type], psmouse->vendor, psmouse->name);
    sprintf(psmouse->phys, "%s/input0",
@@ -676,27 +748,24 @@
 {
    struct psmouse *psmouse = serio->private;
    struct serio_dev *dev = serio->dev;
-   int old_type;
 
    if (!dev || !psmouse) {
       printk(KERN_DEBUG "psmouse: reconnect request, but serio is disconnected, ignoring...\n");
       return -1;
    }
 
-   old_type = psmouse->type;
-
    psmouse->state = PSMOUSE_CMD_MODE;
-   psmouse->type = psmouse->acking = psmouse->cmdcnt = psmouse->pktcnt = 0;
+   psmouse->acking = psmouse->cmdcnt = psmouse->pktcnt = psmouse->out_of_sync = 0;
    if (psmouse->reconnect) {
           if (psmouse->reconnect(psmouse))
          return -1;
-   } else if (psmouse_probe(psmouse) != old_type)
+   } else if (psmouse_probe(psmouse) < 0 ||
+         psmouse->type != psmouse_extensions(psmouse, psmouse_max_proto, 0))
       return -1;
 
    /* ok, the device type (and capabilities) match the old one,
     * we can continue using it, complete intialization
     */
-   psmouse->type = old_type;
    psmouse_initialize(psmouse);
 
    if (psmouse->ptport) {


_________________
Think it twice, think it thrice, you never think enough...
Back to top
View user's profile Send private message
sawanv
Apprentice
Apprentice


Joined: 05 Dec 2002
Posts: 238

PostPosted: Tue Apr 27, 2004 10:01 am    Post subject: Reply with quote

nephros wrote:
Not a big deal, but CD/DVD Packet Writing still does not compile here.


Damn......need this stuff.
_________________
Eir kahen "chalo ghar jayen",
Bir kahen "chalo ghar jayen",
Phatte kahen "chalo ghar jayen",
Cartman kahen....."Screw you guys, I am going home !!! "
Back to top
View user's profile Send private message
silverter
Guru
Guru


Joined: 10 Apr 2002
Posts: 491
Location: Ulm, DE

PostPosted: Tue Apr 27, 2004 10:53 am    Post subject: Reply with quote

Well I guess no love for me. I get this with my .config file from love1. What am I missing.
Code:

CC      arch/i386/lib/dec_and_lock.o
  CC      arch/i386/lib/delay.o
  CC      arch/i386/lib/usercopy.o
  AR      arch/i386/lib/lib.a
  GEN     .version
  CHK     include/linux/compile.h
  UPD     include/linux/compile.h
  CC      init/version.o
  LD      init/built-in.o
  LD      .tmp_vmlinux1
arch/i386/kernel/built-in.o(.init.text+0x1d4f): In function `ignore_timer_override':
: undefined reference to `acpi_skip_timer_override'
make: *** [.tmp_vmlinux1] Error 1


regards
_________________
-- A Guru was once a Beginner --
Back to top
View user's profile Send private message
Robe
n00b
n00b


Joined: 05 Jan 2004
Posts: 64

PostPosted: Tue Apr 27, 2004 11:27 am    Post subject: Hi-res timers Reply with quote

Hey Steele, Downloaded and compiled new love-sources and everything went fine except for the hi-res timers. I was able to compile the Hi-Res Timers using the defaults (cept for acpi)

Code:
Clock/ timer options (Configure High-Resolution-Timers)  --->
(1000) High-Resolution-Timer resolution (nanoseconds) (NEW)            High res timer clock source? (ACPI-pm-timer)  --->
(0) Default ACPI pm timer address (NEW)


When I rebooted I was unable to see my USB keyboard, mouse, etc.
So, After I recompiled udev & hotplug I still had the same issues. At that point I backed off my timer to HPET. now everything works great. I could try and use the Time-stamp counter in conjunction with Hi-Res and see if that does the trick. I was also woundering if you could post your .config file on your web/ftp page so I can compare what kernel I use to yours.

Anyway, another great kernel, thx for all the hard work


ASUS P4T-E --512meg RDRAM -- 1.8GHZ
Back to top
View user's profile Send private message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Tue Apr 27, 2004 11:54 am    Post subject: Reply with quote

I got the Win4Lin stuff to compile by changing PF_IOTHREAD to PF_NOFREEZE. They changed it in the new mm.
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
Pink
Veteran
Veteran


Joined: 24 Jul 2003
Posts: 1062

PostPosted: Tue Apr 27, 2004 12:17 pm    Post subject: Reply with quote

steel300 wrote:
I got the Win4Lin stuff to compile by changing PF_IOTHREAD to PF_NOFREEZE. They changed it in the new mm.


Many thanks for your reply - things are looking clearer now as I progress.... :?

[edit]
Ahhh, got it, I read the changelog at Kernel.org and found this:
Quote:
<akpm@osdl.org>
[PATCH] Rename PF_IOTHREAD to PF_NOFREEZE

From: Nigel Cunningham <ncunningham@users.sourceforge.net>

It all makes sense now. :roll:
Back to top
View user's profile Send private message
ecatmur
Advocate
Advocate


Joined: 20 Oct 2003
Posts: 3595
Location: Edinburgh

PostPosted: Tue Apr 27, 2004 12:59 pm    Post subject: Reply with quote

Just wondering... would it be possible for you to put the digest files up there as well? I'd like to do an automated download but I don't want to waste your bandwidth downloading patchsets that I might not end up using, just for the sake of a digest file... plus there's the security issue, I guess.

Anyway, thanks for your work!
_________________
No more cruft
dep: Revdeps that work
Using command-line ACCEPT_KEYWORDS?
Back to top
View user's profile Send private message
seppe
Guru
Guru


Joined: 01 Sep 2003
Posts: 431
Location: Hove, Antwerp, Belgium

PostPosted: Tue Apr 27, 2004 1:02 pm    Post subject: Reply with quote

Thanks for putting the Win4Lin patch in this love release. I will check it out as soon as I got home.
_________________
nitro-sources, because between stable and experimental there exists only speed

Latest release I made: 2.6.13.2-nitro1
Back to top
View user's profile Send private message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Tue Apr 27, 2004 1:18 pm    Post subject: Reply with quote

ecatmur wrote:
Just wondering... would it be possible for you to put the digest files up there as well? I'd like to do an automated download but I don't want to waste your bandwidth downloading patchsets that I might not end up using, just for the sake of a digest file... plus there's the security issue, I guess.

Anyway, thanks for your work!


Yeah, that's not a problem. I'll put up my overlay for it as well. That way you can download one tarball and extract it and be set.
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
Ylin
n00b
n00b


Joined: 10 Apr 2004
Posts: 27

PostPosted: Tue Apr 27, 2004 1:39 pm    Post subject: Reply with quote

Steel, please include that Nforce Patch from PrakashKC in the next release again. My machine is again hardlocking. :/

I patched it now manually and as far as I could see everything else was ok. :)
Back to top
View user's profile Send private message
steel300
Veteran
Veteran


Joined: 10 Jul 2003
Posts: 1155

PostPosted: Tue Apr 27, 2004 2:04 pm    Post subject: Reply with quote

Ylin wrote:
Steel, please include that Nforce Patch from PrakashKC in the next release again. My machine is again hardlocking. :/

I patched it now manually and as far as I could see everything else was ok. :)


The c1halt thing was supposed to take care of that. Ask prakashkc on how it's supposed to work.
_________________
Rationality is the recognition of the fact that nothing can alter the truth and nothing can take precedence over that act of perceiving it.
Back to top
View user's profile Send private message
Ylin
n00b
n00b


Joined: 10 Apr 2004
Posts: 27

PostPosted: Tue Apr 27, 2004 4:44 pm    Post subject: Reply with quote

Ah, sorry. I confused things.

Didn't realise this post. I thought it was the patch he posted in the topic for the version before. Now things are clear to me.
I'm just remerging und recompiling love-sources. Will see how it works. :)
Sorry again.
Back to top
View user's profile Send private message
gun26
n00b
n00b


Joined: 11 Feb 2004
Posts: 47
Location: Toronto, Canada

PostPosted: Tue Apr 27, 2004 5:47 pm    Post subject: Reply with quote

Compiled and running fine here, although neither UDF packet writing nor compress loop would compile for me - both previously known problems as I understand.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum