summaryrefslogtreecommitdiffstats
path: root/sys/dev/firewire
diff options
context:
space:
mode:
authorsimokawa <simokawa@FreeBSD.org>2007-04-30 10:50:53 +0000
committersimokawa <simokawa@FreeBSD.org>2007-04-30 10:50:53 +0000
commit3f3de6c76718e1fffd0c7e4c72e9a5c0126e2658 (patch)
tree1ed10f53488a44a20d1efec107c8eb8837c856d3 /sys/dev/firewire
parent0660149596b7c7b0fb256d808586bea44cfecef2 (diff)
downloadFreeBSD-src-3f3de6c76718e1fffd0c7e4c72e9a5c0126e2658.zip
FreeBSD-src-3f3de6c76718e1fffd0c7e4c72e9a5c0126e2658.tar.gz
Initialize configuration ROM before a bus reset.
MFC: after 3 days
Diffstat (limited to 'sys/dev/firewire')
-rw-r--r--sys/dev/firewire/firewire.c5
-rw-r--r--sys/dev/firewire/firewirereg.h2
-rw-r--r--sys/dev/firewire/fwohci.c2
3 files changed, 5 insertions, 4 deletions
diff --git a/sys/dev/firewire/firewire.c b/sys/dev/firewire/firewire.c
index 8b6f921..f23b0e9 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 c1bfbf7..b2dbc67 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 e5285b6..b44862d 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]));
}
OpenPOWER on IntegriCloud