|
@@ -586,22 +586,6 @@ struct sge_rspq { /* state for an SGE response queue */
|
|
|
rspq_handler_t handler;
|
|
|
rspq_flush_handler_t flush_handler;
|
|
|
struct t4_lro_mgr lro_mgr;
|
|
|
-#ifdef CONFIG_NET_RX_BUSY_POLL
|
|
|
-#define CXGB_POLL_STATE_IDLE 0
|
|
|
-#define CXGB_POLL_STATE_NAPI BIT(0) /* NAPI owns this poll */
|
|
|
-#define CXGB_POLL_STATE_POLL BIT(1) /* poll owns this poll */
|
|
|
-#define CXGB_POLL_STATE_NAPI_YIELD BIT(2) /* NAPI yielded this poll */
|
|
|
-#define CXGB_POLL_STATE_POLL_YIELD BIT(3) /* poll yielded this poll */
|
|
|
-#define CXGB_POLL_YIELD (CXGB_POLL_STATE_NAPI_YIELD | \
|
|
|
- CXGB_POLL_STATE_POLL_YIELD)
|
|
|
-#define CXGB_POLL_LOCKED (CXGB_POLL_STATE_NAPI | \
|
|
|
- CXGB_POLL_STATE_POLL)
|
|
|
-#define CXGB_POLL_USER_PEND (CXGB_POLL_STATE_POLL | \
|
|
|
- CXGB_POLL_STATE_POLL_YIELD)
|
|
|
- unsigned int bpoll_state;
|
|
|
- spinlock_t bpoll_lock; /* lock for busy poll */
|
|
|
-#endif /* CONFIG_NET_RX_BUSY_POLL */
|
|
|
-
|
|
|
};
|
|
|
|
|
|
struct sge_eth_stats { /* Ethernet queue statistics */
|
|
@@ -1173,102 +1157,6 @@ static inline struct adapter *netdev2adap(const struct net_device *dev)
|
|
|
return netdev2pinfo(dev)->adapter;
|
|
|
}
|
|
|
|
|
|
-#ifdef CONFIG_NET_RX_BUSY_POLL
|
|
|
-static inline void cxgb_busy_poll_init_lock(struct sge_rspq *q)
|
|
|
-{
|
|
|
- spin_lock_init(&q->bpoll_lock);
|
|
|
- q->bpoll_state = CXGB_POLL_STATE_IDLE;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_lock_napi(struct sge_rspq *q)
|
|
|
-{
|
|
|
- bool rc = true;
|
|
|
-
|
|
|
- spin_lock(&q->bpoll_lock);
|
|
|
- if (q->bpoll_state & CXGB_POLL_LOCKED) {
|
|
|
- q->bpoll_state |= CXGB_POLL_STATE_NAPI_YIELD;
|
|
|
- rc = false;
|
|
|
- } else {
|
|
|
- q->bpoll_state = CXGB_POLL_STATE_NAPI;
|
|
|
- }
|
|
|
- spin_unlock(&q->bpoll_lock);
|
|
|
- return rc;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_unlock_napi(struct sge_rspq *q)
|
|
|
-{
|
|
|
- bool rc = false;
|
|
|
-
|
|
|
- spin_lock(&q->bpoll_lock);
|
|
|
- if (q->bpoll_state & CXGB_POLL_STATE_POLL_YIELD)
|
|
|
- rc = true;
|
|
|
- q->bpoll_state = CXGB_POLL_STATE_IDLE;
|
|
|
- spin_unlock(&q->bpoll_lock);
|
|
|
- return rc;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_lock_poll(struct sge_rspq *q)
|
|
|
-{
|
|
|
- bool rc = true;
|
|
|
-
|
|
|
- spin_lock_bh(&q->bpoll_lock);
|
|
|
- if (q->bpoll_state & CXGB_POLL_LOCKED) {
|
|
|
- q->bpoll_state |= CXGB_POLL_STATE_POLL_YIELD;
|
|
|
- rc = false;
|
|
|
- } else {
|
|
|
- q->bpoll_state |= CXGB_POLL_STATE_POLL;
|
|
|
- }
|
|
|
- spin_unlock_bh(&q->bpoll_lock);
|
|
|
- return rc;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_unlock_poll(struct sge_rspq *q)
|
|
|
-{
|
|
|
- bool rc = false;
|
|
|
-
|
|
|
- spin_lock_bh(&q->bpoll_lock);
|
|
|
- if (q->bpoll_state & CXGB_POLL_STATE_POLL_YIELD)
|
|
|
- rc = true;
|
|
|
- q->bpoll_state = CXGB_POLL_STATE_IDLE;
|
|
|
- spin_unlock_bh(&q->bpoll_lock);
|
|
|
- return rc;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_busy_polling(struct sge_rspq *q)
|
|
|
-{
|
|
|
- return q->bpoll_state & CXGB_POLL_USER_PEND;
|
|
|
-}
|
|
|
-#else
|
|
|
-static inline void cxgb_busy_poll_init_lock(struct sge_rspq *q)
|
|
|
-{
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_lock_napi(struct sge_rspq *q)
|
|
|
-{
|
|
|
- return true;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_unlock_napi(struct sge_rspq *q)
|
|
|
-{
|
|
|
- return false;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_lock_poll(struct sge_rspq *q)
|
|
|
-{
|
|
|
- return false;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_unlock_poll(struct sge_rspq *q)
|
|
|
-{
|
|
|
- return false;
|
|
|
-}
|
|
|
-
|
|
|
-static inline bool cxgb_poll_busy_polling(struct sge_rspq *q)
|
|
|
-{
|
|
|
- return false;
|
|
|
-}
|
|
|
-#endif /* CONFIG_NET_RX_BUSY_POLL */
|
|
|
-
|
|
|
/* Return a version number to identify the type of adapter. The scheme is:
|
|
|
* - bits 0..9: chip version
|
|
|
* - bits 10..15: chip revision
|
|
@@ -1325,7 +1213,6 @@ irqreturn_t t4_sge_intr_msix(int irq, void *cookie);
|
|
|
int t4_sge_init(struct adapter *adap);
|
|
|
void t4_sge_start(struct adapter *adap);
|
|
|
void t4_sge_stop(struct adapter *adap);
|
|
|
-int cxgb_busy_poll(struct napi_struct *napi);
|
|
|
void cxgb4_set_ethtool_ops(struct net_device *netdev);
|
|
|
int cxgb4_write_rss(const struct port_info *pi, const u16 *queues);
|
|
|
extern int dbfifo_int_thresh;
|