aboutsummaryrefslogtreecommitdiffstats
path: root/include/scsi/scsi_host.h
diff options
context:
space:
mode:
authorFUJITA Tomonori <tomof@acm.org>2007-08-31 13:02:20 -0400
committerJames Bottomley <jejb@mulgrave.localdomain>2007-10-12 14:46:55 -0400
commit5dc2b89e124251662f580f4ba3c9f6195d1eaff6 (patch)
treea20051d208547da30b9e66ed3746d8a7237c289a /include/scsi/scsi_host.h
parent8184fe9b6e8928c8d5be3e2a1326b8b9183e409d (diff)
[SCSI] add supported_mode and active_mode attributes to the host
This adds supported_mode and active_mode attributes to /sys/class/sys_host/hostX/ for specifying the mode that a lld supports and the currently activated mode. The output format is similar to fc rport roles: luce:/sys/class/scsi_host/host0$ cat supported_mode Initiator luce:/sys/class/scsi_host/host0$ cat active_mode Initiator The mode values uses bitmap since we would support dual-mode llds in the future like this: luce:/sys/class/scsi_host/host0$ cat supported_mode Initiator, Target The supported_mode attribute looks at a scsi_host_template and the active_mode attribute looks at a scsi_host. We would add a hook to a scsi_host_template to change the active_mode attribute dynamically. But now there is no hook since no lld supports that feature. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'include/scsi/scsi_host.h')
-rw-r--r--include/scsi/scsi_host.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index 88f6871badd8..5b79697a3a80 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -32,6 +32,9 @@ struct blk_queue_tags;
32#define SG_NONE 0 32#define SG_NONE 0
33#define SG_ALL 0xff 33#define SG_ALL 0xff
34 34
35#define MODE_UNKNOWN 0x00
36#define MODE_INITIATOR 0x01
37#define MODE_TARGET 0x02
35 38
36#define DISABLE_CLUSTERING 0 39#define DISABLE_CLUSTERING 0
37#define ENABLE_CLUSTERING 1 40#define ENABLE_CLUSTERING 1
@@ -405,6 +408,11 @@ struct scsi_host_template {
405 unsigned char present; 408 unsigned char present;
406 409
407 /* 410 /*
411 * This specifies the mode that a LLD supports.
412 */
413 unsigned supported_mode:2;
414
415 /*
408 * true if this host adapter uses unchecked DMA onto an ISA bus. 416 * true if this host adapter uses unchecked DMA onto an ISA bus.
409 */ 417 */
410 unsigned unchecked_isa_dma:1; 418 unsigned unchecked_isa_dma:1;
@@ -574,6 +582,7 @@ struct Scsi_Host {
574 */ 582 */
575 unsigned long cmd_serial_number, cmd_pid; 583 unsigned long cmd_serial_number, cmd_pid;
576 584
585 unsigned active_mode:2;
577 unsigned unchecked_isa_dma:1; 586 unsigned unchecked_isa_dma:1;
578 unsigned use_clustering:1; 587 unsigned use_clustering:1;
579 unsigned use_blk_tcq:1; 588 unsigned use_blk_tcq:1;