tech-kern archive

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

Re: ne2000 with 8bit bus width



NONAKA Kimihiro 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.
> 
> Because ne2000_detect() function is used by driver's match function,
> softc data cannot be passed to ne2000_detect() function.

Well, if it's really necessary, we can prepare dummy softc
in probe/match functions as src/sys/dev/isa/wdc_isa.c does
for wdc_probe().

Anyway, it's vague for me how DMA width should be specified.

If it should be specified by each backend,
I think ne2000_detect() should be changed
to take an additional dmawidth arg.

If it can/should be determined at runtime in ne2000_detect(),
ne2000_detect() should be changed to return a DMA width too,
via softc or an additional pointer arg etc.

But for now your latest patch seems okay for interim workaround
to reduce changes in MD attachments.
(if some more comments are added about DMA width code ;-)
---
Izumi Tsutsui


Home | Main Index | Thread Index | Old Index