|
@@ -1427,6 +1427,28 @@ static void cnic_reply_bnx2x_kcqes(struct cnic_dev *dev, int ulp_type,
|
|
|
rcu_read_unlock();
|
|
|
}
|
|
|
|
|
|
+static void cnic_bnx2x_set_tcp_options(struct cnic_dev *dev, int time_stamps,
|
|
|
+ int en_tcp_dack)
|
|
|
+{
|
|
|
+ struct cnic_local *cp = dev->cnic_priv;
|
|
|
+ struct bnx2x *bp = netdev_priv(dev->netdev);
|
|
|
+ u8 xstorm_flags = XSTORM_L5CM_TCP_FLAGS_WND_SCL_EN;
|
|
|
+ u16 tstorm_flags = 0;
|
|
|
+
|
|
|
+ if (time_stamps) {
|
|
|
+ xstorm_flags |= XSTORM_L5CM_TCP_FLAGS_TS_ENABLED;
|
|
|
+ tstorm_flags |= TSTORM_L5CM_TCP_FLAGS_TS_ENABLED;
|
|
|
+ }
|
|
|
+ if (en_tcp_dack)
|
|
|
+ tstorm_flags |= TSTORM_L5CM_TCP_FLAGS_DELAYED_ACK_EN;
|
|
|
+
|
|
|
+ CNIC_WR8(dev, BAR_XSTRORM_INTMEM +
|
|
|
+ XSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(cp->pfid), xstorm_flags);
|
|
|
+
|
|
|
+ CNIC_WR16(dev, BAR_TSTRORM_INTMEM +
|
|
|
+ TSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(cp->pfid), tstorm_flags);
|
|
|
+}
|
|
|
+
|
|
|
static int cnic_bnx2x_iscsi_init1(struct cnic_dev *dev, struct kwqe *kwqe)
|
|
|
{
|
|
|
struct cnic_local *cp = dev->cnic_priv;
|
|
@@ -1506,6 +1528,10 @@ static int cnic_bnx2x_iscsi_init1(struct cnic_dev *dev, struct kwqe *kwqe)
|
|
|
CNIC_WR16(dev, BAR_CSTRORM_INTMEM + CSTORM_ISCSI_HQ_SIZE_OFFSET(pfid),
|
|
|
hq_bds);
|
|
|
|
|
|
+ cnic_bnx2x_set_tcp_options(dev,
|
|
|
+ req1->flags & ISCSI_KWQE_INIT1_TIME_STAMPS_ENABLE,
|
|
|
+ req1->flags & ISCSI_KWQE_INIT1_DELAYED_ACK_ENABLE);
|
|
|
+
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
@@ -2035,9 +2061,6 @@ static void cnic_init_storm_conn_bufs(struct cnic_dev *dev,
|
|
|
xstorm_buf->pseudo_header_checksum =
|
|
|
swab16(~csum_ipv6_magic(&src_ip, &dst_ip, 0, IPPROTO_TCP, 0));
|
|
|
|
|
|
- if (!(kwqe1->tcp_flags & L4_KWQ_CONNECT_REQ1_NO_DELAY_ACK))
|
|
|
- tstorm_buf->params |=
|
|
|
- L5CM_TSTORM_CONN_BUFFER_DELAYED_ACK_ENABLE;
|
|
|
if (kwqe3->ka_timeout) {
|
|
|
tstorm_buf->ka_enable = 1;
|
|
|
tstorm_buf->ka_timeout = kwqe3->ka_timeout;
|
|
@@ -2084,25 +2107,6 @@ static void cnic_init_bnx2x_mac(struct cnic_dev *dev)
|
|
|
mac[0]);
|
|
|
}
|
|
|
|
|
|
-static void cnic_bnx2x_set_tcp_timestamp(struct cnic_dev *dev, int tcp_ts)
|
|
|
-{
|
|
|
- struct cnic_local *cp = dev->cnic_priv;
|
|
|
- struct bnx2x *bp = netdev_priv(dev->netdev);
|
|
|
- u8 xstorm_flags = XSTORM_L5CM_TCP_FLAGS_WND_SCL_EN;
|
|
|
- u16 tstorm_flags = 0;
|
|
|
-
|
|
|
- if (tcp_ts) {
|
|
|
- xstorm_flags |= XSTORM_L5CM_TCP_FLAGS_TS_ENABLED;
|
|
|
- tstorm_flags |= TSTORM_L5CM_TCP_FLAGS_TS_ENABLED;
|
|
|
- }
|
|
|
-
|
|
|
- CNIC_WR8(dev, BAR_XSTRORM_INTMEM +
|
|
|
- XSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(cp->pfid), xstorm_flags);
|
|
|
-
|
|
|
- CNIC_WR16(dev, BAR_TSTRORM_INTMEM +
|
|
|
- TSTORM_ISCSI_TCP_VARS_FLAGS_OFFSET(cp->pfid), tstorm_flags);
|
|
|
-}
|
|
|
-
|
|
|
static int cnic_bnx2x_connect(struct cnic_dev *dev, struct kwqe *wqes[],
|
|
|
u32 num, int *work)
|
|
|
{
|
|
@@ -2178,9 +2182,6 @@ static int cnic_bnx2x_connect(struct cnic_dev *dev, struct kwqe *wqes[],
|
|
|
CNIC_WR16(dev, BAR_XSTRORM_INTMEM +
|
|
|
XSTORM_ISCSI_LOCAL_VLAN_OFFSET(cp->pfid), csk->vlan_id);
|
|
|
|
|
|
- cnic_bnx2x_set_tcp_timestamp(dev,
|
|
|
- kwqe1->tcp_flags & L4_KWQ_CONNECT_REQ1_TIME_STAMP);
|
|
|
-
|
|
|
ret = cnic_submit_kwqe_16(dev, L5CM_RAMROD_CMD_ID_TCP_CONNECT,
|
|
|
kwqe1->cid, ISCSI_CONNECTION_TYPE, &l5_data);
|
|
|
if (!ret)
|
|
@@ -4220,7 +4221,7 @@ static int cnic_cm_init_bnx2x_hw(struct cnic_dev *dev)
|
|
|
u32 port = CNIC_PORT(cp);
|
|
|
|
|
|
cnic_init_bnx2x_mac(dev);
|
|
|
- cnic_bnx2x_set_tcp_timestamp(dev, 1);
|
|
|
+ cnic_bnx2x_set_tcp_options(dev, 0, 1);
|
|
|
|
|
|
CNIC_WR16(dev, BAR_XSTRORM_INTMEM +
|
|
|
XSTORM_ISCSI_LOCAL_VLAN_OFFSET(pfid), 0);
|