diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c index 8b6f921c5df8..f23b0e9b6a6f 100644 --- a/sys/dev/firewire/firewire.c +++ b/sys/dev/firewire/firewire.c @@ -419,6 +419,7 @@ firewire_attach(device_t dev) bus_generic_attach(dev); /* bus_reset */ + fw_busreset(fc, FWBUSNOTREADY); fc->ibr(fc); return 0; @@ -644,7 +645,7 @@ fw_reset_crom(struct firewire_comm *fc) * Called after bus reset. */ void -fw_busreset(struct firewire_comm *fc) +fw_busreset(struct firewire_comm *fc, uint32_t new_status) { struct firewire_dev_comm *fdc; struct crom_src *src; @@ -659,7 +660,7 @@ fw_busreset(struct firewire_comm *fc) default: break; } - fc->status = FWBUSRESET; + fc->status = new_status; fw_reset_csr(fc); fw_reset_crom(fc); diff --git a/sys/dev/firewire/firewirereg.h b/sys/dev/firewire/firewirereg.h index c1bfbf773dc5..b2dbc67a5ce3 100644 --- a/sys/dev/firewire/firewirereg.h +++ b/sys/dev/firewire/firewirereg.h @@ -284,7 +284,7 @@ void fw_asybusy (struct fw_xfer *); int fw_bindadd (struct firewire_comm *, struct fw_bind *); int fw_bindremove (struct firewire_comm *, struct fw_bind *); int fw_asyreq (struct firewire_comm *, int, struct fw_xfer*); -void fw_busreset (struct firewire_comm *); +void fw_busreset (struct firewire_comm *, uint32_t); uint16_t fw_crc16 (uint32_t *, uint32_t); void fw_xfer_timeout (void *); void fw_xfer_done (struct fw_xfer *); diff --git a/sys/dev/firewire/fwohci.c b/sys/dev/firewire/fwohci.c index e5285b6d7411..b44862d1c08a 100644 --- a/sys/dev/firewire/fwohci.c +++ b/sys/dev/firewire/fwohci.c @@ -1810,7 +1810,7 @@ fwohci_intr_body(struct fwohci_softc *sc, uint32_t stat, int count) #ifndef ACK_ALL OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_PHY_BUS_R); #endif - fw_busreset(fc); + fw_busreset(fc, FWBUSRESET); OWRITE(sc, OHCI_CROMHDR, ntohl(sc->fc.config_rom[0])); OWRITE(sc, OHCI_BUS_OPT, ntohl(sc->fc.config_rom[2])); }