diff options
author | Ron Mercer <ron.mercer@qlogic.com> | 2007-03-26 16:43:00 -0400 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-03-28 02:18:50 -0400 |
commit | b3b1514c90ab534ec6c9e4452953069f85aacf4d (patch) | |
tree | 37f8b539565bb95080ffa231b621d1ce998033c4 /drivers/net/qla3xxx.c | |
parent | f67cac0190623a3cde4d783c7c7205691aa02cc2 (diff) |
qla3xxx: bugfix: Jumbo frame handling.
Fixed rx checksum bits. Turn on TCP processing for rx checksum.
Fixed max frame length register write. It wasn't getting set
in multi-port system. Set rx buffer queue length properly
for jumbo frames.
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/qla3xxx.c')
-rwxr-xr-x | drivers/net/qla3xxx.c | 29 |
1 files changed, 15 insertions, 14 deletions
diff --git a/drivers/net/qla3xxx.c b/drivers/net/qla3xxx.c index 6612936306d7..a8246eb2f8d9 100755 --- a/drivers/net/qla3xxx.c +++ b/drivers/net/qla3xxx.c | |||
@@ -1933,17 +1933,18 @@ static void ql_process_macip_rx_intr(struct ql3_adapter *qdev, | |||
1933 | u16 checksum = le16_to_cpu(ib_ip_rsp_ptr->checksum); | 1933 | u16 checksum = le16_to_cpu(ib_ip_rsp_ptr->checksum); |
1934 | if (checksum & | 1934 | if (checksum & |
1935 | (IB_IP_IOCB_RSP_3032_ICE | | 1935 | (IB_IP_IOCB_RSP_3032_ICE | |
1936 | IB_IP_IOCB_RSP_3032_CE | | 1936 | IB_IP_IOCB_RSP_3032_CE)) { |
1937 | IB_IP_IOCB_RSP_3032_NUC)) { | ||
1938 | printk(KERN_ERR | 1937 | printk(KERN_ERR |
1939 | "%s: Bad checksum for this %s packet, checksum = %x.\n", | 1938 | "%s: Bad checksum for this %s packet, checksum = %x.\n", |
1940 | __func__, | 1939 | __func__, |
1941 | ((checksum & | 1940 | ((checksum & |
1942 | IB_IP_IOCB_RSP_3032_TCP) ? "TCP" : | 1941 | IB_IP_IOCB_RSP_3032_TCP) ? "TCP" : |
1943 | "UDP"),checksum); | 1942 | "UDP"),checksum); |
1944 | } else if (checksum & IB_IP_IOCB_RSP_3032_TCP) { | 1943 | } else if ((checksum & IB_IP_IOCB_RSP_3032_TCP) || |
1944 | (checksum & IB_IP_IOCB_RSP_3032_UDP && | ||
1945 | !(checksum & IB_IP_IOCB_RSP_3032_NUC))) { | ||
1945 | skb2->ip_summed = CHECKSUM_UNNECESSARY; | 1946 | skb2->ip_summed = CHECKSUM_UNNECESSARY; |
1946 | } | 1947 | } |
1947 | } | 1948 | } |
1948 | skb2->dev = qdev->ndev; | 1949 | skb2->dev = qdev->ndev; |
1949 | skb2->protocol = eth_type_trans(skb2, qdev->ndev); | 1950 | skb2->protocol = eth_type_trans(skb2, qdev->ndev); |
@@ -3039,15 +3040,6 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev) | |||
3039 | goto out; | 3040 | goto out; |
3040 | } | 3041 | } |
3041 | 3042 | ||
3042 | if (qdev->mac_index) | ||
3043 | ql_write_page0_reg(qdev, | ||
3044 | &port_regs->mac1MaxFrameLengthReg, | ||
3045 | qdev->max_frame_size); | ||
3046 | else | ||
3047 | ql_write_page0_reg(qdev, | ||
3048 | &port_regs->mac0MaxFrameLengthReg, | ||
3049 | qdev->max_frame_size); | ||
3050 | |||
3051 | value = qdev->nvram_data.tcpMaxWindowSize; | 3043 | value = qdev->nvram_data.tcpMaxWindowSize; |
3052 | ql_write_page0_reg(qdev, &port_regs->tcpMaxWindow, value); | 3044 | ql_write_page0_reg(qdev, &port_regs->tcpMaxWindow, value); |
3053 | 3045 | ||
@@ -3067,6 +3059,14 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev) | |||
3067 | ql_sem_unlock(qdev, QL_FLASH_SEM_MASK); | 3059 | ql_sem_unlock(qdev, QL_FLASH_SEM_MASK); |
3068 | } | 3060 | } |
3069 | 3061 | ||
3062 | if (qdev->mac_index) | ||
3063 | ql_write_page0_reg(qdev, | ||
3064 | &port_regs->mac1MaxFrameLengthReg, | ||
3065 | qdev->max_frame_size); | ||
3066 | else | ||
3067 | ql_write_page0_reg(qdev, | ||
3068 | &port_regs->mac0MaxFrameLengthReg, | ||
3069 | qdev->max_frame_size); | ||
3070 | 3070 | ||
3071 | if(ql_sem_spinlock(qdev, QL_PHY_GIO_SEM_MASK, | 3071 | if(ql_sem_spinlock(qdev, QL_PHY_GIO_SEM_MASK, |
3072 | (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) * | 3072 | (QL_RESOURCE_BITS_BASE_CODE | (qdev->mac_index) * |
@@ -3137,7 +3137,8 @@ static int ql_adapter_initialize(struct ql3_adapter *qdev) | |||
3137 | if (qdev->device_id == QL3032_DEVICE_ID) { | 3137 | if (qdev->device_id == QL3032_DEVICE_ID) { |
3138 | value = | 3138 | value = |
3139 | (QL3032_PORT_CONTROL_EF | QL3032_PORT_CONTROL_KIE | | 3139 | (QL3032_PORT_CONTROL_EF | QL3032_PORT_CONTROL_KIE | |
3140 | QL3032_PORT_CONTROL_EIv6 | QL3032_PORT_CONTROL_EIv4); | 3140 | QL3032_PORT_CONTROL_EIv6 | QL3032_PORT_CONTROL_EIv4 | |
3141 | QL3032_PORT_CONTROL_ET); | ||
3141 | ql_write_page0_reg(qdev, &port_regs->functionControl, | 3142 | ql_write_page0_reg(qdev, &port_regs->functionControl, |
3142 | ((value << 16) | value)); | 3143 | ((value << 16) | value)); |
3143 | } else { | 3144 | } else { |