From owner-freebsd-current Thu Apr 22 1:10:36 1999 Delivered-To: freebsd-current@freebsd.org Received: from mrelay.jrc.it (mrelay.jrc.it [139.191.1.65]) by hub.freebsd.org (Postfix) with ESMTP id D1A6D15920 for ; Thu, 22 Apr 1999 01:10:32 -0700 (PDT) (envelope-from nick.hibma@jrc.it) Received: from elect8 (elect8.jrc.it [139.191.71.152]) by mrelay.jrc.it (LMC5692) with SMTP id KAA27485; Thu, 22 Apr 1999 10:08:00 +0200 (MET DST) Date: Thu, 22 Apr 1999 10:07:56 +0200 (MET DST) From: Nick Hibma X-Sender: n_hibma@elect8 Reply-To: Nick Hibma To: Amancio Hasty Cc: FreeBSD current mailing list Subject: Re: USB keyboard attach function? In-Reply-To: <199904220758.AAA09090@rah.star-gate.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > Not quite a fix however the following patches fixes disconnect /reconnect > problems with my USB mouse and the 3com USB modem . This is a > bandage please don't commit is just that right if I diconnect my usb > modem or usb mouse my system panics hence the following simple patch. That looks like a proper hack. I'll have to sort out something more reliable than that :-) > Disconnected and reconnected my mouse several times and got no > panic plus every time someone calls here the USB modem does > not crash my system 8) :-) You can quitely answer the phone while your system is doing an fsck of a 18Gb disk that is 80% full... > One thing though someone ought to fix moused so that if > it is talking to a usb mouse which gets disconnected and > then reconnected to enable again the mouse. I managed > to get back my mouse operational by sending a "HUP" > signal to moused. One of the things we might to have a daemon do. Another option would be to just reconnect the mouse to the same open file descriptor, but I don't know whether this is possible. The following is no longer necessary (I think). I fixed that yesterday. diff -r -c usb/usb_port.h usb.new/usb_port.h *** usb/usb_port.h Wed Apr 21 15:33:44 1999 --- usb.new/usb_port.h Wed Apr 21 18:29:20 1999 *************** *** 202,208 **** ((dev)->softc = device_get_softc(bdev)) : 0) /* conversion from one type of queue to the other */ ! #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL #define SIMPLEQ_NEXT STAILQ_NEXT --- 202,216 ---- ((dev)->softc = device_get_softc(bdev)) : 0) /* conversion from one type of queue to the other */ ! /* #define SIMPLEQ_REMOVE_HEAD STAILQ_REMOVE_HEAD */ ! #define SIMPLEQ_REMOVE_HEAD(head, field) do { \ ! if ((head)->stqh_first != NULL ) { \ ! if (((head)->stqh_first = \ ! (head)->stqh_first->field.stqe_next) == NULL) \ ! (head)->stqh_last = &(head)->stqh_first; \ ! } \ ! } while (0) ! #define SIMPLEQ_INSERT_HEAD STAILQ_INSERT_HEAD #define SIMPLEQ_INSERT_TAIL STAILQ_INSERT_TAIL #define SIMPLEQ_NEXT STAILQ_NEXT -- ISIS/STA, T.P.270, Joint Research Centre, 21020 Ispra, Italy To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message