Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/mpr/mpr_table.c
Show First 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | |||||
void | void | ||||
mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) | mpr_print_portfacts(struct mpr_softc *sc, MPI2_PORT_FACTS_REPLY *facts) | ||||
{ | { | ||||
MPR_PRINTFIELD_START(sc, "PortFacts"); | MPR_PRINTFIELD_START(sc, "PortFacts"); | ||||
MPR_PRINTFIELD(sc, facts, PortNumber, %d); | MPR_PRINTFIELD(sc, facts, PortNumber, %d); | ||||
MPR_PRINTFIELD(sc, facts, PortType, 0x%x); | MPR_PRINTFIELD(sc, facts, PortType, 0x%x); | ||||
MPR_PRINTFIELD(sc, facts, MaxPostedCmdBuffers, %d); | MPR_PRINTFIELD_16(sc, facts, MaxPostedCmdBuffers, %d); | ||||
} | } | ||||
void | void | ||||
mpr_print_evt_generic(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | mpr_print_evt_generic(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | ||||
{ | { | ||||
MPR_PRINTFIELD_START(sc, "EventReply"); | MPR_PRINTFIELD_START(sc, "EventReply"); | ||||
MPR_PRINTFIELD(sc, event, EventDataLength, %d); | MPR_PRINTFIELD_16(sc, event, EventDataLength, %d); | ||||
MPR_PRINTFIELD(sc, event, AckRequired, %d); | MPR_PRINTFIELD(sc, event, AckRequired, %d); | ||||
mpr_print_field(sc, "Event: %s (0x%x)\n", | mpr_print_field(sc, "Event: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_event_names, event->Event), event->Event); | mpr_describe_table(mpr_event_names, le16toh(event->Event)), le16toh(event->Event)); | ||||
MPR_PRINTFIELD(sc, event, EventContext, 0x%x); | MPR_PRINTFIELD_32(sc, event, EventContext, 0x%x); | ||||
} | } | ||||
void | void | ||||
mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) | mpr_print_sasdev0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) | ||||
{ | { | ||||
MPR_PRINTFIELD_START(sc, "SAS Device Page 0"); | MPR_PRINTFIELD_START(sc, "SAS Device Page 0"); | ||||
MPR_PRINTFIELD(sc, buf, Slot, %d); | MPR_PRINTFIELD_16(sc, buf, Slot, %d); | ||||
MPR_PRINTFIELD(sc, buf, EnclosureHandle, 0x%x); | MPR_PRINTFIELD_16(sc, buf, EnclosureHandle, 0x%x); | ||||
mpr_print_field(sc, "SASAddress: 0x%jx\n", | mpr_print_field(sc, "SASAddress: 0x%jx\n", | ||||
mpr_to_u64(&buf->SASAddress)); | mpr_to_u64(&buf->SASAddress)); | ||||
MPR_PRINTFIELD(sc, buf, ParentDevHandle, 0x%x); | MPR_PRINTFIELD_16(sc, buf, ParentDevHandle, 0x%x); | ||||
MPR_PRINTFIELD(sc, buf, PhyNum, %d); | MPR_PRINTFIELD(sc, buf, PhyNum, %d); | ||||
MPR_PRINTFIELD(sc, buf, AccessStatus, 0x%x); | MPR_PRINTFIELD(sc, buf, AccessStatus, 0x%x); | ||||
MPR_PRINTFIELD(sc, buf, DevHandle, 0x%x); | MPR_PRINTFIELD_16(sc, buf, DevHandle, 0x%x); | ||||
MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); | MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); | ||||
MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); | MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); | ||||
mpr_print_field(sc, "DeviceInfo: %b,%s\n", buf->DeviceInfo, | mpr_print_field(sc, "DeviceInfo: %b,%s\n", le32toh(buf->DeviceInfo), | ||||
"\20" "\4SataHost" "\5SmpInit" "\6StpInit" "\7SspInit" | "\20" "\4SataHost" "\5SmpInit" "\6StpInit" "\7SspInit" | ||||
"\10SataDev" "\11SmpTarg" "\12StpTarg" "\13SspTarg" "\14Direct" | "\10SataDev" "\11SmpTarg" "\12StpTarg" "\13SspTarg" "\14Direct" | ||||
"\15LsiDev" "\16AtapiDev" "\17SepDev", | "\15LsiDev" "\16AtapiDev" "\17SepDev", | ||||
mpr_describe_table(mpr_sasdev0_devtype, buf->DeviceInfo & 0x03)); | mpr_describe_table(mpr_sasdev0_devtype, buf->DeviceInfo & 0x03)); | ||||
MPR_PRINTFIELD(sc, buf, Flags, 0x%x); | MPR_PRINTFIELD_16(sc, buf, Flags, 0x%x); | ||||
MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); | MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); | ||||
MPR_PRINTFIELD(sc, buf, MaxPortConnections, %d); | MPR_PRINTFIELD(sc, buf, MaxPortConnections, %d); | ||||
mpr_print_field(sc, "DeviceName: 0x%jx\n", | mpr_print_field(sc, "DeviceName: 0x%jx\n", | ||||
mpr_to_u64(&buf->DeviceName)); | mpr_to_u64(&buf->DeviceName)); | ||||
MPR_PRINTFIELD(sc, buf, PortGroups, %d); | MPR_PRINTFIELD(sc, buf, PortGroups, %d); | ||||
MPR_PRINTFIELD(sc, buf, DmaGroup, %d); | MPR_PRINTFIELD(sc, buf, DmaGroup, %d); | ||||
MPR_PRINTFIELD(sc, buf, ControlGroup, %d); | MPR_PRINTFIELD(sc, buf, ControlGroup, %d); | ||||
} | } | ||||
void | void | ||||
mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | mpr_print_evt_sas(struct mpr_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | ||||
{ | { | ||||
mpr_print_evt_generic(sc, event); | mpr_print_evt_generic(sc, event); | ||||
switch(event->Event) { | switch(le16toh(event->Event)) { | ||||
case MPI2_EVENT_SAS_DISCOVERY: | case MPI2_EVENT_SAS_DISCOVERY: | ||||
{ | { | ||||
MPI2_EVENT_DATA_SAS_DISCOVERY *data; | MPI2_EVENT_DATA_SAS_DISCOVERY *data; | ||||
data = (MPI2_EVENT_DATA_SAS_DISCOVERY *)&event->EventData; | data = (MPI2_EVENT_DATA_SAS_DISCOVERY *)&event->EventData; | ||||
mpr_print_field(sc, "Flags: %b\n", data->Flags, | mpr_print_field(sc, "Flags: %b\n", data->Flags, | ||||
"\20" "\1InProgress" "\2DeviceChange"); | "\20" "\1InProgress" "\2DeviceChange"); | ||||
mpr_print_field(sc, "ReasonCode: %s\n", | mpr_print_field(sc, "ReasonCode: %s\n", | ||||
mpr_describe_table(mpr_sasdisc_reason, data->ReasonCode)); | mpr_describe_table(mpr_sasdisc_reason, data->ReasonCode)); | ||||
MPR_PRINTFIELD(sc, data, PhysicalPort, %d); | MPR_PRINTFIELD(sc, data, PhysicalPort, %d); | ||||
mpr_print_field(sc, "DiscoveryStatus: %b\n", | mpr_print_field(sc, "DiscoveryStatus: %b\n", | ||||
data->DiscoveryStatus, "\20" | le32toh(data->DiscoveryStatus), "\20" | ||||
"\1Loop" "\2UnaddressableDev" "\3DupSasAddr" "\5SmpTimeout" | "\1Loop" "\2UnaddressableDev" "\3DupSasAddr" "\5SmpTimeout" | ||||
"\6ExpRouteFull" "\7RouteIndexError" "\10SmpFailed" | "\6ExpRouteFull" "\7RouteIndexError" "\10SmpFailed" | ||||
"\11SmpCrcError" "\12SubSubLink" "\13TableTableLink" | "\11SmpCrcError" "\12SubSubLink" "\13TableTableLink" | ||||
"\14UnsupDevice" "\15TableSubLink" "\16MultiDomain" | "\14UnsupDevice" "\15TableSubLink" "\16MultiDomain" | ||||
"\17MultiSub" "\20MultiSubSub" "\34DownstreamInit" | "\17MultiSub" "\20MultiSubSub" "\34DownstreamInit" | ||||
"\35MaxPhys" "\36MaxTargs" "\37MaxExpanders" | "\35MaxPhys" "\36MaxTargs" "\37MaxExpanders" | ||||
"\40MaxEnclosures"); | "\40MaxEnclosures"); | ||||
break; | break; | ||||
} | } | ||||
//SLM-add for PCIE EVENT too | //SLM-add for PCIE EVENT too | ||||
case MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST: | case MPI2_EVENT_SAS_TOPOLOGY_CHANGE_LIST: | ||||
{ | { | ||||
MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *data; | MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *data; | ||||
MPI2_EVENT_SAS_TOPO_PHY_ENTRY *phy; | MPI2_EVENT_SAS_TOPO_PHY_ENTRY *phy; | ||||
int i, phynum; | int i, phynum; | ||||
data = (MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *) | data = (MPI2_EVENT_DATA_SAS_TOPOLOGY_CHANGE_LIST *) | ||||
&event->EventData; | &event->EventData; | ||||
MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); | MPR_PRINTFIELD_16(sc, data, EnclosureHandle, 0x%x); | ||||
MPR_PRINTFIELD(sc, data, ExpanderDevHandle, 0x%x); | MPR_PRINTFIELD_16(sc, data, ExpanderDevHandle, 0x%x); | ||||
MPR_PRINTFIELD(sc, data, NumPhys, %d); | MPR_PRINTFIELD(sc, data, NumPhys, %d); | ||||
MPR_PRINTFIELD(sc, data, NumEntries, %d); | MPR_PRINTFIELD(sc, data, NumEntries, %d); | ||||
MPR_PRINTFIELD(sc, data, StartPhyNum, %d); | MPR_PRINTFIELD(sc, data, StartPhyNum, %d); | ||||
mpr_print_field(sc, "ExpStatus: %s (0x%x)\n", | mpr_print_field(sc, "ExpStatus: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_sastopo_exp, data->ExpStatus), | mpr_describe_table(mpr_sastopo_exp, data->ExpStatus), | ||||
data->ExpStatus); | data->ExpStatus); | ||||
MPR_PRINTFIELD(sc, data, PhysicalPort, %d); | MPR_PRINTFIELD(sc, data, PhysicalPort, %d); | ||||
for (i = 0; i < data->NumEntries; i++) { | for (i = 0; i < data->NumEntries; i++) { | ||||
phy = &data->PHY[i]; | phy = &data->PHY[i]; | ||||
phynum = data->StartPhyNum + i; | phynum = data->StartPhyNum + i; | ||||
mpr_print_field(sc, | mpr_print_field(sc, | ||||
"PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, | "PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, | ||||
phy->AttachedDevHandle); | le16toh(phy->AttachedDevHandle)); | ||||
mpr_print_field(sc, | mpr_print_field(sc, | ||||
"PHY[%d].LinkRate: %s (0x%x)\n", phynum, | "PHY[%d].LinkRate: %s (0x%x)\n", phynum, | ||||
mpr_describe_table(mpr_linkrate_names, | mpr_describe_table(mpr_linkrate_names, | ||||
(phy->LinkRate >> 4) & 0xf), phy->LinkRate); | (phy->LinkRate >> 4) & 0xf), phy->LinkRate); | ||||
mpr_print_field(sc, "PHY[%d].PhyStatus: %s\n", | mpr_print_field(sc, "PHY[%d].PhyStatus: %s\n", | ||||
phynum, mpr_describe_table(mpr_phystatus_names, | phynum, mpr_describe_table(mpr_phystatus_names, | ||||
phy->PhyStatus)); | phy->PhyStatus)); | ||||
} | } | ||||
break; | break; | ||||
} | } | ||||
case MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE: | case MPI2_EVENT_SAS_ENCL_DEVICE_STATUS_CHANGE: | ||||
{ | { | ||||
MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *data; | MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *data; | ||||
data = (MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *) | data = (MPI2_EVENT_DATA_SAS_ENCL_DEV_STATUS_CHANGE *) | ||||
&event->EventData; | &event->EventData; | ||||
MPR_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); | MPR_PRINTFIELD_16(sc, data, EnclosureHandle, 0x%x); | ||||
mpr_print_field(sc, "ReasonCode: %s\n", | mpr_print_field(sc, "ReasonCode: %s\n", | ||||
mpr_describe_table(mpr_sastopo_exp, data->ReasonCode)); | mpr_describe_table(mpr_sastopo_exp, data->ReasonCode)); | ||||
MPR_PRINTFIELD(sc, data, PhysicalPort, %d); | MPR_PRINTFIELD(sc, data, PhysicalPort, %d); | ||||
MPR_PRINTFIELD(sc, data, NumSlots, %d); | MPR_PRINTFIELD_16(sc, data, NumSlots, %d); | ||||
MPR_PRINTFIELD(sc, data, StartSlot, %d); | MPR_PRINTFIELD_16(sc, data, StartSlot, %d); | ||||
MPR_PRINTFIELD(sc, data, PhyBits, 0x%x); | MPR_PRINTFIELD_32(sc, data, PhyBits, 0x%x); | ||||
break; | break; | ||||
} | } | ||||
case MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE: | case MPI2_EVENT_SAS_DEVICE_STATUS_CHANGE: | ||||
{ | { | ||||
MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *data; | MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *data; | ||||
data = (MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *) | data = (MPI2_EVENT_DATA_SAS_DEVICE_STATUS_CHANGE *) | ||||
&event->EventData; | &event->EventData; | ||||
MPR_PRINTFIELD(sc, data, TaskTag, 0x%x); | MPR_PRINTFIELD_16(sc, data, TaskTag, 0x%x); | ||||
mpr_print_field(sc, "ReasonCode: %s\n", | mpr_print_field(sc, "ReasonCode: %s\n", | ||||
mpr_describe_table(mpr_sasdev_reason, data->ReasonCode)); | mpr_describe_table(mpr_sasdev_reason, data->ReasonCode)); | ||||
MPR_PRINTFIELD(sc, data, ASC, 0x%x); | MPR_PRINTFIELD(sc, data, ASC, 0x%x); | ||||
MPR_PRINTFIELD(sc, data, ASCQ, 0x%x); | MPR_PRINTFIELD(sc, data, ASCQ, 0x%x); | ||||
MPR_PRINTFIELD(sc, data, DevHandle, 0x%x); | MPR_PRINTFIELD_16(sc, data, DevHandle, 0x%x); | ||||
mpr_print_field(sc, "SASAddress: 0x%jx\n", | mpr_print_field(sc, "SASAddress: 0x%jx\n", | ||||
mpr_to_u64(&data->SASAddress)); | mpr_to_u64(&data->SASAddress)); | ||||
break; | break; | ||||
} | } | ||||
case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: | case MPI2_EVENT_SAS_BROADCAST_PRIMITIVE: | ||||
{ | { | ||||
MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE *data; | MPI2_EVENT_DATA_SAS_BROADCAST_PRIMITIVE *data; | ||||
Show All 11 Lines | |||||
void | void | ||||
mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) | mpr_print_expander1(struct mpr_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) | ||||
{ | { | ||||
MPR_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); | MPR_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); | ||||
MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); | MPR_PRINTFIELD(sc, buf, PhysicalPort, %d); | ||||
MPR_PRINTFIELD(sc, buf, NumPhys, %d); | MPR_PRINTFIELD(sc, buf, NumPhys, %d); | ||||
MPR_PRINTFIELD(sc, buf, Phy, %d); | MPR_PRINTFIELD(sc, buf, Phy, %d); | ||||
MPR_PRINTFIELD(sc, buf, NumTableEntriesProgrammed, %d); | MPR_PRINTFIELD_16(sc, buf, NumTableEntriesProgrammed, %d); | ||||
mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", | mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_linkrate_names, | mpr_describe_table(mpr_linkrate_names, | ||||
(buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | ||||
mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", | mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_linkrate_names, | mpr_describe_table(mpr_linkrate_names, | ||||
(buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | ||||
MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); | MPR_PRINTFIELD_16(sc, buf, AttachedDevHandle, 0x%04x); | ||||
mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", | mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_phyinfo_reason_names, | mpr_describe_table(mpr_phyinfo_reason_names, | ||||
(buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); | (le32toh(buf->PhyInfo) >> 16) & 0xf), le32toh(buf->PhyInfo)); | ||||
mpr_print_field(sc, "AttachedDeviceInfo: %b,%s\n", | mpr_print_field(sc, "AttachedDeviceInfo: %b,%s\n", | ||||
buf->AttachedDeviceInfo, "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" | le32toh(buf->AttachedDeviceInfo), "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" | ||||
"\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" | "\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" | ||||
"\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", | "\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", | ||||
mpr_describe_table(mpr_sasdev0_devtype, | mpr_describe_table(mpr_sasdev0_devtype, | ||||
buf->AttachedDeviceInfo & 0x03)); | le32toh(buf->AttachedDeviceInfo) & 0x03)); | ||||
MPR_PRINTFIELD(sc, buf, ExpanderDevHandle, 0x%04x); | MPR_PRINTFIELD_16(sc, buf, ExpanderDevHandle, 0x%04x); | ||||
MPR_PRINTFIELD(sc, buf, ChangeCount, %d); | MPR_PRINTFIELD(sc, buf, ChangeCount, %d); | ||||
mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", | mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_linkrate_names, | mpr_describe_table(mpr_linkrate_names, | ||||
buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | ||||
MPR_PRINTFIELD(sc, buf, PhyIdentifier, %d); | MPR_PRINTFIELD(sc, buf, PhyIdentifier, %d); | ||||
MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | ||||
MPR_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); | MPR_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); | ||||
MPR_PRINTFIELD(sc, buf, AttachedPhyInfo, 0x%x); | MPR_PRINTFIELD_32(sc, buf, AttachedPhyInfo, 0x%x); | ||||
mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", | mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_phyinfo_reason_names, | mpr_describe_table(mpr_phyinfo_reason_names, | ||||
buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); | le32toh(buf->AttachedPhyInfo) & 0xf), le32toh(buf->AttachedPhyInfo)); | ||||
MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); | MPR_PRINTFIELD(sc, buf, ZoneGroup, %d); | ||||
MPR_PRINTFIELD(sc, buf, SelfConfigStatus, 0x%x); | MPR_PRINTFIELD(sc, buf, SelfConfigStatus, 0x%x); | ||||
} | } | ||||
void | void | ||||
mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) | mpr_print_sasphy0(struct mpr_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) | ||||
{ | { | ||||
MPR_PRINTFIELD_START(sc, "SAS PHY Page 0"); | MPR_PRINTFIELD_START(sc, "SAS PHY Page 0"); | ||||
MPR_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); | MPR_PRINTFIELD_16(sc, buf, OwnerDevHandle, 0x%04x); | ||||
MPR_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); | MPR_PRINTFIELD_16(sc, buf, AttachedDevHandle, 0x%04x); | ||||
MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | MPR_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | ||||
mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", | mpr_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_phyinfo_reason_names, | mpr_describe_table(mpr_phyinfo_reason_names, | ||||
buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); | le32toh(buf->AttachedPhyInfo) & 0xf), le32toh(buf->AttachedPhyInfo)); | ||||
mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", | mpr_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_linkrate_names, | mpr_describe_table(mpr_linkrate_names, | ||||
(buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | ||||
mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", | mpr_print_field(sc, "HwLinkRate: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_linkrate_names, | mpr_describe_table(mpr_linkrate_names, | ||||
(buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | ||||
MPR_PRINTFIELD(sc, buf, ChangeCount, %d); | MPR_PRINTFIELD(sc, buf, ChangeCount, %d); | ||||
MPR_PRINTFIELD(sc, buf, Flags, 0x%x); | MPR_PRINTFIELD(sc, buf, Flags, 0x%x); | ||||
mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", | mpr_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_phyinfo_reason_names, | mpr_describe_table(mpr_phyinfo_reason_names, | ||||
(buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); | (le32toh(buf->PhyInfo) >> 16) & 0xf), le32toh(buf->PhyInfo)); | ||||
mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", | mpr_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", | ||||
mpr_describe_table(mpr_linkrate_names, | mpr_describe_table(mpr_linkrate_names, | ||||
buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | ||||
} | } | ||||
void | void | ||||
mpr_print_sgl(struct mpr_softc *sc, struct mpr_command *cm, int offset) | mpr_print_sgl(struct mpr_softc *sc, struct mpr_command *cm, int offset) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 62 Lines • Show Last 20 Lines |