diff options
author | Mark Brown <broonie@kernel.org> | 2014-11-26 23:37:57 +0300 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-26 23:37:57 +0300 |
commit | cf2394f70cf7774a107fbaa1ef5010db4bd69baa (patch) | |
tree | e79e3e479d04213a67ecd47b31c7db648b0313c2 /drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | |
parent | 45fc84c668ba6cc08cbae74042be838bf9283d98 (diff) | |
parent | 206c5f60a3d902bc4b56dab2de3e88de5eb06108 (diff) | |
download | linux-cf2394f70cf7774a107fbaa1ef5010db4bd69baa.tar.xz |
Merge tag 'v3.18-rc4' into regulator-max77802
Linux 3.18-rc4
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c index 3f60070f2519..8520d5529df8 100644 --- a/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c +++ b/drivers/net/ethernet/chelsio/cxgb4/cxgb4_main.c @@ -694,7 +694,11 @@ int cxgb4_dcb_enabled(const struct net_device *dev) #ifdef CONFIG_CHELSIO_T4_DCB struct port_info *pi = netdev_priv(dev); - return pi->dcb.state == CXGB4_DCB_STATE_FW_ALLSYNCED; + if (!pi->dcb.enabled) + return 0; + + return ((pi->dcb.state == CXGB4_DCB_STATE_FW_ALLSYNCED) || + (pi->dcb.state == CXGB4_DCB_STATE_HOST)); #else return 0; #endif @@ -6610,6 +6614,7 @@ static int init_one(struct pci_dev *pdev, const struct pci_device_id *ent) spin_lock_init(&adapter->stats_lock); spin_lock_init(&adapter->tid_release_lock); + spin_lock_init(&adapter->win0_lock); INIT_WORK(&adapter->tid_release_task, process_tid_release_list); INIT_WORK(&adapter->db_full_task, process_db_full); |