Re: USB keyboard problem

2003-09-26 Thread plasma
Hi all,

  I tried to find what the problem is.  I add the following patch to
ukbd.c:


[[[
--- /usr/src/sys/dev/usb/ukbd.c.origMon Mar 31 08:31:35 2003
+++ /usr/src/sys/dev/usb/ukbd.c Sat Sep 27 01:31:54 2003
@@ -693,6 +693,12 @@
int mod, omod;
int key, c;
int i, j;
+#ifdef USB_DEBUG
+static int dumped_empty_queue = 1;
+#endif
+#if 1
+   int no, nn;
+#endif
 
 #define ADDKEY1(c) \
if (state-ks_inputs  INPUTBUFSIZE) {  \
@@ -728,20 +734,121 @@
  ? KEY_PRESS : KEY_RELEASE));
}
 
+#ifdef USB_DEBUG
+   if (ud-keycode[0] || !dumped_empty_queue) {
+   DPRINTF((before old: ));
+   for (i = 0; i  NKEYCODE; i++) {
+   if (state-ks_odata.keycode[i])
+   DPRINTF((%d , state-ks_odata.keycode[i]));
+   }
+   DPRINTF((\n));
+   DPRINTF((before new: ));
+   for (i = 0; i  NKEYCODE; i++) {
+   if (ud-keycode[i])
+   DPRINTF((%d , ud-keycode[i]));
+   }
+   DPRINTF((\n));
+
+dumped_empty_queue = (ud-keycode[0]) ? 0 : 1;
+   }
+#endif /* USB_DEBUG */
+
+#if 1
+   /* Calculate length of old and new data */
+   for (no = 0; no  NKEYCODE; no++) {
+   if (!state-ks_odata.keycode[no])
+   break;
+   }
+   for (nn = 0; nn  NKEYCODE; nn++) {
+   if (!ud-keycode[nn])
+   break;
+   }
+
+#ifdef USB_DEBUG
+   if (no != 0 || nn != 0) {
+   DPRINTF((no: %d, nn: %d\n, no, nn));
+   }
+#endif /* USB_DEBUG */
]]]


Add 'options USB_DEBUG' in kernel config, and build kernel.  Do
'sysctl -w hw.usb.ukbd.debug=1' as well.  Now I can see what's going
on inside.

A very interesting things show up.  Below is a segment of generated
log:

Sep 27 01:37:28 plasmanb /kernel: before old: 12 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 12 
Sep 27 01:37:28 plasmanb /kernel: no: 0, nn: 1
Sep 27 01:37:28 plasmanb /kernel: 0x16 (22) pressed
Sep 27 01:37:28 plasmanb /kernel: 22 12 
Sep 27 01:37:28 plasmanb /kernel: before old: 22 12 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 12 
Sep 27 01:37:28 plasmanb /kernel: no: 1, nn: 1
Sep 27 01:37:28 plasmanb /kernel: before old: 22 12 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 
Sep 27 01:37:28 plasmanb /kernel: no: 1, nn: 1
Sep 27 01:37:28 plasmanb /kernel: before old: 22 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 
Sep 27 01:37:28 plasmanb /kernel: no: 1, nn: 1
Sep 27 01:37:28 plasmanb /kernel: before old: 22 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 
Sep 27 01:37:28 plasmanb /kernel: no: 1, nn: 1
Sep 27 01:37:28 plasmanb /kernel: before old: 22 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 44 
Sep 27 01:37:28 plasmanb /kernel: no: 1, nn: 2
Sep 27 01:37:28 plasmanb /kernel: 0x2c (44) pressed
Sep 27 01:37:28 plasmanb /kernel: 22 44 
Sep 27 01:37:28 plasmanb /kernel: before old: 22 44 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 44 
Sep 27 01:37:28 plasmanb /kernel: no: 2, nn: 2
Sep 27 01:37:28 plasmanb /kernel: before old: 22 44 
Sep 27 01:37:28 plasmanb /kernel: before new: 22 44 
Sep 27 01:37:28 plasmanb /kernel: no: 2, nn: 2
Sep 27 01:37:28 plasmanb /kernel: before old: 22 44 
Sep 27 01:37:28 plasmanb /kernel: before new: 44 
Sep 27 01:37:28 plasmanb /kernel: no: 2, nn: 0
Sep 27 01:37:28 plasmanb /kernel: 0x416 (1046) released
Sep 27 01:37:28 plasmanb /kernel: 0x42c (1068) released
Sep 27 01:37:28 plasmanb /kernel: 44 

The problem is here:

Sep 27 01:37:28 plasmanb /kernel: before old: 22 44 
Sep 27 01:37:28 plasmanb /kernel: before new: 44 
Sep 27 01:37:28 plasmanb /kernel: no: 2, nn: 0
Sep 27 01:37:28 plasmanb /kernel: 0x416 (1046) released
Sep 27 01:37:28 plasmanb /kernel: 0x42c (1068) released

The dumping code

  for (i = 0; i  NKEYCODE; i++) {
if (ud-keycode[i])
DPRINTF((%d , ud-keycode[i]));
  }

shows there's one element in the new key data, but the later counting
loop

  for (nn = 0; nn  NKEYCODE; nn++) {
if (!ud-keycode[nn])
break;
  }

says there's no element inside the new key data.  How could it be
possible?  And why?

I believe if this mystery could be solved, then we'll have a happy usb
keyboard driver.


plasma


==
 ¦¬¨ì±b³æ«á³Ì¾á¤ßªº¨Æ
 http://edm-prg.epaper.com.tw/click.php?ad_code=25227
==
 PChome½u¤WÁʪ«¶g¦~¼y¡G©â¨T¨®¡BDV¤Ñ¤Ñ°e
 http://shopping.pchome.com.tw/
==
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 4.9 Boot Hang when USB Devices Attached

2003-09-26 Thread Brandon Fosdick
Joe Kelsey wrote:
I have a system running

FreeBSD zircon.zircon.seattle.wa.us 4.9-PRERELEASE FreeBSD 
4.9-PRERELEASE #20: Fri Sep 19 12:55:28 PDT 2003 
[EMAIL PROTECTED]:/usr/obj/usr/src/sys/ZIRCON  i386

When I upgraded to fix the OpenSSH problems, the system started hanging 
at boot time right after the USB/OHCI messages whenever I had devices 
plugged into the USB ports (mainly a USB mouse).  Now, in order to boot, 
I have to unplug the mouse and wait for the system to pass the USB part 
of boot before replugging.
There are several threads discussing this ATM. If you have an nforce2 
board search for the thread with the subject fix/workaround for usb 
probe lockups on nForce2 mbs. Andrew Atrens posted a patch that worked 
for me. In the same thread Ian Dowse has offered a few other ideas to 
try. I haven't tried them yet.

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 4.9 Boot Hang when USB Devices Attached

2003-09-26 Thread Joe Kelsey
Brandon Fosdick wrote:
Joe Kelsey wrote:
When I upgraded to fix the OpenSSH problems, the system started 
hanging at boot time right after the USB/OHCI messages whenever I had 
devices plugged into the USB ports (mainly a USB mouse).  Now, in 
order to boot, I have to unplug the mouse and wait for the system to 
pass the USB part of boot before replugging.
There are several threads discussing this ATM. If you have an nforce2 
board search for the thread with the subject fix/workaround for usb 
probe lockups on nForce2 mbs. Andrew Atrens posted a patch that worked 
for me. In the same thread Ian Dowse has offered a few other ideas to 
try. I haven't tried them yet.
I have an ASUS A7S333 which does *not* have an nforce2 chipset.

/Joe



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 4.9 Boot Hang when USB Devices Attached

2003-09-26 Thread Kent Stewart
On Friday 26 September 2003 12:06 pm, Joe Kelsey wrote:
 Brandon Fosdick wrote:
  Joe Kelsey wrote:
  When I upgraded to fix the OpenSSH problems, the system started
  hanging at boot time right after the USB/OHCI messages whenever I
  had devices plugged into the USB ports (mainly a USB mouse).  Now,
  in order to boot, I have to unplug the mouse and wait for the
  system to pass the USB part of boot before replugging.
 
  There are several threads discussing this ATM. If you have an
  nforce2 board search for the thread with the subject
  fix/workaround for usb probe lockups on nForce2 mbs. Andrew
  Atrens posted a patch that worked for me. In the same thread Ian
  Dowse has offered a few other ideas to try. I haven't tried them
  yet.

 I have an ASUS A7S333 which does *not* have an nforce2 chipset.


Mine doesn't either and the fact it dies in the boot -s phase of 
updating the system is a verification of the reason to boot to single 
user mode. I have tried unplugging the USB devices and it will finish 
the boot. I won't, however, finish the installworld.

Kent

-- 
Kent Stewart
Richland, WA

http://users.owt.com/kstewart/index.html

___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 4.9 Boot Hang when USB Devices Attached

2003-09-26 Thread Paul Horechuk
The ASUS A7A266 does NOT have the nForce2 either, but the patch
(actually two lines of inserted code for usb.c) does fix the problem.
I had to actually disable the USB in the BIOS to boot. Simply removing
the USB mouse did not work.

- Original Message - 
From: Joe Kelsey [EMAIL PROTECTED]
To: Brandon Fosdick [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: September 26, 2003 3:06 PM
Subject: Re: 4.9 Boot Hang when USB Devices Attached


 Brandon Fosdick wrote:
  Joe Kelsey wrote:
  When I upgraded to fix the OpenSSH problems, the system started
  hanging at boot time right after the USB/OHCI messages whenever I
had
  devices plugged into the USB ports (mainly a USB mouse).  Now, in
  order to boot, I have to unplug the mouse and wait for the system
to
  pass the USB part of boot before replugging.
  There are several threads discussing this ATM. If you have an
nforce2
  board search for the thread with the subject fix/workaround for
usb
  probe lockups on nForce2 mbs. Andrew Atrens posted a patch that
worked
  for me. In the same thread Ian Dowse has offered a few other ideas
to
  try. I haven't tried them yet.

 I have an ASUS A7S333 which does *not* have an nforce2 chipset.

 /Joe



 ___
 [EMAIL PROTECTED] mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-stable
 To unsubscribe, send any mail to
[EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: 4.9 Boot Hang when USB Devices Attached

2003-09-26 Thread Joe Kelsey
Kent Stewart wrote:
On Friday 26 September 2003 12:06 pm, Joe Kelsey wrote:

Brandon Fosdick wrote:

Joe Kelsey wrote:

When I upgraded to fix the OpenSSH problems, the system started
hanging at boot time right after the USB/OHCI messages whenever I
had devices plugged into the USB ports (mainly a USB mouse).  Now,
in order to boot, I have to unplug the mouse and wait for the
system to pass the USB part of boot before replugging.
There are several threads discussing this ATM. If you have an
nforce2 board search for the thread with the subject
fix/workaround for usb probe lockups on nForce2 mbs. Andrew
Atrens posted a patch that worked for me. In the same thread Ian
Dowse has offered a few other ideas to try. I haven't tried them
yet.
I have an ASUS A7S333 which does *not* have an nforce2 chipset.
Mine doesn't either and the fact it dies in the boot -s phase of 
updating the system is a verification of the reason to boot to single 
user mode. I have tried unplugging the USB devices and it will finish 
the boot. I won't, however, finish the installworld.
boot -s hangs just like normal boot unless I unplug the mouse.  After 
boot -s with ums unplugged, I can fsck if necessary and then mount-a, 
installworld, etc. with no problems.  I can even plug in the mouse, not 
that it helps because I still have to unplug it when I repoot after 
mergemaster.

I have never experienced a panic or other crash related to USB devices. 
 Only the boot lockup.

/Joe



___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


psm0 lockup on boot (FreeBSD 4.9 PreRelease #2)

2003-09-26 Thread Jorge Aldana
Hello,

I lost the previous thread on the psm0 lock but also wanted to report that after
cvsup-ing for the arp patch and rebuilding that the lockup still occurs, any
leads on a fix/workaround? (Besides removing psm0 or disabling the sound card).

Jorge
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: Large memory issues on 4-STABLE

2003-09-26 Thread Kevin Oberman
 Date: Mon, 15 Sep 2003 11:51:26 -0700 (PDT)
 From: Doug White [EMAIL PROTECTED]
 Sender: [EMAIL PROTECTED]
 
 On Mon, 15 Sep 2003, Irvine Short wrote:
 
  Thanks for the definitive reply!
 
 You're quite welcome.
 
This is relevant to the work we're doing - some of my users actually
really do need this amount of memory.
  
   If this is the case then you should consider a 64 bit architecture, like
   ia64, sparc64, or amd64 (Opteron).
 
  Aah, but at the mo the 32bit systems are way way cheaper...
 
 Not for long.  Opteron systems are even now quite price-competitive with
 i386, although I don't know the availability for people outside the US.  I
 can go to a local computer shop and buy dual Opteron server boards and
 processors and not pay much more than for a nice Xeon system, and the
 workstation class stuff will be out Real Soon Now.

RSN has already come. Today's Fry's ad in the SJ Mercury lists an
AMD64 3200+ with mobo for about $650. (I don't recall the mobo.)
-- 
R. Kevin Oberman, Network Engineer
Energy Sciences Network (ESnet)
Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab)
E-mail: [EMAIL PROTECTED]   Phone: +1 510 486-8634
___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: about gcc

2003-09-26 Thread Kris Kennaway
On Fri, Sep 26, 2003 at 12:01:04PM -0400, Peng Zhang wrote:
 Hi,
 
 Thanks for the reply. I think I can do this. However everytime you want
 to install a software, you need read the Makefile to figure out which
 variables you need set up. Is there something like use.perl for gcc?

No.  The point is you don't want it to override your system compiler
when making world/kernels, because in most cases you cannot replace
the system compiler and still have a buildable FreeBSD system.

Kris


pgp0.pgp
Description: PGP signature


Re: How to generate and test GENERIC-STABLE kernel ?

2003-09-26 Thread Wes Peters
On Wednesday 24 September 2003 22:27, Rob Lahaye wrote:
 Hi,

 I was wondering whether the GENERIC files (e.g. in
 /usr/src/sys/i386/conf/GENERIC) are also updated when I cvsup the
 source-tree for building a new world and kernel. Haven't seen any
 change to GENERIC so far.

Yes, they are.  The GENERIC file isn't changed all that often in STABLE 
right now, because it is, er, stable.  ;^)

 I suppose for testing the new upcoming release, we should also verify
 whether the GENERIC kernel works properly, shouldn't we?

Yes, that would be nice.

 If yes, what's the proper way of doing that?

Build a GENERIC kernel, install it, boot it, run a bunch of software on 
it and make sure it runs adequately.  As an interested aside, benchmark 
something you use a lot on GENERIC and on your custom kernel and verify 
your custom kernel is at least as fast, perhaps faster, than GENERIC.

Alternatively, once the Release Candidate builds start popping up, 
download ISO images and install from them on a variety of hardware to 
verify sysinstall  etc. are still functioning well, too.

Thank you for volunteering!

-- 
 Where am I, and what am I doing in this handbasket?

Wes Peters  [EMAIL PROTECTED]


___
[EMAIL PROTECTED] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-stable
To unsubscribe, send any mail to [EMAIL PROTECTED]