2 Replies Latest reply on Aug 3, 2017 4:57 PM by jeppeter

    not right on the wakenup state

    jeppeter

      software :

      driver source code download http://www.mellanox.com/page/products_dyn?product_family=27

      with version 4.0.0

      kernel : ubuntu linux-4.4.0-generic

       

      hardware:

      mainboard : MSI C236A

      mlnx 0x6750 ethernet card

       

      normally running is ok ,

      but when i call pm-suspend --no-quirks or

      equally echo -n "mem" >/sys/power/state

      when it was waken up by keyboard ,the mlx4 0x6750 not running ok ,

       

       

       

      i debug with this problem ,i find that the slice different is in the code to read MLX4_OWNER_BASE

       

       

       

      static int mlx4_get_ownership(struct mlx4_dev *dev)

       

      {

      void __iomem *owner;

      u32 ret;

      if (pci_channel_offline(dev->persist->pdev)){

      debug_info_mlx(" ");

      return -EIO;

      }

      owner = ioremap(pci_resource_start(dev->persist->pdev, 0) +

      MLX4_OWNER_BASE,

      MLX4_OWNER_SIZE);

      if (!owner) {

      debug_info_mlx(" ");

      mlx4_err(dev, "Failed to obtain ownership bit\n");

      return -ENOMEM;

      }

      ret = readl(owner);

      iounmap(owner);

      debug_info_mlx("ret %d", ret);

      return (int) !!ret;

      }

       

       

      on normal the last debug is ret 0

      but when on the wakeup the insmod code is

      16777216

       

      always this code

       

      i wonder how to reset the nic card to be read 0

       

      thank you