aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sfp.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/sfp.h')
-rw-r--r--include/linux/sfp.h72
1 files changed, 71 insertions, 1 deletions
diff --git a/include/linux/sfp.h b/include/linux/sfp.h
index ebce9e24906a..d37518e89db2 100644
--- a/include/linux/sfp.h
+++ b/include/linux/sfp.h
@@ -231,6 +231,50 @@ struct sfp_eeprom_id {
231 struct sfp_eeprom_ext ext; 231 struct sfp_eeprom_ext ext;
232} __packed; 232} __packed;
233 233
234struct sfp_diag {
235 __be16 temp_high_alarm;
236 __be16 temp_low_alarm;
237 __be16 temp_high_warn;
238 __be16 temp_low_warn;
239 __be16 volt_high_alarm;
240 __be16 volt_low_alarm;
241 __be16 volt_high_warn;
242 __be16 volt_low_warn;
243 __be16 bias_high_alarm;
244 __be16 bias_low_alarm;
245 __be16 bias_high_warn;
246 __be16 bias_low_warn;
247 __be16 txpwr_high_alarm;
248 __be16 txpwr_low_alarm;
249 __be16 txpwr_high_warn;
250 __be16 txpwr_low_warn;
251 __be16 rxpwr_high_alarm;
252 __be16 rxpwr_low_alarm;
253 __be16 rxpwr_high_warn;
254 __be16 rxpwr_low_warn;
255 __be16 laser_temp_high_alarm;
256 __be16 laser_temp_low_alarm;
257 __be16 laser_temp_high_warn;
258 __be16 laser_temp_low_warn;
259 __be16 tec_cur_high_alarm;
260 __be16 tec_cur_low_alarm;
261 __be16 tec_cur_high_warn;
262 __be16 tec_cur_low_warn;
263 __be32 cal_rxpwr4;
264 __be32 cal_rxpwr3;
265 __be32 cal_rxpwr2;
266 __be32 cal_rxpwr1;
267 __be32 cal_rxpwr0;
268 __be16 cal_txi_slope;
269 __be16 cal_txi_offset;
270 __be16 cal_txpwr_slope;
271 __be16 cal_txpwr_offset;
272 __be16 cal_t_slope;
273 __be16 cal_t_offset;
274 __be16 cal_v_slope;
275 __be16 cal_v_offset;
276} __packed;
277
234/* SFP EEPROM registers */ 278/* SFP EEPROM registers */
235enum { 279enum {
236 SFP_PHYS_ID = 0x00, 280 SFP_PHYS_ID = 0x00,
@@ -384,7 +428,33 @@ enum {
384 SFP_TEC_CUR = 0x6c, 428 SFP_TEC_CUR = 0x6c,
385 429
386 SFP_STATUS = 0x6e, 430 SFP_STATUS = 0x6e,
387 SFP_ALARM = 0x70, 431 SFP_ALARM0 = 0x70,
432 SFP_ALARM0_TEMP_HIGH = BIT(7),
433 SFP_ALARM0_TEMP_LOW = BIT(6),
434 SFP_ALARM0_VCC_HIGH = BIT(5),
435 SFP_ALARM0_VCC_LOW = BIT(4),
436 SFP_ALARM0_TX_BIAS_HIGH = BIT(3),
437 SFP_ALARM0_TX_BIAS_LOW = BIT(2),
438 SFP_ALARM0_TXPWR_HIGH = BIT(1),
439 SFP_ALARM0_TXPWR_LOW = BIT(0),
440
441 SFP_ALARM1 = 0x71,
442 SFP_ALARM1_RXPWR_HIGH = BIT(7),
443 SFP_ALARM1_RXPWR_LOW = BIT(6),
444
445 SFP_WARN0 = 0x74,
446 SFP_WARN0_TEMP_HIGH = BIT(7),
447 SFP_WARN0_TEMP_LOW = BIT(6),
448 SFP_WARN0_VCC_HIGH = BIT(5),
449 SFP_WARN0_VCC_LOW = BIT(4),
450 SFP_WARN0_TX_BIAS_HIGH = BIT(3),
451 SFP_WARN0_TX_BIAS_LOW = BIT(2),
452 SFP_WARN0_TXPWR_HIGH = BIT(1),
453 SFP_WARN0_TXPWR_LOW = BIT(0),
454
455 SFP_WARN1 = 0x75,
456 SFP_WARN1_RXPWR_HIGH = BIT(7),
457 SFP_WARN1_RXPWR_LOW = BIT(6),
388 458
389 SFP_EXT_STATUS = 0x76, 459 SFP_EXT_STATUS = 0x76,
390 SFP_VSL = 0x78, 460 SFP_VSL = 0x78,