Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 313904
b: refs/heads/master
c: cae82d4
h: refs/heads/master
v: v3
  • Loading branch information
Rajesh Borundia authored and David S. Miller committed Jun 7, 2012
1 parent d8e8b52 commit 346c0c2
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c3001b773bb63afd403bae37febf3f09826912cb
refs/heads/master: cae82d499979d99fc061f939d451244971024864
7 changes: 7 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic.h
Original file line number Diff line number Diff line change
Expand Up @@ -258,6 +258,8 @@ struct rcv_desc {
(((sts_data) >> 52) & 0x1)
#define qlcnic_get_lro_sts_seq_number(sts_data) \
((sts_data) & 0x0FFFFFFFF)
#define qlcnic_get_lro_sts_mss(sts_data1) \
((sts_data1 >> 32) & 0x0FFFF)


struct status_desc {
Expand Down Expand Up @@ -623,6 +625,7 @@ struct qlcnic_recv_context {
#define QLCNIC_CAP0_JUMBO_CONTIGUOUS (1 << 7)
#define QLCNIC_CAP0_LRO_CONTIGUOUS (1 << 8)
#define QLCNIC_CAP0_VALIDOFF (1 << 11)
#define QLCNIC_CAP0_LRO_MSS (1 << 21)

/*
* Context state
Expand Down Expand Up @@ -829,6 +832,9 @@ struct qlcnic_mac_list_s {
#define QLCNIC_FW_CAPABILITY_FVLANTX BIT_9
#define QLCNIC_FW_CAPABILITY_HW_LRO BIT_10
#define QLCNIC_FW_CAPABILITY_MULTI_LOOPBACK BIT_27
#define QLCNIC_FW_CAPABILITY_MORE_CAPS BIT_31

#define QLCNIC_FW_CAPABILITY_2_LRO_MAX_TCP_SEG BIT_2

/* module types */
#define LINKEVENT_MODULE_NOT_PRESENT 1
Expand Down Expand Up @@ -918,6 +924,7 @@ struct qlcnic_ipaddr {
#define QLCNIC_NEED_FLR 0x1000
#define QLCNIC_FW_RESET_OWNER 0x2000
#define QLCNIC_FW_HANG 0x4000
#define QLCNIC_FW_LRO_MSS_CAP 0x8000
#define QLCNIC_IS_MSI_FAMILY(adapter) \
((adapter)->flags & (QLCNIC_MSI_ENABLED | QLCNIC_MSIX_ENABLED))

Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic_ctx.c
Original file line number Diff line number Diff line change
Expand Up @@ -237,6 +237,9 @@ qlcnic_fw_cmd_create_rx_ctx(struct qlcnic_adapter *adapter)
| QLCNIC_CAP0_VALIDOFF);
cap |= (QLCNIC_CAP0_JUMBO_CONTIGUOUS | QLCNIC_CAP0_LRO_CONTIGUOUS);

if (adapter->flags & QLCNIC_FW_LRO_MSS_CAP)
cap |= QLCNIC_CAP0_LRO_MSS;

prq->valid_field_offset = offsetof(struct qlcnic_hostrq_rx_ctx,
msix_handler);
prq->txrx_sds_binding = nsds_rings - 1;
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic_hdr.h
Original file line number Diff line number Diff line change
Expand Up @@ -588,6 +588,7 @@ enum {
#define CRB_DRIVER_VERSION (QLCNIC_REG(0x2a0))

#define CRB_FW_CAPABILITIES_1 (QLCNIC_CAM_RAM(0x128))
#define CRB_FW_CAPABILITIES_2 (QLCNIC_CAM_RAM(0x12c))
#define CRB_MAC_BLOCK_START (QLCNIC_CAM_RAM(0x1c0))

/*
Expand Down
3 changes: 3 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -1653,6 +1653,9 @@ qlcnic_process_lro(struct qlcnic_adapter *adapter,

length = skb->len;

if (adapter->flags & QLCNIC_FW_LRO_MSS_CAP)
skb_shinfo(skb)->gso_size = qlcnic_get_lro_sts_mss(sts_data1);

if (vid != 0xffff)
__vlan_hwaccel_put_tag(skb, vid);
netif_receive_skb(skb);
Expand Down
9 changes: 9 additions & 0 deletions trunk/drivers/net/ethernet/qlogic/qlcnic/qlcnic_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1136,6 +1136,8 @@ static int
__qlcnic_up(struct qlcnic_adapter *adapter, struct net_device *netdev)
{
int ring;
u32 capab2;

struct qlcnic_host_rds_ring *rds_ring;

if (adapter->is_up != QLCNIC_ADAPTER_UP_MAGIC)
Expand All @@ -1146,6 +1148,12 @@ __qlcnic_up(struct qlcnic_adapter *adapter, struct net_device *netdev)
if (qlcnic_set_eswitch_port_config(adapter))
return -EIO;

if (adapter->capabilities & QLCNIC_FW_CAPABILITY_MORE_CAPS) {
capab2 = QLCRD32(adapter, CRB_FW_CAPABILITIES_2);
if (capab2 & QLCNIC_FW_CAPABILITY_2_LRO_MAX_TCP_SEG)
adapter->flags |= QLCNIC_FW_LRO_MSS_CAP;
}

if (qlcnic_fw_create_ctx(adapter))
return -EIO;

Expand Down Expand Up @@ -1215,6 +1223,7 @@ __qlcnic_down(struct qlcnic_adapter *adapter, struct net_device *netdev)
qlcnic_napi_disable(adapter);

qlcnic_fw_destroy_ctx(adapter);
adapter->flags &= ~QLCNIC_FW_LRO_MSS_CAP;

qlcnic_reset_rx_buffers_list(adapter);
qlcnic_release_tx_buffers(adapter);
Expand Down

0 comments on commit 346c0c2

Please sign in to comment.