* [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer
@ 2011-02-11 21:45 Andy Gospodarek
2011-02-11 21:56 ` [PATCH net-2.6] ixgbe: fix panic due to uninitialized pointer Andy Gospodarek
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Andy Gospodarek @ 2011-02-11 21:45 UTC (permalink / raw)
To: netdev; +Cc: Don Skidmore, Alexander Duyck, Jeff Kirsher, Greg Rose
Systems containing an 82599EB and running a backported driver from
upstream were panicing on boot. It turns out hw->mac.ops.setup_sfp is
only set for 82599, so one should check to be sure that pointer is set
before continuing in ixgbe_sfp_config_module_task. I verified by
inspection that the upstream driver has the same issue and also added a
check before the call in ixgbe_sfp_link_config.
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
---
drivers/net/ixgbe/ixgbe_main.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c
index fbae703..30f9ccf 100644
--- a/drivers/net/ixgbe/ixgbe_main.c
+++ b/drivers/net/ixgbe/ixgbe_main.c
@@ -3728,7 +3728,8 @@ static void ixgbe_sfp_link_config(struct ixgbe_adapter *adapter)
* We need to try and force an autonegotiation
* session, then bring up link.
*/
- hw->mac.ops.setup_sfp(hw);
+ if (hw->mac.ops.setup_sfp)
+ hw->mac.ops.setup_sfp(hw);
if (!(adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK))
schedule_work(&adapter->multispeed_fiber_task);
} else {
@@ -5968,7 +5969,8 @@ static void ixgbe_sfp_config_module_task(struct work_struct *work)
unregister_netdev(adapter->netdev);
return;
}
- hw->mac.ops.setup_sfp(hw);
+ if (hw->mac.ops.setup_sfp)
+ hw->mac.ops.setup_sfp(hw);
if (!(adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK))
/* This will also work for DA Twinax connections */
--
1.7.4
^ permalink raw reply related [flat|nested] 4+ messages in thread* Re: [PATCH net-2.6] ixgbe: fix panic due to uninitialized pointer
2011-02-11 21:45 [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer Andy Gospodarek
@ 2011-02-11 21:56 ` Andy Gospodarek
2011-02-11 22:41 ` [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer Jeff Kirsher
2011-02-11 22:47 ` Skidmore, Donald C
2 siblings, 0 replies; 4+ messages in thread
From: Andy Gospodarek @ 2011-02-11 21:56 UTC (permalink / raw)
To: netdev; +Cc: Don Skidmore, Alexander Duyck, Jeff Kirsher, Greg Rose
On Fri, Feb 11, 2011 at 04:45:47PM -0500, Andy Gospodarek wrote:
> Systems containing an 82599EB and running a backported driver from
> upstream were panicing on boot. It turns out hw->mac.ops.setup_sfp is
> only set for 82599, so one should check to be sure that pointer is set
> before continuing in ixgbe_sfp_config_module_task. I verified by
> inspection that the upstream driver has the same issue and also added a
> check before the call in ixgbe_sfp_link_config.
>
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Corrected spelling error in Subject.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer
2011-02-11 21:45 [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer Andy Gospodarek
2011-02-11 21:56 ` [PATCH net-2.6] ixgbe: fix panic due to uninitialized pointer Andy Gospodarek
@ 2011-02-11 22:41 ` Jeff Kirsher
2011-02-11 22:47 ` Skidmore, Donald C
2 siblings, 0 replies; 4+ messages in thread
From: Jeff Kirsher @ 2011-02-11 22:41 UTC (permalink / raw)
To: Andy Gospodarek
Cc: netdev@vger.kernel.org, Skidmore, Donald C, Duyck, Alexander H,
Rose, Gregory V
[-- Attachment #1: Type: text/plain, Size: 734 bytes --]
On Fri, 2011-02-11 at 13:45 -0800, Andy Gospodarek wrote:
> Systems containing an 82599EB and running a backported driver from
> upstream were panicing on boot. It turns out hw->mac.ops.setup_sfp is
> only set for 82599, so one should check to be sure that pointer is set
> before continuing in ixgbe_sfp_config_module_task. I verified by
> inspection that the upstream driver has the same issue and also added
> a
> check before the call in ixgbe_sfp_link_config.
>
> Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
> ---
> drivers/net/ixgbe/ixgbe_main.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
Thanks Andy! Have added the patch (with fixed subject) to my ixgbe
queue of patches.
[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 490 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer
2011-02-11 21:45 [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer Andy Gospodarek
2011-02-11 21:56 ` [PATCH net-2.6] ixgbe: fix panic due to uninitialized pointer Andy Gospodarek
2011-02-11 22:41 ` [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer Jeff Kirsher
@ 2011-02-11 22:47 ` Skidmore, Donald C
2 siblings, 0 replies; 4+ messages in thread
From: Skidmore, Donald C @ 2011-02-11 22:47 UTC (permalink / raw)
To: Andy Gospodarek, netdev@vger.kernel.org
Cc: Duyck, Alexander H, Kirsher, Jeffrey T, Rose, Gregory V
>-----Original Message-----
>From: Andy Gospodarek [mailto:andy@greyhouse.net]
>Sent: Friday, February 11, 2011 1:46 PM
>To: netdev@vger.kernel.org
>Cc: Skidmore, Donald C; Duyck, Alexander H; Kirsher, Jeffrey T; Rose,
>Gregory V
>Subject: [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer
>
>Systems containing an 82599EB and running a backported driver from
>upstream were panicing on boot. It turns out hw->mac.ops.setup_sfp is
>only set for 82599, so one should check to be sure that pointer is set
>before continuing in ixgbe_sfp_config_module_task. I verified by
>inspection that the upstream driver has the same issue and also added a
>check before the call in ixgbe_sfp_link_config.
>
>Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
>---
> drivers/net/ixgbe/ixgbe_main.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
>
>diff --git a/drivers/net/ixgbe/ixgbe_main.c
>b/drivers/net/ixgbe/ixgbe_main.c
>index fbae703..30f9ccf 100644
>--- a/drivers/net/ixgbe/ixgbe_main.c
>+++ b/drivers/net/ixgbe/ixgbe_main.c
>@@ -3728,7 +3728,8 @@ static void ixgbe_sfp_link_config(struct
>ixgbe_adapter *adapter)
> * We need to try and force an autonegotiation
> * session, then bring up link.
> */
>- hw->mac.ops.setup_sfp(hw);
>+ if (hw->mac.ops.setup_sfp)
>+ hw->mac.ops.setup_sfp(hw);
> if (!(adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK))
> schedule_work(&adapter->multispeed_fiber_task);
> } else {
>@@ -5968,7 +5969,8 @@ static void ixgbe_sfp_config_module_task(struct
>work_struct *work)
> unregister_netdev(adapter->netdev);
> return;
> }
>- hw->mac.ops.setup_sfp(hw);
>+ if (hw->mac.ops.setup_sfp)
>+ hw->mac.ops.setup_sfp(hw);
>
> if (!(adapter->flags & IXGBE_FLAG_IN_SFP_LINK_TASK))
> /* This will also work for DA Twinax connections */
>--
>1.7.4
Thanks for the patch. Jeff will pull it into our tree and we will give it some testing but it looks good to me.
-Don Skidmore <donald.c.skidmore@intel.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2011-02-11 22:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-11 21:45 [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer Andy Gospodarek
2011-02-11 21:56 ` [PATCH net-2.6] ixgbe: fix panic due to uninitialized pointer Andy Gospodarek
2011-02-11 22:41 ` [PATCH net-2.6] ixgbe: fix panic due to uninitialied pointer Jeff Kirsher
2011-02-11 22:47 ` Skidmore, Donald C
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox