From: Jun Kamada <kama@jp.fujitsu.com>
Cc: kama@jp.fujitsu.com, xen-devel@lists.xensource.com
Subject: [PATCH 3/6] pvSCSI (SCSI pass through) driver
Date: Tue, 30 Oct 2007 19:39:21 +0900 [thread overview]
Message-ID: <20071030193919.441F.KAMA@jp.fujitsu.com> (raw)
In-Reply-To: <20071025105803.5A32.KAMA@jp.fujitsu.com>
[-- Attachment #1: Type: text/plain, Size: 281 bytes --]
This patch is for vscsiif.h.
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
Signed-off-by: Akira Hayakawa <hayakawa.akira@jp.fujitsu.com>
-----
Jun Kamada
[-- Attachment #2: linux_vscsiif.h.patch --]
[-- Type: application/octet-stream, Size: 6553 bytes --]
# HG changeset patch
# User t.horikoshi@jp.fujitsu.com
# Date 1193730258 -32400
# Node ID 7a834d087b6e75d02b85d8b65efc2022b5bb2cb2
# Parent 374aa5b731056b2182ff60d2efa9f3524232d8d8
[LINUX] add vscsiif.h
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Tsunehisa Doi <Doi.Tsunehisa@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
Signed-off-by: Akira Hayakawa <hayakawa.akira@jp.fujitsu.com>
diff -r 374aa5b73105 -r 7a834d087b6e include/xen/interface/io/vscsiif.h
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/include/xen/interface/io/vscsiif.h Tue Oct 30 16:44:18 2007 +0900
@@ -0,0 +1,238 @@
+/******************************************************************************
+ * scsiif.h
+ *
+ * Based on the blkif.h code.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a copy
+ * of this software and associated documentation files (the "Software"), to
+ * deal in the Software without restriction, including without limitation the
+ * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+ * sell copies of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be included in
+ * all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+ * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+ * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+ * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+ * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ *
+ * Copyright(c) FUJITSU Limited 2007.
+ */
+
+#ifndef __XEN__PUBLIC_IO_SCSI_H__
+#define __XEN__PUBLIC_IO_SCSI_H__
+
+#include "ring.h"
+#include "../grant_table.h"
+
+#ifdef CONFIG_XEN_FC
+#include <scsi/scsi_transport.h>
+#include <scsi/scsi_transport_fc.h>
+#endif
+
+#define CMND_SCSI 1 /* scsi */
+#define CMND_SCSI_RESET 2 /* scsi */
+
+#ifdef CONFIG_XEN_FC
+#define CMND_GET_HOST_PORT_ID 101 /* ghpi */
+#define CMND_GET_HOST_PORT_TYPE 102 /* ghpt */
+#define CMND_GET_HOST_PORT_STATE 103 /* ghps */
+#define CMND_GET_HOST_ACTIVE_FC4S 104 /* ghaf */
+#define CMND_GET_HOST_SPEED 105 /* ghsp */
+#define CMND_GET_HOST_FABRIC_NAME 106 /* ghfn */
+#define CMND_GET_HOST_STATS 107 /* ghst */
+#define CMND_RESET_HOST_STATS 108 /* rhst */
+#define CMND_ISSUE_HOST_LIP 109 /* ihli */
+#define CMND_GET_STARGET_PORT_ID 121 /* gtpi */
+#define CMND_GET_STARGET_NODE_NAME 122 /* gtnn */
+#define CMND_GET_STARGET_PORT_NAME 123 /* gtpn */
+#define CMND_GET_RPORT_LOSS_TMO 141 /* gplt */
+#define CMND_SET_RPORT_LOSS_TMO 142 /* splt */
+#define CMND_GET_INITIAL_SHOST_ATTRIB 161 /* giha */
+#define CMND_GET_INITIAL_STARGET_ATTRIB 162 /* gita */
+#define CMND_GET_INITIAL_RPORT_ATTRIB 163 /* gipa */
+#define CMND_GET_FUNCTION_TEMPLATE 181 /* gftp */
+#endif
+
+/* ----------------------------------------------------------------------
+ Definition of Ring Structures
+ ---------------------------------------------------------------------- */
+
+#define DEFAULT_CAN_QUEUE 256
+#define VSCSI_MAX_COMMAND_SIZE 16
+#define SG_TABLESIZE 32
+
+#define SCSIIF_REQ_OKAY 0
+#define SCSIIF_BTFRING_BUSY 1
+
+/* Definition of
+ * union vscsiif_ftb_sring_entry,
+ * struct vscsiif_ftb_sring,
+ * struct vscsiif_ftb_front_ring,
+ * struct vscsiif_ftb_back_ring,
+ * vscsiif_ftb_sring_t,
+ * vscsiif_ftb_front_ring_t,
+ * vscsiif_ftb_back_ring_t
+*/
+struct vscsiif_ftb_request {
+ uint32_t rqid;
+ uint32_t cmnd;
+ union {
+ /* SCSI */
+ struct scsiif_ftb_request {
+ uint8_t cmnd[VSCSI_MAX_COMMAND_SIZE];
+ uint8_t cmd_len;
+ uint32_t id, lun, channel;
+ uint16_t sc_data_direction;
+ uint16_t use_sg;
+ uint16_t request_bufflen;
+ int32_t timeout_per_command;
+ struct scsiif_request_segment {
+ grant_ref_t gref;
+ uint32_t offset;
+ uint32_t length;
+ } seg[SG_TABLESIZE];
+ uint32_t padding;
+ } scsi;
+#ifdef CONFIG_XEN_FC
+ /* Get_sTarget_Port_Id */
+ /* Get_sTarget_Node_Name */
+ /* Get_sTarget_Port_Name */
+ struct {
+ u32 channel;
+ u32 id;
+ } gtpi, gtnn, gtpn;
+
+ /* Get_rPort_Loss_Tmo */
+ struct {
+ u64 node_name;
+ u64 port_name;
+ u32 port_id;
+ u32 roles;
+ } gplt;
+
+ /* Set_rPort_Loss_Tmo */
+ struct {
+ u64 node_name;
+ u64 port_name;
+ u32 port_id;
+ u32 roles;
+ u32 timeout;
+ u32 padding;
+ } splt;
+#endif
+ } u;
+};
+
+struct vscsiif_ftb_response {
+ uint16_t status;
+ union {
+ struct scsiif_ftb_response {
+ } scsi;
+ } u;
+};
+
+DEFINE_RING_TYPES(vscsiif_ftb, struct vscsiif_ftb_request, struct vscsiif_ftb_response);
+
+
+#define SCSI_SENSE_BUFFERSIZE 96
+
+/* Definition of
+ * union vscsiif_btf_sring_entry,
+ * struct vscsiif_btf_sring,
+ * struct vscsiif_btf_front_ring,
+ * struct vscsiif_btf_back_ring,
+ * vscsiif_btf_sring_t,
+ * vscsiif_btf_front_ring_t,
+ * vscsiif_btf_back_ring_t
+*/
+struct vscsiif_btf_request {
+ uint32_t rqid;
+ int32_t rslt;
+ union {
+ /* SCSI */
+ struct scsiif_response {
+ uint32_t sense_len;
+ uint8_t sense_buffer[SCSI_SENSE_BUFFERSIZE];
+ } scsi;
+
+#ifdef CONFIG_XEN_FC
+ /* Get_Host_Port_Id */
+ struct {
+ u32 port_id;
+ } ghpi;
+
+ /* Get_Host_Port_Type */
+ struct {
+ enum fc_port_type port_type;
+ } ghpt;
+
+ /* Get_Host_Port_State */
+ struct {
+ enum fc_port_state port_state;
+ } ghps;
+
+ /* Get_Host_Active_Fc4s */
+ struct {
+ u8 active_fc4s[FC_FC4_LIST_SIZE];
+ } ghaf;
+
+ /* Get_Host_SPeed */
+ struct {
+ u32 speed;
+ } ghsp;
+
+ /* Get_Host_Fabric_Name */
+ struct {
+ u64 fabric_name;
+ } ghfn;
+
+ /* Get_Host_STats */
+ struct {
+ struct fc_host_statistics stats;
+ } ghst;
+
+ /* Get_sTarget_Port_Id */
+ struct {
+ u32 port_id;
+ } gtpi;
+
+ /* Get_sTarget_Node_Name */
+ struct {
+ u64 node_name;
+ } gtnn;
+
+ /* Get_sTarget_Port_Name */
+ struct {
+ u64 port_name;
+ } gtpn;
+
+ /* Get_rPort_Loss_Tmo */
+ struct {
+ u32 timeout;
+ } gplt;
+
+ /* Set_rPort_Loss_Tmo */
+ struct {
+ u32 timeout;
+ } splt;
+#endif
+ } u;
+};
+
+struct vscsiif_btf_response {
+ union {
+ struct scsiif_btf_response {
+
+ } scsi;
+ } u;
+};
+
+DEFINE_RING_TYPES(vscsiif_btf, struct vscsiif_btf_request, struct vscsiif_btf_response);
+
+#endif
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next prev parent reply other threads:[~2007-10-30 10:39 UTC|newest]
Thread overview: 33+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-19 5:15 [PATCH 0/5] pvSCSI (SCSI pass through) driver Jun Kamada
2007-10-19 8:38 ` Keir Fraser
2007-10-19 10:20 ` Ian Pratt
2007-10-22 2:39 ` Jun Kamada
2007-10-22 0:07 ` James Harper
2007-10-23 7:41 ` Jun Kamada
2007-10-22 8:58 ` Keir Fraser
2007-10-23 7:09 ` Jun Kamada
2007-10-23 8:50 ` Keir Fraser
2007-10-23 11:35 ` Jun Kamada
2007-10-23 12:39 ` Keir Fraser
2007-10-24 6:22 ` Jun Kamada
2007-10-24 7:42 ` Keir Fraser
2007-10-25 1:59 ` Jun Kamada
2007-10-30 10:39 ` [PATCH 0/6] " Jun Kamada
2007-10-30 10:56 ` Keir Fraser
2007-10-31 8:37 ` Jun Kamada
2007-10-31 9:10 ` Keir Fraser
2007-10-31 10:56 ` Jun Kamada
2007-10-31 11:15 ` Keir Fraser
2007-11-01 12:14 ` Stephen C. Tweedie
2007-11-02 0:23 ` James Harper
2007-11-05 3:30 ` Jun Kamada
2007-11-05 2:05 ` Jun Kamada
2007-11-08 21:33 ` Stephen C. Tweedie
2007-11-12 8:27 ` Jun Kamada
2007-11-05 3:34 ` Aaron Dailey
2007-10-30 10:39 ` [PATCH 1/6] " Jun Kamada
2007-10-30 10:39 ` [PATCH 2/6] " Jun Kamada
2007-10-30 10:39 ` Jun Kamada [this message]
2007-10-30 10:39 ` [PATCH 4/6] " Jun Kamada
2007-10-30 10:39 ` [PATCH 5/6] " Jun Kamada
2007-10-30 10:39 ` [PATCH 6/6] " Jun Kamada
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20071030193919.441F.KAMA@jp.fujitsu.com \
--to=kama@jp.fujitsu.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.