summaryrefslogtreecommitdiffstats
path: root/drivers/net/usb/aqc111.h
diff options
context:
space:
mode:
authorDmitry Bezrukov <dmitry.bezrukov@aquantia.com>2018-11-26 10:33:12 +0100
committerDavid S. Miller <davem@davemloft.net>2018-11-28 00:46:06 +0100
commit7b8b06544ab03553022ea77736203d3502de6415 (patch)
treea80c64c2231a3f6762755229af7a4e96ee00d4aa /drivers/net/usb/aqc111.h
parentnet: usb: aqc111: Introduce PHY access (diff)
downloadlinux-7b8b06544ab03553022ea77736203d3502de6415.tar.xz
linux-7b8b06544ab03553022ea77736203d3502de6415.zip
net: usb: aqc111: Introduce link management
Add full hardware initialization sequence and link configuration logic Signed-off-by: Dmitry Bezrukov <dmitry.bezrukov@aquantia.com> Signed-off-by: Igor Russkikh <igor.russkikh@aquantia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/usb/aqc111.h')
-rw-r--r--drivers/net/usb/aqc111.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/net/usb/aqc111.h b/drivers/net/usb/aqc111.h
index a93d34af76b9..f3b45d8ca4e3 100644
--- a/drivers/net/usb/aqc111.h
+++ b/drivers/net/usb/aqc111.h
@@ -113,6 +113,7 @@
#define AQ_ADV_1G BIT(1)
#define AQ_ADV_2G5 BIT(2)
#define AQ_ADV_5G BIT(3)
+#define AQ_ADV_MASK 0x0F
#define AQ_PAUSE BIT(16)
#define AQ_ASYM_PAUSE BIT(17)
@@ -127,6 +128,10 @@
/******************************************************************************/
struct aqc111_data {
+ u8 link_speed;
+ u8 link;
+ u8 autoneg;
+ u32 advertised_speed;
struct {
u8 major;
u8 minor;
@@ -135,6 +140,14 @@ struct aqc111_data {
u32 phy_cfg;
};
+#define AQ_LS_MASK 0x8000
+#define AQ_SPEED_MASK 0x7F00
+#define AQ_SPEED_SHIFT 0x0008
+#define AQ_INT_SPEED_5G 0x000F
+#define AQ_INT_SPEED_2_5G 0x0010
+#define AQ_INT_SPEED_1G 0x0011
+#define AQ_INT_SPEED_100M 0x0013
+
static struct {
unsigned char ctrl;
unsigned char timer_l;