All of lore.kernel.org
 help / color / mirror / Atom feed
* Q: netdevice interface change
@ 2000-12-23 14:13 Manfred
  2000-12-23 15:05 ` Andrew Morton
  0 siblings, 1 reply; 2+ messages in thread
From: Manfred @ 2000-12-23 14:13 UTC (permalink / raw)
  To: Andrew Morton, linux-kernel

Hi Andrew,

I have 2 questions about your netdevice2.txt:
   http://www.uow.edu.au/~andrewm/linux/netdevice2.txt 

* is withdraw_netdevice() really required, can't unregister_netdev
check "hidden", and notify the protocols/hotplug based on that value?

* I don't like the backward compatibility section:

<<<<<<<<
Other things:

     #define HAVE_PUBLISH_NETDEV

          This is for 2.2-compatible drivers.  They can do this:

          #ifdef HAVE_PUBLISH_NETDEV
          #define init_etherdev prepare_etherdev
          #define publish_netdev(dev) do {} while (0)
          #define withdraw_netdev unregister_netdev
          #endif
>>>>>>>>

As far as I know Linus prefers backward compatibility the other way
around:

<<<<<<
A 2.4 driver that must remain compatible with 2.2 should use
the new interface and add these lines to their source file:

       #ifndef HAVE_PUBLISH_NETDEV
       #define prepare_etherdev init_etherdev
       #define publish_netdev(dev) do {} while (0)
       #define withdraw_netdev unregister_netdev
       #endif
>>>>>>

--
  Manfred
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Q: netdevice interface change
  2000-12-23 14:13 Q: netdevice interface change Manfred
@ 2000-12-23 15:05 ` Andrew Morton
  0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2000-12-23 15:05 UTC (permalink / raw)
  To: Manfred; +Cc: linux-kernel, netdev

Manfred wrote:
> 
> Hi Andrew,
> 
> I have 2 questions about your netdevice2.txt:
>    http://www.uow.edu.au/~andrewm/linux/netdevice2.txt
> 
> * is withdraw_netdevice() really required, can't unregister_netdev
> check "hidden", and notify the protocols/hotplug based on that value?

Yes, it's basically the same thing and yes, it could be done
this way.  The only difference is that withdraw_netdev()
will blurt out a warning if it is called on an unhidden device.
This is useful now, but less so later.   I guess it could be
#defined onto unregister_netdev later..


> * I don't like the backward compatibility section:
> 
> <<<<<<<<
> Other things:
> 
>      #define HAVE_PUBLISH_NETDEV
> 
>           This is for 2.2-compatible drivers.  They can do this:
> 
>           #ifdef HAVE_PUBLISH_NETDEV
>           #define init_etherdev prepare_etherdev
>           #define publish_netdev(dev) do {} while (0)
>           #define withdraw_netdev unregister_netdev
>           #endif
> >>>>>>>>
> 
> As far as I know Linus prefers backward compatibility the other way
> around:
> 
> <<<<<<
> A 2.4 driver that must remain compatible with 2.2 should use
> the new interface and add these lines to their source file:
> 
>        #ifndef HAVE_PUBLISH_NETDEV
>        #define prepare_etherdev init_etherdev
>        #define publish_netdev(dev) do {} while (0)
>        #define withdraw_netdev unregister_netdev
>        #endif
> >>>>>>

You are correct, and that is in fact how I did it in rrunner.c.
I'll do eepro100 and acenic that way too.  The manual is wrong :)

BTW: I just finished the ethernet devices, so my request for
help can be ignored.  Fixed a truckload of unchecked kmallocs
and error-path memory leaks while I was at it.  Sigh.

-
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-12-23 15:31 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-12-23 14:13 Q: netdevice interface change Manfred
2000-12-23 15:05 ` Andrew Morton

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.