Subject: devel-digest V2 #205
From: [email-masked] (devel-digest)
To: [email-masked]

devel-digest         Wednesday, June 23 1999         Volume 02 : Number 205

In this issue:

    Re: Bit length of double on ARM
    Re: eth1 usage troubles
    Re: eth1 usage troubles
    Re: Bit length of double on ARM
    Re: eth1 usage troubles

See the end of this digest for information about devel-digest.

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

Date: Tue, 22 Jun 1999 16:59:03 +0100
From: Philip Blundell <[email-masked]>
Subject: Re: Bit length of double on ARM

"Andrew E. Mileski" wrote:

> [email-masked] wrote:
> > > You are shifting a char, not a double.
> >
> > Okay, then this seems to imply that the compiler promotes the chars to
> > int
> > before shifting because this line compiles silently:
> >
> > msg48.msgtyp132 = rawmsg.message[2] | rawmsg.message[3]<<8 |
> > rawmsg.message[4]<<16 | rawmsg.message[5]<<24;
>
> Silent promotion to int is quite common.

Yes; ISO C mandates it in many circumstances.

> > If so, I suppose I could do (long long)foo to get 64-bit ints, but that
> > is a gcc-ism.
>
> True, but it works.  Could also use int64_t or off64_t or whatever
> the headers define (stdint.h sys/types.h ... )

Alternatively you could use something like

union {
    double d;
    struct {
        u_int32_t a,b;
    } i;
};

p.

- ---
This message processed by the Netwinder.Org news2mail gateway.

- --
This list is run automagically by Majordomo 1.94.4
Please send email questions to [email-masked]
To UNSUBSCRIBE: email [email-masked] with
"unsubscribe devel" as the body of your message.

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

Date: Tue, 22 Jun 1999 10:11:47 -0700
From: Tim Rowledge <[email-masked]>
Subject: Re: eth1 usage troubles

"Rod m. Stewart" <[email-masked]> wrote:

>What kernel are you running?  I've never been able to run a NetWinder at 
>100MB reliably with a 2.2 kernel (don't know about 2.0.X, I have enough
>trouble booting into it, the odd time I need to test the old Acorn with the
>current one... :-) )
Both machines are dm12, freshly reloaded.

>The current consensus seems to be that there is a buffer overflow in 
>the Tulip driver that only shows up under a high load (ie. 100 MB).
>I've heard it might work at 100MB on a cross over cable, but I've not
>tried it.
>
>Probably not what you wanted to hear, but it is all I have a present..
Oh dear :-( What _really_ confuses me is the way that two out of three NWs we
have are ok and the other isn't. 

So are there any good diagnostics that might help?  Any way to remove the
'tulip_upgd' effects - since the working one didn't seem to need it?
tim

- ---
This message processed by the Netwinder.Org news2mail gateway.

- --
This list is run automagically by Majordomo 1.94.4
Please send email questions to [email-masked]
To UNSUBSCRIBE: email [email-masked] with
"unsubscribe devel" as the body of your message.

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

Date: Tue, 22 Jun 1999 14:19:44 -0400
From: Ralph Siemsen <[email-masked]>
Subject: Re: eth1 usage troubles

Tim Rowledge wrote:

> So are there any good diagnostics that might help?  Any way to remove the
> 'tulip_upgd' effects - since the working one didn't seem to need it?
> tim

Having done the "upgrade" will not affect the operation of the older
driver at all (I've checked several machines).  Maybe the machine you
think was not upgraded in fact had the upgrade performed at the
factory?  

>From the sounds of it you may have a defective tulip chip / daughtercard
on one machine.  One way to confirm this would be to open them up and
exchange the daughter cards (making sure that both are of the same
"vintage", ie. the don't mix Rev3 with Rev4 daughtercards) (note that
the daughtercard has its own revision number that is currently one less
than the board rev).

- -- 
Ralph Siemsen -- [email-masked]

- ---
This message processed by the Netwinder.Org news2mail gateway.

- --
This list is run automagically by Majordomo 1.94.4
Please send email questions to [email-masked]
To UNSUBSCRIBE: email [email-masked] with
"unsubscribe devel" as the body of your message.

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

Date: Tue, 22 Jun 1999 14:48:51 -0400
From: "\"Eric \\\"The Borg\\\" LaForest\"" <[email-masked]>
Subject: Re: Bit length of double on ARM

Philip Blundell wrote:
> 
> "Andrew E. Mileski" wrote:
> 
> > [email-masked] wrote:
> > > > You are shifting a char, not a double.
> > >
> > > Okay, then this seems to imply that the compiler promotes the chars to
> > > int
> > > before shifting because this line compiles silently:
> > >
> > > msg48.msgtyp132 = rawmsg.message[2] | rawmsg.message[3]<<8 |
> > > rawmsg.message[4]<<16 | rawmsg.message[5]<<24;
> >
> > Silent promotion to int is quite common.
> 
> Yes; ISO C mandates it in many circumstances.
> 
> > > If so, I suppose I could do (long long)foo to get 64-bit ints, but that
> > > is a gcc-ism.
> >
> > True, but it works.  Could also use int64_t or off64_t or whatever
> > the headers define (stdint.h sys/types.h ... )
> 
> Alternatively you could use something like
> 
> union {
>     double d;
>     struct {
>         u_int32_t a,b;
>     } i;
> };
> 
> p.

Ahh....thus bypassing the obscure rule (I presume) which makes double
foo = foo<<32
illegal.  (The compiler doesn't like it.)
(Eric needs a C language lawyer book to cover these bit-level oddities.)
 
- -- 
"We're only in it for the volume."
            -- Black Sabbath

- ---
This message processed by the Netwinder.Org news2mail gateway.

- --
This list is run automagically by Majordomo 1.94.4
Please send email questions to [email-masked]
To UNSUBSCRIBE: email [email-masked] with
"unsubscribe devel" as the body of your message.

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

Date: Tue, 22 Jun 1999 14:09:52 -0700
From: Tim Rowledge <[email-masked]>
Subject: Re: eth1 usage troubles

Ralph Siemsen <[email-masked]> wrote:
>Having done the "upgrade" will not affect the operation of the older
>driver at all (I've checked several machines).  Maybe the machine you
>think was not upgraded in fact had the upgrade performed at the
>factory?  
Hmm, that sounds more like something you would be able to answer - both
machines were purchased at the same time and came as dm12 boxes.  I hope that
means they were functionally identical!

>
>From the sounds of it you may have a defective tulip chip / daughtercard
>on one machine.  One way to confirm this would be to open them up and
>exchange the daughter cards (making sure that both are of the same
>"vintage", ie. the don't mix Rev3 with Rev4 daughtercards) (note that
>the daughtercard has its own revision number that is currently one less
>than the board rev).

Eeek, well OK I'll try swapping the daughterboards sometime soon. If they blow
up I'll quote you as the authority for opening them  up :-)
Wish me luck...

- ---
This message processed by the Netwinder.Org news2mail gateway.

- --
This list is run automagically by Majordomo 1.94.4
Please send email questions to [email-masked]
To UNSUBSCRIBE: email [email-masked] with
"unsubscribe devel" as the body of your message.

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

End of devel-digest V2 #205
***************************

--
This list is run automagically by Majordomo 1.94.4
Please send email questions to [email-masked]
To UNSUBSCRIBE: email [email-masked] with
"unsubscribe devel-digest" as the body of your message.