aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/qla4xxx/ql4_def.h
diff options
context:
space:
mode:
authorVikas Chaudhary <vikas.chaudhary@qlogic.com>2011-07-25 14:48:39 -0400
committerJames Bottomley <JBottomley@Parallels.com>2011-08-27 10:35:59 -0400
commit2bab08fc770ccd6c56859371356a4a905e8c0bd4 (patch)
tree03f6f260135452ac8d94e416478d0b8f8e140e36 /drivers/scsi/qla4xxx/ql4_def.h
parentd00efe3fa87fdf1df3635ba57ef3f14d03bc3ac8 (diff)
[SCSI] qla4xxx: Added new "struct ipaddress_config"
- Move all ipaddress related param to "struct ipaddress_config" from "struct scsi_qla_host" - update function - qla4xxx_update_local_ip() - Rename IPOPT_IPv4_PROTOCOL_ENABLE to IPOPT_IPV4_PROTOCOL_ENABLE Signed-off-by: Vikas Chaudhary <vikas.chaudhary@qlogic.com> [update for new ISCSI_IFACE values] Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/qla4xxx/ql4_def.h')
-rw-r--r--drivers/scsi/qla4xxx/ql4_def.h48
1 files changed, 27 insertions, 21 deletions
diff --git a/drivers/scsi/qla4xxx/ql4_def.h b/drivers/scsi/qla4xxx/ql4_def.h
index 473c5c872b39..015d0a18bf8a 100644
--- a/drivers/scsi/qla4xxx/ql4_def.h
+++ b/drivers/scsi/qla4xxx/ql4_def.h
@@ -357,6 +357,28 @@ struct isp_operations {
357 int (*get_sys_info) (struct scsi_qla_host *); 357 int (*get_sys_info) (struct scsi_qla_host *);
358}; 358};
359 359
360/*qla4xxx ipaddress configuration details */
361struct ipaddress_config {
362 uint16_t ipv4_options;
363 uint16_t tcp_options;
364 uint16_t ipv4_vlan_tag;
365 uint8_t ipv4_addr_state;
366 uint8_t ip_address[IP_ADDR_LEN];
367 uint8_t subnet_mask[IP_ADDR_LEN];
368 uint8_t gateway[IP_ADDR_LEN];
369 uint32_t ipv6_options;
370 uint32_t ipv6_addl_options;
371 uint8_t ipv6_link_local_state;
372 uint8_t ipv6_addr0_state;
373 uint8_t ipv6_addr1_state;
374 uint8_t ipv6_default_router_state;
375 uint16_t ipv6_vlan_tag;
376 struct in6_addr ipv6_link_local_addr;
377 struct in6_addr ipv6_addr0;
378 struct in6_addr ipv6_addr1;
379 struct in6_addr ipv6_default_router_addr;
380};
381
360/* 382/*
361 * Linux Host Adapter structure 383 * Linux Host Adapter structure
362 */ 384 */
@@ -451,10 +473,6 @@ struct scsi_qla_host {
451 /* --- From Init_FW --- */ 473 /* --- From Init_FW --- */
452 /* init_cb_t *init_cb; */ 474 /* init_cb_t *init_cb; */
453 uint16_t firmware_options; 475 uint16_t firmware_options;
454 uint16_t tcp_options;
455 uint8_t ip_address[IP_ADDR_LEN];
456 uint8_t subnet_mask[IP_ADDR_LEN];
457 uint8_t gateway[IP_ADDR_LEN];
458 uint8_t alias[32]; 476 uint8_t alias[32];
459 uint8_t name_string[256]; 477 uint8_t name_string[256];
460 uint8_t heartbeat_interval; 478 uint8_t heartbeat_interval;
@@ -533,22 +551,7 @@ struct scsi_qla_host {
533 /* Saved srb for status continuation entry processing */ 551 /* Saved srb for status continuation entry processing */
534 struct srb *status_srb; 552 struct srb *status_srb;
535 553
536 /* IPv6 support info from InitFW */
537 uint8_t acb_version; 554 uint8_t acb_version;
538 uint8_t ipv4_addr_state;
539 uint16_t ipv4_options;
540
541 uint32_t resvd2;
542 uint32_t ipv6_options;
543 uint32_t ipv6_addl_options;
544 uint8_t ipv6_link_local_state;
545 uint8_t ipv6_addr0_state;
546 uint8_t ipv6_addr1_state;
547 uint8_t ipv6_default_router_state;
548 struct in6_addr ipv6_link_local_addr;
549 struct in6_addr ipv6_addr0;
550 struct in6_addr ipv6_addr1;
551 struct in6_addr ipv6_default_router_addr;
552 555
553 /* qla82xx specific fields */ 556 /* qla82xx specific fields */
554 struct device_reg_82xx __iomem *qla4_8xxx_reg; /* Base I/O address */ 557 struct device_reg_82xx __iomem *qla4_8xxx_reg; /* Base I/O address */
@@ -584,6 +587,8 @@ struct scsi_qla_host {
584 587
585 struct completion mbx_intr_comp; 588 struct completion mbx_intr_comp;
586 589
590 struct ipaddress_config ip_config;
591
587 /* --- From About Firmware --- */ 592 /* --- From About Firmware --- */
588 uint16_t iscsi_major; 593 uint16_t iscsi_major;
589 uint16_t iscsi_minor; 594 uint16_t iscsi_minor;
@@ -595,12 +600,13 @@ struct scsi_qla_host {
595 600
596static inline int is_ipv4_enabled(struct scsi_qla_host *ha) 601static inline int is_ipv4_enabled(struct scsi_qla_host *ha)
597{ 602{
598 return ((ha->ipv4_options & IPOPT_IPv4_PROTOCOL_ENABLE) != 0); 603 return ((ha->ip_config.ipv4_options & IPOPT_IPV4_PROTOCOL_ENABLE) != 0);
599} 604}
600 605
601static inline int is_ipv6_enabled(struct scsi_qla_host *ha) 606static inline int is_ipv6_enabled(struct scsi_qla_host *ha)
602{ 607{
603 return ((ha->ipv6_options & IPV6_OPT_IPV6_PROTOCOL_ENABLE) != 0); 608 return ((ha->ip_config.ipv6_options &
609 IPV6_OPT_IPV6_PROTOCOL_ENABLE) != 0);
604} 610}
605 611
606static inline int is_qla4010(struct scsi_qla_host *ha) 612static inline int is_qla4010(struct scsi_qla_host *ha)