ixgbe: use correct FCoE DDP max check
authorVasu Dev <vasu.dev@intel.com>
Mon, 23 Nov 2015 18:31:01 +0000 (10:31 -0800)
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>
Fri, 8 Jan 2016 11:47:51 +0000 (03:47 -0800)
Use fcoe_ddp_xid from netdev as this is correctly set for different
device IDs to avoid DDP skip error on X550 as "xid=0x20b out-of-range"

Signed-off-by: Vasu Dev <vasu.dev@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_fcoe.c

index 5f988703e1b7e464a75b936bf7fb1fbb7f997b2c..598293790ae612db88728d473494ba1360b86b8a 100644 (file)
@@ -77,7 +77,7 @@ int ixgbe_fcoe_ddp_put(struct net_device *netdev, u16 xid)
        if (!netdev)
                return 0;
 
-       if (xid >= IXGBE_FCOE_DDP_MAX)
+       if (xid >= netdev->fcoe_ddp_xid)
                return 0;
 
        adapter = netdev_priv(netdev);
@@ -177,7 +177,7 @@ static int ixgbe_fcoe_ddp_setup(struct net_device *netdev, u16 xid,
                return 0;
 
        adapter = netdev_priv(netdev);
-       if (xid >= IXGBE_FCOE_DDP_MAX) {
+       if (xid >= netdev->fcoe_ddp_xid) {
                e_warn(drv, "xid=0x%x out-of-range\n", xid);
                return 0;
        }