Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for 1G autoneg on ixgbe #56

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/drivers/net/intelx.c
Expand Up @@ -183,6 +183,7 @@ static int intelx_open ( struct net_device *netdev ) {
uint32_t rdrxctl;
uint32_t rxctrl;
uint32_t dca_rxctrl;
uint32_t autoc;
int rc;

/* Create transmit descriptor ring */
Expand Down Expand Up @@ -259,6 +260,16 @@ static int intelx_open ( struct net_device *netdev ) {
/* Fill receive ring */
intel_refill_rx ( intel );

/* Support 1G autoneg */
autoc = readl ( intel->regs + INTELX_AUTOC );
DBGC ( intel, "INTEL %p neg (autoc %08x)\n", intel, autoc );
autoc &= ~INTELX_AUTOC_LMS_MASK;
autoc |= INTELX_AUTOC_LMS_KX4_KX_KR_1G_AN;
autoc |= INTELX_AUTOC_KX_SUPP;
autoc |= INTELX_AUTOC_AN_RESTART;
writel ( autoc, intel->regs + INTELX_AUTOC );
DBGC ( intel, "INTEL %p neg (autoc %08x)\n", intel, autoc );

/* Update link state */
intelx_check_link ( netdev );

Expand Down
7 changes: 7 additions & 0 deletions src/drivers/net/intelx.h
Expand Up @@ -114,4 +114,11 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
#define INTELX_LINKS 0x042a4UL
#define INTELX_LINKS_UP 0x40000000UL /**< Link up */

/** Auto config */
#define INTELX_AUTOC 0x042A0UL
#define INTELX_AUTOC_LMS_MASK (0x7 << 13)
#define INTELX_AUTOC_LMS_KX4_KX_KR_1G_AN (0x6 << 13)
#define INTELX_AUTOC_KX_SUPP 0x40000000UL
#define INTELX_AUTOC_AN_RESTART 0x00001000UL

#endif /* _INTELX_H */