Initialize configuration ROM before a bus reset.

MFC: after 3 days
This commit is contained in:
Hidetoshi Shimokawa 2007-04-30 10:50:53 +00:00
parent 057f398585
commit ad9cf50615
3 changed files with 5 additions and 4 deletions

View File

@ -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);

View File

@ -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 *);

View File

@ -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]));
}