From 740b10aaa94930499c5513bfbbe7942536d5c0df Mon Sep 17 00:00:00 2001 From: Hidetoshi Shimokawa Date: Fri, 27 Jun 2003 00:27:33 +0000 Subject: [PATCH] - Use fwohci_poll() instead of fwohci_intr() to process the first bus reest. - Wait 2 cycles before starting the process for fast machines. --- sys/dev/firewire/fwohci.c | 3 +-- sys/dev/firewire/fwohci_pci.c | 3 ++- sys/dev/firewire/fwohcivar.h | 1 + 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index d7ca246fe1a..a597a34fbce 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -144,7 +144,6 @@ static void fwohci_irx_post __P((struct firewire_comm *, u_int32_t *)); static int fwohci_itxbuf_enable __P((struct firewire_comm *, int)); static int fwohci_itx_disable __P((struct firewire_comm *, int)); static void fwohci_timeout __P((void *)); -static void fwohci_poll __P((struct firewire_comm *, int, int)); static void fwohci_set_intr __P((struct firewire_comm *, int)); static int fwohci_add_rx_buf __P((struct fwohci_dbch *, struct fwohcidb_tr *, int, struct fwdma_alloc *)); @@ -2010,7 +2009,7 @@ again: #endif } -static void +void fwohci_poll(struct firewire_comm *fc, int quick, int count) { int s; diff --git a/sys/dev/firewire/fwohci_pci.c b/sys/dev/firewire/fwohci_pci.c index 9898aba88b2..6f45152a47a 100644 --- a/sys/dev/firewire/fwohci_pci.c +++ b/sys/dev/firewire/fwohci_pci.c @@ -317,8 +317,9 @@ fwohci_pci_attach(device_t self) * Clear the bus reset event flag to start transactions even when * interrupt is disabled during the boot process. */ + DELAY(250); /* 2 cycles */ s = splfw(); - fwohci_intr((void *)sc); + fwohci_poll((void *)sc, 0, -1); splx(s); return 0; diff --git a/sys/dev/firewire/fwohcivar.h b/sys/dev/firewire/fwohcivar.h index b68e9e24a20..92b679bbe3f 100644 --- a/sys/dev/firewire/fwohcivar.h +++ b/sys/dev/firewire/fwohcivar.h @@ -84,6 +84,7 @@ typedef struct fwohci_softc { void fwohci_intr __P((void *arg)); int fwohci_init __P((struct fwohci_softc *, device_t)); +void fwohci_poll __P((struct firewire_comm *, int, int)); void fwohci_reset __P((struct fwohci_softc *, device_t)); int fwohci_detach __P((struct fwohci_softc *, device_t)); int fwohci_resume __P((struct fwohci_softc *, device_t));