NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/46616: Copy, echo, cat to /dev/ttyU0 ends badly, with "cp: /dev/ttyU0: Invalid argument"



The following reply was made to PR kern/46616; it has been noted by GNATS.

From: M L Riechers <mlr%rse.com@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: mlr%rse.com@localhost
Subject: Re: kern/46616: Copy, echo, cat to /dev/ttyU0 ends badly, with "cp: 
/dev/ttyU0: Invalid argument"
Date: Sun, 15 Jul 2012 16:43:17 -0400 (EDT)

 fix:
 
 --- ucom.c.ori  2012-02-02 14:43:07.000000000 -0500
 +++ ucom.c      2012-07-14 17:48:57.000000000 -0400
 @@ -365,10 +365,6 @@
         int s, i;
         int error;
  
 -       /* XXX This is a hopefully temporary stopgap for kern/42848. */
 -       if ((flag & (FREAD|FWRITE)) != (FREAD|FWRITE))
 -               return (EINVAL);
 -
         if (sc == NULL)
                 return (ENXIO);
 
 I applied the patch, re-compiled the kernal, and now I can "Copy, echo,
 and cat to /dev/ttyU0."
 
 This "temporary stopgap" was introduced 14 Jan as:
 
 diff -u src/sys/dev/usb/ucom.c:1.95 src/sys/dev/usb/ucom.c:1.96
 --- src/sys/dev/usb/ucom.c:1.95 Sat Jan 14 20:41:49 2012
 +++ src/sys/dev/usb/ucom.c      Sat Jan 14 20:51:00 2012
 @@ -1,4 +1,4 @@
 -/*     $NetBSD: ucom.c,v 1.95 2012/01/14 20:41:49 jakllsch Exp $       */
 +/*     $NetBSD: ucom.c,v 1.96 2012/01/14 20:51:00 jakllsch Exp $       */
 
 
 This seems to stem from a temporary fix to PR/45013 and PR/42848:
 
  
 > From: "Jonathan A. Kollasch" <jakllsch%netbsd.org@localhost>
 > To: gnats-bugs%gnats.NetBSD.org@localhost
 > Cc: 
 > Subject: PR/42848 CVS commit: src/sys/dev/usb
 > Date: Sat, 14 Jan 2012 20:51:00 +0000
 > 
 > 
 >  Module Name:        src
 >  Committed By:       jakllsch
 >  Date:               Sat Jan 14 20:51:00 UTC 2012
 > 
 >  
 >  Modified Files:
 >      src/sys/dev/usb: ucom.c
 > 
 >  
 >  Log Message:
 >  Stopgap XXX kludge for PR kern/42848 and PR kern/45013.
 > 
 >  
 >  Someone should really find and fix the real problem,
 >  but it's better to not crash in the meantime.
 > 
 
 I heartily agree that "Someone should really find and fix
 the real problem", and hope someone with more knowledge than
 I fixes it.
 
 Meanwhile, I'm backing out the stopgap on my systems, and
 hoping for the best. I really can't live with the stopgap.
 
 Should this PR be closed, or left open as a reminder of the
 consequences of this stopgap?
 
 Yours,
 
 -Mike
 


Home | Main Index | Thread Index | Old Index