Luoqi Chen <[EMAIL PROTECTED]> wrote:

> We shouldn't need bus_simple_create_bsh(). All drivers ought to use
> rman_get_bushandle()/rman_get_bustag() to retrieve the bus handle and tag,
> and use them in bus_space_read/write calls to perform device io. Drivers
> that don't do that should be fixed.

Yes.  I think it is correct way.  It means porting isp, amd and adv
drivers to newbus, but I'm not familiar with these drivers.  So I
added bus_simple_creat_bsh function to reduce modification.


> Why have two files bus_at386.h and bus_pc98.h? I386_BUS_PIO_IND should be
> able to live with I386_BUS_PIO and I386_BUS_MEMIO happily together.

Because they are different in the type of bus_space_tag_t from each
other.  It is the u_long in PC/AT and the structure in PC-98.  For
example, bus_space_read_1()s of them are:

  PC/AT:
        bus_space_read_1(...)
        {
                ...
                return (inb(handle + offset));
                ...
        }

  PC-98:
        bus_space_read_1(...)
        {
                ...
                return (inb(bsh.bsh_iat[offset]));
                ...
        }


-----------------------------------------------+--------------------------+
KATO Takenori <[EMAIL PROTECTED]>  |        FreeBSD           |
Dept. Earth Planet. Sci, Nagoya Univ.          |    The power to serve!   |
Nagoya, 464-8602, Japan                        |  http://www.FreeBSD.org/ |
                                               |http://www.jp.FreeBSD.org/|
++++ FreeBSD(98) 3.3R-Rev. 01 available!       +==========================+


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message

Reply via email to