DEPCA ethernet driver multicast bug

DEPCA ethernet driver multicast bug

Post by Shankar Unn » Fri, 03 Oct 1997 04:00:00




>  while(dev->tbusy); /* Stop ring access */
>  while(lp->tx_old != lp->tx_new); /* Wait for the ring to empty */
> One way of fixing this, I guess, would be to declare tbusy, tx_old and
> tx_new as "volatile". This would force a new memory access every time
> the variables were used. However, an alternative which affects only
> this file is to fill the loop with at least one instruction which the
> compiler thinks can affect the memory: this prevents the unwanted
> optimization.  My choice was to use the macro mb() (defined in
> "asm/system.h"):

> #define mb() __asm__ __volatile__ ("" : : :"memory")

Err, very bad idea. This is a bug just waiting to reappear (esp. if and
when gcc's optimizer decides to look at the contents of the "assembly"
and notices it's empty).

Anyway, it's not tbusy, etc., which you would declare volatile (fields
cannot be declared volatile).  It's whatever dev and lp point to that
are volatile.

If what dev points to really can change behind the driver's back, it
*SHOULD* be declared volatile:

  volatile something *dev;

You can also limit your change to just that loop, if you wish (limits
the change, though it's stylistically indefensible):

  while (((volatile something *)dev)->tbusy)
        ;
  while (((volatile somethingelse *)lp)->tx_old !=
         ((volatile somethingelse *)lp)->tx_new)
        ; /* Wait for the ring to empty */

Remember, volatile is your *friend*. Use it wisely, and you'll be
rewarded.

--
Shankar Unni                       Powertel Global, Inc.


 
 
 

1. Q: DEPCA Ethernet driver, config help needed

After reading all the FAQ's that I could and all the linux dist. info
I could get  my hands on, I'm at a loss for what to do now.  Any help
with the followingis much  appreciated - Did you  know this was 'help
a newbie Linux Admin' week?-)

System: DECpc LPv 433dx  (486 DX 33MHz box)
        515MB IDE drive
        Bus mouse
        VGA/SVGA video
Ethernet: DEC DE205 thinwire.

OS:     Linux v1.20 (or so it said when I ran setup)
        Installed from a CD that came with the book, "Internet CD", by
        Vivian Neou.
Packs:  A,AP,N,D        (Want to instal rest via network)

Okay, the problem is that I  can't figure out how to add an ethernet device
(namely eth0) to the system.  I've seen iflink and ifsetup, but they require
a file in /dev such as wd*, etc.  There are no such files in my install'n.

I cd'd to /usr/src/linux and rebuilt the kernel including a 'make config'  in
which  I specified the DEPCA driver support.  When that was done; however,
all I had was a kernel and a net.a in drivers/net.

How do I  turn this net.a &/or kernel into a usable driver??

I appreciate any help that people can offer.  Please CC: my email address
when posting any  replies, thanks.

Merry Christmas,
Jason.


--
+---------------+-------------------------------------------------------+

| System Management - The art of keeping people happy.                  |
+-----------------------------------------------------------------------+

2. Curses problems with kterm

3. Does DEPCA ethernet driver exist?

4. Useful information about networks

5. enable ethernet multicast inside my TLI driver

6. "SMBFS: need mount version 6" error

7. Which Ethernet drivers support multicast, or would ep0 do it?

8. Dosemu - problems

9. DEPCA ethernet card still supported??

10. DEC depca ethernet card recognized by Linux?

11. depca ethernet drv for pl11

12. Linux and DEPCA ethernet card

13. how to use DEPCA Ethernet card