~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/include/scsi/scsi_bsg_iscsi.h

Version: ~ [ linux-6.11.5 ] ~ [ linux-6.10.14 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.58 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.114 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.169 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.228 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.284 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.322 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 /* SPDX-License-Identifier: GPL-2.0-or-later */
  2 /*
  3  *  iSCSI Transport BSG Interface
  4  *
  5  *  Copyright (C) 2009   James Smart, Emulex Corporation
  6  */
  7 
  8 #ifndef SCSI_BSG_ISCSI_H
  9 #define SCSI_BSG_ISCSI_H
 10 
 11 /*
 12  * This file intended to be included by both kernel and user space
 13  */
 14 
 15 #include <scsi/scsi.h>
 16 
 17 /*
 18  * iSCSI Transport SGIO v4 BSG Message Support
 19  */
 20 
 21 /* Default BSG request timeout (in seconds) */
 22 #define ISCSI_DEFAULT_BSG_TIMEOUT      (10 * HZ)
 23 
 24 
 25 /*
 26  * Request Message Codes supported by the iSCSI Transport
 27  */
 28 
 29 /* define the class masks for the message codes */
 30 #define ISCSI_BSG_CLS_MASK     0xF0000000      /* find object class */
 31 #define ISCSI_BSG_HST_MASK     0x80000000      /* iscsi host class */
 32 
 33 /* iscsi host Message Codes */
 34 #define ISCSI_BSG_HST_VENDOR           (ISCSI_BSG_HST_MASK | 0x000000FF)
 35 
 36 
 37 /*
 38  * iSCSI Host Messages
 39  */
 40 
 41 /* ISCSI_BSG_HST_VENDOR : */
 42 
 43 /* Request:
 44  * Note: When specifying vendor_id, be sure to read the Vendor Type and ID
 45  *   formatting requirements specified in scsi_netlink.h
 46  */
 47 struct iscsi_bsg_host_vendor {
 48         /*
 49          * Identifies the vendor that the message is formatted for. This
 50          * should be the recipient of the message.
 51          */
 52         uint64_t vendor_id;
 53 
 54         /* start of vendor command area */
 55         uint32_t vendor_cmd[];
 56 };
 57 
 58 /* Response:
 59  */
 60 struct iscsi_bsg_host_vendor_reply {
 61         /* start of vendor response area */
 62         uint32_t vendor_rsp[0];
 63 };
 64 
 65 
 66 /* request (CDB) structure of the sg_io_v4 */
 67 struct iscsi_bsg_request {
 68         uint32_t msgcode;
 69         union {
 70                 struct iscsi_bsg_host_vendor    h_vendor;
 71         } rqst_data;
 72 } __attribute__((packed));
 73 
 74 
 75 /* response (request sense data) structure of the sg_io_v4 */
 76 struct iscsi_bsg_reply {
 77         /*
 78          * The completion result. Result exists in two forms:
 79          * if negative, it is an -Exxx system errno value. There will
 80          * be no further reply information supplied.
 81          * else, it's the 4-byte scsi error result, with driver, host,
 82          * msg and status fields. The per-msgcode reply structure
 83          * will contain valid data.
 84          */
 85         uint32_t result;
 86 
 87         /* If there was reply_payload, how much was received ? */
 88         uint32_t reply_payload_rcv_len;
 89 
 90         union {
 91                 struct iscsi_bsg_host_vendor_reply      vendor_reply;
 92         } reply_data;
 93 };
 94 
 95 
 96 #endif /* SCSI_BSG_ISCSI_H */
 97 

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php