Subject: Linux-Development Digest #985
From: Digestifier <Linux-Development-Request@senator-bedfellow.MIT.EDU>
To: Linux-Development@senator-bedfellow.MIT.EDU
Reply-To: Linux-Development@senator-bedfellow.MIT.EDU
Date:     Thu, 4 Aug 94 16:13:09 EDT

Linux-Development Digest #985, Volume #1          Thu, 4 Aug 94 16:13:09 EDT

Contents:
  Re: auto irq problems after 1.1.16 (Rob Janssen)
  Re: Weird problem with msdosfs (Rob Janssen)
  Re: 1.1.38 fixes uart detection (Rob Janssen)
  Re: Using rs232 control lines from program? (Rob Janssen)
  Re: general performance has dropped in the last month (Rob Janssen)
  Re: How to do inb from a user program? (Rob Janssen)
  Kernel -> kernel IP. (Ji)
  Re: gcc 2.6.0 & linux/soundcard.h (Chris Origer)
  gcc 2.6.0 & linux/soundcard.h (Chris Origer)
  Re: -= good programmer's editor for X? (Chris Bitmead)
  Re: gcc 2.6.0 & linux/soundcard.h (Chris Origer)
  Re: How to do inb from a user program? (Richard Roth)
  Kernel change summary archive (Russell Nelson)
  Re: possible bug in libc 4.5.26 (__load_shared_libraries)? (David Engel)
  Re: can't make kernels at all above 1.23 (Slackware 1.1.1) (Vince Skahan)

----------------------------------------------------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: auto irq problems after 1.1.16
Reply-To: pe1chl@rabo.nl
Date: Thu, 4 Aug 1994 08:20:09 GMT

In <31ohb1$jgk@eis.calstate.edu> tdeppne@eis.calstate.edu (Ted Deppner) writes:

>Greetings all.  I've not seen any mention of this problem in the last 
>month, so I'll post an article about it.  If it's already been hashed, be 
>merciful with me.

>I've a 486dx2-66 AMD machine, Trident 8900c, 420 and 345meg IDE, 16meg 
>memory, SoundBlaster 16 irq 5 dma 1,6 port 220, Ne2000 clone port 300, 
>irq 15, and 3.5", 5-1/4" floppies.

>with kernel 1.1.16 all the above is autodetected and all irqs are 
>correct.  I recompiled the kernel of course with support for only the 
>above SB16 and Ne2000 cards.

>the next kernel I used was 1.1.30, then 1.1.35, then 1.1.37.  Something 
>about these kernels doesn't do correct IRQ detection.  the SB16 comes up 
>okay, but the 30,35,37 kernels think my NE2000 is on IRQ 6, the floppy 
>interrupt.  Hence, Ne2000 doens't work, and the floppies fail in a polite, 
>yet complete fashion.

>I didn't see any change in the autoirq procedures in drivers/net/misc.c, 
>and there are no significant changes in drivers/net/ne2.c that I could 
>find regarding IRQs, so I'm at a loss as to why they fail.

>My machine configuration has not changed at all, and I can still boot 
>1.1.37 and have it fail, then next boot bring up 1.1.16 (alah lilo) and 
>have everything work correctly.  Same kernel config options.

I have had exactly the same problem, and sent a small patch to the
autoirq_setup routine that fixed it for me at that time.  Yesterday I
went from 1.1.37 to 1.1.38 and it failed *again* :-(

With the first patch I believed to fix a problem where an interrupt from
the floppy was already pending (maybe a leftover from the ROM boot) when
the IRQ for the ethernet card was being probed.  I fixed that by clearing
the "detected interrupts" variable only after all interrupt handlers for
the detection have been setup, so that any interrupts that go off
instantaneously would not be misinterpreted.

It seems that this was not what was really happening, but it seems to be
a real floppy interrupt occurring at the exact time when the NE2000 autodetect
tries to find its interrupt...

This time I could fix it by calling autoirq_setup(2) from ne.c, giving it
some extra delay to wait for unexpected interrupts.  However, I have not
yet submitted that patch to Linus as I have a feeling that I am just moving
around the window for trouble, and it will fail again when something in the
code above the autodetect changes its timing....

This problem never occurred in older kernels because the floppy was
permanently grabbing its interrupt and therefore it could never be taken
away by autodetecting cards.  It seems that was better.

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Weird problem with msdosfs
Reply-To: pe1chl@rabo.nl
Date: Thu, 4 Aug 1994 08:36:43 GMT

In <DHOLLAND.94Aug3145431@husc7.harvard.edu> dholland@husc7.harvard.edu (David Holland) writes:


>I have a weird problem with msdosfs date stamps: files created on my
>machine register as two weeks earlier when taken over to a DOS box
>(either 6.0 or 6.2, not sure). Correspondingly, files carried over
>from that machine come out dated two weeks on the future on my
>machine. 

>This is using floppies. 

>I haven't checked against the Amiga's DOS filesystem, but I suspect it
>would produce similar results.

>First noticed in 1.1.16, still occurs in 1.1.27. I now have 1.1.37,
>but I haven't checked yet.

>Comments? Suggestions? 

Probably you have a weird setting of the timezone in Linux?
It is normal that the times are a few hours off, as the dosfs incorrectly
writes UTC time to the directory entries (DOS writes localtime there.  Linux
filesystems normally use UTC and it is converted back to localtime during
operations like "ls -l".  The localtime/UTC issue is very difficult to get
right when you run several operating systems on the machine)

As you report the difference to be two weeks, I think the offset between
UTC and localtime has somehow be gotten to be two weeks on your system.
Check the value of the TZ environment variable.

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: 1.1.38 fixes uart detection
Reply-To: pe1chl@rabo.nl
Date: Thu, 4 Aug 1994 08:43:47 GMT

In <31onv9$4vp@news.u.washington.edu> dcflood@u.washington.edu (David Flood) writes:

>I have a Digicom 14.4+fax installed in my system.  Before 38, the uart
>was reported as a 8250, now it is correctly reported as a 16450 (which
>it emulates).  This is a win in my book.

Fixed this relative to what version??   I don't see any changes relative
to 1.1.37!

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: Using rs232 control lines from program?
Reply-To: pe1chl@rabo.nl
Date: Thu, 4 Aug 1994 08:52:42 GMT

In <CtzDA2.ByG@ucdavis.edu> ez008579@dale.ucdavis.edu (Lynx man) writes:

>dlacroix@guilder.bevd.blacksburg.va.us (David La Croix) writes:

>>I'd like to know how to program for the serial ports under LINUX.
>>Specifically I'd like to be able to use the flow control lines to 
>>send/detect a boolean case.

>>any RTFMs are welcomed, but I'd like to know which Ms.

>I have a similar (the same?) problem.  I want to migrate from QNX 2.x to
>Linux.  Under QNX there's this convenient function:

>    unsigned tty_ctrl(fp,mask,control)
>    FILE *fp;
>    unsigned mask;
>    unsigned control;

Such a routine with a FILE * arg??   Gross...

>Example usage:  force DTR and RTS lines off:

>    new_state = tty_ctrl(fp, 0x03, 0x00);

>These and similar functions are of course not Posix or System V or anything.
>I've combed through the kernel source code, grep'ed the /usr/include/*/*.h files,
>and haven't come up with any promising leads, but some clues in sys/serial.h and
>linux/serial_reg.h.

Check the TIOCMBIC and TIOCMBIS ioctl's, e.g.:

        int arg,fd;

        arg = TIOCM_RTS;
        ioctl(fd,TIOCMBIS,&arg);                /* RTS ON */

        ...

        arg = TIOCM_RTS;
        ioctl(fd,TIOCMBIC,&arg);                /* RTS OFF */

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: general performance has dropped in the last month
Reply-To: pe1chl@rabo.nl
Date: Thu, 4 Aug 1994 08:55:55 GMT

In <1994Aug3.233902.3992@news.etc.bc.ca> nwalker@cln.etc.bc.ca (Norm Walker) writes:


>I have been using linux on a 486DX33 and after upgrading the kernel
>to any version above 1.1.13 .  The system suffers from serious 
>performance problems ... some program are alot worse than others
>with no other software running it takes over a minute to load and
>run pine (lots of memory available). Checking system usage while
>trying to load pine shows that pine is in a sleep state ...
>how does one find out what a program is waiting for
>and has anybody else had performance problems like I have?

The "strace" program is good at finding what programs are doing.
(at least what they are requesting from the system)

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: rob@pe1chl.ampr.org (Rob Janssen)
Subject: Re: How to do inb from a user program?
Reply-To: pe1chl@rabo.nl
Date: Thu, 4 Aug 1994 08:57:09 GMT

In <31pg8i$9em@news1.svc.portal.com> zerucha@shell.portal.com (Thomas E Zerucha) writes:

>How can I access the IO space (using inb and outb instructions) outside
>the kernel?  I know it is probably documented somewhere, but I was wondering
>if anyone knows this off the top of their head

Yes, but you must use ioperm() first.  And of course you should not dare
to access devices the kernel is managing as well :-)

Rob
-- 
=========================================================================
| Rob Janssen                | AMPRnet:   rob@pe1chl.ampr.org           |
| e-mail: pe1chl@rabo.nl     | AX.25 BBS: PE1CHL@PI8UTR.#UTR.NLD.EU     |
=========================================================================

------------------------------

From: Ji.Whan.Kim@dcs.warwick.ac.uk (Ji)
Subject: Kernel -> kernel IP.
Date: Thu, 4 Aug 1994 13:41:10 GMT


Hi,

As part of my MSc project I need to modify the *page fault* handlers to
request pages from other machines on an Ethernet network. I've done most of
the modifications but since I know next to nothing about the ethernet/ip code
in the kernel, I'm stuck on the networking side. 

I've just taken a brief glance at the code and it appears that I can use
sockets in the kernel - so can I set up a socket at boot up time which can be
used by the page fault handlers and then make all processes sleep whilst
waiting for a reply to a remote page request? (Datagram sockets most
probably!)

Any help/tips/code/information appreciated.

Cheers,

Ji.


------------------------------

From: ctoriger@starbase.neosoft.com (Chris Origer)
Subject: Re: gcc 2.6.0 & linux/soundcard.h
Date: 4 Aug 1994 13:36:08 GMT

Chris Origer (ctoriger@starbase.neosoft.com) wrote:
: Hi, using gcc2.6.0 on make dep with kernel ver 1.1.38 the make depend 
: dies on linux/soundcard.h with macro recursion to deep (this is after 
: in file included from soundcard.h scrolls down the screen for about a minute.

: my soundcard.h has #include <linux/soundcard.h> in it with nothing more.

: can any one help? thanks.

: (should I go back to 2.5.8? hm.)
: Chris

Hi, I'm following up on my own post. I don't think its gcc 2.6.0 
thats the problem (I put gcc 2.5.8 back and same problem). I had
also updated to the 4.5.26 includes and libc. 

Any help would be appreciated. Has anyone else had this problem?
 Thanks, Chris


------------------------------

From: ctoriger@starbase.neosoft.com (Chris Origer)
Subject: gcc 2.6.0 & linux/soundcard.h
Date: 4 Aug 1994 03:12:11 GMT

Hi, using gcc2.6.0 on make dep with kernel ver 1.1.38 the make depend 
dies on linux/soundcard.h with macro recursion to deep (this is after 
in file included from soundcard.h scrolls down the screen for about a minute.

my soundcard.h has #include <linux/soundcard.h> in it with nothing more.

can any one help? thanks.

(should I go back to 2.5.8? hm.)
Chris


------------------------------

From: chrisb@cssc-syd.tansu.com.au (Chris Bitmead)
Subject: Re: -= good programmer's editor for X?
Date: 4 Aug 1994 12:39:09 +1000

>Kris Nybakken (nybakken@world.std.com) wrote:

> Hi.

> Are there any good programmer's editors for X - not term-like ports?

> I'm diving into *nix development from the Mac and Windows world, and 
> haven't had to use a terminal-like editor since my Apple II days!  I'm 
> thinking of something like you'd find under Think C or Visual C (not 
> super-feature loaded, but a good tool).  I've tried the Emacs with the X 
> stuff (menus and the like), but I was kinda hoping for things like syntax 
> coloring, 

Emacs 19.25 has syntax colouring.

> font-size-on-the-fly, etc.  

Do you mean changing font size on the fly? Hold down Ctrl and right mouse
button.

> Not to mention that I don't like the C 
> mode and am not into learning elisp to change it.  

Changing C indentation modes is trivial, and doesn't involve writing lisp.
This is what I have in my .emacs file:

;; set up prefered indentation scheme
(setq c-indent-level 4)
(setq c-continued-statement-offset 4)
(setq c-continued-brace-offset 0)
(setq c-brace-offset -4)
(setq c-brace-imaginary-offset 0)
(setq c-argdecl-indent 4)
(setq c-label-offset -4)
(setq c++-empty-arglist-indent 4)
(setq c++-friend-offset 0)

> Not to mention I'm not 
> a believer in having everything AND the kitchen sink installed in my
> editor.

So remove the lisp files that don't interest you.

> Anything out there?

Think of something that emacs doesn't have first.

Chris Bitmead.


------------------------------

From: ctoriger@starbase.neosoft.com (Chris Origer)
Subject: Re: gcc 2.6.0 & linux/soundcard.h
Date: 4 Aug 1994 16:17:30 GMT

Chris Origer (ctoriger@starbase.neosoft.com) wrote:
: Chris Origer (ctoriger@starbase.neosoft.com) wrote:
: : Hi, using gcc2.6.0 on make dep with kernel ver 1.1.38 the make depend 
: : dies on linux/soundcard.h with macro recursion to deep (this is after 
: : in file included from soundcard.h scrolls down the screen for about a minute.

: : my soundcard.h has #include <linux/soundcard.h> in it with nothing more.

: : can any one help? thanks.

: : (should I go back to 2.5.8? hm.)
: : Chris

: Hi, I'm following up on my own post. I don't think its gcc 2.6.0 
: thats the problem (I put gcc 2.5.8 back and same problem). I had
: also updated to the 4.5.26 includes and libc. 

: Any help would be appreciated. Has anyone else had this problem?
:  Thanks, Chris

Hi, me again... sorry. I find out that my problem was using the wrong
soundcard.h. I guess between patches I did not get the correct one.
Live and learn.

Chris


------------------------------

From: rothr@iia.org (Richard Roth)
Subject: Re: How to do inb from a user program?
Date: 4 Aug 1994 03:55:46 GMT

Thomas E Zerucha (zerucha@shell.portal.com) wrote:
: How can I access the IO space (using inb and outb instructions) outside
: the kernel?  I know it is probably documented somewhere, but I was wondering
: if anyone knows this off the top of their head
: ---
: zerucha@shell.portal.com - main email address

Check out the ioperm(port, count, ???) function call. I forgot to doc the 
two params but (port, 1, 1) will allow inb()/outb() to that port.

The headers you need are: 
        fcntl.h (maybe)
        asm/io.h
        linux/hdreg.h   (maybe)
        linux/fs.h (maybe)

Sorry for the maybe's but this is from a code segment.

Rich Roth - Xps - Mail to rich@dtop.com


------------------------------

From: nelson@crynwr.crynwr.com (Russell Nelson)
Subject: Kernel change summary archive
Date: 04 Aug 1994 11:51:25 GMT

I've uploaded all my kernel change summaries (from 1.1.13 on) to
ftp://ftp.emlist.com/pub/kchanges.

--
-russ <nelson@crynwr.com>    http://www.crynwr.com/crynwr/nelson.html
Crynwr Software   | Crynwr Software sells packet driver support | ask4 PGP key
11 Grant St.      | +1 315 268 1925 (9201 FAX)  | What is thee doing about it?
Potsdam, NY 13676 | LPF member - ask me about the harm software patents do.

------------------------------

From: david@ods.com (David Engel)
Subject: Re: possible bug in libc 4.5.26 (__load_shared_libraries)?
Date: Thu, 4 Aug 1994 14:29:17 GMT

Mitchum DSouza (Mitchum.DSouza@mrc-apu.cam.ac.uk) wrote:
: In article <Ctxr0A.6BF@raven.alaska.edu>, fxmlk@camelot.acf-lab.alaska.edu (Mike
: L. Kienenberger) writes:
: |> I'm running a program which unexpectedly dies at random intervals
: |> with the message "statically linked" to stderr.  I've finally traced the
: |> message back to __load.c in libc.  I can even see the exit() which kills
: |> the program there.  I don't know for sure, but I assume I'm running
: |> libc.4.5.26 since that's what shows up in /lib/lib*.   However,
: |> I can't figure out where (or even why!) __load_shared_libraries() (the
: |> source of the message) gets called.  Setting a breakpoint in the debugger
: |> at exit(), _exit(), and __load_shared_libraries() shows an empty stack
: |> except for __load_shared_libraries.
: |> ...
:
: You can try getting the ld.so-1.4.4.tar.gz package which has a debugging version
: of libldso.a. Link your program with that. You will then be able to debug
: you program properly as control is not passed to ld.so.
:
: Anyhow I think the problem probably is that you have some exec() calls with
: incorrect arguments in your program.

Dereferencing a NULL function pointer can also cause these symtoms.
This could be easily caught by linking with -qmagic.

David
-- 
David Engel                        Optical Data Systems, Inc.
david@ods.com                      1101 E. Arapaho Road
(214) 234-6400                     Richardson, TX  75081

------------------------------

From: vince@coho.halcyon.com (Vince Skahan)
Subject: Re: can't make kernels at all above 1.23 (Slackware 1.1.1)
Date: 3 Aug 1994 04:04:07 GMT

vince@coho.halcyon.com (Vince Skahan) writes:

>I'm running Slackware 1.1.1 with upgraded shlibs (4.5.24),
>binutils (Jun-26-94) and flex (2.4.6) and have been unable to build
>a bootable kernel since 1.1.23.  Is there something that's undocumented

>(on booting)
>------------
>  INVALID BOOT DISKETTE
>Insert BOOT diskette in A:
>Press any key when ready


Just to give a followup, upgrading to 1.1.38 magically fixed things.
It appears to work fine so far with CSLIP running....


--
   ------------------- Vince Skahan ------ vince@halcyon.com ----------------
   I need facts even if they have to be fabricated.  You know you're gonna 
   find something wrong down there because if you don't you're going back.
                                      - former supervisor at Sunoco (1983)

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Development-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux.development) via:

    Internet: Linux-Development@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    sunsite.unc.edu				pub/Linux

End of Linux-Development Digest
******************************
