| 215 | } |
| 216 | |
| 217 | static void sff_8472_parse_eeprom(const uint8_t *data, struct sff_diags *sd) |
| 218 | { |
| 219 | sd->supports_dom = data[SFF_A0_DOM] & SFF_A0_DOM_IMPL; |
| 220 | sd->supports_alarms = data[SFF_A0_OPTIONS] & SFF_A0_OPTIONS_AW; |
| 221 | sd->calibrated_ext = data[SFF_A0_DOM] & SFF_A0_DOM_EXTCAL; |
| 222 | sd->rx_power_type = data[SFF_A0_DOM] & SFF_A0_DOM_PWRT; |
| 223 | |
| 224 | sff_8472_dom_parse(data, sd); |
| 225 | |
| 226 | /* |
| 227 | * If the SFP is externally calibrated, we need to read calibration data |
| 228 | * and compensate the already stored readings. |
| 229 | */ |
| 230 | if (sd->calibrated_ext) |
| 231 | sff_8472_calibration(data, sd); |
| 232 | } |
| 233 | |
| 234 | void sff_8472_show_all(const uint8_t *data, struct rte_tel_data *d) |
| 235 | { |
no test coverage detected