Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255957
b: refs/heads/master
c: 9372453
h: refs/heads/master
i:
  255955: 48134b2
v: v3
  • Loading branch information
John Fastabend authored and Jeff Kirsher committed Jun 25, 2011
1 parent 027097d commit 6f5941f
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 14 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7555e83df399ef35e031b137442eac2b1894b993
refs/heads/master: 9372453e87560f1602815bf08b9e2af0f5136a61
38 changes: 25 additions & 13 deletions trunk/drivers/net/ixgbe/ixgbe_dcb_nl.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,24 +330,20 @@ static void ixgbe_dcbnl_get_pfc_cfg(struct net_device *netdev, int priority,
static u8 ixgbe_dcbnl_set_all(struct net_device *netdev)
{
struct ixgbe_adapter *adapter = netdev_priv(netdev);
int ret;
#ifdef IXGBE_FCOE
struct dcb_app app = {
.selector = DCB_APP_IDTYPE_ETHTYPE,
.protocol = ETH_P_FCOE,
};
u8 up = dcb_getapp(netdev, &app);
int ret;
#endif

ret = ixgbe_copy_dcb_cfg(&adapter->temp_dcb_cfg, &adapter->dcb_cfg,
MAX_TRAFFIC_CLASS);
if (ret)
return DCB_NO_HW_CHG;

/* In IEEE mode app data must be parsed into DCBX format for
* hardware routines.
*/
if (adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE)
up = (1 << up);

#ifdef IXGBE_FCOE
if (up && (up != (1 << adapter->fcoe.up)))
adapter->dcb_set_bitmap |= BIT_APP_UPCHG;
Expand Down Expand Up @@ -678,18 +674,34 @@ static int ixgbe_dcbnl_ieee_setapp(struct net_device *dev,
struct dcb_app *app)
{
struct ixgbe_adapter *adapter = netdev_priv(dev);
int err = -EINVAL;

if (!(adapter->dcbx_cap & DCB_CAP_DCBX_VER_IEEE))
return -EINVAL;
return err;

dcb_setapp(dev, app);
err = dcb_ieee_setapp(dev, app);

#ifdef IXGBE_FCOE
if (app->selector == 1 && app->protocol == ETH_P_FCOE &&
adapter->fcoe.tc == app->priority)
ixgbe_dcbnl_set_all(dev);
if (!err && app->selector == IEEE_8021QAZ_APP_SEL_ETHERTYPE &&
app->protocol == ETH_P_FCOE) {
u8 app_mask = dcb_ieee_getapp_mask(dev, app);

if (app_mask & (1 << adapter->fcoe.up))
return err;

adapter->fcoe.up = app->priority;

if (netif_running(dev))
dev->netdev_ops->ndo_stop(dev);

ixgbe_clear_interrupt_scheme(adapter);
ixgbe_init_interrupt_scheme(adapter);

if (netif_running(dev))
dev->netdev_ops->ndo_open(dev);
}
#endif
return 0;
return err;
}

static u8 ixgbe_dcbnl_getdcbx(struct net_device *dev)
Expand Down

0 comments on commit 6f5941f

Please sign in to comment.