summaryrefslogtreecommitdiff
path: root/sys/dev/pci/fwohci_pci.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/pci/fwohci_pci.c')
-rw-r--r--sys/dev/pci/fwohci_pci.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/sys/dev/pci/fwohci_pci.c b/sys/dev/pci/fwohci_pci.c
index 3a8f4c4c793..7dc29c075a7 100644
--- a/sys/dev/pci/fwohci_pci.c
+++ b/sys/dev/pci/fwohci_pci.c
@@ -1,3 +1,4 @@
+/* $OpenBSD: fwohci_pci.c,v 1.4 2003/01/09 15:28:53 mickey Exp $ */
/* $NetBSD: fwohci_pci.c,v 1.13 2002/01/26 16:30:00 ichiro Exp $ */
/*-
@@ -99,14 +100,10 @@ fwohci_pci_attach(struct device *parent, struct device *self, void *aux)
{
struct pci_attach_args *pa = (struct pci_attach_args *) aux;
struct fwohci_pci_softc *psc = (struct fwohci_pci_softc *) self;
- char devinfo[256];
char const *intrstr;
pci_intr_handle_t ih;
u_int32_t csr;
- pci_devinfo(pa->pa_id, pa->pa_class, 0, devinfo);
- printf(": %s (rev. 0x%02x)\n", devinfo, PCI_REVISION(pa->pa_class));
-
psc->psc_sc.sc_dmat = pa->pa_dmat;
psc->psc_pc = pa->pa_pc;
@@ -121,7 +118,7 @@ fwohci_pci_attach(struct device *parent, struct device *self, void *aux)
NULL, &psc->psc_sc.sc_memsize, 0))
#endif
{
- printf("%s: can't map OHCI register space\n", self->dv_xname);
+ printf(": can't map OHCI register space\n");
return;
}
@@ -142,7 +139,9 @@ fwohci_pci_attach(struct device *parent, struct device *self, void *aux)
/* Map and establish the interrupt. */
if (pci_intr_map(pa, &ih)) {
- printf("%s: couldn't map interrupt\n", self->dv_xname);
+ printf(": couldn't map interrupt\n");
+ bus_space_unmap(psc->psc_sc.sc_memt, psc->psc_sc.sc_memh,
+ psc->psc_sc.sc_memsize);
return;
}
intrstr = pci_intr_string(pa->pa_pc, ih);
@@ -154,13 +153,15 @@ fwohci_pci_attach(struct device *parent, struct device *self, void *aux)
&psc->psc_sc, self->dv_xname);
#endif
if (psc->psc_ih == NULL) {
- printf("%s: couldn't establish interrupt", self->dv_xname);
+ printf(": couldn't establish interrupt");
if (intrstr != NULL)
printf(" at %s", intrstr);
printf("\n");
+ bus_space_unmap(psc->psc_sc.sc_memt, psc->psc_sc.sc_memh,
+ psc->psc_sc.sc_memsize);
return;
}
- printf("%s: interrupting at %s\n", self->dv_xname, intrstr);
+ printf(": %s\n", intrstr);
#ifdef __NetBSD__
if (fwohci_init(&psc->psc_sc, pci_intr_evcnt(pa->pa_pc, ih)) != 0)