aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb3/sge.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/cxgb3/sge.c')
-rw-r--r--drivers/net/cxgb3/sge.c23
1 files changed, 15 insertions, 8 deletions
diff --git a/drivers/net/cxgb3/sge.c b/drivers/net/cxgb3/sge.c
index a2cfd68ac757..58a5f60521ed 100644
--- a/drivers/net/cxgb3/sge.c
+++ b/drivers/net/cxgb3/sge.c
@@ -1073,7 +1073,7 @@ int t3_eth_xmit(struct sk_buff *skb, struct net_device *dev)
1073{ 1073{
1074 unsigned int ndesc, pidx, credits, gen, compl; 1074 unsigned int ndesc, pidx, credits, gen, compl;
1075 const struct port_info *pi = netdev_priv(dev); 1075 const struct port_info *pi = netdev_priv(dev);
1076 struct adapter *adap = dev->priv; 1076 struct adapter *adap = pi->adapter;
1077 struct sge_qset *qs = dev2qset(dev); 1077 struct sge_qset *qs = dev2qset(dev);
1078 struct sge_txq *q = &qs->txq[TXQ_ETH]; 1078 struct sge_txq *q = &qs->txq[TXQ_ETH];
1079 1079
@@ -1326,7 +1326,8 @@ static void restart_ctrlq(unsigned long data)
1326 struct sk_buff *skb; 1326 struct sk_buff *skb;
1327 struct sge_qset *qs = (struct sge_qset *)data; 1327 struct sge_qset *qs = (struct sge_qset *)data;
1328 struct sge_txq *q = &qs->txq[TXQ_CTRL]; 1328 struct sge_txq *q = &qs->txq[TXQ_CTRL];
1329 struct adapter *adap = qs->netdev->priv; 1329 const struct port_info *pi = netdev_priv(qs->netdev);
1330 struct adapter *adap = pi->adapter;
1330 1331
1331 spin_lock(&q->lock); 1332 spin_lock(&q->lock);
1332 again:reclaim_completed_tx_imm(q); 1333 again:reclaim_completed_tx_imm(q);
@@ -1531,7 +1532,8 @@ static void restart_offloadq(unsigned long data)
1531 struct sk_buff *skb; 1532 struct sk_buff *skb;
1532 struct sge_qset *qs = (struct sge_qset *)data; 1533 struct sge_qset *qs = (struct sge_qset *)data;
1533 struct sge_txq *q = &qs->txq[TXQ_OFLD]; 1534 struct sge_txq *q = &qs->txq[TXQ_OFLD];
1534 struct adapter *adap = qs->netdev->priv; 1535 const struct port_info *pi = netdev_priv(qs->netdev);
1536 struct adapter *adap = pi->adapter;
1535 1537
1536 spin_lock(&q->lock); 1538 spin_lock(&q->lock);
1537 again:reclaim_completed_tx(adap, q); 1539 again:reclaim_completed_tx(adap, q);
@@ -1675,7 +1677,8 @@ static inline void deliver_partial_bundle(struct t3cdev *tdev,
1675 */ 1677 */
1676static int ofld_poll(struct net_device *dev, int *budget) 1678static int ofld_poll(struct net_device *dev, int *budget)
1677{ 1679{
1678 struct adapter *adapter = dev->priv; 1680 const struct port_info *pi = netdev_priv(dev);
1681 struct adapter *adapter = pi->adapter;
1679 struct sge_qset *qs = dev2qset(dev); 1682 struct sge_qset *qs = dev2qset(dev);
1680 struct sge_rspq *q = &qs->rspq; 1683 struct sge_rspq *q = &qs->rspq;
1681 int work_done, limit = min(*budget, dev->quota), avail = limit; 1684 int work_done, limit = min(*budget, dev->quota), avail = limit;
@@ -2075,7 +2078,8 @@ static inline int is_pure_response(const struct rsp_desc *r)
2075 */ 2078 */
2076static int napi_rx_handler(struct net_device *dev, int *budget) 2079static int napi_rx_handler(struct net_device *dev, int *budget)
2077{ 2080{
2078 struct adapter *adap = dev->priv; 2081 const struct port_info *pi = netdev_priv(dev);
2082 struct adapter *adap = pi->adapter;
2079 struct sge_qset *qs = dev2qset(dev); 2083 struct sge_qset *qs = dev2qset(dev);
2080 int effective_budget = min(*budget, dev->quota); 2084 int effective_budget = min(*budget, dev->quota);
2081 2085
@@ -2205,7 +2209,8 @@ static inline int handle_responses(struct adapter *adap, struct sge_rspq *q)
2205irqreturn_t t3_sge_intr_msix(int irq, void *cookie) 2209irqreturn_t t3_sge_intr_msix(int irq, void *cookie)
2206{ 2210{
2207 struct sge_qset *qs = cookie; 2211 struct sge_qset *qs = cookie;
2208 struct adapter *adap = qs->netdev->priv; 2212 const struct port_info *pi = netdev_priv(qs->netdev);
2213 struct adapter *adap = pi->adapter;
2209 struct sge_rspq *q = &qs->rspq; 2214 struct sge_rspq *q = &qs->rspq;
2210 2215
2211 spin_lock(&q->lock); 2216 spin_lock(&q->lock);
@@ -2224,7 +2229,8 @@ irqreturn_t t3_sge_intr_msix(int irq, void *cookie)
2224irqreturn_t t3_sge_intr_msix_napi(int irq, void *cookie) 2229irqreturn_t t3_sge_intr_msix_napi(int irq, void *cookie)
2225{ 2230{
2226 struct sge_qset *qs = cookie; 2231 struct sge_qset *qs = cookie;
2227 struct adapter *adap = qs->netdev->priv; 2232 const struct port_info *pi = netdev_priv(qs->netdev);
2233 struct adapter *adap = pi->adapter;
2228 struct sge_rspq *q = &qs->rspq; 2234 struct sge_rspq *q = &qs->rspq;
2229 2235
2230 spin_lock(&q->lock); 2236 spin_lock(&q->lock);
@@ -2508,7 +2514,8 @@ static void sge_timer_cb(unsigned long data)
2508{ 2514{
2509 spinlock_t *lock; 2515 spinlock_t *lock;
2510 struct sge_qset *qs = (struct sge_qset *)data; 2516 struct sge_qset *qs = (struct sge_qset *)data;
2511 struct adapter *adap = qs->netdev->priv; 2517 const struct port_info *pi = netdev_priv(qs->netdev);
2518 struct adapter *adap = pi->adapter;
2512 2519
2513 if (spin_trylock(&qs->txq[TXQ_ETH].lock)) { 2520 if (spin_trylock(&qs->txq[TXQ_ETH].lock)) {
2514 reclaim_completed_tx(adap, &qs->txq[TXQ_ETH]); 2521 reclaim_completed_tx(adap, &qs->txq[TXQ_ETH]);