From patchwork Tue Oct 10 10:48:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jitendra Bhivare X-Patchwork-Id: 9995773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id CE295603B5 for ; Tue, 10 Oct 2017 10:48:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C9DEE28500 for ; Tue, 10 Oct 2017 10:48:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id BEE2E28503; Tue, 10 Oct 2017 10:48:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7531E28500 for ; Tue, 10 Oct 2017 10:48:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755563AbdJJKsl (ORCPT ); Tue, 10 Oct 2017 06:48:41 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:43217 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751398AbdJJKsl (ORCPT ); Tue, 10 Oct 2017 06:48:41 -0400 Received: by mail-pf0-f178.google.com with SMTP id d2so13616481pfh.0 for ; Tue, 10 Oct 2017 03:48:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=EqLDI3esu4smMPkri2ZBQFu1BTb9ObZLnT3zgVmFIRA=; b=MB2PPVMpxvkstIe1jH8WS3tSJSJQA6+nftStH7F4u3sLKTEaLngxIec7mw9f9qN6Cc bo5j93U6yvP1rBwKntOgud+c9p9MXRU9MbtJGKWPELDh8DkhpKAepnTmqQVzZ4b43R2c SAogEaoRNGHSBl87zueDQ5mTFK4wC5AJFRY2c= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=EqLDI3esu4smMPkri2ZBQFu1BTb9ObZLnT3zgVmFIRA=; b=OiNDhpxkKA+GHkMIYFQ6SUDtvvJi9B0OXBWVUruxkMo7jRok/oKJq+5DcjCbjymJnJ 96eWCsc/FN8ZGDsPPWjap4snk77shMXKms0rVxJyNM7KECz858vMAnVqdZhiBVM0oyfg bt4nEFFF2e3CmEODxfk5e2JEKRoSdjMSXILcllkCieDAzwwzD/8S2FoI3lseyuA9RSSX A2i/JIcCZqxjvysq/TI4nt80BnjfBqVhGTIbB6eJ/nmU4EsbBlwBltdZCGzdDGsDJM+K v7GbIkfIzdQUasIOMITTSexo5lEykW4NZG7+wuuurKUROtBo4Xuq7M4/CEY/ggApASeV TDqQ== X-Gm-Message-State: AMCzsaXCA9afn3DmeZreG+wSnpRKD1te/NoSweGrl2/ZtXzbNfKSs3vE vVr3aNpPhqxCTGOaXU8+/zG2wQ== X-Google-Smtp-Source: AOwi7QDTMkwxmYqQelMnERjcUenZE3vYIKiV2Hwra6LlGyC9DanXxbELLflaFifWe5QKZs8JrJvuew== X-Received: by 10.84.131.66 with SMTP id 60mr11867294pld.341.1507632520650; Tue, 10 Oct 2017 03:48:40 -0700 (PDT) Received: from localhost.localdomain ([103.195.99.222]) by smtp.gmail.com with ESMTPSA id w13sm16131313pgq.13.2017.10.10.03.48.38 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 10 Oct 2017 03:48:39 -0700 (PDT) From: Jitendra Bhivare To: cleech@redhat.com, lduncan@suse.com Cc: linux-scsi@vger.kernel.org, Jitendra Bhivare Subject: [PATCH 01/10] be2iscsi: Fix boot flags in sysfs Date: Tue, 10 Oct 2017 16:18:11 +0530 Message-Id: <1507632500-26445-2-git-send-email-jitendra.bhivare@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1507632500-26445-1-git-send-email-jitendra.bhivare@broadcom.com> References: <1507632500-26445-1-git-send-email-jitendra.bhivare@broadcom.com> Sender: linux-scsi-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-scsi@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP The boot flags exported through sysfs was wrongly reverted to 2. Use boot flag 3 required per spec. Bit 0 Block valid flag Bit 1 Firmware booting selected Signed-off-by: Jitendra Bhivare --- drivers/scsi/be2iscsi/be_main.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_main.c b/drivers/scsi/be2iscsi/be_main.c index b4542e7..56ae0f4 100644 --- a/drivers/scsi/be2iscsi/be_main.c +++ b/drivers/scsi/be2iscsi/be_main.c @@ -4917,6 +4917,13 @@ void beiscsi_start_boot_work(struct beiscsi_hba *phba, unsigned int s_handle) schedule_work(&phba->boot_work); } +/** + * Boot flag info for iscsi-utilities + * Bit 0 Block valid flag + * Bit 1 Firmware booting selected + */ +#define BEISCSI_SYSFS_ISCSI_BOOT_FLAGS 3 + static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf) { struct beiscsi_hba *phba = data; @@ -4972,7 +4979,7 @@ static ssize_t beiscsi_show_boot_tgt_info(void *data, int type, char *buf) auth_data.chap.intr_secret); break; case ISCSI_BOOT_TGT_FLAGS: - rc = sprintf(str, "2\n"); + rc = sprintf(str, "%d\n", BEISCSI_SYSFS_ISCSI_BOOT_FLAGS); break; case ISCSI_BOOT_TGT_NIC_ASSOC: rc = sprintf(str, "0\n"); @@ -5004,7 +5011,7 @@ static ssize_t beiscsi_show_boot_eth_info(void *data, int type, char *buf) switch (type) { case ISCSI_BOOT_ETH_FLAGS: - rc = sprintf(str, "2\n"); + rc = sprintf(str, "%d\n", BEISCSI_SYSFS_ISCSI_BOOT_FLAGS); break; case ISCSI_BOOT_ETH_INDEX: rc = sprintf(str, "0\n");