linux_dsm_epyc7002/include/scsi/fc/fc_ms.h
Linus Torvalds ba6d10ab80 SCSI misc on 20190709
This is mostly update of the usual drivers: qla2xxx, hpsa, lpfc, ufs,
 mpt3sas, ibmvscsi, megaraid_sas, bnx2fc and hisi_sas as well as the
 removal of the osst driver (I heard from Willem privately that he
 would like the driver removed because all his test hardware has
 failed).  Plus number of minor changes, spelling fixes and other
 trivia.
 
 Signed-off-by: James E.J. Bottomley <jejb@linux.ibm.com>
 -----BEGIN PGP SIGNATURE-----
 
 iJwEABMIAEQWIQTnYEDbdso9F2cI+arnQslM7pishQUCXSTl4yYcamFtZXMuYm90
 dG9tbGV5QGhhbnNlbnBhcnRuZXJzaGlwLmNvbQAKCRDnQslM7pishdcxAQDCJVbd
 fPUX76/V1ldupunF97+3DTharxxbst+VnkOnCwD8D4c0KFFFOI9+F36cnMGCPegE
 fjy17dQLvsJ4GsidHy8=
 =aS5B
 -----END PGP SIGNATURE-----

Merge tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi

Pull SCSI updates from James Bottomley:
 "This is mostly update of the usual drivers: qla2xxx, hpsa, lpfc, ufs,
  mpt3sas, ibmvscsi, megaraid_sas, bnx2fc and hisi_sas as well as the
  removal of the osst driver (I heard from Willem privately that he
  would like the driver removed because all his test hardware has
  failed). Plus number of minor changes, spelling fixes and other
  trivia.

  The big merge conflict this time around is the SPDX licence tags.
  Following discussion on linux-next, we believe our version to be more
  accurate than the one in the tree, so the resolution is to take our
  version for all the SPDX conflicts"

Note on the SPDX license tag conversion conflicts: the SCSI tree had
done its own SPDX conversion, which in some cases conflicted with the
treewide ones done by Thomas & co.

In almost all cases, the conflicts were purely syntactic: the SCSI tree
used the old-style SPDX tags ("GPL-2.0" and "GPL-2.0+") while the
treewide conversion had used the new-style ones ("GPL-2.0-only" and
"GPL-2.0-or-later").

In these cases I picked the new-style one.

In a few cases, the SPDX conversion was actually different, though.  As
explained by James above, and in more detail in a pre-pull-request
thread:

 "The other problem is actually substantive: In the libsas code Luben
  Tuikov originally specified gpl 2.0 only by dint of stating:

  * This file is licensed under GPLv2.

  In all the libsas files, but then muddied the water by quoting GPLv2
  verbatim (which includes the or later than language). So for these
  files Christoph did the conversion to v2 only SPDX tags and Thomas
  converted to v2 or later tags"

So in those cases, where the spdx tag substantially mattered, I took the
SCSI tree conversion of it, but then also took the opportunity to turn
the old-style "GPL-2.0" into a new-style "GPL-2.0-only" tag.

Similarly, when there were whitespace differences or other differences
to the comments around the copyright notices, I took the version from
the SCSI tree as being the more specific conversion.

Finally, in the spdx conversions that had no conflicts (because the
treewide ones hadn't been done for those files), I just took the SCSI
tree version as-is, even if it was old-style.  The old-style conversions
are perfectly valid, even if the "-only" and "-or-later" versions are
perhaps more descriptive.

* tag 'scsi-misc' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: (185 commits)
  scsi: qla2xxx: move IO flush to the front of NVME rport unregistration
  scsi: qla2xxx: Fix NVME cmd and LS cmd timeout race condition
  scsi: qla2xxx: on session delete, return nvme cmd
  scsi: qla2xxx: Fix kernel crash after disconnecting NVMe devices
  scsi: megaraid_sas: Update driver version to 07.710.06.00-rc1
  scsi: megaraid_sas: Introduce various Aero performance modes
  scsi: megaraid_sas: Use high IOPS queues based on IO workload
  scsi: megaraid_sas: Set affinity for high IOPS reply queues
  scsi: megaraid_sas: Enable coalescing for high IOPS queues
  scsi: megaraid_sas: Add support for High IOPS queues
  scsi: megaraid_sas: Add support for MPI toolbox commands
  scsi: megaraid_sas: Offload Aero RAID5/6 division calculations to driver
  scsi: megaraid_sas: RAID1 PCI bandwidth limit algorithm is applicable for only Ventura
  scsi: megaraid_sas: megaraid_sas: Add check for count returned by HOST_DEVICE_LIST DCMD
  scsi: megaraid_sas: Handle sequence JBOD map failure at driver level
  scsi: megaraid_sas: Don't send FPIO to RL Bypass queue
  scsi: megaraid_sas: In probe context, retry IOC INIT once if firmware is in fault
  scsi: megaraid_sas: Release Mutex lock before OCR in case of DCMD timeout
  scsi: megaraid_sas: Call disable_irq from process IRQ poll
  scsi: megaraid_sas: Remove few debug counters from IO path
  ...
2019-07-11 15:14:01 -07:00

203 lines
4.6 KiB
C

/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Copyright(c) 2011 Intel Corporation. All rights reserved.
*
* Maintained at www.Open-FCoE.org
*/
#ifndef _FC_MS_H_
#define _FC_MS_H_
#include <linux/types.h>
/*
* Fibre Channel Services - Management Service (MS)
* From T11.org FC-GS-4 Rev 7.91 February 4, 2004
*/
/*
* Fabric Device Management Interface
*/
/*
* Common-transport sub-type for FDMI
*/
#define FC_FDMI_SUBTYPE 0x10 /* fs_ct_hdr.ct_fs_subtype */
/*
* Management server FDMI Requests.
*/
enum fc_fdmi_req {
FC_FDMI_GRHL = 0x0100, /* Get Registered HBA List */
FC_FDMI_GHAT = 0x0101, /* Get HBA Attributes */
FC_FDMI_GRPL = 0x0102, /* Get Registered Port List */
FC_FDMI_GPAT = 0x0110, /* Get Port Attributes */
FC_FDMI_RHBA = 0x0200, /* Register HBA */
FC_FDMI_RHAT = 0x0201, /* Register HBA Attributes */
FC_FDMI_RPRT = 0x0210, /* Register Port */
FC_FDMI_RPA = 0x0211, /* Register Port Attributes */
FC_FDMI_DHBA = 0x0300, /* Deregister HBA */
FC_FDMI_DHAT = 0x0301, /* Deregister HBA Attributes */
FC_FDMI_DPRT = 0x0310, /* Deregister Port */
FC_FDMI_DPA = 0x0311, /* Deregister Port Attributes */
};
/*
* HBA Attribute Entry Type
*/
enum fc_fdmi_hba_attr_type {
FC_FDMI_HBA_ATTR_NODENAME = 0x0001,
FC_FDMI_HBA_ATTR_MANUFACTURER = 0x0002,
FC_FDMI_HBA_ATTR_SERIALNUMBER = 0x0003,
FC_FDMI_HBA_ATTR_MODEL = 0x0004,
FC_FDMI_HBA_ATTR_MODELDESCRIPTION = 0x0005,
FC_FDMI_HBA_ATTR_HARDWAREVERSION = 0x0006,
FC_FDMI_HBA_ATTR_DRIVERVERSION = 0x0007,
FC_FDMI_HBA_ATTR_OPTIONROMVERSION = 0x0008,
FC_FDMI_HBA_ATTR_FIRMWAREVERSION = 0x0009,
FC_FDMI_HBA_ATTR_OSNAMEVERSION = 0x000A,
FC_FDMI_HBA_ATTR_MAXCTPAYLOAD = 0x000B,
};
/*
* HBA Attribute Length
*/
#define FC_FDMI_HBA_ATTR_NODENAME_LEN 8
#define FC_FDMI_HBA_ATTR_MANUFACTURER_LEN 64
#define FC_FDMI_HBA_ATTR_SERIALNUMBER_LEN 64
#define FC_FDMI_HBA_ATTR_MODEL_LEN 256
#define FC_FDMI_HBA_ATTR_MODELDESCR_LEN 256
#define FC_FDMI_HBA_ATTR_HARDWAREVERSION_LEN 256
#define FC_FDMI_HBA_ATTR_DRIVERVERSION_LEN 256
#define FC_FDMI_HBA_ATTR_OPTIONROMVERSION_LEN 256
#define FC_FDMI_HBA_ATTR_FIRMWAREVERSION_LEN 256
#define FC_FDMI_HBA_ATTR_OSNAMEVERSION_LEN 256
#define FC_FDMI_HBA_ATTR_MAXCTPAYLOAD_LEN 4
/*
* Port Attribute Type
*/
enum fc_fdmi_port_attr_type {
FC_FDMI_PORT_ATTR_FC4TYPES = 0x0001,
FC_FDMI_PORT_ATTR_SUPPORTEDSPEED = 0x0002,
FC_FDMI_PORT_ATTR_CURRENTPORTSPEED = 0x0003,
FC_FDMI_PORT_ATTR_MAXFRAMESIZE = 0x0004,
FC_FDMI_PORT_ATTR_OSDEVICENAME = 0x0005,
FC_FDMI_PORT_ATTR_HOSTNAME = 0x0006,
};
/*
* Port Attribute Length
*/
#define FC_FDMI_PORT_ATTR_FC4TYPES_LEN 32
#define FC_FDMI_PORT_ATTR_SUPPORTEDSPEED_LEN 4
#define FC_FDMI_PORT_ATTR_CURRENTPORTSPEED_LEN 4
#define FC_FDMI_PORT_ATTR_MAXFRAMESIZE_LEN 4
#define FC_FDMI_PORT_ATTR_OSDEVICENAME_LEN 256
#define FC_FDMI_PORT_ATTR_HOSTNAME_LEN 256
/*
* HBA Attribute ID
*/
struct fc_fdmi_hba_identifier {
__be64 id;
};
/*
* Port Name
*/
struct fc_fdmi_port_name {
__be64 portname;
};
/*
* Attribute Entry Block for HBA/Port Attributes
*/
#define FC_FDMI_ATTR_ENTRY_HEADER_LEN 4
struct fc_fdmi_attr_entry {
__be16 type;
__be16 len;
__u8 value[1];
} __attribute__((__packed__));
/*
* Common for HBA/Port Attributes
*/
struct fs_fdmi_attrs {
__be32 numattrs;
struct fc_fdmi_attr_entry attr[1];
} __attribute__((__packed__));
/*
* Registered Port List
*/
struct fc_fdmi_rpl {
__be32 numport;
struct fc_fdmi_port_name port[1];
} __attribute__((__packed__));
/*
* Register HBA (RHBA)
*/
struct fc_fdmi_rhba {
struct fc_fdmi_hba_identifier hbaid;
struct fc_fdmi_rpl port;
struct fs_fdmi_attrs hba_attrs;
} __attribute__((__packed__));
/*
* Register HBA Attributes (RHAT)
*/
struct fc_fdmi_rhat {
struct fc_fdmi_hba_identifier hbaid;
struct fs_fdmi_attrs hba_attrs;
} __attribute__((__packed__));
/*
* Register Port (RPRT)
*/
struct fc_fdmi_rprt {
struct fc_fdmi_hba_identifier hbaid;
struct fc_fdmi_port_name port;
struct fs_fdmi_attrs hba_attrs;
} __attribute__((__packed__));
/*
* Register Port Attributes (RPA)
*/
struct fc_fdmi_rpa {
struct fc_fdmi_port_name port;
struct fs_fdmi_attrs hba_attrs;
} __attribute__((__packed__));
/*
* Deregister Port (DPRT)
*/
struct fc_fdmi_dprt {
struct fc_fdmi_port_name port;
} __attribute__((__packed__));
/*
* Deregister Port Attributes (DPA)
*/
struct fc_fdmi_dpa {
struct fc_fdmi_port_name port;
struct fs_fdmi_attrs hba_attrs;
} __attribute__((__packed__));
/*
* Deregister HBA Attributes (DHAT)
*/
struct fc_fdmi_dhat {
struct fc_fdmi_hba_identifier hbaid;
} __attribute__((__packed__));
/*
* Deregister HBA (DHBA)
*/
struct fc_fdmi_dhba {
struct fc_fdmi_hba_identifier hbaid;
} __attribute__((__packed__));
#endif /* _FC_MS_H_ */