Subject: Linux-Development Digest #910
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:     Tue, 12 Jul 94 18:13:07 EDT

Linux-Development Digest #910, Volume #1         Tue, 12 Jul 94 18:13:07 EDT

Contents:
  Re: Xfree86 3.0? estimated release? (Dirk Hohndel)
  Re: syscall() problem, actual program... (Gautam Thaker)
  aha1542cf only good at 8MHz CPU ?? (Karsten Steffens)
  Is XFree86 3.X from X11R6 ? (javet@didec30.epfl.ch)
  Re: Programming in Linux (Alan Cox)
  Adaptec 7700 ? (Roth Mark Daniel)
  Who has Calcomp for X11 ?
  Re: NCR-Driver Bug with Fdisk (E.C. Loyd)
  Serial problem solved (CTS/RTS) (Tomi Leppikangas)
  Re: Convert sun ioctl to Linux (Charles Lopes)
  Re: Linux Performance Enhance ? ("John E. Davis")
  Re: Energy Star Screen Saver for X? Monitor Shutdown codes? (Tim Smith)
  Re: Linux (1.1.24) hangs in cdrom access. (Nick Andrew)
  Ethernet conflict? (David La Croix)
  Linux 1.0 network code not robust (Phil Howard)
  Linux CDROM (Mick J Hellstrom)
  Re: BUG ? read/write on shared memory in 1.1.2x (Linus Torvalds)

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

From: hohndel@aib.com (Dirk Hohndel)
Subject: Re: Xfree86 3.0? estimated release?
Date: Tue, 12 Jul 1994 11:59:50 GMT

CREEP (n9410493@animal.cc.wwu.edu) wrote:
: i was wondering anyone had an approximate release date for XFree86 3.X, i 
: am planning to install X soon, and if the wait is short i'd rather just 
: install 3.X rather than go through the upgrade mess.

We have no release schedule yet, so if someone sends you a date, you
better be careful...

        Dirk

-- 
Dirk H. Hohndel <hohndel@aib.com>                 Phone: (703) 430-9247  
AIB Software Corporation                          Fax:   (703) 450-4560 
46030 Manekin Plaza, Suite 160, Dulles, VA 20166

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

From: gthaker@polyphony.sw.stratus.com (Gautam Thaker)
Subject: Re: syscall() problem, actual program...
Date: 12 Jul 1994 14:06:49 GMT

In article <2vr72t$miu@smurf.noris.de> urlichs@smurf.noris.de (Matthias Urlichs) writes:

   In comp.os.linux.development, article <GTHAKER.94Jul8102440@polyphony.sw.stratus.com>,
   > 
   > (note: this pgm fails on linux kernel 1.1.13 (and on 0.99pl15f).
   > 
   > int foo(int domain, int type, int protocol) {
   > /* under SUNOS SYS_SOCKET is SYS_socket. */
   >   return syscall(SYS_SOCKET, domain, type, protocol);
   > }
   > 
   Under Linux, you have to go through the sys_socketcall dispatcher for
   network calls.
   SYS_SOCKET is a subcode of this dispatcher. It's defined to 1, which
   incidentally is the syscall number of exit(), which is the reason why
   your program terminates. ;-)

   Why don't you use the library code? socket() is there, you know...

   Or get the library sources and look how it's done there if you think you
   absolutely have to do it yourself. (Hint: you don't.)


   Matthias Urlichs        \ XLink-POP N|rnberg  | EMail: urlichs@smurf.noris.de

Yes, I figured this out after posting. It seems like there is no easy
way to get to socket() system call without calling socket() itself.
In Cornell's Horus system (ftp.cs.cornell.edu under pub/horus or
pub/isis/horus) they define AF_HORUS that gives sockets process group
semantics. (one gets process groups, causal and atomic message
ordering properties and all types of neat stuff....)  To achieve this
they have their own socket() call. Anything not AF_HORUS they redirect
to syscall(SYS_socket..). Well this does not work under Linux. Easy to
work around if such calls are limited.  BUt horus uses syscall() for
all types of socket and networking calls. It is not easy to change
all these hundreds of calls.

Sigh. Todate I have never had trouble porting any application to Linux.



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

From: steffens@qgp.uni-muenster.de (Karsten Steffens)
Crossposted-To: comp.os.linux.help,comp.periphs.scsi
Subject: aha1542cf only good at 8MHz CPU ??
Date: 12 Jul 1994 07:14:08 GMT

Hello,
        with my newly acquired adaptec aha1542cf I encounter a very strange
problem, which occurs both in my 486/33 VLB and my 386SX/25 ISA in the same
way. It also happens with kernel 1.0.9 and 1.1.27:

- when the CPU is set to HIGH speed in any of the machines (33MHz/25MHz)
  the adaptec fails to initialize saying something like:

        "interrupt received, but no mail", then it tries to reset scsi target 
         0, i.e., the controller.

         some seconds pause

         then I get a kernel panic saying: "Unable to find free mailbox for
        AHA1542.", and the machine is stuck. No devices are detected.

- when the CPU is running at LOW speed, i.e, 8MHz on both machines,
  the adaptec initializes fine, detects the scsi-tape-drive and is fully
  operational and functional.

So my idea is that the problem is concerned to bus speed. BUT: I run both
machines at conservative values, i.e., 8MHz bus clock, and the DMA also
is at 3.96MHz and 4.12MHz respectively (those are the values from amisetup).

Conclusion (?): the adaptec is somehow being overrun during initialization
phase. In special, in self-test mode it is working okay in both machines
even at high clock: it can correctly talk to the connected device then. But
not with linux. 

As I'm not very experienced in kernel and scsi-driver-hacking, I desperately
need a hint (or even better a patch ;-), what gives the adaptec more time
to initialize when the machine is running fast. It looks as if it does not
react fast enough after an interrupt occurs (...interrupt received, no mail...)
I tried to read and modify aha1542.c, but no luck yet.

BTW, the SCSI-HOWTO mentions the "no mail" problem; but it looks as if my
"no mail" problem is somehow different - I tried several different cables,
the presence and settings of the adaptec's bios has no influence. Only running
at low CPU speed helps. For the moment (tape only) I can stand the problem,
I have to reboot the machine at low speed for backups. But as I plan to
connect a HD some day in near future, I would be lost with the current problem.

Thanks a lot in advance,
        and best regards
                Karsten

        


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

From: javet@didec30.epfl.ch
Subject: Is XFree86 3.X from X11R6 ?
Date: 12 Jul 1994 14:04:00 GMT

 Hello,


 Could someone tell me what's in XFree86 3.X ? Is the X11R6 version or what ?
 If not, what's new ?

 Thanks to answer.

=======================================================
--                                                   --
--  Chris ...         (email: javet@di.epfl.ch)      --
--                                                   --
=======================================================


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

From: iialan@iifeak (Alan Cox)
Subject: Re: Programming in Linux
Date: Tue, 12 Jul 1994 12:42:05 GMT

In article <2vpsvj$g83@sun.cais.com> bass@cais.cais.com (Tim Bass (Network Systems Engineer)) writes:
>I have the exact same problem with Stevens code.  All of his books and code
>are very difficult to compile because the lib and header file are simply not
>there on my Linux box.  This is true for all Steven's book.  When I look

The Linux BSD networking support covers all the common stuff, and most of
the semi-obscure stuff barring FASYNC, sendmsg() and Unix domain datagram
sockets.

>This questions asked on this newgroup my me a few weeks ago and I got some nice
>responses, but none answered this question on porting Steven's BSD code.  Then
>I read the Oreilly book on POSIX and there was nothing on BSD networking system
>calls.  Maybe all the linux developers that read this list have not had the
>chance to port the BSD networking code of R. Steven's to linux.  

Steven's uses a lot of Streams code rather than BSD networking in some
examples (those using stropts.h etc). Linux doesn't currently have streams 
support.

Alan
-- 
Alan Cox: gw4pts@gw4pts.ampr.org      \\  //          GW4PTS@GB7SWN
=======================================\\//===================================
<<<<<<     Toolkits are for WIMPS :::: //\\Lib :::: the only way to fly >>>>>>
======================================//==\\==================================

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

From: roth@ux4.cso.uiuc.edu (Roth Mark Daniel)
Subject: Adaptec 7700 ?
Date: 12 Jul 1994 05:12:41 GMT

I need to install Linux on a computer which claims on bootup to have
an Adaptec 7700 SCSI controller.  I have never heard of this card.  Is
it supported?  If not, does it have a 1542-compatible mode so that
Linux can use it like a 1542?  (I know the 1740 has this feature...)
Any help appreciated.

-- 
   Mark D. Roth <roth@uiuc.edu>     | "Why's the network being so slow?"
GCS d-- p c++ l++ u+ e+(*) m+ s++/- | "Maybe someone sneezed on a router."
  n+(---) h f+ g+ w++@ t++@ r- y?   |             - Mike Blumenthal
  <a href="http://www.cen.uiuc.edu/~mr4342/mark.html">My Home Page</a>

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

From: tom@linux1.erib.uni-hannover.de ()
Subject: Who has Calcomp for X11 ?
Date: Tue, 12 Jul 1994 13:47:01 GMT

hello,

i have a lot of old but good Calcomp-based software and i want to use it
under Linux / X11.
So, who knows, where i can get calcomp - plotsoftware for X11 ?


--
      Thomas Blase                               Universitaet Hannover
     Institut fuer Stroemungsmechanik und       ____/    ____/   ____/  ____/
    Elektronisches Rechnen  im  Bauwesen       /        /   _/    /    /   _/
   Appelstrasse 9 A                          ___/     ____/     /    ____/
  D-30167 Hannover                          /        / \      /     /   _/
 phone   +49-511-762-4291   fax -3710     ____/  __/  __\  ____/  ____/
tom@linux1.erib.uni-hannover.de          and thank you for the fish !


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

From: ecldco@ultb.isc.rit.edu (E.C. Loyd)
Subject: Re: NCR-Driver Bug with Fdisk
Date: Tue, 12 Jul 1994 12:19:28 GMT

In article <1994Jul6.145937.8876@newsserver.rrzn.uni-hannover.de> te@informatik.uni-hannover.de (Thomas Esser) writes:
>E.C. Loyd (ecldco@ultb.isc.rit.edu) wrote:
>: In article <1994Jun30.171838.360@wagner.muc.de> richard@wagner.muc.de (Richard Schmid) writes:
>
>: Richard:  You're not reading.  :-)  You must specify the cylinders,
>: sectors per track, and number of heads with fdisk using the x-pert
>: command menu.  On my Seagate, I have 16 heads, 63 sectors per track,
>: and 1023 cylinders.  After specifying this, fdisk works just fine.
>
>Or you get release 3 of the driver ;-)
>

At the time, there was no version 3.  :)

-- 
Eric C. Loyd                        "I've got a [Roland U-110 preset 2] to prop
Operations Coordinator II           up my mortal remains."
ISC/Data Center Operations                                      -Pink Floyd
Rochester Institute of Technology   Phone:  (716) 475-7320

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

From: tomilepp@rieska.oulu.fi (Tomi Leppikangas)
Subject: Serial problem solved (CTS/RTS)
Date: 12 Jul 1994 13:55:16 GMT

I have problems with my serial printer on /dev/ttyS1 using hardware
(cts/rts) handshaking.
It loses data at end of each print, i found that there is line
in serial.c that disables CTS/RTS when device is closed ?

Is it right to be there ?

Is it enought that there is timeout for closing, why disable CTS/RTS ?

When i commented that line out, printer works fine, mouse also, i dont
have other serial devises.

in serial.c:
in static void rs_close():
. 
. 
. 
        info->flags |= ASYNC_CLOSING; 
/*      info->flags &= ~ASYNC_CTS_FLOW; */
        ^-- This commented out
. 
. 
. 
 
--
##  tomilepp@phoenix.oulu.fi  ##  Tomi Leppikangas  ##


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

From: tjarls@petrel.infm.ulst.ac.uk (Charles Lopes)
Subject: Re: Convert sun ioctl to Linux
Date: 12 Jul 1994 15:08:52 GMT

In article <773971134snz@mquinn.demon.co.uk>, John@mquinn.demon.co.uk (John Michael Plunkett Quinn) writes:
|> I am converting a program that runs under Xwindows on sun to Xwindows on 
|> Linux.  The original program uses the call ioctl (0, TIOCGETP, &oldsg) to 
|> fill in the structure oldsg which is defined in /usr/include/bsd/sgtty.h by 
|> typedef struct {...} sgtty; The call should enable the user's values for
|> erase and kill fields to be obtained and stored for later use.
|> The ioctl call returns -1 which I presume means failure.  In the original
|> version on the sun the program would abort in that situation.
|> If I comment out the test for < 0 the program works but the behaviour
|> associated with those two inputs is incorrect.
|> Can anyone suggest why the call is failing and what should it be replaced
|> by for Linux..
|> TIA Michael.
|> -- 
|> J Michael P Quinn
I don't know why it's failing but if I were you I'd have this program use
termios instead of sgtty. Then use tcgetattr() and tcsetattr() to respectively
get and set the terminal properties. The value of erase and kill values are 
stored respectively in c_cc[VERASE] and c_cc[VKILL] fields of a termios stucture.

        Regards,
                Charles

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

From: davis@pacific.mps.ohio-state.edu ("John E. Davis")
Subject: Re: Linux Performance Enhance ?
Reply-To: davis@amy.tch.harvard.edu (John E. Davis)
Date: Tue, 12 Jul 1994 18:46:08 GMT

In article <2vtcrs$78d@smurf.noris.de> urlichs@smurf.noris.de (Matthias
Urlichs) writes: 
  > > At least this does the same as your code without those ugly goto's.
  > > 
  > Not really...
  >
  > It's possible to restart the loop, of course, by setting "what" to zero at
  > the end, but the generated code is worse. I hate suboptimal code even more
  > than code with gotos. ;-)

It is true that the two pieces of code are different.  However, even setting
`what' to zero and re-executing the loop will fail since `what' has been
declared static.  Here is the original code.  My suggested replacement
follows.

>static int try_to_free_page(int priority)
>{
>    int i=5;
>    static int what = 0;
>                 
>    switch(what) {
>      case 0:
>        goto what_0;
>      case 1:
>        goto what_1;
>      case 2:
>        goto what_2;
>    }                                                         

>  what_0:                                               
>    if (priority != GFP_NOBUFFER && shrink_buffers(i)) {                        
>        what = 1;
>        return 1;
>    }                                                         
>  what_1:             
>    if (shm_swap(i)) {   
>        what = 2;
>        return 1;
>    }                     
>  what_2:             
>    if (swap_out(i)) {  
>        what = 0;
>        return 1;
>    }               
>    if(i-- > 0)       
>        goto what_0;    

>    return 0;                                                               
>}                                                                               


static int try_to_free_page(int priority)
{
   int i = 5;
   static int what = 0;
   register int auto_what;

   auto_what = what;
   
   while (1)
     {
        switch (auto_what)
         {
           case 0:
             if (priority != GFP_NOBUFFER && shrink_buffers(i)) {
               what = 1;
               return 1;
             }
             /* drop */
           case 1:
             if (shm_swap(i)) {   
               what = 2;
               return 1;
             }
             /* drop */
           case 2:
             if (swap_out(i)) {
               what = 0;
               return 1;
             }
          }
        if (i--) break;
        auto_what = 0;
     }
   return 0;
}

If you are worried about performance, I suggest that you replace the switch
with an `if' statement.  However, this might not be necessary with gcc since
there is an option for it to optimize a switch with jumps.
--
     _____________
#___/John E. Davis\_________________________________________________________
#
# internet: davis@amy.tch.harvard.edu
#   bitnet: davis@ohstpy
#   office: 617-735-6746
#

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

From: tzs@u.washington.edu (Tim Smith)
Crossposted-To: comp.os.linux.help
Subject: Re: Energy Star Screen Saver for X? Monitor Shutdown codes?
Date: 12 Jul 1994 07:01:23 GMT

MATTHEW CROCKER <crocker@opine> wrote:
>shutdown.)   Most of the energy star monitors just look for a blank screen 
>(ie completly black) for a duration then they will shut themselves down.

No, it's not a black screen that does it.  The monitor looks at the H and
V sync signals.  Removing those signals in various combinations tells the
monitor to go into various energy saving modes.  I think there is at least
one monitor that also looks for a black screen, but that's not standard.

By the way, it *may* be possible to get a monitor into energy saving mode
even if your graphics card doesn't support it.  For example, if I send
my Sony 17se1 a PAL signal, the 17se1 goes into energy saving mode.  It
thus seems that if one has a graphics card that supports PAL output,
one might be able to switch to PAL mode to turn on energy saving.  Before
doing this, one should check with someone who understands hardware to make
sure that sending a PAL signal to a non-PAL monitor is safe.

--Tim Smith

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

From: nick@kralizec.zeta.org.au (Nick Andrew)
Subject: Re: Linux (1.1.24) hangs in cdrom access.
Date: 13 Jul 1994 03:22:54 +1000

In <Cso93v.2tF@hkuxb.hku.hk> puifunle@hkuxb.hku.hk (Leung Danny Pui Fun) writes:

>Donald Jeff Dionne (jeff@ee.ryerson.ca) wrote:
>: :    kernel: SCSI host 0 abort() timed out - reseting
>I thought that's either a kernel problem or a motherboard problem since
>I'm using Opti...:-(

I don't think either is a problem. Your SCSI CD-ROM drive is responding
too slowly.

The constants concerned are found in sr.c and sr_ioctl.c and are passed as
one of the arguments (possibly the last or second-last) to scsi_do_cmd().

I use a CD-ROM changer unit so it takes considerable time sometimes to
move the platters around. This could happen on a mount request. If I have
2 or more CDs mounted at once, it could happen on a read.

I increased the relevant timeouts (at least doubled them) and the
annoying messages went away.

By the way, under 1.0.x (no timeout increase) a mount resulted in 1 or 2
instances of the error. Under 1.1.x, I got a whole screenful of them,
and the system died soon afterwards in one case (about 5 seconds later).
This might be a timing reset or race condition bug.

Nick.
-- 
Kralizec Dialup Unix (Public Access)    Data: +61-2-837-1183, 837-1868
Zeta Microcomputer Software             v.42bis v.32bis 14.4k 24 hours
P.O. Box 177, Riverstone NSW 2765       Plan: To beat Gnuchess 4.0 fairly!

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

From: dlacroix@guilder.bevd.blacksburg.va.us (David La Croix)
Subject: Ethernet conflict?
Date: 12 Jul 1994 15:01:33 GMT

I am the proud owner of 3 NE2000 clone ethernet cards from At-Lan-Tech

two of them are the NE2000 BNC/AUI cards with the UNC (something) chipset
and the other is a TP/BNC with the netset chipset (I think)

Because of my networking position... I want to use 2 ethernet cards
in the same computer...  
(before I bought the TP card)
I tried out the system with the 2 identical cards set up at 0x300 and 0x320
and IRQ 11,12 respectively... they seemed to work fine...

however, when I got the new card, it will hang on the ethernet probe
(initializing the cards) no matter what... the only mediocre medium I've
been able to find is that if I stick the first ethernet card at
0x300 and the TP card at 0x360 they will both function (IRQ doesn't affect
them as long as they each have a Unique IRQ)
BUT... I get a kernel panic if I try to print anything... this, I assume
is due to the printer port conflicting partially with the ethernet card's
address.

I have 2 questions:
Is the card defective? 
is there some combination that will work?  
(I don't think the memory location or any of that has anything to do with
this problem because it is supposed to be the memory location for the 
boot ROM)

Am I doing something wrong?

Will moving the printer port to LPT2 (I forget the address)
conflict with anything normal?

Do I have to do anything special to make the kernel recognize
the location of the printer port if it's non-standard?

--
dlacroix@guilder.bevd.blacksburg.va.us
dlacroix@vt.edu

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

From: phil@zeus.fasttax.com (Phil Howard)
Subject: Linux 1.0 network code not robust
Date: 12 Jul 1994 02:13:22 -0500

It's as if Linux drops connections when they get an "unreachable" packet.

If this is true, does anyone have a patch to fix it?

If not, can you suggest where in the kernel network code to fix it?
-- 
Phil Howard KA9WGN      | The drive spec says the capacity is 600mb unformatted
Unix/Internet/Sys Admin | and 525mb formatted.  So where do I find an unformat
CLR/Fast-Tax            | utility?
phil@fasttax.com        |

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

From: mick@jtec.com.au (Mick J Hellstrom)
Subject: Linux CDROM
Date: Mon, 11 Jul 1994 16:36:09


I was just wondering where I could get my hands on a Linux CDROM?

Mail to the below address if you have one for sale or know of someplace where 
I could get one as I don't read this news group often.

Thanks in advance.

Mick.

--
FROM:  Mick J Hellstrom  -  Email: mick@jtec.com.au
                Cruci dum spiro fido
+------------------------+------------------------+
|__________Work__________|__________Home__________|
| Ph: +61 2 390 0188     | Ph: +61 2 416 9073     |
| Jtec Pty Ltd           | Mick J Hellstrom       |
| 118-122 Bowden St.     | P.O. Box 235           |
| Meadowbank, NSW 2114   | Gordon, NSW 2072       |
| Australia              | Australia              |
+------------------------+------------------------+
DISCLAIMER:Any resemblance between the above views
and those of my employer, my terminal, or the view
out my window are purely coincidental.

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

From: torvalds@cc.Helsinki.FI (Linus Torvalds)
Subject: Re: BUG ? read/write on shared memory in 1.1.2x
Date: 13 Jul 1994 00:23:30 +0300

In article <2vpnrt$3fh@loki.muc.de>, Michael Lausch <mla@loki.muc.de> wrote:
>In article <1994Jul6.151903.13103@uk.ac.swan.pyr>,
>Alan Cox <iiitac@uk.ac.swan.pyr> wrote:
>>In article <2vdjb0$ju@loach.cichlid.com> aab@loach.cichlid.com (Andy Burgess) writes:
>>>In <2uu3cb$adk@urmel.informatik.rwth-aachen.de> bart@rog.rwth-aachen.de (Michael Bartmann) writes:
>>>Well I'm not on vacation and I'm having the same problem. I'm using the
>>>buffer program (comp.sources.misc/volume38) which double buffers using 
>>>shared memory (to keep your tape streaming). 
>>>
>>>Worked in 1.1.19, 1.1.24 gives:
>>>
>>>loach:aab % buffer
>>>buffer: failed to read input: Bad address
>>>buffer: failed to attach shared memory: Invalid argument
>>
>>1.1.20 + are buggy - they are ALPHA test kernels for a reason. I suspect once
>>Linus is back this will get fixed.
>>
>>Alan
>>
>Okay here is a quick and dirty patch to repair this. I posted it to
>the kernel channel, but my internet connection is currently rather
>unreliable. IMHO the shared memory should be included in the
>vm_area_struct list of a process. Why isn't it? Is there a reason i've
>missed? 

I just forgot about the shared mem stuff, but it should be ok now in
version 1.1.27.  The sysv shared memory is still a rather non-integrated
piece of work, so I just used the minimal vm_area_struct stuff there,
but I'll get around to fixing that properly some other time (or somebody
else will, which is even better :-)

                Linus

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


** 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
******************************
