aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ibmvscsi/ibmvfc.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/ibmvscsi/ibmvfc.h')
-rw-r--r--drivers/scsi/ibmvscsi/ibmvfc.h44
1 files changed, 40 insertions, 4 deletions
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h
index 057f3c01ed61..4bf6e374f076 100644
--- a/drivers/scsi/ibmvscsi/ibmvfc.h
+++ b/drivers/scsi/ibmvscsi/ibmvfc.h
@@ -29,8 +29,8 @@
29#include "viosrp.h" 29#include "viosrp.h"
30 30
31#define IBMVFC_NAME "ibmvfc" 31#define IBMVFC_NAME "ibmvfc"
32#define IBMVFC_DRIVER_VERSION "1.0.0" 32#define IBMVFC_DRIVER_VERSION "1.0.1"
33#define IBMVFC_DRIVER_DATE "(July 1, 2008)" 33#define IBMVFC_DRIVER_DATE "(July 11, 2008)"
34 34
35#define IBMVFC_DEFAULT_TIMEOUT 15 35#define IBMVFC_DEFAULT_TIMEOUT 15
36#define IBMVFC_INIT_TIMEOUT 30 36#define IBMVFC_INIT_TIMEOUT 30
@@ -119,6 +119,7 @@ enum ibmvfc_mad_types {
119 IBMVFC_PROCESS_LOGIN = 0x0008, 119 IBMVFC_PROCESS_LOGIN = 0x0008,
120 IBMVFC_QUERY_TARGET = 0x0010, 120 IBMVFC_QUERY_TARGET = 0x0010,
121 IBMVFC_IMPLICIT_LOGOUT = 0x0040, 121 IBMVFC_IMPLICIT_LOGOUT = 0x0040,
122 IBMVFC_PASSTHRU = 0x0200,
122 IBMVFC_TMF_MAD = 0x0100, 123 IBMVFC_TMF_MAD = 0x0100,
123}; 124};
124 125
@@ -439,6 +440,37 @@ struct ibmvfc_cmd {
439 struct ibmvfc_fcp_rsp rsp; 440 struct ibmvfc_fcp_rsp rsp;
440}__attribute__((packed, aligned (8))); 441}__attribute__((packed, aligned (8)));
441 442
443struct ibmvfc_passthru_fc_iu {
444 u32 payload[7];
445#define IBMVFC_ADISC 0x52000000
446 u32 response[7];
447};
448
449struct ibmvfc_passthru_iu {
450 u64 task_tag;
451 u32 cmd_len;
452 u32 rsp_len;
453 u16 status;
454 u16 error;
455 u32 flags;
456#define IBMVFC_FC_ELS 0x01
457 u32 cancel_key;
458 u32 reserved;
459 struct srp_direct_buf cmd;
460 struct srp_direct_buf rsp;
461 u64 correlation;
462 u64 scsi_id;
463 u64 tag;
464 u64 reserved2[2];
465}__attribute__((packed, aligned (8)));
466
467struct ibmvfc_passthru_mad {
468 struct ibmvfc_mad_common common;
469 struct srp_direct_buf cmd_ioba;
470 struct ibmvfc_passthru_iu iu;
471 struct ibmvfc_passthru_fc_iu fc_iu;
472}__attribute__((packed, aligned (8)));
473
442struct ibmvfc_trace_start_entry { 474struct ibmvfc_trace_start_entry {
443 u32 xfer_len; 475 u32 xfer_len;
444}__attribute__((packed)); 476}__attribute__((packed));
@@ -531,6 +563,7 @@ union ibmvfc_iu {
531 struct ibmvfc_implicit_logout implicit_logout; 563 struct ibmvfc_implicit_logout implicit_logout;
532 struct ibmvfc_tmf tmf; 564 struct ibmvfc_tmf tmf;
533 struct ibmvfc_cmd cmd; 565 struct ibmvfc_cmd cmd;
566 struct ibmvfc_passthru_mad passthru;
534}__attribute__((packed, aligned (8))); 567}__attribute__((packed, aligned (8)));
535 568
536enum ibmvfc_target_action { 569enum ibmvfc_target_action {
@@ -656,6 +689,9 @@ struct ibmvfc_host {
656#define tgt_dbg(t, fmt, ...) \ 689#define tgt_dbg(t, fmt, ...) \
657 DBG_CMD(dev_info((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__)) 690 DBG_CMD(dev_info((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__))
658 691
692#define tgt_info(t, fmt, ...) \
693 dev_info((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__)
694
659#define tgt_err(t, fmt, ...) \ 695#define tgt_err(t, fmt, ...) \
660 dev_err((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__) 696 dev_err((t)->vhost->dev, "%lX: " fmt, (t)->scsi_id, ##__VA_ARGS__)
661 697
@@ -668,8 +704,8 @@ struct ibmvfc_host {
668 dev_err((vhost)->dev, ##__VA_ARGS__); \ 704 dev_err((vhost)->dev, ##__VA_ARGS__); \
669 } while (0) 705 } while (0)
670 706
671#define ENTER DBG_CMD(printk(KERN_INFO IBMVFC_NAME": Entering %s\n", __FUNCTION__)) 707#define ENTER DBG_CMD(printk(KERN_INFO IBMVFC_NAME": Entering %s\n", __func__))
672#define LEAVE DBG_CMD(printk(KERN_INFO IBMVFC_NAME": Leaving %s\n", __FUNCTION__)) 708#define LEAVE DBG_CMD(printk(KERN_INFO IBMVFC_NAME": Leaving %s\n", __func__))
673 709
674#ifdef CONFIG_SCSI_IBMVFC_TRACE 710#ifdef CONFIG_SCSI_IBMVFC_TRACE
675#define ibmvfc_create_trace_file(kobj, attr) sysfs_create_bin_file(kobj, attr) 711#define ibmvfc_create_trace_file(kobj, attr) sysfs_create_bin_file(kobj, attr)