Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/firewire/fwohci.c
Show First 20 Lines • Show All 81 Lines • ▼ Show 20 Lines | char fwohcicode[32][0x20]= { | ||||
"Undef", "Undef", "unknown event", "flushed", | "Undef", "Undef", "unknown event", "flushed", | ||||
"Undef" ,"ack complete", "ack pend", "Undef", | "Undef" ,"ack complete", "ack pend", "Undef", | ||||
"ack busy_X", "ack busy_A", "ack busy_B", "Undef", | "ack busy_X", "ack busy_A", "ack busy_B", "Undef", | ||||
"Undef", "Undef", "Undef", "ack tardy", | "Undef", "Undef", "Undef", "ack tardy", | ||||
"Undef", "ack data_err", "ack type_err", ""}; | "Undef", "ack data_err", "ack type_err", ""}; | ||||
#define MAX_SPEED 3 | #define MAX_SPEED 3 | ||||
extern char *linkspeed[]; | extern char *linkspeed[]; | ||||
uint32_t tagbit[4] = {1 << 28, 1 << 29, 1 << 30, 1 << 31}; | uint32_t tagbit[4] = {1 << 28, 1 << 29, 1 << 30, 1U << 31}; | ||||
static struct tcode_info tinfo[] = { | static struct tcode_info tinfo[] = { | ||||
/* hdr_len block flag valid_response */ | /* hdr_len block flag valid_response */ | ||||
/* 0 WREQQ */ {16, FWTI_REQ | FWTI_TLABEL, FWTCODE_WRES}, | /* 0 WREQQ */ {16, FWTI_REQ | FWTI_TLABEL, FWTCODE_WRES}, | ||||
/* 1 WREQB */ {16, FWTI_REQ | FWTI_TLABEL | FWTI_BLOCK_ASY, FWTCODE_WRES}, | /* 1 WREQB */ {16, FWTI_REQ | FWTI_TLABEL | FWTI_BLOCK_ASY, FWTCODE_WRES}, | ||||
/* 2 WRES */ {12, FWTI_RES, 0xff}, | /* 2 WRES */ {12, FWTI_RES, 0xff}, | ||||
/* 3 XXX */ { 0, 0, 0xff}, | /* 3 XXX */ { 0, 0, 0xff}, | ||||
/* 4 RREQQ */ {12, FWTI_REQ | FWTI_TLABEL, FWTCODE_RRESQ}, | /* 4 RREQQ */ {12, FWTI_REQ | FWTI_TLABEL, FWTCODE_RRESQ}, | ||||
▲ Show 20 Lines • Show All 1,742 Lines • ▼ Show 20 Lines | if (!kdb_active) | ||||
taskqueue_enqueue(sc->fc.taskqueue, &sc->fwohci_task_busreset); | taskqueue_enqueue(sc->fc.taskqueue, &sc->fwohci_task_busreset); | ||||
} | } | ||||
if (stat & OHCI_INT_PHY_SID) { | if (stat & OHCI_INT_PHY_SID) { | ||||
/* Enable bus reset interrupt */ | /* Enable bus reset interrupt */ | ||||
OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_PHY_BUS_R); | OWRITE(sc, FWOHCI_INTSTATCLR, OHCI_INT_PHY_BUS_R); | ||||
OWRITE(sc, FWOHCI_INTMASK, OHCI_INT_PHY_BUS_R); | OWRITE(sc, FWOHCI_INTMASK, OHCI_INT_PHY_BUS_R); | ||||
/* Allow async. request to us */ | /* Allow async. request to us */ | ||||
OWRITE(sc, OHCI_AREQHI, 1 << 31); | OWRITE(sc, OHCI_AREQHI, 1U << 31); | ||||
if (firewire_phydma_enable) { | if (firewire_phydma_enable) { | ||||
/* allow from all nodes */ | /* allow from all nodes */ | ||||
OWRITE(sc, OHCI_PREQHI, 0x7fffffff); | OWRITE(sc, OHCI_PREQHI, 0x7fffffff); | ||||
OWRITE(sc, OHCI_PREQLO, 0xffffffff); | OWRITE(sc, OHCI_PREQLO, 0xffffffff); | ||||
prequpper = ((uintmax_t)Maxmem << PAGE_SHIFT) >> 16; | prequpper = ((uintmax_t)Maxmem << PAGE_SHIFT) >> 16; | ||||
if (prequpper > OHCI_PREQUPPER_MAX) { | if (prequpper > OHCI_PREQUPPER_MAX) { | ||||
device_printf(fc->dev, | device_printf(fc->dev, | ||||
"Physical memory size of 0x%jx exceeds " | "Physical memory size of 0x%jx exceeds " | ||||
▲ Show 20 Lines • Show All 1,122 Lines • Show Last 20 Lines |