mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-06-20 05:31:15 +00:00
[SCSI] scsi_transport_iscsi: Added support to show port_state and port_speed in sysfs
sysfs patch to view port_state: /sys/class/iscsi_host/host*/port_state sysfs patch to view port_speed: /sys/class/iscsi_host/host*/port_speed Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> Reviewed-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
This commit is contained in:
parent
6c1b8789b0
commit
aeddde2978
3 changed files with 84 additions and 0 deletions
|
@ -416,9 +416,26 @@ enum iscsi_host_param {
|
|||
ISCSI_HOST_PARAM_INITIATOR_NAME,
|
||||
ISCSI_HOST_PARAM_NETDEV_NAME,
|
||||
ISCSI_HOST_PARAM_IPADDRESS,
|
||||
ISCSI_HOST_PARAM_PORT_STATE,
|
||||
ISCSI_HOST_PARAM_PORT_SPEED,
|
||||
ISCSI_HOST_PARAM_MAX,
|
||||
};
|
||||
|
||||
/* iSCSI port Speed */
|
||||
enum iscsi_port_speed {
|
||||
ISCSI_PORT_SPEED_UNKNOWN = 0x1,
|
||||
ISCSI_PORT_SPEED_10MBPS = 0x2,
|
||||
ISCSI_PORT_SPEED_100MBPS = 0x4,
|
||||
ISCSI_PORT_SPEED_1GBPS = 0x8,
|
||||
ISCSI_PORT_SPEED_10GBPS = 0x10,
|
||||
};
|
||||
|
||||
/* iSCSI port state */
|
||||
enum iscsi_port_state {
|
||||
ISCSI_PORT_STATE_DOWN = 0x1,
|
||||
ISCSI_PORT_STATE_UP = 0x2,
|
||||
};
|
||||
|
||||
#define iscsi_ptr(_handle) ((void*)(unsigned long)_handle)
|
||||
#define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue