diff options
author | Dhananjay Phadke <dhananjay@netxen.com> | 2009-03-13 14:52:03 +0000 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2009-03-14 14:00:32 -0700 |
commit | 438627c77b877e445a4b918a50ff910a5ea2a12d (patch) | |
tree | 254abcb0c57f6c57947428f9c8ec38b6904801fc /drivers/net/netxen/netxen_nic_ctx.c | |
parent | 0b72e659a10ec50acbef90756bf04177b66c8266 (diff) |
netxen: sanitize variable names
o remove max_ prefix from ring sizes, since they don't really
represent max possible sizes.
o cleanup naming of rx ring types (normal, jumbo, lro).
o simplify logic to choose rx ring size, gig ports get half
rx ring of 10 gig ports.
Signed-off-by: Dhananjay Phadke <dhananjay@netxen.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_ctx.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_ctx.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/net/netxen/netxen_nic_ctx.c b/drivers/net/netxen/netxen_nic_ctx.c index d125dca0131..2e66335bd00 100644 --- a/drivers/net/netxen/netxen_nic_ctx.c +++ b/drivers/net/netxen/netxen_nic_ctx.c @@ -231,7 +231,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter) rds_ring = &recv_ctx->rds_rings[i]; prq_rds[i].host_phys_addr = cpu_to_le64(rds_ring->phys_addr); - prq_rds[i].ring_size = cpu_to_le32(rds_ring->max_rx_desc_count); + prq_rds[i].ring_size = cpu_to_le32(rds_ring->num_desc); prq_rds[i].ring_kind = cpu_to_le32(i); prq_rds[i].buff_size = cpu_to_le64(rds_ring->dma_size); } @@ -241,7 +241,7 @@ nx_fw_cmd_create_rx_ctx(struct netxen_adapter *adapter) prq_sds[0].host_phys_addr = cpu_to_le64(recv_ctx->rcv_status_desc_phys_addr); - prq_sds[0].ring_size = cpu_to_le32(adapter->max_rx_desc_count); + prq_sds[0].ring_size = cpu_to_le32(adapter->num_rxd); /* only one msix vector for now */ prq_sds[0].msi_index = cpu_to_le16(0); @@ -362,7 +362,7 @@ nx_fw_cmd_create_tx_ctx(struct netxen_adapter *adapter) prq_cds->host_phys_addr = cpu_to_le64(adapter->ahw.cmd_desc_phys_addr); - prq_cds->ring_size = cpu_to_le32(adapter->max_tx_desc_count); + prq_cds->ring_size = cpu_to_le32(adapter->num_txd); phys_addr = rq_phys_addr; err = netxen_issue_cmd(adapter, @@ -494,7 +494,7 @@ netxen_init_old_ctx(struct netxen_adapter *adapter) adapter->ctx_desc->cmd_ring_addr = cpu_to_le64(adapter->ahw.cmd_desc_phys_addr); adapter->ctx_desc->cmd_ring_size = - cpu_to_le32(adapter->max_tx_desc_count); + cpu_to_le32(adapter->num_txd); recv_ctx = &adapter->recv_ctx; @@ -504,12 +504,12 @@ netxen_init_old_ctx(struct netxen_adapter *adapter) adapter->ctx_desc->rcv_ctx[ring].rcv_ring_addr = cpu_to_le64(rds_ring->phys_addr); adapter->ctx_desc->rcv_ctx[ring].rcv_ring_size = - cpu_to_le32(rds_ring->max_rx_desc_count); + cpu_to_le32(rds_ring->num_desc); } adapter->ctx_desc->sts_ring_addr = cpu_to_le64(recv_ctx->rcv_status_desc_phys_addr); adapter->ctx_desc->sts_ring_size = - cpu_to_le32(adapter->max_rx_desc_count); + cpu_to_le32(adapter->num_rxd); adapter->pci_write_normalize(adapter, CRB_CTX_ADDR_REG_LO(func_id), lower32(adapter->ctx_desc_phys_addr)); @@ -562,7 +562,7 @@ int netxen_alloc_hw_resources(struct netxen_adapter *adapter) /* cmd desc ring */ addr = pci_alloc_consistent(adapter->pdev, sizeof(struct cmd_desc_type0) * - adapter->max_tx_desc_count, + adapter->num_txd, &hw->cmd_desc_phys_addr); if (addr == NULL) { @@ -669,7 +669,7 @@ void netxen_free_hw_resources(struct netxen_adapter *adapter) if (adapter->ahw.cmd_desc_head != NULL) { pci_free_consistent(adapter->pdev, sizeof(struct cmd_desc_type0) * - adapter->max_tx_desc_count, + adapter->num_txd, adapter->ahw.cmd_desc_head, adapter->ahw.cmd_desc_phys_addr); adapter->ahw.cmd_desc_head = NULL; |