Jeff Garzik wrote:
> Andrew Morton wrote:
> > - The consensus here seems to be that I should continue to generate
> > drivers/net/3c59x.o as well as drivers/net/pcmcia/3c575_cb.o. Fair
> > enough.
> The stumbling block seems to be pcmcia. If we can get pcmcia to load
> 3c59x.o for all its 3com needs, then there should be no reason why
> 3c575_cb.o continues to live.
> > - I don't want to copy a single .o file into two places because the
> > source _should_ be compiled twice.
> What makes you think this? The source should not need to be compiled
> twice. The PCI driver interface is designed to seamlessly support
> hotplug and non-hotplug.
One example: 3c59x.o could have been compiled for static (non-modular)
use. Copying that onto 3c575cb.o and insmodding it wouldn't work very
hmm.. This is going on a bit. Summary time:
I believe the path of least resistance is to separately compile the same
source into two objects. This preserves pcmcia config compatibility and
allows for different compile options for 3x59x.o and 3c575_cb.o.
It appears the best way to compile one .c file into two .o files is to
add a special makefile target:
$(CC) $(CFLAGS) -D__NO_VERSION__ -DPCMCIA -c -o $@ ../3c59x.c
Note that I have not added the magic code to create .3c575_cb.o.flags.
This is deliberate. It _forces_ 3c575_cb.o to be unnecessarily
recomiled each time you type 'make modules' (If 3c575_cb is configured
in). If I had not done this, 'make' would have no header file
dependencies for 3c575_cb.o which is dangerous.
The longer-term fix is to make mkdep understand nested includes and to
then create a 3c575_cb.c which simply #includes ../3c59x.c.
The problem of mapping a driver name to an interface name for cardmgr is
still spinning around. I don't know enough to make any useful comments
The problem of 'cardctl suspend' causing permanent NICicide is still
open. I need to do some more testing.
[ cp drivers/net/3c59x.c drivers/net/pcmcia/3c575_cb.c ]
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to firstname.lastname@example.org Please read the FAQ at http://www.tux.org/lkml/
This archive was generated by hypermail 2b29 : Sat Apr 15 2000 - 21:00:18 EST