Changeset View
Changeset View
Standalone View
Standalone View
head/sys/dev/mps/mps_table.c
Show First 20 Lines • Show All 190 Lines • ▼ Show 20 Lines | mps_describe_devinfo(uint32_t devinfo, char *string, int len) | ||||
snprintf(string, len, "%b,%s", devinfo, | snprintf(string, len, "%b,%s", devinfo, | ||||
"\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", | ||||
mps_describe_table(mps_sasdev0_devtype, devinfo & 0x03)); | mps_describe_table(mps_sasdev0_devtype, devinfo & 0x03)); | ||||
} | } | ||||
void | void | ||||
mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) | _mps_print_iocfacts(struct mps_softc *sc, MPI2_IOC_FACTS_REPLY *facts) | ||||
{ | { | ||||
MPS_PRINTFIELD_START(sc, "IOCFacts"); | MPS_PRINTFIELD_START(sc, "IOCFacts"); | ||||
MPS_PRINTFIELD(sc, facts, MsgVersion, 0x%x); | MPS_PRINTFIELD(sc, facts, MsgVersion, 0x%x); | ||||
MPS_PRINTFIELD(sc, facts, HeaderVersion, 0x%x); | MPS_PRINTFIELD(sc, facts, HeaderVersion, 0x%x); | ||||
MPS_PRINTFIELD(sc, facts, IOCNumber, %d); | MPS_PRINTFIELD(sc, facts, IOCNumber, %d); | ||||
MPS_PRINTFIELD(sc, facts, IOCExceptions, 0x%x); | MPS_PRINTFIELD(sc, facts, IOCExceptions, 0x%x); | ||||
MPS_PRINTFIELD(sc, facts, MaxChainDepth, %d); | MPS_PRINTFIELD(sc, facts, MaxChainDepth, %d); | ||||
mps_dprint_field(sc, MPS_XINFO, "WhoInit: %s\n", | mps_print_field(sc, "WhoInit: %s\n", | ||||
mps_describe_table(mps_whoinit_names, facts->WhoInit)); | mps_describe_table(mps_whoinit_names, facts->WhoInit)); | ||||
MPS_PRINTFIELD(sc, facts, NumberOfPorts, %d); | MPS_PRINTFIELD(sc, facts, NumberOfPorts, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxMSIxVectors, %d); | MPS_PRINTFIELD(sc, facts, MaxMSIxVectors, %d); | ||||
MPS_PRINTFIELD(sc, facts, RequestCredit, %d); | MPS_PRINTFIELD(sc, facts, RequestCredit, %d); | ||||
MPS_PRINTFIELD(sc, facts, ProductID, 0x%x); | MPS_PRINTFIELD(sc, facts, ProductID, 0x%x); | ||||
mps_dprint_field(sc, MPS_XINFO, "IOCCapabilities: %b\n", | mps_print_field(sc, "IOCCapabilities: %b\n", | ||||
facts->IOCCapabilities, "\20" "\3ScsiTaskFull" "\4DiagTrace" | facts->IOCCapabilities, "\20" "\3ScsiTaskFull" "\4DiagTrace" | ||||
"\5SnapBuf" "\6ExtBuf" "\7EEDP" "\10BiDirTarg" "\11Multicast" | "\5SnapBuf" "\6ExtBuf" "\7EEDP" "\10BiDirTarg" "\11Multicast" | ||||
"\14TransRetry" "\15IR" "\16EventReplay" "\17RaidAccel" | "\14TransRetry" "\15IR" "\16EventReplay" "\17RaidAccel" | ||||
"\20MSIXIndex" "\21HostDisc"); | "\20MSIXIndex" "\21HostDisc"); | ||||
mps_dprint_field(sc, MPS_XINFO, "FWVersion= %d-%d-%d-%d\n", | mps_print_field(sc, "FWVersion= %d-%d-%d-%d\n", | ||||
facts->FWVersion.Struct.Major, | facts->FWVersion.Struct.Major, | ||||
facts->FWVersion.Struct.Minor, | facts->FWVersion.Struct.Minor, | ||||
facts->FWVersion.Struct.Unit, | facts->FWVersion.Struct.Unit, | ||||
facts->FWVersion.Struct.Dev); | facts->FWVersion.Struct.Dev); | ||||
MPS_PRINTFIELD(sc, facts, IOCRequestFrameSize, %d); | MPS_PRINTFIELD(sc, facts, IOCRequestFrameSize, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxInitiators, %d); | MPS_PRINTFIELD(sc, facts, MaxInitiators, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxTargets, %d); | MPS_PRINTFIELD(sc, facts, MaxTargets, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxSasExpanders, %d); | MPS_PRINTFIELD(sc, facts, MaxSasExpanders, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxEnclosures, %d); | MPS_PRINTFIELD(sc, facts, MaxEnclosures, %d); | ||||
mps_dprint_field(sc, MPS_XINFO, "ProtocolFlags: %b\n", | mps_print_field(sc, "ProtocolFlags: %b\n", | ||||
facts->ProtocolFlags, "\20" "\1ScsiTarg" "\2ScsiInit"); | facts->ProtocolFlags, "\20" "\1ScsiTarg" "\2ScsiInit"); | ||||
MPS_PRINTFIELD(sc, facts, HighPriorityCredit, %d); | MPS_PRINTFIELD(sc, facts, HighPriorityCredit, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxReplyDescriptorPostQueueDepth, %d); | MPS_PRINTFIELD(sc, facts, MaxReplyDescriptorPostQueueDepth, %d); | ||||
MPS_PRINTFIELD(sc, facts, ReplyFrameSize, %d); | MPS_PRINTFIELD(sc, facts, ReplyFrameSize, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxVolumes, %d); | MPS_PRINTFIELD(sc, facts, MaxVolumes, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxDevHandle, %d); | MPS_PRINTFIELD(sc, facts, MaxDevHandle, %d); | ||||
MPS_PRINTFIELD(sc, facts, MaxPersistentEntries, %d); | MPS_PRINTFIELD(sc, facts, MaxPersistentEntries, %d); | ||||
} | } | ||||
void | void | ||||
mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) | _mps_print_portfacts(struct mps_softc *sc, MPI2_PORT_FACTS_REPLY *facts) | ||||
{ | { | ||||
MPS_PRINTFIELD_START(sc, "PortFacts"); | MPS_PRINTFIELD_START(sc, "PortFacts"); | ||||
MPS_PRINTFIELD(sc, facts, PortNumber, %d); | MPS_PRINTFIELD(sc, facts, PortNumber, %d); | ||||
MPS_PRINTFIELD(sc, facts, PortType, 0x%x); | MPS_PRINTFIELD(sc, facts, PortType, 0x%x); | ||||
MPS_PRINTFIELD(sc, facts, MaxPostedCmdBuffers, %d); | MPS_PRINTFIELD(sc, facts, MaxPostedCmdBuffers, %d); | ||||
} | } | ||||
void | void | ||||
mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | _mps_print_event(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | ||||
{ | { | ||||
MPS_EVENTFIELD_START(sc, "EventReply"); | MPS_PRINTFIELD_START(sc, "EventReply"); | ||||
MPS_EVENTFIELD(sc, event, EventDataLength, %d); | MPS_PRINTFIELD(sc, event, EventDataLength, %d); | ||||
MPS_EVENTFIELD(sc, event, AckRequired, %d); | MPS_PRINTFIELD(sc, event, AckRequired, %d); | ||||
mps_dprint_field(sc, MPS_EVENT, "Event: %s (0x%x)\n", | mps_print_field(sc, "Event: %s (0x%x)\n", | ||||
mps_describe_table(mps_event_names, event->Event), event->Event); | mps_describe_table(mps_event_names, event->Event), event->Event); | ||||
MPS_EVENTFIELD(sc, event, EventContext, 0x%x); | MPS_PRINTFIELD(sc, event, EventContext, 0x%x); | ||||
} | } | ||||
void | void | ||||
mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) | _mps_print_sasdev0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_DEV_0 *buf) | ||||
{ | { | ||||
MPS_PRINTFIELD_START(sc, "SAS Device Page 0"); | MPS_PRINTFIELD_START(sc, "SAS Device Page 0"); | ||||
MPS_PRINTFIELD(sc, buf, Slot, %d); | MPS_PRINTFIELD(sc, buf, Slot, %d); | ||||
MPS_PRINTFIELD(sc, buf, EnclosureHandle, 0x%x); | MPS_PRINTFIELD(sc, buf, EnclosureHandle, 0x%x); | ||||
mps_dprint_field(sc, MPS_XINFO, "SASAddress: 0x%jx\n", | mps_print_field(sc, "SASAddress: 0x%jx\n", | ||||
mps_to_u64(&buf->SASAddress)); | mps_to_u64(&buf->SASAddress)); | ||||
MPS_PRINTFIELD(sc, buf, ParentDevHandle, 0x%x); | MPS_PRINTFIELD(sc, buf, ParentDevHandle, 0x%x); | ||||
MPS_PRINTFIELD(sc, buf, PhyNum, %d); | MPS_PRINTFIELD(sc, buf, PhyNum, %d); | ||||
MPS_PRINTFIELD(sc, buf, AccessStatus, 0x%x); | MPS_PRINTFIELD(sc, buf, AccessStatus, 0x%x); | ||||
MPS_PRINTFIELD(sc, buf, DevHandle, 0x%x); | MPS_PRINTFIELD(sc, buf, DevHandle, 0x%x); | ||||
MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); | MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, 0x%x); | ||||
MPS_PRINTFIELD(sc, buf, ZoneGroup, %d); | MPS_PRINTFIELD(sc, buf, ZoneGroup, %d); | ||||
mps_dprint_field(sc, MPS_XINFO, "DeviceInfo: %b,%s\n", buf->DeviceInfo, | mps_print_field(sc, "DeviceInfo: %b,%s\n", 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", | ||||
mps_describe_table(mps_sasdev0_devtype, buf->DeviceInfo & 0x03)); | mps_describe_table(mps_sasdev0_devtype, buf->DeviceInfo & 0x03)); | ||||
MPS_PRINTFIELD(sc, buf, Flags, 0x%x); | MPS_PRINTFIELD(sc, buf, Flags, 0x%x); | ||||
MPS_PRINTFIELD(sc, buf, PhysicalPort, %d); | MPS_PRINTFIELD(sc, buf, PhysicalPort, %d); | ||||
MPS_PRINTFIELD(sc, buf, MaxPortConnections, %d); | MPS_PRINTFIELD(sc, buf, MaxPortConnections, %d); | ||||
mps_dprint_field(sc, MPS_XINFO, "DeviceName: 0x%jx\n", | mps_print_field(sc, "DeviceName: 0x%jx\n", | ||||
mps_to_u64(&buf->DeviceName)); | mps_to_u64(&buf->DeviceName)); | ||||
MPS_PRINTFIELD(sc, buf, PortGroups, %d); | MPS_PRINTFIELD(sc, buf, PortGroups, %d); | ||||
MPS_PRINTFIELD(sc, buf, DmaGroup, %d); | MPS_PRINTFIELD(sc, buf, DmaGroup, %d); | ||||
MPS_PRINTFIELD(sc, buf, ControlGroup, %d); | MPS_PRINTFIELD(sc, buf, ControlGroup, %d); | ||||
} | } | ||||
void | void | ||||
mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | _mps_print_evt_sas(struct mps_softc *sc, MPI2_EVENT_NOTIFICATION_REPLY *event) | ||||
{ | { | ||||
mps_print_event(sc, event); | _mps_print_event(sc, event); | ||||
switch(event->Event) { | switch(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; | ||||
mps_dprint_field(sc, MPS_EVENT, "Flags: %b\n", data->Flags, | mps_print_field(sc, "Flags: %b\n", data->Flags, | ||||
"\20" "\1InProgress" "\2DeviceChange"); | "\20" "\1InProgress" "\2DeviceChange"); | ||||
mps_dprint_field(sc, MPS_EVENT, "ReasonCode: %s\n", | mps_print_field(sc, "ReasonCode: %s\n", | ||||
mps_describe_table(mps_sasdisc_reason, data->ReasonCode)); | mps_describe_table(mps_sasdisc_reason, data->ReasonCode)); | ||||
MPS_EVENTFIELD(sc, data, PhysicalPort, %d); | MPS_PRINTFIELD(sc, data, PhysicalPort, %d); | ||||
mps_dprint_field(sc, MPS_EVENT, "DiscoveryStatus: %b\n", | mps_print_field(sc, "DiscoveryStatus: %b\n", | ||||
data->DiscoveryStatus, "\20" | 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; | ||||
} | } | ||||
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; | ||||
MPS_EVENTFIELD(sc, data, EnclosureHandle, 0x%x); | MPS_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); | ||||
MPS_EVENTFIELD(sc, data, ExpanderDevHandle, 0x%x); | MPS_PRINTFIELD(sc, data, ExpanderDevHandle, 0x%x); | ||||
MPS_EVENTFIELD(sc, data, NumPhys, %d); | MPS_PRINTFIELD(sc, data, NumPhys, %d); | ||||
MPS_EVENTFIELD(sc, data, NumEntries, %d); | MPS_PRINTFIELD(sc, data, NumEntries, %d); | ||||
MPS_EVENTFIELD(sc, data, StartPhyNum, %d); | MPS_PRINTFIELD(sc, data, StartPhyNum, %d); | ||||
mps_dprint_field(sc, MPS_EVENT, "ExpStatus: %s (0x%x)\n", | mps_print_field(sc, "ExpStatus: %s (0x%x)\n", | ||||
mps_describe_table(mps_sastopo_exp, data->ExpStatus), | mps_describe_table(mps_sastopo_exp, data->ExpStatus), | ||||
data->ExpStatus); | data->ExpStatus); | ||||
MPS_EVENTFIELD(sc, data, PhysicalPort, %d); | MPS_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; | ||||
mps_dprint_field(sc, MPS_EVENT, | mps_print_field(sc, | ||||
"PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, | "PHY[%d].AttachedDevHandle: 0x%04x\n", phynum, | ||||
phy->AttachedDevHandle); | phy->AttachedDevHandle); | ||||
mps_dprint_field(sc, MPS_EVENT, | mps_print_field(sc, | ||||
"PHY[%d].LinkRate: %s (0x%x)\n", phynum, | "PHY[%d].LinkRate: %s (0x%x)\n", phynum, | ||||
mps_describe_table(mps_linkrate_names, | mps_describe_table(mps_linkrate_names, | ||||
(phy->LinkRate >> 4) & 0xf), phy->LinkRate); | (phy->LinkRate >> 4) & 0xf), phy->LinkRate); | ||||
mps_dprint_field(sc,MPS_EVENT,"PHY[%d].PhyStatus: %s\n", | mps_print_field(sc, "PHY[%d].PhyStatus: %s\n", | ||||
phynum, mps_describe_table(mps_phystatus_names, | phynum, mps_describe_table(mps_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; | ||||
MPS_EVENTFIELD(sc, data, EnclosureHandle, 0x%x); | MPS_PRINTFIELD(sc, data, EnclosureHandle, 0x%x); | ||||
mps_dprint_field(sc, MPS_EVENT, "ReasonCode: %s\n", | mps_print_field(sc, "ReasonCode: %s\n", | ||||
mps_describe_table(mps_sastopo_exp, data->ReasonCode)); | mps_describe_table(mps_sastopo_exp, data->ReasonCode)); | ||||
MPS_EVENTFIELD(sc, data, PhysicalPort, %d); | MPS_PRINTFIELD(sc, data, PhysicalPort, %d); | ||||
MPS_EVENTFIELD(sc, data, NumSlots, %d); | MPS_PRINTFIELD(sc, data, NumSlots, %d); | ||||
MPS_EVENTFIELD(sc, data, StartSlot, %d); | MPS_PRINTFIELD(sc, data, StartSlot, %d); | ||||
MPS_EVENTFIELD(sc, data, PhyBits, 0x%x); | MPS_PRINTFIELD(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; | ||||
MPS_EVENTFIELD(sc, data, TaskTag, 0x%x); | MPS_PRINTFIELD(sc, data, TaskTag, 0x%x); | ||||
mps_dprint_field(sc, MPS_EVENT, "ReasonCode: %s\n", | mps_print_field(sc, "ReasonCode: %s\n", | ||||
mps_describe_table(mps_sasdev_reason, data->ReasonCode)); | mps_describe_table(mps_sasdev_reason, data->ReasonCode)); | ||||
MPS_EVENTFIELD(sc, data, ASC, 0x%x); | MPS_PRINTFIELD(sc, data, ASC, 0x%x); | ||||
MPS_EVENTFIELD(sc, data, ASCQ, 0x%x); | MPS_PRINTFIELD(sc, data, ASCQ, 0x%x); | ||||
MPS_EVENTFIELD(sc, data, DevHandle, 0x%x); | MPS_PRINTFIELD(sc, data, DevHandle, 0x%x); | ||||
mps_dprint_field(sc, MPS_EVENT, "SASAddress: 0x%jx\n", | mps_print_field(sc, "SASAddress: 0x%jx\n", | ||||
mps_to_u64(&data->SASAddress)); | mps_to_u64(&data->SASAddress)); | ||||
} | } | ||||
default: | default: | ||||
break; | break; | ||||
} | } | ||||
} | } | ||||
void | void | ||||
mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) | _mps_print_expander1(struct mps_softc *sc, MPI2_CONFIG_PAGE_EXPANDER_1 *buf) | ||||
{ | { | ||||
MPS_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); | MPS_PRINTFIELD_START(sc, "SAS Expander Page 1 #%d", buf->Phy); | ||||
MPS_PRINTFIELD(sc, buf, PhysicalPort, %d); | MPS_PRINTFIELD(sc, buf, PhysicalPort, %d); | ||||
MPS_PRINTFIELD(sc, buf, NumPhys, %d); | MPS_PRINTFIELD(sc, buf, NumPhys, %d); | ||||
MPS_PRINTFIELD(sc, buf, Phy, %d); | MPS_PRINTFIELD(sc, buf, Phy, %d); | ||||
MPS_PRINTFIELD(sc, buf, NumTableEntriesProgrammed, %d); | MPS_PRINTFIELD(sc, buf, NumTableEntriesProgrammed, %d); | ||||
mps_dprint_field(sc, MPS_XINFO, "ProgrammedLinkRate: %s (0x%x)\n", | mps_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", | ||||
mps_describe_table(mps_linkrate_names, | mps_describe_table(mps_linkrate_names, | ||||
(buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | ||||
mps_dprint_field(sc, MPS_XINFO, "HwLinkRate: %s (0x%x)\n", | mps_print_field(sc, "HwLinkRate: %s (0x%x)\n", | ||||
mps_describe_table(mps_linkrate_names, | mps_describe_table(mps_linkrate_names, | ||||
(buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | ||||
MPS_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); | MPS_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); | ||||
mps_dprint_field(sc, MPS_XINFO, "PhyInfo Reason: %s (0x%x)\n", | mps_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", | ||||
mps_describe_table(mps_phyinfo_reason_names, | mps_describe_table(mps_phyinfo_reason_names, | ||||
(buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); | (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); | ||||
mps_dprint_field(sc, MPS_XINFO, "AttachedDeviceInfo: %b,%s\n", | mps_print_field(sc, "AttachedDeviceInfo: %b,%s\n", | ||||
buf->AttachedDeviceInfo, "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" | buf->AttachedDeviceInfo, "\20" "\4SATAhost" "\5SMPinit" "\6STPinit" | ||||
"\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" | "\7SSPinit" "\10SATAdev" "\11SMPtarg" "\12STPtarg" "\13SSPtarg" | ||||
"\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", | "\14Direct" "\15LSIdev" "\16ATAPIdev" "\17SEPdev", | ||||
mps_describe_table(mps_sasdev0_devtype, | mps_describe_table(mps_sasdev0_devtype, | ||||
buf->AttachedDeviceInfo & 0x03)); | buf->AttachedDeviceInfo & 0x03)); | ||||
MPS_PRINTFIELD(sc, buf, ExpanderDevHandle, 0x%04x); | MPS_PRINTFIELD(sc, buf, ExpanderDevHandle, 0x%04x); | ||||
MPS_PRINTFIELD(sc, buf, ChangeCount, %d); | MPS_PRINTFIELD(sc, buf, ChangeCount, %d); | ||||
mps_dprint_field(sc, MPS_XINFO, "NegotiatedLinkRate: %s (0x%x)\n", | mps_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", | ||||
mps_describe_table(mps_linkrate_names, | mps_describe_table(mps_linkrate_names, | ||||
buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | ||||
MPS_PRINTFIELD(sc, buf, PhyIdentifier, %d); | MPS_PRINTFIELD(sc, buf, PhyIdentifier, %d); | ||||
MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | ||||
MPS_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); | MPS_PRINTFIELD(sc, buf, DiscoveryInfo, 0x%x); | ||||
MPS_PRINTFIELD(sc, buf, AttachedPhyInfo, 0x%x); | MPS_PRINTFIELD(sc, buf, AttachedPhyInfo, 0x%x); | ||||
mps_dprint_field(sc, MPS_XINFO, "AttachedPhyInfo Reason: %s (0x%x)\n", | mps_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", | ||||
mps_describe_table(mps_phyinfo_reason_names, | mps_describe_table(mps_phyinfo_reason_names, | ||||
buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); | buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); | ||||
MPS_PRINTFIELD(sc, buf, ZoneGroup, %d); | MPS_PRINTFIELD(sc, buf, ZoneGroup, %d); | ||||
MPS_PRINTFIELD(sc, buf, SelfConfigStatus, 0x%x); | MPS_PRINTFIELD(sc, buf, SelfConfigStatus, 0x%x); | ||||
} | } | ||||
void | void | ||||
mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) | _mps_print_sasphy0(struct mps_softc *sc, MPI2_CONFIG_PAGE_SAS_PHY_0 *buf) | ||||
{ | { | ||||
MPS_PRINTFIELD_START(sc, "SAS PHY Page 0"); | MPS_PRINTFIELD_START(sc, "SAS PHY Page 0"); | ||||
MPS_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); | MPS_PRINTFIELD(sc, buf, OwnerDevHandle, 0x%04x); | ||||
MPS_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); | MPS_PRINTFIELD(sc, buf, AttachedDevHandle, 0x%04x); | ||||
MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | MPS_PRINTFIELD(sc, buf, AttachedPhyIdentifier, %d); | ||||
mps_dprint_field(sc, MPS_XINFO, "AttachedPhyInfo Reason: %s (0x%x)\n", | mps_print_field(sc, "AttachedPhyInfo Reason: %s (0x%x)\n", | ||||
mps_describe_table(mps_phyinfo_reason_names, | mps_describe_table(mps_phyinfo_reason_names, | ||||
buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); | buf->AttachedPhyInfo & 0xf), buf->AttachedPhyInfo); | ||||
mps_dprint_field(sc, MPS_XINFO, "ProgrammedLinkRate: %s (0x%x)\n", | mps_print_field(sc, "ProgrammedLinkRate: %s (0x%x)\n", | ||||
mps_describe_table(mps_linkrate_names, | mps_describe_table(mps_linkrate_names, | ||||
(buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | (buf->ProgrammedLinkRate >> 4) & 0xf), buf->ProgrammedLinkRate); | ||||
mps_dprint_field(sc, MPS_XINFO, "HwLinkRate: %s (0x%x)\n", | mps_print_field(sc, "HwLinkRate: %s (0x%x)\n", | ||||
mps_describe_table(mps_linkrate_names, | mps_describe_table(mps_linkrate_names, | ||||
(buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | (buf->HwLinkRate >> 4) & 0xf), buf->HwLinkRate); | ||||
MPS_PRINTFIELD(sc, buf, ChangeCount, %d); | MPS_PRINTFIELD(sc, buf, ChangeCount, %d); | ||||
MPS_PRINTFIELD(sc, buf, Flags, 0x%x); | MPS_PRINTFIELD(sc, buf, Flags, 0x%x); | ||||
mps_dprint_field(sc, MPS_XINFO, "PhyInfo Reason: %s (0x%x)\n", | mps_print_field(sc, "PhyInfo Reason: %s (0x%x)\n", | ||||
mps_describe_table(mps_phyinfo_reason_names, | mps_describe_table(mps_phyinfo_reason_names, | ||||
(buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); | (buf->PhyInfo >> 16) & 0xf), buf->PhyInfo); | ||||
mps_dprint_field(sc, MPS_XINFO, "NegotiatedLinkRate: %s (0x%x)\n", | mps_print_field(sc, "NegotiatedLinkRate: %s (0x%x)\n", | ||||
mps_describe_table(mps_linkrate_names, | mps_describe_table(mps_linkrate_names, | ||||
buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | buf->NegotiatedLinkRate & 0xf), buf->NegotiatedLinkRate); | ||||
} | } | ||||
void | void | ||||
mps_print_sgl(struct mps_softc *sc, struct mps_command *cm, int offset) | mps_print_sgl(struct mps_softc *sc, struct mps_command *cm, int offset) | ||||
{ | { | ||||
MPI2_SGE_SIMPLE64 *sge; | MPI2_SGE_SIMPLE64 *sge; | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |