From: Ben Hutchings <bhutchings@solarflare.com>
To: David Miller <davem@davemloft.net>
Cc: netdev@vger.kernel.org, linux-net-drivers@solarflare.com,
Jeff Kirsher <jeffrey.t.kirsher@intel.com>,
Jesse Brandenburg <jesse.brandeburg@intel.com>,
e1000-devel <e1000-devel@lists.sourceforge.net>
Subject: [PATCH 08/16] ixgb: Use generic MDIO definitions
Date: Wed, 29 Apr 2009 19:11:05 +0100 [thread overview]
Message-ID: <1241028665.3246.49.camel@achroite> (raw)
In-Reply-To: <1241028086.3246.30.camel@achroite>
Compile-tested only.
Signed-off-by: Ben Hutchings <bhutchings@solarflare.com>
---
drivers/net/ixgb/ixgb_hw.c | 20 ++++++++++----------
drivers/net/ixgb/ixgb_hw.h | 14 ++------------
2 files changed, 12 insertions(+), 22 deletions(-)
diff --git a/drivers/net/ixgb/ixgb_hw.c b/drivers/net/ixgb/ixgb_hw.c
index 11dcda0..ff67a84 100644
--- a/drivers/net/ixgb/ixgb_hw.c
+++ b/drivers/net/ixgb/ixgb_hw.c
@@ -192,7 +192,7 @@ ixgb_identify_xpak_vendor(struct ixgb_hw *hw)
vendor_name[i] = ixgb_read_phy_reg(hw,
MDIO_PMA_PMD_XPAK_VENDOR_NAME
+ i, IXGB_PHY_ADDRESS,
- MDIO_PMA_PMD_DID);
+ MDIO_MMD_PMAPMD);
}
/* Determine the actual vendor */
@@ -1225,15 +1225,15 @@ ixgb_optics_reset(struct ixgb_hw *hw)
u16 mdio_reg;
ixgb_write_phy_reg(hw,
- MDIO_PMA_PMD_CR1,
- IXGB_PHY_ADDRESS,
- MDIO_PMA_PMD_DID,
- MDIO_PMA_PMD_CR1_RESET);
-
- mdio_reg = ixgb_read_phy_reg( hw,
- MDIO_PMA_PMD_CR1,
- IXGB_PHY_ADDRESS,
- MDIO_PMA_PMD_DID);
+ MDIO_CTRL1,
+ IXGB_PHY_ADDRESS,
+ MDIO_MMD_PMAPMD,
+ MDIO_CTRL1_RESET);
+
+ mdio_reg = ixgb_read_phy_reg(hw,
+ MDIO_CTRL1,
+ IXGB_PHY_ADDRESS,
+ MDIO_MMD_PMAPMD);
}
return;
diff --git a/drivers/net/ixgb/ixgb_hw.h b/drivers/net/ixgb/ixgb_hw.h
index 831fe0c..af6ca3a 100644
--- a/drivers/net/ixgb/ixgb_hw.h
+++ b/drivers/net/ixgb/ixgb_hw.h
@@ -29,6 +29,8 @@
#ifndef _IXGB_HW_H_
#define _IXGB_HW_H_
+#include <linux/mdio.h>
+
#include "ixgb_osdep.h"
/* Enums */
@@ -507,18 +509,6 @@ typedef enum {
/* Definitions for the optics devices on the MDIO bus. */
#define IXGB_PHY_ADDRESS 0x0 /* Single PHY, multiple "Devices" */
-/* Standard five-bit Device IDs. See IEEE 802.3ae, clause 45 */
-#define MDIO_PMA_PMD_DID 0x01
-#define MDIO_WIS_DID 0x02
-#define MDIO_PCS_DID 0x03
-#define MDIO_XGXS_DID 0x04
-
-/* Standard PMA/PMD registers and bit definitions. */
-/* Note: This is a very limited set of definitions, */
-/* only implemented features are defined. */
-#define MDIO_PMA_PMD_CR1 0x0000
-#define MDIO_PMA_PMD_CR1_RESET 0x8000
-
#define MDIO_PMA_PMD_XPAK_VENDOR_NAME 0x803A /* XPAK/XENPAK devices only */
/* Vendor-specific MDIO registers */
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2009-04-29 18:11 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-29 18:01 [PATCH 00/16] MDIO and ethtool enhancements Ben Hutchings
2009-04-29 18:02 ` [PATCH 01/16] ethtool: Add port type PORT_OTHER Ben Hutchings
2009-04-29 18:04 ` [PATCH 02/16] mdio: Add register definitions for MDIO (clause 45) Ben Hutchings
2009-04-29 18:04 ` [PATCH 03/16] mdio: Add generic MDIO (clause 45) support functions Ben Hutchings
2009-04-29 18:05 ` [PATCH 04/16] sfc: Use generic MDIO functions and definitions Ben Hutchings
2009-04-29 18:06 ` [PATCH 05/16] chelsio: Use generic MDIO definitions and mdio_mii_ioctl() Ben Hutchings
2009-04-29 18:07 ` [PATCH 06/16] cxgb3: " Ben Hutchings
2009-04-29 18:08 ` [PATCH 07/16] ixgbe: Use generic MDIO definitions and functions Ben Hutchings
2009-04-29 18:11 ` Ben Hutchings [this message]
2009-04-29 18:13 ` [PATCH 09/16] s2io: Use generic MDIO definitions Ben Hutchings
2009-04-29 18:15 ` [PATCH 10/16] mii: Simplify mii_resolve_flowctrl_fdx() Ben Hutchings
2009-04-30 8:18 ` Steve.Glendinning
2009-04-29 18:19 ` [PATCH 11/16] mii: Add mii_advertise_flowctrl() Ben Hutchings
2009-04-29 18:19 ` [PATCH 12/16] mdio: Add mdio45_ethtool_spauseparam_an() Ben Hutchings
2009-04-29 18:20 ` [PATCH 13/16] sfc: Use generic MDIO flow control auto-negotiation functions Ben Hutchings
2009-04-29 18:21 ` [PATCH 14/16] ethtool/mdio: Report MDIO mode support and link partner advertising Ben Hutchings
2009-04-29 18:25 ` [PATCH 15/16] ethtool/mdio: Support backplane mode negotiation Ben Hutchings
2009-04-29 18:34 ` [PATCH 16/16] mii: Rewrite mii_ethtool_gset() to report mdio_support and lp_advertising Ben Hutchings
2009-04-30 0:31 ` [PATCH 00/16] MDIO and ethtool enhancements David Miller
2009-04-30 1:28 ` Ben Hutchings
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1241028665.3246.49.camel@achroite \
--to=bhutchings@solarflare.com \
--cc=davem@davemloft.net \
--cc=e1000-devel@lists.sourceforge.net \
--cc=jeffrey.t.kirsher@intel.com \
--cc=jesse.brandeburg@intel.com \
--cc=linux-net-drivers@solarflare.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).