diff options
Diffstat (limited to 'drivers/net/cxgb3/adapter.h')
-rw-r--r-- | drivers/net/cxgb3/adapter.h | 22 |
1 files changed, 7 insertions, 15 deletions
diff --git a/drivers/net/cxgb3/adapter.h b/drivers/net/cxgb3/adapter.h index 20e887de2545..044261703381 100644 --- a/drivers/net/cxgb3/adapter.h +++ b/drivers/net/cxgb3/adapter.h | |||
@@ -49,11 +49,13 @@ | |||
49 | typedef irqreturn_t(*intr_handler_t) (int, void *); | 49 | typedef irqreturn_t(*intr_handler_t) (int, void *); |
50 | 50 | ||
51 | struct vlan_group; | 51 | struct vlan_group; |
52 | |||
53 | struct adapter; | 52 | struct adapter; |
53 | struct sge_qset; | ||
54 | |||
54 | struct port_info { | 55 | struct port_info { |
55 | struct adapter *adapter; | 56 | struct adapter *adapter; |
56 | struct vlan_group *vlan_grp; | 57 | struct vlan_group *vlan_grp; |
58 | struct sge_qset *qs; | ||
57 | const struct port_type_info *port_type; | 59 | const struct port_type_info *port_type; |
58 | u8 port_id; | 60 | u8 port_id; |
59 | u8 rx_csum_offload; | 61 | u8 rx_csum_offload; |
@@ -173,10 +175,12 @@ enum { /* per port SGE statistics */ | |||
173 | }; | 175 | }; |
174 | 176 | ||
175 | struct sge_qset { /* an SGE queue set */ | 177 | struct sge_qset { /* an SGE queue set */ |
178 | struct adapter *adap; | ||
179 | struct napi_struct napi; | ||
176 | struct sge_rspq rspq; | 180 | struct sge_rspq rspq; |
177 | struct sge_fl fl[SGE_RXQ_PER_SET]; | 181 | struct sge_fl fl[SGE_RXQ_PER_SET]; |
178 | struct sge_txq txq[SGE_TXQ_PER_SET]; | 182 | struct sge_txq txq[SGE_TXQ_PER_SET]; |
179 | struct net_device *netdev; /* associated net device */ | 183 | struct net_device *netdev; |
180 | unsigned long txq_stopped; /* which Tx queues are stopped */ | 184 | unsigned long txq_stopped; /* which Tx queues are stopped */ |
181 | struct timer_list tx_reclaim_timer; /* reclaims TX buffers */ | 185 | struct timer_list tx_reclaim_timer; /* reclaims TX buffers */ |
182 | unsigned long port_stats[SGE_PSTAT_MAX]; | 186 | unsigned long port_stats[SGE_PSTAT_MAX]; |
@@ -221,12 +225,6 @@ struct adapter { | |||
221 | struct delayed_work adap_check_task; | 225 | struct delayed_work adap_check_task; |
222 | struct work_struct ext_intr_handler_task; | 226 | struct work_struct ext_intr_handler_task; |
223 | 227 | ||
224 | /* | ||
225 | * Dummy netdevices are needed when using multiple receive queues with | ||
226 | * NAPI as each netdevice can service only one queue. | ||
227 | */ | ||
228 | struct net_device *dummy_netdev[SGE_QSETS - 1]; | ||
229 | |||
230 | struct dentry *debugfs_root; | 228 | struct dentry *debugfs_root; |
231 | 229 | ||
232 | struct mutex mdio_lock; | 230 | struct mutex mdio_lock; |
@@ -253,12 +251,6 @@ static inline struct port_info *adap2pinfo(struct adapter *adap, int idx) | |||
253 | return netdev_priv(adap->port[idx]); | 251 | return netdev_priv(adap->port[idx]); |
254 | } | 252 | } |
255 | 253 | ||
256 | /* | ||
257 | * We use the spare atalk_ptr to map a net device to its SGE queue set. | ||
258 | * This is a macro so it can be used as l-value. | ||
259 | */ | ||
260 | #define dev2qset(netdev) ((netdev)->atalk_ptr) | ||
261 | |||
262 | #define OFFLOAD_DEVMAP_BIT 15 | 254 | #define OFFLOAD_DEVMAP_BIT 15 |
263 | 255 | ||
264 | #define tdev2adap(d) container_of(d, struct adapter, tdev) | 256 | #define tdev2adap(d) container_of(d, struct adapter, tdev) |
@@ -284,7 +276,7 @@ int t3_mgmt_tx(struct adapter *adap, struct sk_buff *skb); | |||
284 | void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p); | 276 | void t3_update_qset_coalesce(struct sge_qset *qs, const struct qset_params *p); |
285 | int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports, | 277 | int t3_sge_alloc_qset(struct adapter *adapter, unsigned int id, int nports, |
286 | int irq_vec_idx, const struct qset_params *p, | 278 | int irq_vec_idx, const struct qset_params *p, |
287 | int ntxq, struct net_device *netdev); | 279 | int ntxq, struct net_device *dev); |
288 | int t3_get_desc(const struct sge_qset *qs, unsigned int qnum, unsigned int idx, | 280 | int t3_get_desc(const struct sge_qset *qs, unsigned int qnum, unsigned int idx, |
289 | unsigned char *data); | 281 | unsigned char *data); |
290 | irqreturn_t t3_sge_intr_msix(int irq, void *cookie); | 282 | irqreturn_t t3_sge_intr_msix(int irq, void *cookie); |