From patchwork Fri Apr 10 20:57:21 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Karen Xie X-Patchwork-Id: 6199371 Return-Path: X-Original-To: patchwork-linux-scsi@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 9A59ABF4A7 for ; Fri, 10 Apr 2015 21:00:55 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C15E320462 for ; Fri, 10 Apr 2015 21:00:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D203520451 for ; Fri, 10 Apr 2015 21:00:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756440AbbDJVAw (ORCPT ); Fri, 10 Apr 2015 17:00:52 -0400 Received: from stargate.chelsio.com ([67.207.112.58]:20048 "EHLO stargate.chelsio.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756405AbbDJVAu (ORCPT ); Fri, 10 Apr 2015 17:00:50 -0400 Received: from localhost6.localdomain6 (qatest6.asicdesigners.com [10.192.162.143]) by stargate.chelsio.com (8.13.8/8.13.8) with ESMTP id t3AKvMLp023329; Fri, 10 Apr 2015 13:57:22 -0700 Received: from localhost6.localdomain6 (localhost.localdomain [127.0.0.1]) by localhost6.localdomain6 (8.14.4/8.14.4) with ESMTP id t3AKvMwf028779; Fri, 10 Apr 2015 13:57:22 -0700 Received: (from kxie@localhost) by localhost6.localdomain6 (8.14.4/8.14.4/Submit) id t3AKvLNw028778; Fri, 10 Apr 2015 13:57:21 -0700 From: Karen Xie Message-Id: <201504102057.t3AKvLNw028778@localhost6.localdomain6> Date: Fri, 10 Apr 2015 13:57:21 -0700 To: linux-scsi@vger.kernel.org Cc: kxie@chelsio.com, hch@infradead.org, James.Bottomley@HansenPartnership.com, michaelc@cs.wisc.edu Subject: [PATCH 4/4] cxgb4i: set the initial sequence number User-Agent: Heirloom mailx 12.4 7/29/08 MIME-Version: 1.0 Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP set the initial sequence number so the 1st byte of payload is aligned on the 8-byte boundary. Signed-off-by: Karen Xie --- drivers/scsi/cxgbi/cxgb4i/cxgb4i.c | 8 ++++++-- drivers/scsi/cxgbi/cxgb4i/cxgb4i.h | 2 ++ 2 files changed, 8 insertions(+), 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c index dc495a4..089110e 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.c @@ -200,9 +200,9 @@ static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, SMAC_SEL_V(csk->smac_idx) | ULP_MODE_V(ULP_MODE_ISCSI) | RCV_BUFSIZ_V(csk->rcv_win >> 10); + opt2 = RX_CHANNEL_V(0) | RSS_QUEUE_VALID_F | - (RX_FC_DISABLE_F) | RSS_QUEUE_V(csk->rss_qid); if (is_t4(lldi->adapter_type)) { @@ -231,6 +231,7 @@ static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, } else { struct cpl_t5_act_open_req *req = (struct cpl_t5_act_open_req *)skb->head; + u32 isn = (prandom_u32() & ~7UL) - 1; INIT_TP_WR(req, 0); OPCODE_TID(req) = cpu_to_be32(MK_OPCODE_TID(CPL_ACT_OPEN_REQ, @@ -244,7 +245,10 @@ static void send_act_open_req(struct cxgbi_sock *csk, struct sk_buff *skb, cxgb4_select_ntuple( csk->cdev->ports[csk->port_id], csk->l2t))); - opt2 |= 1 << 31; + req->rsvd = cpu_to_be32(isn); + opt2 |= T5_ISS_VALID; + opt2 |= T5_OPT_2_VALID_F; + req->opt2 = cpu_to_be32(opt2); log_debug(1 << CXGBI_DBG_TOE | 1 << CXGBI_DBG_SOCK, diff --git a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.h b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.h index 63115bc..22dd8d6 100644 --- a/drivers/scsi/cxgbi/cxgb4i/cxgb4i.h +++ b/drivers/scsi/cxgbi/cxgb4i/cxgb4i.h @@ -23,6 +23,8 @@ #define CXGB4I_TX_HEADER_LEN \ (sizeof(struct fw_ofld_tx_data_wr) + sizeof(struct sge_opaque_hdr)) +#define T5_ISS_VALID (1 << 18) + struct ulptx_idata { __be32 cmd_more; __be32 len;