Linux-Development-Sys Digest #829, Volume #7      Sun, 7 May 00 12:13:12 EDT

Contents:
  Re: Have new parallel port - but it's PCI!! (W R Carr)
  a real challange for driver developers?? ([EMAIL PROTECTED])
  Re: Uh... floppy disk not being seen? (Paul D. Smith)
  Does Linux support PCMCIA cards? ("Blade")
  Re: Need to find my IP address (Tobias Anderberg)
  Re: Uh... floppy disk not being seen? (Tobias Anderberg)
  Re: Need to find my IP address ("christos karayiannis")
  Access user space address from kernel space (liran)
  Re: Invalid /usr/include/asm symbolic link (nilesh patel)
  Re: Does Linux support PCMCIA cards? (Stuart Butterfield)
  Re: Does Linux support PCMCIA cards? (Villy Kruse)
  Re: a doubt about kernel and vm w.r.t device driver (nilesh patel)
  RS-485 (Tobias Anderberg)
  Re: Need to find my IP address (Mario Klebsch)
  Re: a doubt about kernel and vm w.r.t device driver (Mario Klebsch)
  Re: Need to find my IP address (Mario Klebsch)
  DiskOnChip support when compile kernel ("fung")
  Re: Need to find my IP address (brian moore)

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

From: W R Carr <[EMAIL PROTECTED]>
Subject: Re: Have new parallel port - but it's PCI!!
Date: Sun, 07 May 2000 00:53:20 -0500
Reply-To: [EMAIL PROTECTED]

On Sun, 07 May 2000 14:57:35 +1000, Chris Rankin
<au.zipworld.com@{no.spam}rankinc> wrote:

>J Bland wrote:
>> I have two parallel ports on my server, one being a PCI card. Adding the
>> following hardware parameter to lilo does the trick if the parport support
>> is compiled into the kernel (there's a similar thing that works in
>> modules.conf, have a look, it may be listed in there already):
>> 
>> parport=0x3bc,7 parport=0x9800,auto
>> 
>> These numbers were found by pretty much trying any of the standard parport
>> ones and the I/O info found from /proc/pci for the parallel port card.
>
>I have *finally* managed to get this port enabled, although it's taken
>several documents from the manufacturer and a lot of email from the
>parallel port developers. It seems that my PCI card uses a "multi-IO"
>chip which needs a *lot* of special configuring before it will work.
>However, now it can do ECP, EPP1.7, EPP1.9, PS2 and SPP - and all I
>wanted was somewhere to put my ZIP drive!
>
Are you talking about one of the SIIG CyberParallel cards? What
special instructions did you have to give the kernel? (Or parport
module?)

Thanks
Ray


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

From: [EMAIL PROTECTED]
Subject: a real challange for driver developers??
Date: Sun, 07 May 2000 06:34:06 GMT

hello friends,
             i am trying to write a new driver for intellimouse
connected to ps/2 mouse port in a pII machine. i would like to
map the wheel movements to up or down arrow keys at the driver level
itself. an authority in linux device drivers told me you have to access
the input queue of the
terminal driver using ioctl from the mouse driver and put the
characters whatever you
want there. i read terminal i/o chapter from Advanced Prog in UNIX
environment by richard stevens . i could not get how to write into
the input queue . also i think that ioctl can be called from user
space only(then only kernel can trace thru chrdev table and jump to
the ioctl of the device corresponding to the fd). pleease explain
how the terminal i/o takes place in linux is it similar to unix?

 any other logic for mapping the wheel movements to up or down arrow
keys at driver level itself is highly appreciated
  thanks in advance
please cc to :  [EMAIL PROTECTED]


Sent via Deja.com http://www.deja.com/
Before you buy.

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

From: [EMAIL PROTECTED] (Paul D. Smith)
Subject: Re: Uh... floppy disk not being seen?
Date: 07 May 2000 03:20:11 -0400
Reply-To: [EMAIL PROTECTED]

OK, that _really_ was dumb.  I rebooted into Windows and... Windows
couldn't see the floppy either!  Turns out when I installed a new HD a
month ago or so, I accidentally knocked out the power cable to the
floppy.  I could have sworn I'd used the floppy in Windows more
recently.  I guess not.  Sigh.

Of course, in the process of fooling with some Windows drivers I managed
to screw up my system royally.  Not only did Windows not boot, but Linux
wouldn't boot either!  It would get to checking the partitions on hda
(the Windows drive), then say "timeout waiting for DMA" and hang
forever.  I fooled around with the Windows IDE controller drivers (I
have _three_!  I had to disable one; Windows won't let me delete any of
them) then Windows was happy, but Linux still hung.

I had to go into the BIOS and explicitly disable UDMA on the primary
controller (both disks are on the primary controller)--it used to be
"auto"--to get Linux to boot again!  That can't be right; some damn
Windows driver must have futzed something in the controller or
something, but it works for the moment... :-/.

-- 
===============================================================================
 Paul D. Smith <[EMAIL PROTECTED]>         Network Management Development
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist
===============================================================================
   These are my opinions---Nortel Networks takes no responsibility for them.

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

From: "Blade" <[EMAIL PROTECTED]>
Subject: Does Linux support PCMCIA cards?
Date: Sun, 07 May 2000 07:31:10 GMT

    Hope someone can help me, I have recently installed Redhat Linux 6.2 on
my Sony notebook, and I want to have my network card up and running. I'm
using a LiveWire 10/100 Ethernet LAN card, but I can't find the drivers for
it and also don't know if there are drivers for my PCMCIA slots. If anyone
knows of a web site that has PCMCIA drivers or drivers for that particular
network card, please help thanks



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

From: [EMAIL PROTECTED] (Tobias Anderberg)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Need to find my IP address
Reply-To: [EMAIL PROTECTED]
Date: Sun, 7 May 2000 09:34:11 +0200

Chris <[EMAIL PROTECTED]> wrote:
>>      int fd;
>>      struct ifreq i;
>>      fd = socket(AF_INET, SOCK_DGRAM, 0);
>>      strncpy(i.ifr_name, "eth0", 5);
>>      ioctl(fd, SIOCGIFADDR, (int) &i);
>>      close(fd);
>>      return (char *)inet_ntoa(((struct sockaddr_in *)
>>              &i.ifr_addr)->sin_addr);
>
>Herein lies one of my biggest complaints about the Linux development
>environment: there should be no reason why an application programmer must
>rely on undocumented "catch-all" calls to accomplish simple tasks.  The

This is, of course, not the only way of doing it. And about beeing
undocumented, they are "documented" in the kernel source. If
you're not too lazy and have a little interest in learning, there
souldn't be any trouble looking at the source for information on
how accomplish certain tasks.

>"man ioctl_list" page is a complete waste of time-- it's hopelessly out of
>date and only contains the argument type for each command without any
>explaination of where, why or how each should be used.  Application

In an open source "environment" you just can't rely on somebody
else to do the all the work for you (well, sometimes you can). If
you find that somethings missing or needs to be fixed, then by all
means, fix it.

>programmers shouldn't have to resort to sifting through the kernel source
>code to figure out how to perform simple and common tasks.

Usually people don't wade through the kernel source for "simple
and common" tasks. Rather to see how a certain driver, part of
kernel and so on work, to gain deeper knowledge of the
operating system, they need to fix something, or out of plain
interest.

If I wanted to know how to fetch my IP, I certainly wouldn't look
in the kernel source for that (at least not at first). That's just
something I picked up during my general kernel "research" and I
found it to be a easy way of solving this particular problem.

>People who write device drivers or kernel modules should provide a proper
>man(2) or man(3) page.  Ideally, we should kill off the ioctl() function
>and place all accessible driver variables in /proc.

Killing of ioctl() would be a Bad Idea<TM>.

/tobias
-- 
"There's no trick to it, it's just a simple trick!"
                        - Goodman, The Simpsons

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

From: [EMAIL PROTECTED] (Tobias Anderberg)
Subject: Re: Uh... floppy disk not being seen?
Reply-To: [EMAIL PROTECTED]
Date: Sun, 7 May 2000 09:38:23 +0200

Paul D. Smith <[EMAIL PROTECTED]> wrote:
>  # mount -t msdos /dev/fd0 /mnt
>  mount: block device /dev/fd0 is write-protected, mounting read-only
>  mount: wrong fs type, bad option, bad superblock on /dev/fd0,
>         or too many mounted file systems

Are you sure it's a msdos filesystem on it? Have you tried with
vfat instead.

/tobias
-- 
"There's no trick to it, it's just a simple trick!"
                        - Goodman, The Simpsons

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

From: "christos karayiannis" <[EMAIL PROTECTED]>
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Need to find my IP address
Date: Sun, 7 May 2000 11:46:53 +0300

I used getsockname() as:
if (getsockname(sock, (struct sockaddr *) &host, &addrlen) < 0 ) {
    perror("getsockname");
    exit(1);
}

printf("My port is %d\n", ntohs(host.sin_port));
printf("My address is %s\n", inet_ntoa(host.sin_addr.s_addr));


where host was of type struct sockaddr_in and
addrlen  of type int.

                        Christos Karayiannis




Doug Schulz <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]...
> I have a sockets program an need to find the IP address of the machine
> the program is being run from so I can bind the socket to the correct
> address/port.  I have tried using gethostname coupled with gethostbyname
> and I can only get 127.0.0.1 (localhost address).  I want to find the
> actual IP address of the machine.  Is there a way of doing this.  Any
> help would be great.
>
> FYI this is a UDP app.
>
> Thanks,
>
> Doug
>



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

From: liran <[EMAIL PROTECTED]>
Subject: Access user space address from kernel space
Date: Sun, 07 May 2000 02:30:58 -0700

Hi,
I wonder is it possible to make user space buffer visible
to kernel space without considering which context am I
now.I know that "copy_to_user" and friends will work only
if I am in the same context which I got the address
from.
if it can be done where can I find example code for that.

Thanks Liran.


* Sent from AltaVista http://www.altavista.com Where you can also find related Web 
Pages, Images, Audios, Videos, News, and Shopping.  Smart is Beautiful

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

From: nilesh patel <[EMAIL PROTECTED]>
Subject: Re: Invalid /usr/include/asm symbolic link
Date: Sun, 07 May 2000 15:57:00 +0530

Duncan Higgins wrote:
create a link in ../src/linux/include/asm  of asm-i386 if your system is
i386.

> I've got RedHat 6.0 installed and am having a problem with the
> symbolic links to include directories. My /usr/include/linux points to
> ../src/linux/include/linux which is all fine and dandy. The problem is
> that my /usr/include/asm points to ../src/linux/include/asm which
> doesn't exist ! The directories in /usr/src/linux/include include
> asm-generic and asm-i386. Should I change the asm symbolic link to
> point to one of these directories to get my include directives to
> work, or do I need to install extra stuff ?

no.

Nilesh


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

From: [EMAIL PROTECTED] (Stuart Butterfield)
Subject: Re: Does Linux support PCMCIA cards?
Date: Sun, 7 May 2000 10:19:58 GMT

Everything you need and more at:

        http://pcmcia.sourceforge.org/

--
Dr Stuart Butterfield                   T: +44 (0)1293 815581
Research Scientist                      F: +44 (0)1293 815500
Interactive Systems Group
Philips Research Labs, UK               E: [EMAIL PROTECTED]


Blade ([EMAIL PROTECTED]) wrote:
:     Hope someone can help me, I have recently installed Redhat Linux 6.2 on
: my Sony notebook, and I want to have my network card up and running. I'm
: using a LiveWire 10/100 Ethernet LAN card, but I can't find the drivers for
: it and also don't know if there are drivers for my PCMCIA slots. If anyone
: knows of a web site that has PCMCIA drivers or drivers for that particular
: network card, please help thanks



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

From: [EMAIL PROTECTED] (Villy Kruse)
Subject: Re: Does Linux support PCMCIA cards?
Date: 7 May 2000 10:47:52 GMT

On Sun, 07 May 2000 07:31:10 GMT, Blade <[EMAIL PROTECTED]> wrote:
>    Hope someone can help me, I have recently installed Redhat Linux 6.2 on
>my Sony notebook, and I want to have my network card up and running. I'm
>using a LiveWire 10/100 Ethernet LAN card, but I can't find the drivers for
>it and also don't know if there are drivers for my PCMCIA slots. If anyone
>knows of a web site that has PCMCIA drivers or drivers for that particular
>network card, please help thanks
>
>


Redhat (and probably most other distributions as well) include the pcmcia
package.

Some PC cards may not be supported, though.


Villy

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

From: nilesh patel <[EMAIL PROTECTED]>
Subject: Re: a doubt about kernel and vm w.r.t device driver
Date: Sun, 07 May 2000 17:08:25 +0530

[EMAIL PROTECTED] wrote:

> respected sir(s),
>                    i am trying to develop a new driver for intellimouse
> under
> linux(caldera ,kde,kernel ver 2.2.5). i read from the online manual
> 'the linux kernel' that kernel does not run from virtual memory,it runs
> from real memory i.e no address tranlation takes place. i have two
> problems
>  (1). i could not get proper intellimouse protocol specification with a
> brief
>         explanation.
>   (2). i would like to map the wheel movements to up or down arrow keys
>          so i need to access the keyboard buffer (a 32 byte memory area
>          starting around 0x410 or near).i tried this in the
> initialisation part
>          of a kernel module, char *p=(char *)0x412. and when i
>          dereference it i get segmentation fault (i tried this because
> kernel
>           runs in real memory). how can i fix this.

What is real memory ?

All the address derefernce has to pass thru the page tables whether kernel
or user. If you want to access 0x410 location you need to do
char *p = ioremap (0x410,32);
Now what ever you write to the location p will be written to 0x410.
The ioremap writes the range of address from 0x410 of size 32 in the page
table and returns you the start of the address.

so when you access p it will access 0x410
                                    p+1                    0x411 .....
Nilesh

>
>           any other logic for achieving the mapping of wheel with up or
>           down arrow keys at the driver level is highly appriciated.
>
> i think the keyboard buffer lies in BIOS area of primary memory so it is
> os independent.
>  i use a PII machine.this mapping can easily be done in MS-DOS.
>    i need your help.pleeeeeeease.
> mailto:: [EMAIL PROTECTED]
>
> Sent via Deja.com http://www.deja.com/
> Before you buy.


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

From: [EMAIL PROTECTED] (Tobias Anderberg)
Subject: RS-485
Reply-To: [EMAIL PROTECTED]
Date: Sun, 7 May 2000 15:37:50 +0200


I'm about to add support for rs-485 for a project I'm working on.
I don't want to make this a user-space driver, instead I would
like to add this directly to the existing serial driver, and make
it easy accesible with an ioctl(), like "ioctl(fd, RS485, &n);"
and then all communication with the serial device would be done
using rs-485 semantics.

I just wondering what you people has to say about this. What's the
reason that this isn't already in the driver? How would one
implement this in best possible manner? Basically, just flame me
with thoughts, comment, ideas and so on.

/tobias
-- 
"There's no trick to it, it's just a simple trick!"
                        - Goodman, The Simpsons

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Need to find my IP address
Date: Sun, 7 May 2000 14:48:15 +0200

[EMAIL PROTECTED] (Chris) writes:

>On Sat, 6 May 2000 17:51:38 +0200, [EMAIL PROTECTED] (Tobias Anderberg)
>wrote in comp.os.linux.development.apps:

>>      int fd;
>>      struct ifreq i;
>>      fd = socket(AF_INET, SOCK_DGRAM, 0);
>>      strncpy(i.ifr_name, "eth0", 5);
>>      ioctl(fd, SIOCGIFADDR, (int) &i);
>>      close(fd);
>>      return (char *)inet_ntoa(((struct sockaddr_in *)
>>              &i.ifr_addr)->sin_addr);

>Herein lies one of my biggest complaints about the Linux development
>environment: there should be no reason why an application programmer must
>rely on undocumented "catch-all" calls to accomplish simple tasks.

The SIOCGIFADDR seems to be prety standard anyway. You are right, it
is one of those not so well known features, that separate gurus from
wannabegurus. But in this code, there is a different IMHO major design
problem, that is commonly ignored: Where the hell does the
applikations get the NAME of the primary netword interface? In this
case, it is hardcoded, whoch is hardly portable.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Subject: Re: a doubt about kernel and vm w.r.t device driver
Date: Sun, 7 May 2000 15:04:30 +0200

[EMAIL PROTECTED] writes:

>  (2). i would like to map the wheel movements to up or down arrow keys
>         so i need to access the keyboard buffer (a 32 byte memory area
>         starting around 0x410 or near).i tried this in the initialisation part
>         of a kernel module, char *p=(char *)0x412. and when i
>         dereference it i get segmentation fault (i tried this because kernel
>          runs in real memory). how can i fix this.

Try to think about it. What Keyboard buffer is located at 0x412?

It is the keyboard buffer of the 16 bit BIOS of your PC.

Does Linux uses this old 16 bit stuff for anything else than booting?

No, Linux does have its own drivers for everything.

So, at which location can I find the buffer of linux's keyboard driver?

I don't know, but you have the source of everything in the linux
kernel, the keyboard driver should be there, too. If you are lucky,
there even is an interface for exactly this purpose, but I don't know
this. Looking at the source will tell you.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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

From: [EMAIL PROTECTED] (Mario Klebsch)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Need to find my IP address
Date: Sun, 7 May 2000 14:53:59 +0200

[EMAIL PROTECTED] (brian moore) writes:

>Yep, though for some applications, you need to know it (such as ftp and
>the god-awful PORT command it uses -- gads, that protocol needs
>replacing bad...  all in all it's just plain evil).

But that should not be that bad. I would use getsockname() on this
ocasion.

73, Mario
-- 
Mario Klebsch                                           [EMAIL PROTECTED]

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

From: "fung" <[EMAIL PROTECTED]>
Subject: DiskOnChip support when compile kernel
Date: Sun, 7 May 2000 23:10:54 +0800

hi,
i need the kernel to support DiskOnChip 2000 for M-systems, so i compile the
kernel.
but on then manual supplied by M-systems it say:

    Make sure that you mark the DiskOnChip as ��Y��es under ��Floppy,
IDE and other devices��.

but i can't find the option with ��Floppy, IDE and other devices��when using
"make menuconfig".

what is the problem?






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

From: [EMAIL PROTECTED] (brian moore)
Crossposted-To: comp.os.linux.development.apps,comp.os.linux,comp.os.linux.misc
Subject: Re: Need to find my IP address
Date: 7 May 2000 16:02:54 GMT

On Sun, 7 May 2000 14:48:15 +0200, 
 Mario Klebsch <[EMAIL PROTECTED]> wrote:
> [EMAIL PROTECTED] (Chris) writes:
> 
> >On Sat, 6 May 2000 17:51:38 +0200, [EMAIL PROTECTED] (Tobias Anderberg)
> >wrote in comp.os.linux.development.apps:
> 
> >>    int fd;
> >>    struct ifreq i;
> >>    fd = socket(AF_INET, SOCK_DGRAM, 0);
> >>    strncpy(i.ifr_name, "eth0", 5);
> >>    ioctl(fd, SIOCGIFADDR, (int) &i);
> >>    close(fd);
> >>    return (char *)inet_ntoa(((struct sockaddr_in *)
> >>            &i.ifr_addr)->sin_addr);
> 
> >Herein lies one of my biggest complaints about the Linux development
> >environment: there should be no reason why an application programmer must
> >rely on undocumented "catch-all" calls to accomplish simple tasks.
> 
> The SIOCGIFADDR seems to be prety standard anyway. You are right, it
> is one of those not so well known features, that separate gurus from
> wannabegurus. But in this code, there is a different IMHO major design
> problem, that is commonly ignored: Where the hell does the
> applikations get the NAME of the primary netword interface? In this
> case, it is hardcoded, whoch is hardly portable.

That's what SIOCGIFCONF is for.

See section 16.5 of Unix Network Programming by W. Richard Stevens.

Again, though, you will still have problems determining -which- IP
number is relevant.

For example, a relatively common setup is to have a machine with 2 NICs,
one going to a private network shared with something like a Network
Appliance NFS server.... it would be wrong to assume the address used on
that NIC is public, since it's probably in RFC1918 space.

-- 
Brian Moore                       | Of course vi is God's editor.
      Sysadmin, C/Perl Hacker     | If He used Emacs, He'd still be waiting
      Usenet Vandal               |  for it to load on the seventh day.
      Netscum, Bane of Elves.

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


** 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: [EMAIL PROTECTED]

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

    Internet: [EMAIL PROTECTED]

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

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

Reply via email to