lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <F6FB0E698C9B3143BDF729DF222866462F153919@ORSMSX101.amr.corp.intel.com>
Date:	Mon, 22 Oct 2012 20:45:51 +0000
From:	"Skidmore, Donald C" <donald.c.skidmore@...el.com>
To:	Martin Josefsson <gandalf@...fs.se>,
	"Kirsher, Jeffrey T" <jeffrey.t.kirsher@...el.com>
CC:	"davem@...emloft.net" <davem@...emloft.net>,
	"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
	"gospo@...hat.com" <gospo@...hat.com>,
	"sassmann@...hat.com" <sassmann@...hat.com>
Subject: RE: [net-next 12/13] ixgbe: Add support for pipeline reset

-----Original Message-----
From: netdev-owner@...r.kernel.org [mailto:netdev-owner@...r.kernel.org] On Behalf Of Martin Josefsson
Sent: Sunday, October 21, 2012 5:06 AM
To: Kirsher, Jeffrey T
Cc: davem@...emloft.net; Skidmore, Donald C; netdev@...r.kernel.org; gospo@...hat.com; sassmann@...hat.com
Subject: Re: [net-next 12/13] ixgbe: Add support for pipeline reset

On Sat, Oct 20, 2012 at 8:26 AM, Jeff Kirsher <jeffrey.t.kirsher@...el.com> wrote:
> From: Don Skidmore <donald.c.skidmore@...el.com>

Hi Jeff, Don,

> Calling the ixgbe_reset_pipeline_82599 function will ensure a full 
> pipeline reset on all 82599 devices.  This is necessary to avoid possible link issues.
> Since this patch accomplishes this by modifying AUTOC.LMS we need to 
> wrap all AUTOC writes when LESM is enabled.

The section below doesn't look right.
Old behaviour gave LMS == 011b (SFI)
New behaviour gives LMS == 000b (1 GbE link (no backplane auto-negotiation))

LMS is reset to 0 before ixgbe_reset_pipeline_82599() is called.
Looks like that part of the old code wasn't removed.

> @@ -137,28 +135,37 @@ static s32 ixgbe_setup_sfp_modules_82599(struct ixgbe_hw *hw)
>                 usleep_range(hw->eeprom.semaphore_delay * 1000,
>                              hw->eeprom.semaphore_delay * 2000);
>
> +               /* Need SW/FW semaphore around AUTOC writes if LESM on,
> +                * likewise reset_pipeline requires lock as it also writes
> +                * AUTOC.
> +                */
> +               if (ixgbe_verify_lesm_fw_enabled_82599(hw)) {
> +                       ret_val = hw->mac.ops.acquire_swfw_sync(hw,
> +                                                       IXGBE_GSSR_MAC_CSR_SM);
> +                       if (ret_val)
> +                               goto setup_sfp_out;
> +
> +                       got_lock = true;
> +               }
> +
>                 /* Now restart DSP by setting Restart_AN and clearing LMS */
>                 IXGBE_WRITE_REG(hw, IXGBE_AUTOC, ((IXGBE_READ_REG(hw,
>                                 IXGBE_AUTOC) & ~IXGBE_AUTOC_LMS_MASK) |
>                                 IXGBE_AUTOC_AN_RESTART));
>
> -               /* Wait for AN to leave state 0 */
> -               for (i = 0; i < 10; i++) {
> -                       usleep_range(4000, 8000);
> -                       reg_anlp1 = IXGBE_READ_REG(hw, IXGBE_ANLP1);
> -                       if (reg_anlp1 & IXGBE_ANLP1_AN_STATE_MASK)
> -                               break;
> +               ret_val = ixgbe_reset_pipeline_82599(hw);
> +
> +               if (got_lock) {
> +                       hw->mac.ops.release_swfw_sync(hw,
> +                                                     IXGBE_GSSR_MAC_CSR_SM);
> +                       got_lock = false;
>                 }
> -               if (!(reg_anlp1 & IXGBE_ANLP1_AN_STATE_MASK)) {
> -                       hw_dbg(hw, "sfp module setup not complete\n");
> +
> +               if (ret_val) {
> +                       hw_dbg(hw, " sfp module setup not 
> + complete\n");
>                         ret_val = IXGBE_ERR_SFP_SETUP_NOT_COMPLETE;
>                         goto setup_sfp_out;
>                 }
> -
> -               /* Restart DSP by setting Restart_AN and return to SFI mode */
> -               IXGBE_WRITE_REG(hw, IXGBE_AUTOC, (IXGBE_READ_REG(hw,
> -                               IXGBE_AUTOC) | IXGBE_AUTOC_LMS_10G_SERIAL |
> -                               IXGBE_AUTOC_AN_RESTART));
>         }
>
>  setup_sfp_out:

--
/Martin
--
To unsubscribe from this list: send the line "unsubscribe netdev" in the body of a message to majordomo@...r.kernel.org More majordomo info at  http://vger.kernel.org/majordomo-info.html

Hi Martin,

Thanks for pointing this problem out and I believe I see what is wrong.  I'll work with Jeff to get a new patch created and tested.

Thanks again,
-Don Skidmore <donald.c.skidmore@...el.com>
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ