Date: Sun, 16 Jan 2000 15:35:03 +0900 (JST) From: Takahashi Yoshihiro <nyan@wyvern.cc.kogakuin.ac.jp> To: imp@village.org Cc: kato@ganko.eps.nagoya-u.ac.jp, luoqi@watermarkgroup.com, cvs-all@FreeBSD.org, cvs-committers@FreeBSD.org, luoqi@FreeBSD.org Subject: Re: cvs commit: src/sys/i386/isa aic6360.c aic_98.h Message-ID: <20000116153503B.nyan@dd.catv.ne.jp> In-Reply-To: <200001151807.LAA42155@harmony.village.org> References: <20000115222237I.kato@gneiss.eps.nagoya-u.ac.jp> <200001141424.JAA13791@lor.watermarkgroup.com> <200001151807.LAA42155@harmony.village.org>
next in thread | previous in thread | raw e-mail | index | archive | help
----Next_Part(Sun_Jan_16_15:28:24_2000_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
In article <200001151807.LAA42155@harmony.village.org>
Warner Losh <imp@village.org> writes:
> I think that most of the drivers that make this assumption would
> easily be found with a special version of the normal bus space stuff
> and LINT. When I did this the biggest offenders were the Bill Paul
> drivers of the time, which he's since corrected.
>
> It might be worth another try to see what is still broken.
I make a kernel from LINT with PC-98 bus space stuff (the type of
bus_space_handle_t is struct). There are compile errors in the
following files.
dev/advansys/adv_isa.c
dev/advansys/adv_eisa.c
dev/advansys/adv_pci.c
dev/ahb/ahb.c
dev/an/if_an.c
dev/buslogic/bt_pci.c
dev/dpt/dpt_eisa.c
dev/dpt/dpt_pci.c
pci/adw_pci.c
pci/alpm.c
pci/amd.c
pci/isp_pci.c
As it is easy to fix some files, I attach patch to this mail. This
patch fixes dev/ahb/ahb.c, dev/an/if_an.c and dev/buslogic/bt_pci.c.
The remaining files are needed to fix using Kato's way.
BTW, are there any big problems to commit this PC-98 bus space stuff?
I think that problem is only the above files and that it is no problem
to be commented out temporarily in GENERIC98 (this problem is only on
PC-98).
---
Takahashi Yoshihiro / nyan@FreeBSD.org
----Next_Part(Sun_Jan_16_15:28:24_2000_809)--
Content-Type: Text/Plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="bs_fix.diff"
Index: dev/ahb/ahb.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ahb/ahb.c,v
retrieving revision 1.16
diff -u -r1.16 ahb.c
--- dev/ahb/ahb.c 2000/01/14 07:13:54 1.16
+++ dev/ahb/ahb.c 2000/01/16 04:50:17
@@ -75,7 +75,7 @@
bus_space_write_4((ahb)->tag, (ahb)->bsh, port, value)
static const char *ahbmatch(eisa_id_t type);
-static struct ahb_softc *ahballoc(u_long unit, u_int iobase);
+static struct ahb_softc *ahballoc(u_long unit, struct resource *res);
static void ahbfree(struct ahb_softc *ahb);
static int ahbreset(struct ahb_softc *ahb);
static void ahbmapecbs(void *arg, bus_dma_segment_t *segs,
@@ -277,7 +277,7 @@
return ENOMEM;
}
- if ((ahb = ahballoc(device_get_unit(dev), rman_get_start(io))) == NULL) {
+ if ((ahb = ahballoc(device_get_unit(dev), io)) == NULL) {
goto error_exit2;
}
@@ -391,7 +391,7 @@
}
static struct ahb_softc *
-ahballoc(u_long unit, u_int iobase)
+ahballoc(u_long unit, struct resource *res)
{
struct ahb_softc *ahb;
@@ -407,8 +407,8 @@
SLIST_INIT(&ahb->free_ecbs);
LIST_INIT(&ahb->pending_ccbs);
ahb->unit = unit;
- ahb->tag = I386_BUS_SPACE_IO;
- ahb->bsh = iobase;
+ ahb->tag = rman_get_bustag(res);
+ ahb->bsh = rman_get_bushandle(res);
ahb->disc_permitted = ~0;
ahb->tags_permitted = ~0;
Index: dev/an/if_an.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/an/if_an.c,v
retrieving revision 1.1
diff -u -r1.1 if_an.c
--- dev/an/if_an.c 2000/01/14 20:40:56 1.1
+++ dev/an/if_an.c 2000/01/16 04:44:33
@@ -189,7 +189,7 @@
* to be able to issue commands and call some of the
* other routines.
*/
- sc->an_bhandle = rman_get_start(sc->port_res);
+ sc->an_bhandle = rman_get_bushandle(sc->port_res);
sc->an_btag = rman_get_bustag(sc->port_res);
sc->an_unit = device_get_unit(dev);
Index: dev/buslogic/bt_pci.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/buslogic/bt_pci.c,v
retrieving revision 1.10
diff -u -r1.10 bt_pci.c
--- dev/buslogic/bt_pci.c 1999/08/28 00:50:44 1.10
+++ dev/buslogic/bt_pci.c 2000/01/16 04:53:45
@@ -134,7 +134,8 @@
if (error == 0
&& pci_info.io_port < BIO_DISABLED) {
bt_mark_probed_bio(pci_info.io_port);
- if (bt->bsh != bt_iop_from_bio(pci_info.io_port)) {
+ if (rman_get_start(bt->port) !=
+ bt_iop_from_bio(pci_info.io_port)) {
u_int8_t new_addr;
new_addr = BIO_DISABLED;
----Next_Part(Sun_Jan_16_15:28:24_2000_809)----
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000116153503B.nyan>
