Linux-Development-Sys Digest #403, Volume #8     Wed, 10 Jan 01 05:13:10 EST

Contents:
  Re: Extending /proc filesystem on Solaris 7/8? (Philip Brown)
  Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel. (Dave)
  Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel. ("Gene Heskett")
  thread debuggin (Jen-Chieh Tang)
  Re: need help fixing a tcp kernel problem ("Peter T. Breuer")
  Re: thread debuggin (Ralf Edrich)
  Linux device driver (YAMAZAKI NINJA)
  about pci_find_device function ("ShawnTsao")
  Re: measure time since program-start in ms (Josef Moellers)
  Re: Looking for unique ID on a Intel system ... (ratz)
  Re: about pci_find_device function (Arne Driescher)
  compiling non-smp kernel on smp machine - wrong signature! (Michal Szymanski)
  Re: measure time since program-start in ms (Kasper Dupont)
  Re: Linux device driver (Kasper Dupont)
  Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel. (Michael V. 
Ferranti)

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

From: [EMAIL PROTECTED] (Philip Brown)
Crossposted-To: comp.unix.solaris
Subject: Re: Extending /proc filesystem on Solaris 7/8?
Reply-To: [EMAIL PROTECTED]
Date: Wed, 10 Jan 2001 02:47:26 GMT

On 08 Jan 2001 08:54:42 -0800, [EMAIL PROTECTED] wrote:
>[EMAIL PROTECTED] (Joerg Schilling) writes:
>> NO, /devices is definitely the wrong place. It is only for
>> dynamic nodes referring to drivers.
>
>Uhm, but the module I'm referring to above will be a driver on Solaris.
>Specifically, a char driver that just happens to use memory instead of any
>special hardware. There are plenty of precedents for that. Indeed, Sun's
>own TNF subsystem appears to work this way.
>
>I assume this would remove your objection to OpenTNF using /devices?

You misunderstand the purpose of /devices, I think.

/devices seems to be part of the regular root filesystem on solaris.
But it's not like /dev, with character special or block special devices.
Basically, it's a way to see how drivers are physically and logically 
interconnected.
And beyond that, each entry in the tree is supposed to give back special
properties.

The only way to cleanly use /devices under solaris, is to stop what you're
doing with the linux side of things. And here's a little essay on why
that's exactly what you should do;

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

In linux, there is this disgusting habit of "I dont have to write a 
real kernel API: i'll just make my driver dump ASCII text with a procfs dev".

This makes it simpler to hack out a quick driver for linux, in some ways.
But if you think about it, this is a very large enemy of portable coding.
To have a portable interface...  You actually have to 
*DEFINE* an interface.

"Look through the ASCII dump of /proc/blah" is NOT a very good interface 
definition.

It is far more portable if you standardize on a single /dev/yourdrv special
node, and write a user-level library to access information through it via
ioctls or something.

If you do that, then all you would have to do at the driver level in
solaris, would be

 ddi_create_minor_node(....)

and you would have a device node created in /devices/pseudo/yourdrv

Then with the appropriate entry in /etc/devlink.tab, the system would
automatically link
/dev/yourdrv  -> /devices/pseudo/yourdrv

and then presumably your user-level library would default to accessing
/dev/yourdrv



-- 
[Trim the no-bots from my address to reply to me by email!]
[ Do NOT email-CC me on posts. Pick one or the other.]
S.1618 http://thomas.loc.gov/cgi-bin/bdquery/z?d105:SN01618:@@@D
The word of the day is mispergitude

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

From: Dave <[EMAIL PROTECTED]>
Subject: Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel.
Date: Wed, 10 Jan 2001 03:30:09 -0000

Jerry Peters wrote:
>
>
> Dave <[EMAIL PROTECTED]> wrote:
> > Problem: Unable to connect to I.S.P. (LCP timeout sending config requests)
> > after kernel upgrade (2.2.13 to 2.4.0)
>
> > I'm running a SuSE 6.3 system with a 2.2.13 kernel, ppp 2.3.10, kppp
> > 1.6.23, Netscape-6 (bloatware) and Helix-Gnome. Dialing my isp (USR 5686-03
> > 56K serial on /dev/ttys1) everything is fine and happy and has been for
> > some time.
>
> > I installed a 2.4 kernel. Everything seems fine during boot; gdm starts no
> > problem, but ppp (still 2.3.10) dies when I try to dial the I.S.P. using
> > kppp. Following is the log:
>
> > --   pppd 2.3.10 started by root, uid0
> > --   using interface ppp0
> > --   connect ppp0 <--> /dev/ttys1
> > --   sent [LCP ConfReq id=0x1 <asyncmap 0x0><magic
07049e221><pcomp><accomp>
> > ... 30 seconds goes by ...
> > --  LCP: timeout sending Config-requests.
>
> > I can shut down and restart using the 2.2.13 kernel (on the same system;
> > two boot images), and dial up/use the ISP just fine (is how I posted this
> > message).
>
> > I Searched/GOOGLE-ed the net, lots of hits on LCP timeouts, no luck why
> > this happens going 2.2.13 --> 2.4.0, *or*, how to fix things.
>
> > Question is: anyone seen this and know how to fix it? I'd sure appreciate
> > the help.
>
> > Many thanks,
> > Dave G.
> > [EMAIL PROTECTED]
>
> > --
> > Posted via CNET Help.com
> > http://www.help.com/
>
> I'm using 2.4.0 with ppp 2.3.11 with no problems. I've been using
> 2.3.11 for quite a while under kernel 2.3.51, also with no problems.
> I suggest you upgrade.
>
> Jerry


Many thanks, Jerry; Working just fine now.

If I'd just rtfm-ed, there's tons of doc out there stating ppp 2.4.0b+ is
required. I pulled the latest (2.4.0) copy of ppp off Linuxcare's web site
and things are just fine. (according to their doc you should not be able to
run ppp 2.3.11 with a 2.4.0 kernel, so, go figure).

Thanks again -- Dave.

--
Posted via CNET Help.com
http://www.help.com/

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

Date: 9 Jan 2001 23:7:4 -0500
From: "Gene Heskett" <[EMAIL PROTECTED]>
Subject: Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel.

Gene Heskett sends Greetings to Dave ;

> Problem: Unable to connect to I.S.P. (LCP timeout sending config
> requests) after kernel upgrade (2.2.13 to 2.4.0)

> I'm running a SuSE 6.3 system with a 2.2.13 kernel, ppp 2.3.10, kppp
> 1.6.23, Netscape-6 (bloatware) and Helix-Gnome. Dialing my isp (USR
> 5686-03
> 56K serial on /dev/ttys1) everything is fine and happy and has been
> for some time.

> I installed a 2.4 kernel. Everything seems fine during boot; gdm
> starts no problem, but ppp (still 2.3.10) dies when I try to dial
> the I.S.P. using kppp. Following is the log:

> --   pppd 2.3.10 started by root, uid0
> --   using interface ppp0
> --   connect ppp0 <--> /dev/ttys1
> --   sent [LCP ConfReq id=0x1 <asyncmap 0x0><magic
> 07049e221><pcomp><accomp>
> ... 30 seconds goes by ...
> --  LCP: timeout sending Config-requests.

> I can shut down and restart using the 2.2.13 kernel (on the same
> system; two boot images), and dial up/use the ISP just fine (is how
> I posted this message).

> I Searched/GOOGLE-ed the net, lots of hits on LCP timeouts, no luck
> why this happens going 2.2.13 --> 2.4.0, *or*, how to fix things.

> Question is: anyone seen this and know how to fix it? I'd sure
> appreciate the help.

Well, there have been prolly 20 messages pointed at me with the same
problem.  They *all* say RTFM in the 2.4.0 tree.  Theres lot of info there
about how to setup a ppp dialin lashup, meaning to be able to dial into
your machine from elsewhere.  The man pages that *should* be in the rpm?
fugetaboudit, they haven't been touched in ages and are for the most
part irrevalent.

Unforch, there is an absolute minimum of info on what actually was
changed that effects your basic 'call your ISP' functions.  I've rebuilt
it from the tar.gz 2 or 3 times now, but when its installed and
rebooted, the error messages say its looking for chap-secrets in some
directory that doesn't exist on my system,
'/etc/networks/network-scripts' or some such.  And here I thought all
the ppp option files were in /etc/ppp.

I'd like to see a really valid explanation as to why the man pages
aren't being maintained, but in most cases only the html versions.
While they are pretty, they aren't worth the disk space on the vendors
server or mine if I first have to get x working, followed by a decent
browser just so information that *should* be in the man pages and
accessable from any cli can be viewed.

By damn I finally got it! kernel 2.4.0 and ppp-2.4.1 works!

I detest shouting as much as the rest but...

THE SECRET, AND NO PLACE IN THE DOCS THAT I'VE SPENT A FSCKING MONTH
RE-READING, DOES IT TELL YOU TO MOVE YOUR /etc/ppp/*-secrets FILES TO
/etc/sysconf/network-scripts/*-secrets!

Find a *large* block of soft stone, it only has to last till 2.4.0-ac5
probably, carve the above message in it, and throw it forcefully at the
next 10,000 people that ask this question.

Only the error messages contained in the debug log for ppp show that
missing file error.

Like I said, repeatedly, the man pages SUCK!

Cheers, Gene
-- 
  Gene Heskett, CET, UHK       |Amiga A2k Zeus040, Linux @ 600mhz 
        email gene underscore heskett at iolinc dot net
#Amiga based X10 home automation program EZHome, see at:#
# <http://www.thirdwave.net/~jimlucia/amigahomeauto> #
ISP's please take note: My spam control policy is explicit!
#Any Class C address# involved in spamming me is added to my killfile
never to be seen again.  Message will be automaticly deleted without dl.
This messages reply content, but not any previously quoted material,
is � 2000 by Gene Heskett, all rights reserved.
-- 


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

From: Jen-Chieh Tang <[EMAIL PROTECTED]>
Subject: thread debuggin
Date: Wed, 10 Jan 2001 06:02:27 +0000 (UTC)


  Hello ...

    I was wondering if someone had a good link to thread 
  debugging.  I'm trying gdb, but it's rather cumbersome,
  and the usual debugging techniques don't seem to work.
  Thanks.

  - Tom Tang

-- 

                                          Tom Tang  
                                          [EMAIL PROTECTED]
                                          

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

From: "Peter T. Breuer" <[EMAIL PROTECTED]>
Subject: Re: need help fixing a tcp kernel problem
Date: Wed, 10 Jan 2001 07:05:53 +0100

Eric Taylor <[EMAIL PROTECTED]> wrote:
> I can easily force an error using 2 perl scripts.
> I simply create a socket server in one script, a
> client in another, start sending, suspend the receiver
> and wait 4 minutes. The socket will get disconnected. It
> should not do this, it should send an ack with a window
> of 0, which it fails to do. Both the client and the
> server can be on the same system to easily see the error.

Please send your report to Alan Cox and other interested parties.

The kernel list is your obvious target.

Peter

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

From: Ralf Edrich <[EMAIL PROTECTED]>
Subject: Re: thread debuggin
Date: Wed, 10 Jan 2001 07:56:58 +0100

Hi,

did you try the combination kdevelop (www.kdevelop.org) / gdb 5.0
(www.gnu.org) ?

This is not as comfortable as the VC++ enviroment, but at least a
possibility.

Ralf

Jen-Chieh Tang wrote:

>   Hello ...
>
>     I was wondering if someone had a good link to thread
>   debugging.  I'm trying gdb, but it's rather cumbersome,
>   and the usual debugging techniques don't seem to work.
>   Thanks.
>
>   - Tom Tang
>
> --
>
>                                           Tom Tang
>                                           [EMAIL PROTECTED]
>


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

From: YAMAZAKI NINJA <[EMAIL PROTECTED]>
Subject: Linux device driver
Date: Wed, 10 Jan 2001 15:07:54 +0800
Reply-To: [EMAIL PROTECTED]

Hi ,

What kind of device driver that we can find in Linux . As far as I know,
we can divide it to 3 groups (character device,block device and network
device).Is it true ?

How do we classified these devices ? How about VGA card,sound card ? Are
they character device ?

Thank you .




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

From: "ShawnTsao" <[EMAIL PROTECTED]>
Subject: about pci_find_device function
Date: Wed, 10 Jan 2001 15:08:46 +0800

Hi,

i tried to find the hardware resource in module about irq, memory map...

But i have a problem in my program during compiling
Is it right that i use the pci_find_device() to get the info about my
hardware?


struct pci_dev *vdev;
. 
. 

vdev = pci_find_device ( VENDOR_ID, DEVICE_ID, NULL); <----- (warning:
assignment makes pointer from integer without a cast)
. 
. 
Irq = vdev->irq  <-----(error: dereferencing pointer to incomplete type)
. 
. 
. 


Thanks for your help

Shawn Tsao



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

From: Josef Moellers <[EMAIL PROTECTED]>
Subject: Re: measure time since program-start in ms
Date: Wed, 10 Jan 2001 08:46:28 +0100

Ralf Edrich wrote:
> =

> Hi,
> =

> is it possible to measure the time since program-start with precision o=
f
> 1 ms ?
> =

> All I've read about now deals with around 10 ms.

You can measure real time using gettimeofday. However, although the
precision is microseconds, the resolution depends on the hardware
available and may be 10 milliseconds only.

-- =

Josef M=F6llers (Pinguinpfleger bei FSC)
        If failure had no penalty success would not be a prize (T.  Pratchett)

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

From: ratz <[EMAIL PROTECTED]>
Subject: Re: Looking for unique ID on a Intel system ...
Date: Wed, 10 Jan 2001 08:47:53 +0100

Hi Chris,

> The IA32 reference manual (see
> http://developer.intel.com/design/pentium4/manuals/245471.htm)
> will tell you the answer to this and
> many other questions :)

Well, that one is already in my bookshelf but I just can't find
that much time to parse the important pages ;)
 
> In this case, op = 3 and the answer
> is in ecx (low dword) and edx (high
> dword).
> 
> Of course, you may well find that the
> CPUID is not enabled on your machine.

That's it :) Me, stupid enough tried it on a Celeron and then
on a PIII with cpuid disabled in the BIOS.
 
> Why not wait until the system is up
> then use the hardware address of the
> first ethernet card? Or, if the machines

Well, there are currently three design features that would
prevent it (I had it like this before):

1. The systems startup scripts and some other vital scripts
   are encrypted too.
2. I need to change the NICs from time to time
3. This are packetfilters and sometimes it is required to do
   a ifconfig eth0 down because they are high available, a
   cluster so to speak.

However I already think of a fundamental design change.

> are connected to a network, their IP
> addresses? Or simply create a file on

Forget about unique IP addresses (at least in my case)

> each machine, either containing a unique
> ID, or use some feature of the file
> (say, its creation time) as the ID?

Well I though about that too but then I need to hide it and
therefor I'd need to introduce some kind of MAC in our distro.
Well this is planned but I have limited resources.

Thank you for your troubles and suggestions,
Roberto Nibali, ratz

-- 
mailto: `echo [EMAIL PROTECTED] | sed 's/[NOSPAM]//g'`

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

From: Arne Driescher <[EMAIL PROTECTED]>
Subject: Re: about pci_find_device function
Date: Wed, 10 Jan 2001 09:17:57 +0100

Hi,

try to do it the right way from the beginning and _read_
what Alan Cox has tried to tell us.

http://www.linux-mag.com/2000-03/gear_01.html

And you certainly have studied the public docs
provided at
http://www.linuxhq.com/lkprogram.html


-Arne




ShawnTsao wrote:
> 
> Hi,
> 
> i tried to find the hardware resource in module about irq, memory map...
> 
> But i have a problem in my program during compiling
> Is it right that i use the pci_find_device() to get the info about my
> hardware?
> 
> struct pci_dev *vdev;
> .
> .
> 
> vdev = pci_find_device ( VENDOR_ID, DEVICE_ID, NULL); <----- (warning:
> assignment makes pointer from integer without a cast)
> .
> .
> Irq = vdev->irq  <-----(error: dereferencing pointer to incomplete type)
> .
> .
> .
> 
> Thanks for your help
> 
> Shawn Tsao

-- 
Dr.-Ing. Arne Driescher         [EMAIL PROTECTED]
Max-Planck-Institut f�r Dynamik komplexer technischer Systeme
Leipziger Str. 44
39120 Magdeburg
Tel: +49 391/6117 540
Fax: +49 391/6117 501

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

From: [EMAIL PROTECTED] (Michal Szymanski)
Subject: compiling non-smp kernel on smp machine - wrong signature!
Date: 10 Jan 2001 08:55:11 GMT

To speed up the build, I've compiled new kernel (2.2.16-3 from RedHat
sources RPM) for a single-CPU, old 486 PC, on a fast dual-CPU
machine. Needless to say, the CONFIG_SMP in the config file was
NOT set. After installing the kernel to the 486 PC, it booted up
without network, quite strangely. It seems that the reason is that
the kernel has a 'smp' signature, so the 'depmod' command looks
for /lib/modules/2.2.16-3smp directory while, of course, the modules
are installed in /lib/modules/2.2.16-3.

I wonder whether this is a bug, easy to patch, or it is always so
that non-smp kernel should be built on a non-smp machine.

any hints?

regards, Michal.

-- 
  Michal Szymanski ([EMAIL PROTECTED])
  Warsaw University Observatory, Warszawa, POLAND

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: measure time since program-start in ms
Date: Wed, 10 Jan 2001 09:18:47 +0000

Ralf Edrich wrote:
> 
> Hi,
> 
> is it possible to measure the time since program-start with precision of
> 1 ms ?
> 
> All I've read about now deals with around 10 ms.
> 
> tia,
> 
> Ralf

A pentium can give you time in clockcycles.
Otherwise you can modify the timer resultion
in the Linux source, but that might cause
problems with some programs.

-- 
Kasper Dupont

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

From: Kasper Dupont <[EMAIL PROTECTED]>
Subject: Re: Linux device driver
Date: Wed, 10 Jan 2001 09:42:41 +0000

YAMAZAKI NINJA wrote:
> 
> Hi ,
> 
> What kind of device driver that we can find in Linux . As far as I know,
> we can divide it to 3 groups (character device,block device and network
> device).Is it true ?
> 
> How do we classified these devices ? How about VGA card,sound card ? Are
> they character device ?
> 
> Thank you .

Character devices and block devices is the interface
used between the original unix kernels and userspace
programs. In later versions more interfaces have been
added. A driver in Linux can make as many interfaces
as it wants to.

In general if it is a disk or is suposed to work like
a disk it is a block device otherwise it is a character
device.

The linux Sound driver have a number of character
device interfaces to sound, midi, mixer, statistics
etc. Type: ls -l /dev/ | grep "^c.* 14, " to see a
list of them.

The VGA card is presented through a lot of different
character interfaces, virtual consoles, framebuffer
devices etc.

Userspace programs with root permitions can to some
degree access hardware directly, the X server does
that.

-- 
Kasper Dupont

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

From: Michael V. Ferranti <[EMAIL PROTECTED]>
Subject: Re: ppp 2.3.10 fails (LCP Timeout) after installing 2.4.0 kernel.
Date: Wed, 10 Jan 2001 09:47:27 +0000

And Dave <[EMAIL PROTECTED]> spoke thusly:

>Dialing my isp (USR 5686-03 56K serial on /dev/ttys1)

        I have the same model, on the same port, too.  Ugly little thing, ain't
it? <grins>  I had the same problem you're having, for far too long.  I
finally found the problem in my modem's NVRAM configuration.  The "&B"
setting was set to zero when it should be 1 or 2, so that the modem locks
speeds with the serial port.  Otherwise you get LCP timeouts, garbage on
the screen instead of text when you're trying to communicate with bulletin
boards, etc.

>--   connect ppp0 <--> /dev/ttys1
>--   sent [LCP ConfReq id=0x1 <asyncmap 0x0><magic 07049e221><pcomp><accomp>
>... 30 seconds goes by ...
>--  LCP: timeout sending Config-requests.

        Use minicom to access the modem and type in whatever reset string you
normally use, and then perform an "ATI4" to display the modem's current
settings.  Make sure &B1 is set (&B1 is the default setting, btw).  See
below, and please ignore my &N, &U, and S41-register settings which are not
default.  Normally, those are all set to zero.

>U.S. Robotics 56K FAX EXT Settings...
>
>   B0  E1  F1  M1  Q0  V1  X4  Y0
>   BAUD=57600  PARITY=N  WORDLEN=8
>   DIAL=TONE    ON HOOK   CID=0
>
>   &A3  &B1  &C1  &D2  &G0  &H1  &I0  &K1
>   &M4  &N39  &P0  &R2  &S0  &T5  &U29 &Y1  
>
>   S00=000  S01=000  S02=043  S03=013  S04=010  S05=008  S06=002
>   S07=060  S08=002  S09=006  S10=014  S11=070  S12=050  S13=000
>   S15=000  S16=000  S18=000  S19=000  S21=010  S22=017  S23=019
>   S25=005  S27=000  S28=008  S29=020  S30=000  S31=128  S32=002
>   S33=000  S34=000  S35=000  S36=014  S38=000  S39=000  S40=001
>   S41=001  S42=000

        Hope that gets you going...not sure what else it could be.

--               Michael V. Ferranti [blades&inreach*com]
Linux Counter Reg.ID# 177869    http://counter.li.org    GNUke The Planet!
Sign The Linux Driver Petition:   www.libralinux.com/petition.english.html

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


** 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 by posting to the
comp.os.linux.development.system newsgroup.

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