|
Lines 58-69
MPS_TABLE(top, show);
Link Here
|
| 58 |
static int |
58 |
static int |
| 59 |
show_adapter(int ac, char **av) |
59 |
show_adapter(int ac, char **av) |
| 60 |
{ |
60 |
{ |
|
|
61 |
const char* pcie_speed[] = { "2.5", "5.0", "8.0" }; |
| 62 |
const char* temp_units[] = { "", "F", "C" }; |
| 63 |
const char* ioc_speeds[] = { "", "Full", "Half", "Quarter", "Eighth" }; |
| 64 |
|
| 61 |
MPI2_CONFIG_PAGE_SASIOUNIT_0 *sas0; |
65 |
MPI2_CONFIG_PAGE_SASIOUNIT_0 *sas0; |
| 62 |
MPI2_CONFIG_PAGE_SASIOUNIT_1 *sas1; |
66 |
MPI2_CONFIG_PAGE_SASIOUNIT_1 *sas1; |
| 63 |
MPI2_SAS_IO_UNIT0_PHY_DATA *phy0; |
67 |
MPI2_SAS_IO_UNIT0_PHY_DATA *phy0; |
| 64 |
MPI2_SAS_IO_UNIT1_PHY_DATA *phy1; |
68 |
MPI2_SAS_IO_UNIT1_PHY_DATA *phy1; |
| 65 |
MPI2_CONFIG_PAGE_MAN_0 *man0; |
69 |
MPI2_CONFIG_PAGE_MAN_0 *man0; |
| 66 |
MPI2_CONFIG_PAGE_BIOS_3 *bios3; |
70 |
MPI2_CONFIG_PAGE_BIOS_3 *bios3; |
|
|
71 |
MPI2_CONFIG_PAGE_IO_UNIT_7 *iounit7; |
| 67 |
MPI2_IOC_FACTS_REPLY *facts; |
72 |
MPI2_IOC_FACTS_REPLY *facts; |
| 68 |
U16 IOCStatus; |
73 |
U16 IOCStatus; |
| 69 |
char *speed, *minspeed, *maxspeed, *isdisabled, *type; |
74 |
char *speed, *minspeed, *maxspeed, *isdisabled, *type; |
|
Lines 125-130
show_adapter(int ac, char **av)
Link Here
|
| 125 |
? "yes" : "no"); |
130 |
? "yes" : "no"); |
| 126 |
free(facts); |
131 |
free(facts); |
| 127 |
|
132 |
|
|
|
133 |
iounit7 = mps_read_config_page(fd, MPI2_CONFIG_PAGETYPE_IO_UNIT, 7, 0, NULL); |
| 134 |
if (iounit7 == NULL) { |
| 135 |
error = errno; |
| 136 |
warn("Failed to get IOUNIT page 7 info"); |
| 137 |
return (error); |
| 138 |
} |
| 139 |
printf(" PCIe Width/Speed: x%d (%s GB/sec)\n", iounit7->PCIeWidth, |
| 140 |
pcie_speed[iounit7->PCIeSpeed]); |
| 141 |
printf(" IOC Speed: %s\n", ioc_speeds[iounit7->IOCSpeed]); |
| 142 |
printf(" Temperature: "); |
| 143 |
if (iounit7->IOCTemperatureUnits == MPI2_IOUNITPAGE7_IOC_TEMP_NOT_PRESENT) |
| 144 |
printf("Unknown/Unsupported\n"); |
| 145 |
else |
| 146 |
printf("%d %s\n", iounit7->IOCTemperature, |
| 147 |
temp_units[iounit7->IOCTemperatureUnits]); |
| 148 |
free(iounit7); |
| 149 |
|
| 128 |
fd = mps_open(mps_unit); |
150 |
fd = mps_open(mps_unit); |
| 129 |
if (fd < 0) { |
151 |
if (fd < 0) { |
| 130 |
error = errno; |
152 |
error = errno; |