From patchwork Fri Apr 5 23:04:20 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Smart X-Patchwork-Id: 10887949 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3F0D01390 for ; Fri, 5 Apr 2019 23:04:34 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 29C5D286D7 for ; Fri, 5 Apr 2019 23:04:34 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1E34B28B35; Fri, 5 Apr 2019 23:04:34 +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=-8.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,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 B944A286D7 for ; Fri, 5 Apr 2019 23:04:33 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726310AbfDEXEd (ORCPT ); Fri, 5 Apr 2019 19:04:33 -0400 Received: from mail-pf1-f196.google.com ([209.85.210.196]:38918 "EHLO mail-pf1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbfDEXEd (ORCPT ); Fri, 5 Apr 2019 19:04:33 -0400 Received: by mail-pf1-f196.google.com with SMTP id i17so930349pfo.6 for ; Fri, 05 Apr 2019 16:04:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=y1P9ji9RXVZdgdkmrihTp3i1dOpiIX8wHnIecW7HXAI=; b=mGE+s+CgvjHsntE5I/LZO69RzZSgpfpYN2xaU4usg+IpePVFOQP76BAxE/tvvZ+FyG DR1CTomzj0HrlUkjpZ2SJjquCmDBc4XO+PEaog7I0sQelKVOy5qvyWqmt3Mf2+HFzWYt C6BgSrBrMRG6NwX7Z/AYF9u+BuI/BIjjOvfWCLyWHfYlL/DL7Jnaib6Musu05RFXltq9 klcpw4gdGh7bcS6I8g9+M9J8zFZDZ/v6ZK+GvJ+xje+TSAr3nL6kJ6PYLDzfSUNYcEbT 3g7inX9qSfNszShSnVSeogZ+EfOOH5mC/SEqpHNytlkBYXzQ/bxgowWkF3wsuqou/p8t S3hQ== 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=y1P9ji9RXVZdgdkmrihTp3i1dOpiIX8wHnIecW7HXAI=; b=pyi+BYfjvMDAvLjY+d3JsNMf2w0dqKOjRt+BQl9c+N8gO1pi2QsauoK2RWUZjamX4y 2jjQIZ1bvLsizfdB6AIuJ5RRGJ0QhTof94vJShEo/U5tY1RNYRlBctuO8g5/aqo/547C gTJzZXuvzD4GqmA5CH+Dz4oPbGk+u8lXrgnLdU9kP+UmDvrh5aDawlwk1QFvSBVru2Ig RtBAjU6b/kXVn+9uS22WQN+qyRap0hO4ffBoEpMMtv77qSRIcSzEjLEL3LRBm2SIy+4x gnl1yZy7rZL9/FOSy+fZZma72V/BfYKn3XShFJj1tO79cwaj+1MNVKlMGI0pQQxjpK7d Jg4Q== X-Gm-Message-State: APjAAAU/hJGFQHz8KqFu3KaaYyX7QFoKthm8Hh3jHBn/IPqL15219FnR 9D4x30mz1QfCkuVCk2mb0/fMBJ5K X-Google-Smtp-Source: APXvYqwCPRuBWL9+/KN19T66QKerQ+SdLrrEbJkn4yTf0RR6A2XQQHfd8kC5OP0AJAEVrbUzYI3ouw== X-Received: by 2002:a63:e915:: with SMTP id i21mr14618491pgh.297.1554505472121; Fri, 05 Apr 2019 16:04:32 -0700 (PDT) Received: from os42.localdomain ([192.19.223.250]) by smtp.gmail.com with ESMTPSA id j67sm30805068pfc.72.2019.04.05.16.04.31 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 05 Apr 2019 16:04:31 -0700 (PDT) From: James Smart To: linux-scsi@vger.kernel.org Cc: muneendra.kumar@broadcom.com, James Smart Subject: [PATCH 1/4] scsi fc: add FPIN ELS definition Date: Fri, 5 Apr 2019 16:04:20 -0700 Message-Id: <20190405230423.4316-2-jsmart2021@gmail.com> X-Mailer: git-send-email 2.13.7 In-Reply-To: <20190405230423.4316-1-jsmart2021@gmail.com> References: <20190405230423.4316-1-jsmart2021@gmail.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 T11 has introduced a new Fabric Notifications mechanism whereby the fabric can notify a port of events occurring in the fabric. The notifications are given by the FPIN ELS. Add the FPIN ELS definitions to the kernel. Signed-off-by: James Smart Reviewed-by: Ewan D. Milne --- include/uapi/scsi/fc/fc_els.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/uapi/scsi/fc/fc_els.h b/include/uapi/scsi/fc/fc_els.h index b7e0a5ed40de..a81c53508cc6 100644 --- a/include/uapi/scsi/fc/fc_els.h +++ b/include/uapi/scsi/fc/fc_els.h @@ -52,6 +52,7 @@ enum fc_els_cmd { ELS_RRQ = 0x12, /* reinstate recovery qualifier */ ELS_REC = 0x13, /* read exchange concise */ ELS_SRR = 0x14, /* sequence retransmission request */ + ELS_FPIN = 0x16, /* Fabric Performance Impact Notification */ ELS_PRLI = 0x20, /* process login */ ELS_PRLO = 0x21, /* process logout */ ELS_SCN = 0x22, /* state change notification */ @@ -119,6 +120,7 @@ enum fc_els_cmd { [ELS_RRQ] = "RRQ", \ [ELS_REC] = "REC", \ [ELS_SRR] = "SRR", \ + [ELS_FPIN] = "FPIN", \ [ELS_PRLI] = "PRLI", \ [ELS_PRLO] = "PRLO", \ [ELS_SCN] = "SCN", \ @@ -829,4 +831,35 @@ enum fc_els_clid_ic { ELS_CLID_IC_LIP = 8, /* receiving LIP */ }; + +/* + * Fabric Notification Descriptor Tag values + */ +enum fc_fn_dtag { + ELS_FN_DTAG_LNK_INTEGRITY = 0x00020001, /* Link Integrity */ + ELS_FN_DTAG_PEER_CONGEST = 0x00020003, /* Peer Congestion */ + ELS_FN_DTAG_CONGESTION = 0x00020004, /* Congestion */ +}; + +/* + * Fabric Notification Descriptor + */ +struct fc_fn_desc { + __be32 fn_desc_tag; /* Notification Descriptor Tag */ + __be32 fn_desc_value_len; /* Length of Descriptor Value field + * (in bytes) + */ + __u8 fn_desc_value[0]; /* Descriptor Value */ +}; + +/* + * ELS_FPIN - Fabric Performance Impact Notification + */ +struct fc_els_fpin { + __u8 fpin_cmd; /* command (0x16) */ + __u8 fpin_zero[3]; /* specified as zero - part of cmd */ + __be32 fpin_desc_cnt; /* count of descriptors */ + struct fc_fn_desc fpin_desc[0]; /* Descriptor list */ +}; + #endif /* _FC_ELS_H_ */