* [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics
@ 2009-01-23 8:37 Jeff Kirsher
2009-01-23 8:37 ` [net-next PATCH 2/2] ixgbe: add support KX/KX4 device Jeff Kirsher
2009-01-27 4:57 ` [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics David Miller
0 siblings, 2 replies; 4+ messages in thread
From: Jeff Kirsher @ 2009-01-23 8:37 UTC (permalink / raw)
To: davem; +Cc: netdev, jeff, Don Skidmore, Peter P Waskiewicz Jr, Jeff Kirsher
From: Don Skidmore <donald.c.skidmore@intel.com>
Load times for NICs that use i2c to communicate with the phy were taking
~4.5 sec per port. This fix first checks to see if the link is already
up before calling get_link_capabilities, since if it is we don't need
query the phy for link state.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_main.c | 25 ++++++++++++++++++-------
1 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index f7b592e..18d4353 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3901,16 +3901,27 @@ static void ixgbe_netpoll(struct net_device *netdev)
**/
static int ixgbe_link_config(struct ixgbe_hw *hw)
{
- u32 autoneg = IXGBE_LINK_SPEED_10GB_FULL;
+ u32 autoneg;
+ bool link_up = false;
+ u32 ret = IXGBE_ERR_LINK_SETUP;
- /* must always autoneg for both 1G and 10G link */
- hw->mac.autoneg = true;
+ if (hw->mac.ops.check_link)
+ ret = hw->mac.ops.check_link(hw, &autoneg, &link_up, false);
- if ((hw->mac.type == ixgbe_mac_82598EB) &&
- (hw->phy.media_type == ixgbe_media_type_copper))
- autoneg = IXGBE_LINK_SPEED_82598_AUTONEG;
+ if (ret || !link_up)
+ goto link_cfg_out;
- return hw->mac.ops.setup_link_speed(hw, autoneg, true, true);
+ if (hw->mac.ops.get_link_capabilities)
+ ret = hw->mac.ops.get_link_capabilities(hw, &autoneg,
+ &hw->mac.autoneg);
+ if (ret)
+ goto link_cfg_out;
+
+ if (hw->mac.ops.setup_link_speed)
+ ret = hw->mac.ops.setup_link_speed(hw, autoneg, true, true);
+
+link_cfg_out:
+ return ret;
}
static const struct net_device_ops ixgbe_netdev_ops = {
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [net-next PATCH 2/2] ixgbe: add support KX/KX4 device
2009-01-23 8:37 [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics Jeff Kirsher
@ 2009-01-23 8:37 ` Jeff Kirsher
2009-01-27 4:57 ` David Miller
2009-01-27 4:57 ` [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics David Miller
1 sibling, 1 reply; 4+ messages in thread
From: Jeff Kirsher @ 2009-01-23 8:37 UTC (permalink / raw)
To: davem; +Cc: netdev, jeff, Don Skidmore, Peter P Waskiewicz Jr, Jeff Kirsher
From: Don Skidmore <donald.c.skidmore@intel.com>
And support for the KX/KX4 mezzanine card. Device id 0x10B6.
Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
---
drivers/net/ixgbe/ixgbe_82598.c | 9 +++++++++
drivers/net/ixgbe/ixgbe_ethtool.c | 12 ++++++++++++
drivers/net/ixgbe/ixgbe_main.c | 2 ++
drivers/net/ixgbe/ixgbe_type.h | 1 +
4 files changed, 24 insertions(+), 0 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c
index ad5699d..6c7ddb9 100644
--- a/drivers/net/ixgbe/ixgbe_82598.c
+++ b/drivers/net/ixgbe/ixgbe_82598.c
@@ -213,6 +213,10 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw)
/* Media type for I82598 is based on device ID */
switch (hw->device_id) {
+ case IXGBE_DEV_ID_82598:
+ /* Default device ID is mezzanine card KX/KX4 */
+ media_type = ixgbe_media_type_backplane;
+ break;
case IXGBE_DEV_ID_82598AF_DUAL_PORT:
case IXGBE_DEV_ID_82598AF_SINGLE_PORT:
case IXGBE_DEV_ID_82598EB_CX4:
@@ -1002,6 +1006,11 @@ static s32 ixgbe_get_supported_physical_layer_82598(struct ixgbe_hw *hw)
s32 physical_layer = IXGBE_PHYSICAL_LAYER_UNKNOWN;
switch (hw->device_id) {
+ case IXGBE_DEV_ID_82598:
+ /* Default device ID is mezzanine card KX/KX4 */
+ physical_layer = (IXGBE_PHYSICAL_LAYER_10GBASE_KX4 |
+ IXGBE_PHYSICAL_LAYER_1000BASE_KX);
+ break;
case IXGBE_DEV_ID_82598EB_CX4:
case IXGBE_DEV_ID_82598_CX4_DUAL_PORT:
physical_layer = IXGBE_PHYSICAL_LAYER_10GBASE_CX4;
diff --git a/drivers/net/ixgbe/ixgbe_ethtool.c b/drivers/net/ixgbe/ixgbe_ethtool.c
index 4f6b5df..444200f 100644
--- a/drivers/net/ixgbe/ixgbe_ethtool.c
+++ b/drivers/net/ixgbe/ixgbe_ethtool.c
@@ -130,6 +130,18 @@ static int ixgbe_get_settings(struct net_device *netdev,
ecmd->advertising |= ADVERTISED_1000baseT_Full;
ecmd->port = PORT_TP;
+ } else if (hw->phy.media_type == ixgbe_media_type_backplane) {
+ /* Set as FIBRE until SERDES defined in kernel */
+ switch (hw->device_id) {
+ case IXGBE_DEV_ID_82598:
+ ecmd->supported |= (SUPPORTED_1000baseT_Full |
+ SUPPORTED_FIBRE);
+ ecmd->advertising = (ADVERTISED_10000baseT_Full |
+ ADVERTISED_1000baseT_Full |
+ ADVERTISED_FIBRE);
+ ecmd->port = PORT_FIBRE;
+ break;
+ }
} else {
ecmd->supported |= SUPPORTED_FIBRE;
ecmd->advertising = (ADVERTISED_10000baseT_Full |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index 18d4353..43980dc 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -64,6 +64,8 @@ static const struct ixgbe_info *ixgbe_info_tbl[] = {
* Class, Class Mask, private data (not used) }
*/
static struct pci_device_id ixgbe_pci_tbl[] = {
+ {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598),
+ board_82598 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_DUAL_PORT),
board_82598 },
{PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598AF_SINGLE_PORT),
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h
index f011c57..e43f0c7 100644
--- a/drivers/net/ixgbe/ixgbe_type.h
+++ b/drivers/net/ixgbe/ixgbe_type.h
@@ -34,6 +34,7 @@
#define IXGBE_INTEL_VENDOR_ID 0x8086
/* Device IDs */
+#define IXGBE_DEV_ID_82598 0x10B6
#define IXGBE_DEV_ID_82598AF_DUAL_PORT 0x10C6
#define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7
#define IXGBE_DEV_ID_82598EB_SFP_LOM 0x10DB
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics
2009-01-23 8:37 [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics Jeff Kirsher
2009-01-23 8:37 ` [net-next PATCH 2/2] ixgbe: add support KX/KX4 device Jeff Kirsher
@ 2009-01-27 4:57 ` David Miller
1 sibling, 0 replies; 4+ messages in thread
From: David Miller @ 2009-01-27 4:57 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, jeff, donald.c.skidmore, peter.p.waskiewicz.jr
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 23 Jan 2009 00:37:33 -0800
> Load times for NICs that use i2c to communicate with the phy were taking
> ~4.5 sec per port. This fix first checks to see if the link is already
> up before calling get_link_capabilities, since if it is we don't need
> query the phy for link state.
>
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [net-next PATCH 2/2] ixgbe: add support KX/KX4 device
2009-01-23 8:37 ` [net-next PATCH 2/2] ixgbe: add support KX/KX4 device Jeff Kirsher
@ 2009-01-27 4:57 ` David Miller
0 siblings, 0 replies; 4+ messages in thread
From: David Miller @ 2009-01-27 4:57 UTC (permalink / raw)
To: jeffrey.t.kirsher; +Cc: netdev, jeff, donald.c.skidmore, peter.p.waskiewicz.jr
From: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Date: Fri, 23 Jan 2009 00:37:55 -0800
> And support for the KX/KX4 mezzanine card. Device id 0x10B6.
>
> Signed-off-by: Don Skidmore <donald.c.skidmore@intel.com>
> Signed-off-by: Peter P Waskiewicz Jr <peter.p.waskiewicz.jr@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Also applied.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2009-01-27 4:58 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-23 8:37 [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics Jeff Kirsher
2009-01-23 8:37 ` [net-next PATCH 2/2] ixgbe: add support KX/KX4 device Jeff Kirsher
2009-01-27 4:57 ` David Miller
2009-01-27 4:57 ` [net-next PATCH 1/2] ixgbe: fix slow load times on 82598 nics David Miller
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).