From kchowksey@hss.hns.com  Thu Apr  9 21:48:16 1998
Received: from tapti.hss.hns.com (tapti.hss.hns.com [139.85.242.19])
          by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA07936
          for <FreeBSD-gnats-submit@freebsd.org>; Thu, 9 Apr 1998 21:47:43 -0700 (PDT)
          (envelope-from kchowksey@hss.hns.com)
Received: from tarang.hss.hns.com (tarang.hss.hns.com [139.85.242.33]) by tapti.hss.hns.com (8.8.2/8.7.3) with ESMTP id KAA28031 for <FreeBSD-gnats-submit@freebsd.org>; Fri, 10 Apr 1998 10:17:08 +0530 (IST)
Received: (from kchowksey@localhost) by tarang.hss.hns.com (8.8.2/8.7.3) id KAA05525; Fri, 10 Apr 1998 10:16:11 +0530 (IST)
Message-Id: <199804100446.KAA05525@tarang.hss.hns.com>
Date: Fri, 10 Apr 1998 10:16:11 +0530 (IST)
From: Kapil Chowksey <kchowksey@hss.hns.com>
To: FreeBSD-gnats-submit@freebsd.org
Subject: patch: DEVFS and psm

>Number:         6260
>Category:       i386
>Synopsis:       patch: DEVFS and psm
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Apr  9 21:50:00 PDT 1998
>Closed-Date:    Wed Apr 15 10:07:00 PDT 1998
>Last-Modified:  Wed Apr 15 10:07:11 PDT 1998
>Originator:     Kapil Chowksey
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
Hughes Software Systems
>Environment:

FreeBSD elbereth.hss.hns.com 3.0-CURRENT FreeBSD 3.0-CURRENT #0: Wed Mar  4 09:41:22 IST 1998     kch@elbereth.hss.hns.com:/usr/src/sys/compile/ELBERETH  i386

with julian's SLICE patches.

>Description:

In pre-devfs days, /dev/psm0 had always been a non-blocking
device. But with devfs, currently, /dev/psm0 is the blocking device
and /dev/npsm0 is the non-blocking one.

DEVFS must stay consistent with the older behaviour.

>How-To-Repeat:

Install XFree86 with /dev/psm0 as the mouse device; X hangs with no
keyboard activity possible.

>Fix:
	
This patch makes /dev/psm0 a non-blocking device; and /dev/bpsm0 a
blocking one. Tested with moused and XFree86 3.3.1.

--- /sys/i386/isa/psm.c~	Sun Jan 25 16:48:45 1998
+++ /sys/i386/isa/psm.c	Sat Mar 28 18:33:02 1998
@@ -161,7 +161,7 @@
     int           button;	/* the latest button state */
 #ifdef DEVFS
     void          *devfs_token;
-    void          *n_devfs_token;
+    void          *b_devfs_token;
 #endif
 #ifdef PSM_HOOKAPM
     struct apmhook resumehook;
@@ -981,11 +981,11 @@
     /* Done */
 #ifdef    DEVFS
     sc->devfs_token =
-        devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, TRUE),
-        DV_CHR, 0, 0, 0666, "psm%d", unit);
-    sc->n_devfs_token =
         devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, FALSE),
-        DV_CHR, 0, 0, 0666, "npsm%d", unit);
+        DV_CHR, 0, 0, 0666, "psm%d", unit);
+    sc->b_devfs_token =
+        devfs_add_devswf(&psm_cdevsw, PSM_MKMINOR(unit, TRUE),
+        DV_CHR, 0, 0, 0666, "bpsm%d", unit);
 #endif /* DEVFS */
 
 #ifdef PSM_HOOKAPM


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: phk 
State-Changed-When: Wed Apr 15 10:07:00 PDT 1998 
State-Changed-Why:  
committed, thanks! 
>Unformatted:
