Initialize configuration ROM before a bus reset.
MFC: after 3 days
This commit is contained in:
parent
057f398585
commit
ad9cf50615
@ -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);
|
||||
|
||||
|
@ -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 *);
|
||||
|
@ -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]));
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user