mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-18 10:35:55 +00:00
Detect cycle lost.
This commit is contained in:
parent
2bab61b0b4
commit
d0581de84e
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=167628
@ -1877,6 +1877,19 @@ fwohci_intr_body(struct fwohci_softc *sc, uint32_t stat, int count)
|
|||||||
#endif
|
#endif
|
||||||
fwohci_arcv(sc, &sc->arrq, count);
|
fwohci_arcv(sc, &sc->arrq, count);
|
||||||
}
|
}
|
||||||
|
if (stat & OHCI_INT_CYC_LOST) {
|
||||||
|
if (sc->cycle_lost >= 0)
|
||||||
|
sc->cycle_lost ++;
|
||||||
|
if (sc->cycle_lost > 10) {
|
||||||
|
sc->cycle_lost = -1;
|
||||||
|
#if 0
|
||||||
|
OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCTIMER);
|
||||||
|
#endif
|
||||||
|
OWRITE(sc, FWOHCI_INTMASKCLR, OHCI_INT_CYC_LOST);
|
||||||
|
device_printf(fc->dev, "too many cycle lost, "
|
||||||
|
"no cycle master presents?\n");
|
||||||
|
}
|
||||||
|
}
|
||||||
if(stat & OHCI_INT_PHY_SID){
|
if(stat & OHCI_INT_PHY_SID){
|
||||||
uint32_t *buf, node_id;
|
uint32_t *buf, node_id;
|
||||||
int plen;
|
int plen;
|
||||||
@ -1907,6 +1920,10 @@ fwohci_intr_body(struct fwohci_softc *sc, uint32_t stat, int count)
|
|||||||
printf("Bus reset failure\n");
|
printf("Bus reset failure\n");
|
||||||
goto sidout;
|
goto sidout;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* cycle timer */
|
||||||
|
sc->cycle_lost = 0;
|
||||||
|
OWRITE(sc, FWOHCI_INTMASK, OHCI_INT_CYC_LOST);
|
||||||
if (node_id & OHCI_NODE_ROOT) {
|
if (node_id & OHCI_NODE_ROOT) {
|
||||||
printf("CYCLEMASTER mode\n");
|
printf("CYCLEMASTER mode\n");
|
||||||
OWRITE(sc, OHCI_LNKCTL,
|
OWRITE(sc, OHCI_LNKCTL,
|
||||||
@ -1916,6 +1933,7 @@ fwohci_intr_body(struct fwohci_softc *sc, uint32_t stat, int count)
|
|||||||
OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCMTR);
|
OWRITE(sc, OHCI_LNKCTLCLR, OHCI_CNTL_CYCMTR);
|
||||||
OWRITE(sc, OHCI_LNKCTL, OHCI_CNTL_CYCTIMER);
|
OWRITE(sc, OHCI_LNKCTL, OHCI_CNTL_CYCTIMER);
|
||||||
}
|
}
|
||||||
|
|
||||||
fc->nodeid = node_id & 0x3f;
|
fc->nodeid = node_id & 0x3f;
|
||||||
|
|
||||||
if (plen & OHCI_SID_ERR) {
|
if (plen & OHCI_SID_ERR) {
|
||||||
|
@ -81,6 +81,7 @@ typedef struct fwohci_softc {
|
|||||||
uint32_t intstat;
|
uint32_t intstat;
|
||||||
struct task fwohci_task_complete;
|
struct task fwohci_task_complete;
|
||||||
#endif
|
#endif
|
||||||
|
int cycle_lost;
|
||||||
} fwohci_softc_t;
|
} fwohci_softc_t;
|
||||||
|
|
||||||
void fwohci_intr (void *arg);
|
void fwohci_intr (void *arg);
|
||||||
|
Loading…
Reference in New Issue
Block a user