mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/chenhuacai/linux-loongson
synced 2025-09-01 23:46:45 +00:00

Add support for reading SFP module info and digital diagnostic monitoring data if supported by the module. The only Aquantia controller without an integrated PHY is the AQC100 which belongs to the B0 revision, that's why it's only implemented there. The register information was extracted from a diagnostic tool made publicly available by Dell, but all code was written from scratch by me. This has been tested to work with a variety of both optical and direct attach modules I had lying around and seems to work fine with all of them, including the diagnostics if supported by an optical module. All tests have been done with an AQC100 on an TL-NT521F card on firmware version 3.1.121 (current at the time of this patch). Signed-off-by: Lorenz Brun <lorenz@brun.one> Reviewed-by: Simon Horman <horms@kernel.org> Message-ID: <20241018171721.2577386-1-lorenz@brun.one> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
26 lines
608 B
C
26 lines
608 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/*
|
|
* aQuantia Corporation Network Driver
|
|
* Copyright (C) 2014-2017 aQuantia Corporation. All rights reserved
|
|
*/
|
|
|
|
/* File aq_ethtool.h: Declaration of ethertool related functions. */
|
|
|
|
#ifndef AQ_ETHTOOL_H
|
|
#define AQ_ETHTOOL_H
|
|
|
|
#include "aq_common.h"
|
|
|
|
extern const struct ethtool_ops aq_ethtool_ops;
|
|
#define AQ_PRIV_FLAGS_MASK (AQ_HW_LOOPBACK_MASK)
|
|
|
|
#define SFF_8472_ID_ADDR 0x50
|
|
#define SFF_8472_DIAGNOSTICS_ADDR 0x51
|
|
|
|
#define SFF_8472_COMP_ADDR 0x5e
|
|
#define SFF_8472_DOM_TYPE_ADDR 0x5c
|
|
|
|
#define SFF_8472_ADDRESS_CHANGE_REQ_MASK 0x4
|
|
|
|
#endif /* AQ_ETHTOOL_H */
|