tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: ne2000 with 8bit bus width



nonakap%gmail.com@localhost wrote:

> > - It looks now ne2000_detect() also checks if chip is 16 bit DMA capable.
> >   If so, isn't it better to use the result of ne2000_detect()
> >   to set sc_useworddma, rather than setting it in backends?
> 
> ne2000_softc is not passed to the ne2000_detect() function.

We can change ne2000_detect() appropriately,
but your newer patch seems okay.

> > - It might be better to use bool for useworddma and sc_useworddma
> >  unless it's also used as an integer as current useword.
> 
> The driver that doesn't call the ne2000_detect() function exists(*1).
> In addition, the driver that calls the ne2000_attach() function after
> the sc_type is set exists(*2).
> Because such a driver exists, it is necessary to maintain three
> states(unknown, 8bit, 16bit).
> Therefore, the type of the variable of the bus width is not made bool.
> 
> (*1): e.g. src/sys/arch/acorn32/podulebus/if_ne_pbus.c
> (*2): e.g. src/sys/dev/mca/if_ne_mca.c

Ah, then enum is okay.

---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index