aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/qlcnic/qlcnic_init.c
diff options
context:
space:
mode:
authorAmit Kumar Salecha <amit.salecha@qlogic.com>2010-05-12 23:07:46 -0400
committerDavid S. Miller <davem@davemloft.net>2010-05-14 06:08:00 -0400
commit251a84c9272b88eac4888d610c44c821b277c6c9 (patch)
treef5b401d901040740368190aa053db3e848e2c4f7 /drivers/net/qlcnic/qlcnic_init.c
parent1bb09fb9c9333c97dc58524b05d4ee35b02b4216 (diff)
qlcnic: cleanup unused code
LRO ring, cut-thru mode and specific fw version are not valid to Qlogic CNA device. Signed-off-by: Amit Kumar Salecha <amit.salecha@qlogic.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/qlcnic/qlcnic_init.c')
-rw-r--r--drivers/net/qlcnic/qlcnic_init.c31
1 files changed, 6 insertions, 25 deletions
diff --git a/drivers/net/qlcnic/qlcnic_init.c b/drivers/net/qlcnic/qlcnic_init.c
index 9b010422e9a6..c4bef57b9cd0 100644
--- a/drivers/net/qlcnic/qlcnic_init.c
+++ b/drivers/net/qlcnic/qlcnic_init.c
@@ -230,17 +230,8 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter)
230 switch (ring) { 230 switch (ring) {
231 case RCV_RING_NORMAL: 231 case RCV_RING_NORMAL:
232 rds_ring->num_desc = adapter->num_rxd; 232 rds_ring->num_desc = adapter->num_rxd;
233 if (adapter->ahw.cut_through) { 233 rds_ring->dma_size = QLCNIC_P3_RX_BUF_MAX_LEN;
234 rds_ring->dma_size = 234 rds_ring->skb_size = rds_ring->dma_size + NET_IP_ALIGN;
235 QLCNIC_CT_DEFAULT_RX_BUF_LEN;
236 rds_ring->skb_size =
237 QLCNIC_CT_DEFAULT_RX_BUF_LEN;
238 } else {
239 rds_ring->dma_size =
240 QLCNIC_P3_RX_BUF_MAX_LEN;
241 rds_ring->skb_size =
242 rds_ring->dma_size + NET_IP_ALIGN;
243 }
244 break; 235 break;
245 236
246 case RCV_RING_JUMBO: 237 case RCV_RING_JUMBO:
@@ -254,13 +245,6 @@ int qlcnic_alloc_sw_resources(struct qlcnic_adapter *adapter)
254 rds_ring->skb_size = 245 rds_ring->skb_size =
255 rds_ring->dma_size + NET_IP_ALIGN; 246 rds_ring->dma_size + NET_IP_ALIGN;
256 break; 247 break;
257
258 case RCV_RING_LRO:
259 rds_ring->num_desc = adapter->num_lro_rxd;
260 rds_ring->dma_size = QLCNIC_RX_LRO_BUFFER_LENGTH;
261 rds_ring->skb_size = rds_ring->dma_size + NET_IP_ALIGN;
262 break;
263
264 } 248 }
265 rds_ring->rx_buf_arr = (struct qlcnic_rx_buffer *) 249 rds_ring->rx_buf_arr = (struct qlcnic_rx_buffer *)
266 vmalloc(RCV_BUFF_RINGSIZE(rds_ring)); 250 vmalloc(RCV_BUFF_RINGSIZE(rds_ring));
@@ -556,12 +540,10 @@ qlcnic_has_mn(struct qlcnic_adapter *adapter)
556 QLCNIC_FW_VERSION_OFFSET, (int *)&flashed_ver); 540 QLCNIC_FW_VERSION_OFFSET, (int *)&flashed_ver);
557 flashed_ver = QLCNIC_DECODE_VERSION(flashed_ver); 541 flashed_ver = QLCNIC_DECODE_VERSION(flashed_ver);
558 542
559 if (flashed_ver >= QLCNIC_VERSION_CODE(4, 0, 220)) { 543 capability = QLCRD32(adapter, QLCNIC_PEG_TUNE_CAPABILITY);
544 if (capability & QLCNIC_PEG_TUNE_MN_PRESENT)
545 return 1;
560 546
561 capability = QLCRD32(adapter, QLCNIC_PEG_TUNE_CAPABILITY);
562 if (capability & QLCNIC_PEG_TUNE_MN_PRESENT)
563 return 1;
564 }
565 return 0; 547 return 0;
566} 548}
567 549
@@ -1279,8 +1261,7 @@ qlcnic_alloc_rx_skb(struct qlcnic_adapter *adapter,
1279 1261
1280 skb = buffer->skb; 1262 skb = buffer->skb;
1281 1263
1282 if (!adapter->ahw.cut_through) 1264 skb_reserve(skb, 2);
1283 skb_reserve(skb, 2);
1284 1265
1285 dma = pci_map_single(pdev, skb->data, 1266 dma = pci_map_single(pdev, skb->data,
1286 rds_ring->dma_size, PCI_DMA_FROMDEVICE); 1267 rds_ring->dma_size, PCI_DMA_FROMDEVICE);