diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/scsi/iscsi_if.h | 17 | ||||
-rw-r--r-- | include/scsi/scsi_transport_iscsi.h | 4 |
2 files changed, 21 insertions, 0 deletions
diff --git a/include/scsi/iscsi_if.h b/include/scsi/iscsi_if.h index 2703e3bedbf5..e49b7c8dd217 100644 --- a/include/scsi/iscsi_if.h +++ b/include/scsi/iscsi_if.h | |||
@@ -416,9 +416,26 @@ enum iscsi_host_param { | |||
416 | ISCSI_HOST_PARAM_INITIATOR_NAME, | 416 | ISCSI_HOST_PARAM_INITIATOR_NAME, |
417 | ISCSI_HOST_PARAM_NETDEV_NAME, | 417 | ISCSI_HOST_PARAM_NETDEV_NAME, |
418 | ISCSI_HOST_PARAM_IPADDRESS, | 418 | ISCSI_HOST_PARAM_IPADDRESS, |
419 | ISCSI_HOST_PARAM_PORT_STATE, | ||
420 | ISCSI_HOST_PARAM_PORT_SPEED, | ||
419 | ISCSI_HOST_PARAM_MAX, | 421 | ISCSI_HOST_PARAM_MAX, |
420 | }; | 422 | }; |
421 | 423 | ||
424 | /* iSCSI port Speed */ | ||
425 | enum iscsi_port_speed { | ||
426 | ISCSI_PORT_SPEED_UNKNOWN = 0x1, | ||
427 | ISCSI_PORT_SPEED_10MBPS = 0x2, | ||
428 | ISCSI_PORT_SPEED_100MBPS = 0x4, | ||
429 | ISCSI_PORT_SPEED_1GBPS = 0x8, | ||
430 | ISCSI_PORT_SPEED_10GBPS = 0x10, | ||
431 | }; | ||
432 | |||
433 | /* iSCSI port state */ | ||
434 | enum iscsi_port_state { | ||
435 | ISCSI_PORT_STATE_DOWN = 0x1, | ||
436 | ISCSI_PORT_STATE_UP = 0x2, | ||
437 | }; | ||
438 | |||
422 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) | 439 | #define iscsi_ptr(_handle) ((void*)(unsigned long)_handle) |
423 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) | 440 | #define iscsi_handle(_ptr) ((uint64_t)(unsigned long)_ptr) |
424 | 441 | ||
diff --git a/include/scsi/scsi_transport_iscsi.h b/include/scsi/scsi_transport_iscsi.h index 2c3a46d102fd..fa7ca4e16020 100644 --- a/include/scsi/scsi_transport_iscsi.h +++ b/include/scsi/scsi_transport_iscsi.h | |||
@@ -238,6 +238,8 @@ struct iscsi_cls_host { | |||
238 | atomic_t nr_scans; | 238 | atomic_t nr_scans; |
239 | struct mutex mutex; | 239 | struct mutex mutex; |
240 | struct request_queue *bsg_q; | 240 | struct request_queue *bsg_q; |
241 | uint32_t port_speed; | ||
242 | uint32_t port_state; | ||
241 | }; | 243 | }; |
242 | 244 | ||
243 | #define iscsi_job_to_shost(_job) \ | 245 | #define iscsi_job_to_shost(_job) \ |
@@ -307,5 +309,7 @@ extern struct iscsi_iface *iscsi_create_iface(struct Scsi_Host *shost, | |||
307 | uint32_t iface_num, int dd_size); | 309 | uint32_t iface_num, int dd_size); |
308 | extern void iscsi_destroy_iface(struct iscsi_iface *iface); | 310 | extern void iscsi_destroy_iface(struct iscsi_iface *iface); |
309 | extern struct iscsi_iface *iscsi_lookup_iface(int handle); | 311 | extern struct iscsi_iface *iscsi_lookup_iface(int handle); |
312 | extern char *iscsi_get_port_speed_name(struct Scsi_Host *shost); | ||
313 | extern char *iscsi_get_port_state_name(struct Scsi_Host *shost); | ||
310 | 314 | ||
311 | #endif | 315 | #endif |