aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cxgb4vf
diff options
context:
space:
mode:
authorCasey Leedom <leedom@chelsio.com>2010-11-11 04:30:40 -0500
committerDavid S. Miller <davem@davemloft.net>2010-11-15 12:17:36 -0500
commitcaedda35c6dba5a283e5d87e77a8d19ee4be3183 (patch)
treea092408058021a44ca8bf4b5a9547a84dd2d562b /drivers/net/cxgb4vf
parentd9aa93804e53f2153260568024b75ad3d81784f9 (diff)
cxgb4vf: minor comment/symbolic name cleanup.
Minor cleanup of comments and symbolic constant names for clarity. Signed-off-by: Casey Leedom <leedom@chelsio.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/cxgb4vf')
-rw-r--r--drivers/net/cxgb4vf/adapter.h2
-rw-r--r--drivers/net/cxgb4vf/cxgb4vf_main.c11
-rw-r--r--drivers/net/cxgb4vf/sge.c9
-rw-r--r--drivers/net/cxgb4vf/t4vf_hw.c5
4 files changed, 14 insertions, 13 deletions
diff --git a/drivers/net/cxgb4vf/adapter.h b/drivers/net/cxgb4vf/adapter.h
index 8ea01962e045..4766b4116b41 100644
--- a/drivers/net/cxgb4vf/adapter.h
+++ b/drivers/net/cxgb4vf/adapter.h
@@ -60,7 +60,7 @@ enum {
60 * MSI-X interrupt index usage. 60 * MSI-X interrupt index usage.
61 */ 61 */
62 MSIX_FW = 0, /* MSI-X index for firmware Q */ 62 MSIX_FW = 0, /* MSI-X index for firmware Q */
63 MSIX_NIQFLINT = 1, /* MSI-X index base for Ingress Qs */ 63 MSIX_IQFLINT = 1, /* MSI-X index base for Ingress Qs */
64 MSIX_EXTRAS = 1, 64 MSIX_EXTRAS = 1,
65 MSIX_ENTRIES = MAX_ETH_QSETS + MSIX_EXTRAS, 65 MSIX_ENTRIES = MAX_ETH_QSETS + MSIX_EXTRAS,
66 66
diff --git a/drivers/net/cxgb4vf/cxgb4vf_main.c b/drivers/net/cxgb4vf/cxgb4vf_main.c
index c3449bbc585a..62357191d4e7 100644
--- a/drivers/net/cxgb4vf/cxgb4vf_main.c
+++ b/drivers/net/cxgb4vf/cxgb4vf_main.c
@@ -280,9 +280,7 @@ static void name_msix_vecs(struct adapter *adapter)
280 const struct port_info *pi = netdev_priv(dev); 280 const struct port_info *pi = netdev_priv(dev);
281 int qs, msi; 281 int qs, msi;
282 282
283 for (qs = 0, msi = MSIX_NIQFLINT; 283 for (qs = 0, msi = MSIX_IQFLINT; qs < pi->nqsets; qs++, msi++) {
284 qs < pi->nqsets;
285 qs++, msi++) {
286 snprintf(adapter->msix_info[msi].desc, namelen, 284 snprintf(adapter->msix_info[msi].desc, namelen,
287 "%s-%d", dev->name, qs); 285 "%s-%d", dev->name, qs);
288 adapter->msix_info[msi].desc[namelen] = 0; 286 adapter->msix_info[msi].desc[namelen] = 0;
@@ -309,7 +307,7 @@ static int request_msix_queue_irqs(struct adapter *adapter)
309 /* 307 /*
310 * Ethernet queues. 308 * Ethernet queues.
311 */ 309 */
312 msi = MSIX_NIQFLINT; 310 msi = MSIX_IQFLINT;
313 for_each_ethrxq(s, rxq) { 311 for_each_ethrxq(s, rxq) {
314 err = request_irq(adapter->msix_info[msi].vec, 312 err = request_irq(adapter->msix_info[msi].vec,
315 t4vf_sge_intr_msix, 0, 313 t4vf_sge_intr_msix, 0,
@@ -337,7 +335,7 @@ static void free_msix_queue_irqs(struct adapter *adapter)
337 int rxq, msi; 335 int rxq, msi;
338 336
339 free_irq(adapter->msix_info[MSIX_FW].vec, &s->fw_evtq); 337 free_irq(adapter->msix_info[MSIX_FW].vec, &s->fw_evtq);
340 msi = MSIX_NIQFLINT; 338 msi = MSIX_IQFLINT;
341 for_each_ethrxq(s, rxq) 339 for_each_ethrxq(s, rxq)
342 free_irq(adapter->msix_info[msi++].vec, 340 free_irq(adapter->msix_info[msi++].vec,
343 &s->ethrxq[rxq].rspq); 341 &s->ethrxq[rxq].rspq);
@@ -527,7 +525,7 @@ static int setup_sge_queues(struct adapter *adapter)
527 * brought up at which point lots of things get nailed down 525 * brought up at which point lots of things get nailed down
528 * permanently ... 526 * permanently ...
529 */ 527 */
530 msix = MSIX_NIQFLINT; 528 msix = MSIX_IQFLINT;
531 for_each_port(adapter, pidx) { 529 for_each_port(adapter, pidx) {
532 struct net_device *dev = adapter->port[pidx]; 530 struct net_device *dev = adapter->port[pidx];
533 struct port_info *pi = netdev_priv(dev); 531 struct port_info *pi = netdev_priv(dev);
@@ -2470,7 +2468,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
2470 version_printed = 1; 2468 version_printed = 1;
2471 } 2469 }
2472 2470
2473
2474 /* 2471 /*
2475 * Initialize generic PCI device state. 2472 * Initialize generic PCI device state.
2476 */ 2473 */
diff --git a/drivers/net/cxgb4vf/sge.c b/drivers/net/cxgb4vf/sge.c
index ecf0770bf0ff..e0b3d1bc2fdf 100644
--- a/drivers/net/cxgb4vf/sge.c
+++ b/drivers/net/cxgb4vf/sge.c
@@ -1568,6 +1568,9 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
1568 } else 1568 } else
1569 skb_checksum_none_assert(skb); 1569 skb_checksum_none_assert(skb);
1570 1570
1571 /*
1572 * Deliver the packet to the stack.
1573 */
1571 if (unlikely(pkt->vlan_ex)) { 1574 if (unlikely(pkt->vlan_ex)) {
1572 struct vlan_group *grp = pi->vlan_grp; 1575 struct vlan_group *grp = pi->vlan_grp;
1573 1576
@@ -2143,7 +2146,7 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,
2143 2146
2144 /* 2147 /*
2145 * Calculate the size of the hardware free list ring plus 2148 * Calculate the size of the hardware free list ring plus
2146 * status page (which the SGE will place at the end of the 2149 * Status Page (which the SGE will place after the end of the
2147 * free list ring) in Egress Queue Units. 2150 * free list ring) in Egress Queue Units.
2148 */ 2151 */
2149 flsz = (fl->size / FL_PER_EQ_UNIT + 2152 flsz = (fl->size / FL_PER_EQ_UNIT +
@@ -2240,8 +2243,8 @@ int t4vf_sge_alloc_eth_txq(struct adapter *adapter, struct sge_eth_txq *txq,
2240 struct port_info *pi = netdev_priv(dev); 2243 struct port_info *pi = netdev_priv(dev);
2241 2244
2242 /* 2245 /*
2243 * Calculate the size of the hardware TX Queue (including the 2246 * Calculate the size of the hardware TX Queue (including the Status
2244 * status age on the end) in units of TX Descriptors. 2247 * Page on the end of the TX Queue) in units of TX Descriptors.
2245 */ 2248 */
2246 nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc); 2249 nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc);
2247 2250
diff --git a/drivers/net/cxgb4vf/t4vf_hw.c b/drivers/net/cxgb4vf/t4vf_hw.c
index e306c20dfaee..f7d7f976064b 100644
--- a/drivers/net/cxgb4vf/t4vf_hw.c
+++ b/drivers/net/cxgb4vf/t4vf_hw.c
@@ -1276,7 +1276,7 @@ int t4vf_eth_eq_free(struct adapter *adapter, unsigned int eqid)
1276 */ 1276 */
1277int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl) 1277int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl)
1278{ 1278{
1279 struct fw_cmd_hdr *cmd_hdr = (struct fw_cmd_hdr *)rpl; 1279 const struct fw_cmd_hdr *cmd_hdr = (const struct fw_cmd_hdr *)rpl;
1280 u8 opcode = FW_CMD_OP_GET(be32_to_cpu(cmd_hdr->hi)); 1280 u8 opcode = FW_CMD_OP_GET(be32_to_cpu(cmd_hdr->hi));
1281 1281
1282 switch (opcode) { 1282 switch (opcode) {
@@ -1284,7 +1284,8 @@ int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl)
1284 /* 1284 /*
1285 * Link/module state change message. 1285 * Link/module state change message.
1286 */ 1286 */
1287 const struct fw_port_cmd *port_cmd = (void *)rpl; 1287 const struct fw_port_cmd *port_cmd =
1288 (const struct fw_port_cmd *)rpl;
1288 u32 word; 1289 u32 word;
1289 int action, port_id, link_ok, speed, fc, pidx; 1290 int action, port_id, link_ok, speed, fc, pidx;
1290 1291