Commit 80f61f19 authored by Arjun Vynipadath's avatar Arjun Vynipadath Committed by David S. Miller
Browse files

cxgb4/chtls: Prefix adapter flags with CXGB4



Some of these macros were conflicting with global namespace,
hence prefixing them with CXGB4.

Signed-off-by: default avatarArjun Vynipadath <arjun@chelsio.com>
Signed-off-by: default avatarVishal Kulkarni <vishal@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 29ca1c5a
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -616,7 +616,7 @@ int chtls_listen_start(struct chtls_dev *cdev, struct sock *sk)

	pi = netdev_priv(ndev);
	adap = pi->adapter;
	if (!(adap->flags & FULL_INIT_DONE))
	if (!(adap->flags & CXGB4_FULL_INIT_DONE))
		return -EBADF;

	if (listen_hash_find(cdev, sk) >= 0)   /* already have it */
+1 −1
Original line number Diff line number Diff line
@@ -81,7 +81,7 @@ static int is_fw_attached(struct cudbg_init *pdbg_init)
{
	struct adapter *padap = pdbg_init->adap;

	if (!(padap->flags & FW_OK) || padap->use_bd)
	if (!(padap->flags & CXGB4_FW_OK) || padap->use_bd)
		return 0;

	return 1;
+12 −12
Original line number Diff line number Diff line
@@ -606,18 +606,18 @@ struct dentry;
struct work_struct;

enum {                                 /* adapter flags */
	FULL_INIT_DONE     = (1 << 0),
	DEV_ENABLED        = (1 << 1),
	USING_MSI          = (1 << 2),
	USING_MSIX         = (1 << 3),
	FW_OK              = (1 << 4),
	RSS_TNLALLLOOKUP   = (1 << 5),
	USING_SOFT_PARAMS  = (1 << 6),
	MASTER_PF          = (1 << 7),
	FW_OFLD_CONN       = (1 << 9),
	ROOT_NO_RELAXED_ORDERING = (1 << 10),
	SHUTTING_DOWN	   = (1 << 11),
	SGE_DBQ_TIMER      = (1 << 12),
	CXGB4_FULL_INIT_DONE		= (1 << 0),
	CXGB4_DEV_ENABLED		= (1 << 1),
	CXGB4_USING_MSI			= (1 << 2),
	CXGB4_USING_MSIX		= (1 << 3),
	CXGB4_FW_OK			= (1 << 4),
	CXGB4_RSS_TNLALLLOOKUP		= (1 << 5),
	CXGB4_USING_SOFT_PARAMS		= (1 << 6),
	CXGB4_MASTER_PF			= (1 << 7),
	CXGB4_FW_OFLD_CONN		= (1 << 9),
	CXGB4_ROOT_NO_RELAXED_ORDERING	= (1 << 10),
	CXGB4_SHUTTING_DOWN		= (1 << 11),
	CXGB4_SGE_DBQ_TIMER		= (1 << 12),
};

enum {
+1 −1
Original line number Diff line number Diff line
@@ -3143,7 +3143,7 @@ static int tid_info_show(struct seq_file *seq, void *v)
			seq_printf(seq, ", in use: %u/%u\n",
				   atomic_read(&t->tids_in_use),
				   atomic_read(&t->hash_tids_in_use));
		} else if (adap->flags & FW_OFLD_CONN) {
		} else if (adap->flags & CXGB4_FW_OFLD_CONN) {
			seq_printf(seq, "TID range: %u..%u/%u..%u",
				   t->aftid_base,
				   t->aftid_end,
+8 −8
Original line number Diff line number Diff line
@@ -875,7 +875,7 @@ static int set_sge_param(struct net_device *dev, struct ethtool_ringparam *e)
	    e->rx_pending < MIN_FL_ENTRIES || e->tx_pending < MIN_TXQ_ENTRIES)
		return -EINVAL;

	if (adapter->flags & FULL_INIT_DONE)
	if (adapter->flags & CXGB4_FULL_INIT_DONE)
		return -EBUSY;

	for (i = 0; i < pi->nqsets; ++i) {
@@ -940,7 +940,7 @@ static int get_dbqtimer_tick(struct net_device *dev)
	struct port_info *pi = netdev_priv(dev);
	struct adapter *adap = pi->adapter;

	if (!(adap->flags & SGE_DBQ_TIMER))
	if (!(adap->flags & CXGB4_SGE_DBQ_TIMER))
		return 0;

	return adap->sge.dbqtimer_tick;
@@ -957,7 +957,7 @@ static int get_dbqtimer(struct net_device *dev)

	txq = &adap->sge.ethtxq[pi->first_qset];

	if (!(adap->flags & SGE_DBQ_TIMER))
	if (!(adap->flags & CXGB4_SGE_DBQ_TIMER))
		return 0;

	/* all of the TX Queues use the same Timer Index */
@@ -979,7 +979,7 @@ static int set_dbqtimer_tick(struct net_device *dev, int usecs)
	u32 param, val;
	int ret;

	if (!(adap->flags & SGE_DBQ_TIMER))
	if (!(adap->flags & CXGB4_SGE_DBQ_TIMER))
		return 0;

	/* return early if it's the same Timer Tick we're already using */
@@ -1015,7 +1015,7 @@ static int set_dbqtimer(struct net_device *dev, int usecs)
	u32 param, val;
	int ret;

	if (!(adap->flags & SGE_DBQ_TIMER))
	if (!(adap->flags & CXGB4_SGE_DBQ_TIMER))
		return 0;

	/* Find the SGE Doorbell Timer Value that's closest to the requested
@@ -1042,7 +1042,7 @@ static int set_dbqtimer(struct net_device *dev, int usecs)
		return 0;

	for (qix = 0; qix < pi->nqsets; qix++, txq++) {
		if (adap->flags & FULL_INIT_DONE) {
		if (adap->flags & CXGB4_FULL_INIT_DONE) {
			param =
			 (FW_PARAMS_MNEM_V(FW_PARAMS_MNEM_DMAQ) |
			  FW_PARAMS_PARAM_X_V(FW_PARAMS_PARAM_DMAQ_EQ_TIMERIX) |
@@ -1263,7 +1263,7 @@ static int set_flash(struct net_device *netdev, struct ethtool_flash *ef)
	 * firmware image otherwise we'll try to do the entire job from the
	 * host ... and we always "force" the operation in this path.
	 */
	if (adap->flags & FULL_INIT_DONE)
	if (adap->flags & CXGB4_FULL_INIT_DONE)
		mbox = adap->mbox;

	ret = t4_fw_upgrade(adap, mbox, fw->data, fw->size, 1);
@@ -1342,7 +1342,7 @@ static int set_rss_table(struct net_device *dev, const u32 *p, const u8 *key,
		return 0;

	/* Interface must be brought up atleast once */
	if (pi->adapter->flags & FULL_INIT_DONE) {
	if (pi->adapter->flags & CXGB4_FULL_INIT_DONE) {
		for (i = 0; i < pi->rss_size; i++)
			pi->rss[i] = p[i];

Loading