Commit caedda35 authored by Casey Leedom's avatar Casey Leedom Committed by David S. Miller

cxgb4vf: minor comment/symbolic name cleanup.

Minor cleanup of comments and symbolic constant names for clarity.
Signed-off-by: default avatarCasey Leedom <leedom@chelsio.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent d9aa9380
...@@ -60,7 +60,7 @@ enum { ...@@ -60,7 +60,7 @@ enum {
* MSI-X interrupt index usage. * MSI-X interrupt index usage.
*/ */
MSIX_FW = 0, /* MSI-X index for firmware Q */ MSIX_FW = 0, /* MSI-X index for firmware Q */
MSIX_NIQFLINT = 1, /* MSI-X index base for Ingress Qs */ MSIX_IQFLINT = 1, /* MSI-X index base for Ingress Qs */
MSIX_EXTRAS = 1, MSIX_EXTRAS = 1,
MSIX_ENTRIES = MAX_ETH_QSETS + MSIX_EXTRAS, MSIX_ENTRIES = MAX_ETH_QSETS + MSIX_EXTRAS,
......
...@@ -280,9 +280,7 @@ static void name_msix_vecs(struct adapter *adapter) ...@@ -280,9 +280,7 @@ static void name_msix_vecs(struct adapter *adapter)
const struct port_info *pi = netdev_priv(dev); const struct port_info *pi = netdev_priv(dev);
int qs, msi; int qs, msi;
for (qs = 0, msi = MSIX_NIQFLINT; for (qs = 0, msi = MSIX_IQFLINT; qs < pi->nqsets; qs++, msi++) {
qs < pi->nqsets;
qs++, msi++) {
snprintf(adapter->msix_info[msi].desc, namelen, snprintf(adapter->msix_info[msi].desc, namelen,
"%s-%d", dev->name, qs); "%s-%d", dev->name, qs);
adapter->msix_info[msi].desc[namelen] = 0; adapter->msix_info[msi].desc[namelen] = 0;
...@@ -309,7 +307,7 @@ static int request_msix_queue_irqs(struct adapter *adapter) ...@@ -309,7 +307,7 @@ static int request_msix_queue_irqs(struct adapter *adapter)
/* /*
* Ethernet queues. * Ethernet queues.
*/ */
msi = MSIX_NIQFLINT; msi = MSIX_IQFLINT;
for_each_ethrxq(s, rxq) { for_each_ethrxq(s, rxq) {
err = request_irq(adapter->msix_info[msi].vec, err = request_irq(adapter->msix_info[msi].vec,
t4vf_sge_intr_msix, 0, t4vf_sge_intr_msix, 0,
...@@ -337,7 +335,7 @@ static void free_msix_queue_irqs(struct adapter *adapter) ...@@ -337,7 +335,7 @@ static void free_msix_queue_irqs(struct adapter *adapter)
int rxq, msi; int rxq, msi;
free_irq(adapter->msix_info[MSIX_FW].vec, &s->fw_evtq); free_irq(adapter->msix_info[MSIX_FW].vec, &s->fw_evtq);
msi = MSIX_NIQFLINT; msi = MSIX_IQFLINT;
for_each_ethrxq(s, rxq) for_each_ethrxq(s, rxq)
free_irq(adapter->msix_info[msi++].vec, free_irq(adapter->msix_info[msi++].vec,
&s->ethrxq[rxq].rspq); &s->ethrxq[rxq].rspq);
...@@ -527,7 +525,7 @@ static int setup_sge_queues(struct adapter *adapter) ...@@ -527,7 +525,7 @@ static int setup_sge_queues(struct adapter *adapter)
* brought up at which point lots of things get nailed down * brought up at which point lots of things get nailed down
* permanently ... * permanently ...
*/ */
msix = MSIX_NIQFLINT; msix = MSIX_IQFLINT;
for_each_port(adapter, pidx) { for_each_port(adapter, pidx) {
struct net_device *dev = adapter->port[pidx]; struct net_device *dev = adapter->port[pidx];
struct port_info *pi = netdev_priv(dev); struct port_info *pi = netdev_priv(dev);
...@@ -2470,7 +2468,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev, ...@@ -2470,7 +2468,6 @@ static int __devinit cxgb4vf_pci_probe(struct pci_dev *pdev,
version_printed = 1; version_printed = 1;
} }
/* /*
* Initialize generic PCI device state. * Initialize generic PCI device state.
*/ */
......
...@@ -1568,6 +1568,9 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp, ...@@ -1568,6 +1568,9 @@ int t4vf_ethrx_handler(struct sge_rspq *rspq, const __be64 *rsp,
} else } else
skb_checksum_none_assert(skb); skb_checksum_none_assert(skb);
/*
* Deliver the packet to the stack.
*/
if (unlikely(pkt->vlan_ex)) { if (unlikely(pkt->vlan_ex)) {
struct vlan_group *grp = pi->vlan_grp; struct vlan_group *grp = pi->vlan_grp;
...@@ -2143,7 +2146,7 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq, ...@@ -2143,7 +2146,7 @@ int t4vf_sge_alloc_rxq(struct adapter *adapter, struct sge_rspq *rspq,
/* /*
* Calculate the size of the hardware free list ring plus * Calculate the size of the hardware free list ring plus
* status page (which the SGE will place at the end of the * Status Page (which the SGE will place after the end of the
* free list ring) in Egress Queue Units. * free list ring) in Egress Queue Units.
*/ */
flsz = (fl->size / FL_PER_EQ_UNIT + 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,8 +2243,8 @@ int t4vf_sge_alloc_eth_txq(struct adapter *adapter, struct sge_eth_txq *txq,
struct port_info *pi = netdev_priv(dev); struct port_info *pi = netdev_priv(dev);
/* /*
* Calculate the size of the hardware TX Queue (including the * Calculate the size of the hardware TX Queue (including the Status
* status age on the end) in units of TX Descriptors. * Page on the end of the TX Queue) in units of TX Descriptors.
*/ */
nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc); nentries = txq->q.size + STAT_LEN / sizeof(struct tx_desc);
......
...@@ -1276,7 +1276,7 @@ int t4vf_eth_eq_free(struct adapter *adapter, unsigned int eqid) ...@@ -1276,7 +1276,7 @@ int t4vf_eth_eq_free(struct adapter *adapter, unsigned int eqid)
*/ */
int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl) int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl)
{ {
struct fw_cmd_hdr *cmd_hdr = (struct fw_cmd_hdr *)rpl; const struct fw_cmd_hdr *cmd_hdr = (const struct fw_cmd_hdr *)rpl;
u8 opcode = FW_CMD_OP_GET(be32_to_cpu(cmd_hdr->hi)); u8 opcode = FW_CMD_OP_GET(be32_to_cpu(cmd_hdr->hi));
switch (opcode) { switch (opcode) {
...@@ -1284,7 +1284,8 @@ int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl) ...@@ -1284,7 +1284,8 @@ int t4vf_handle_fw_rpl(struct adapter *adapter, const __be64 *rpl)
/* /*
* Link/module state change message. * Link/module state change message.
*/ */
const struct fw_port_cmd *port_cmd = (void *)rpl; const struct fw_port_cmd *port_cmd =
(const struct fw_port_cmd *)rpl;
u32 word; u32 word;
int action, port_id, link_ok, speed, fc, pidx; int action, port_id, link_ok, speed, fc, pidx;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment