diff options
author | brking@us.ibm.com <brking@us.ibm.com> | 2005-11-01 18:00:18 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-11-06 13:59:53 -0500 |
commit | cfc321397e9e309a8148c18c32ade26ac40be39d (patch) | |
tree | 2fddc675dc4d3d9bceb32dc84403004892fbf4e8 /drivers/scsi/ipr.h | |
parent | 11cd8f120173a707e9ed7b78f7af8cde5a1ebb90 (diff) |
[SCSI] ipr: Cleanup error structures
Simplify the ipr error structures a bit by removing some duplication.
Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/ipr.h')
-rw-r--r-- | drivers/scsi/ipr.h | 52 |
1 files changed, 20 insertions, 32 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 8cf967108500..01950b9d2e6d 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h | |||
@@ -261,6 +261,11 @@ struct ipr_std_inq_vpids { | |||
261 | u8 product_id[IPR_PROD_ID_LEN]; | 261 | u8 product_id[IPR_PROD_ID_LEN]; |
262 | }__attribute__((packed)); | 262 | }__attribute__((packed)); |
263 | 263 | ||
264 | struct ipr_vpd { | ||
265 | struct ipr_std_inq_vpids vpids; | ||
266 | u8 sn[IPR_SERIAL_NUM_LEN]; | ||
267 | }__attribute__((packed)); | ||
268 | |||
264 | struct ipr_std_inq_data { | 269 | struct ipr_std_inq_data { |
265 | u8 peri_qual_dev_type; | 270 | u8 peri_qual_dev_type; |
266 | #define IPR_STD_INQ_PERI_QUAL(peri) ((peri) >> 5) | 271 | #define IPR_STD_INQ_PERI_QUAL(peri) ((peri) >> 5) |
@@ -537,21 +542,16 @@ struct ipr_inquiry_page3 { | |||
537 | }__attribute__((packed)); | 542 | }__attribute__((packed)); |
538 | 543 | ||
539 | struct ipr_hostrcb_device_data_entry { | 544 | struct ipr_hostrcb_device_data_entry { |
540 | struct ipr_std_inq_vpids dev_vpids; | 545 | struct ipr_vpd vpd; |
541 | u8 dev_sn[IPR_SERIAL_NUM_LEN]; | ||
542 | struct ipr_res_addr dev_res_addr; | 546 | struct ipr_res_addr dev_res_addr; |
543 | struct ipr_std_inq_vpids new_dev_vpids; | 547 | struct ipr_vpd new_vpd; |
544 | u8 new_dev_sn[IPR_SERIAL_NUM_LEN]; | 548 | struct ipr_vpd ioa_last_with_dev_vpd; |
545 | struct ipr_std_inq_vpids ioa_last_with_dev_vpids; | 549 | struct ipr_vpd cfc_last_with_dev_vpd; |
546 | u8 ioa_last_with_dev_sn[IPR_SERIAL_NUM_LEN]; | ||
547 | struct ipr_std_inq_vpids cfc_last_with_dev_vpids; | ||
548 | u8 cfc_last_with_dev_sn[IPR_SERIAL_NUM_LEN]; | ||
549 | __be32 ioa_data[5]; | 550 | __be32 ioa_data[5]; |
550 | }__attribute__((packed, aligned (4))); | 551 | }__attribute__((packed, aligned (4))); |
551 | 552 | ||
552 | struct ipr_hostrcb_array_data_entry { | 553 | struct ipr_hostrcb_array_data_entry { |
553 | struct ipr_std_inq_vpids vpids; | 554 | struct ipr_vpd vpd; |
554 | u8 serial_num[IPR_SERIAL_NUM_LEN]; | ||
555 | struct ipr_res_addr expected_dev_res_addr; | 555 | struct ipr_res_addr expected_dev_res_addr; |
556 | struct ipr_res_addr dev_res_addr; | 556 | struct ipr_res_addr dev_res_addr; |
557 | }__attribute__((packed, aligned (4))); | 557 | }__attribute__((packed, aligned (4))); |
@@ -568,47 +568,35 @@ struct ipr_hostrcb_type_01_error { | |||
568 | }__attribute__((packed, aligned (4))); | 568 | }__attribute__((packed, aligned (4))); |
569 | 569 | ||
570 | struct ipr_hostrcb_type_02_error { | 570 | struct ipr_hostrcb_type_02_error { |
571 | struct ipr_std_inq_vpids ioa_vpids; | 571 | struct ipr_vpd ioa_vpd; |
572 | u8 ioa_sn[IPR_SERIAL_NUM_LEN]; | 572 | struct ipr_vpd cfc_vpd; |
573 | struct ipr_std_inq_vpids cfc_vpids; | 573 | struct ipr_vpd ioa_last_attached_to_cfc_vpd; |
574 | u8 cfc_sn[IPR_SERIAL_NUM_LEN]; | 574 | struct ipr_vpd cfc_last_attached_to_ioa_vpd; |
575 | struct ipr_std_inq_vpids ioa_last_attached_to_cfc_vpids; | ||
576 | u8 ioa_last_attached_to_cfc_sn[IPR_SERIAL_NUM_LEN]; | ||
577 | struct ipr_std_inq_vpids cfc_last_attached_to_ioa_vpids; | ||
578 | u8 cfc_last_attached_to_ioa_sn[IPR_SERIAL_NUM_LEN]; | ||
579 | __be32 ioa_data[3]; | 575 | __be32 ioa_data[3]; |
580 | u8 reserved[844]; | ||
581 | }__attribute__((packed, aligned (4))); | 576 | }__attribute__((packed, aligned (4))); |
582 | 577 | ||
583 | struct ipr_hostrcb_type_03_error { | 578 | struct ipr_hostrcb_type_03_error { |
584 | struct ipr_std_inq_vpids ioa_vpids; | 579 | struct ipr_vpd ioa_vpd; |
585 | u8 ioa_sn[IPR_SERIAL_NUM_LEN]; | 580 | struct ipr_vpd cfc_vpd; |
586 | struct ipr_std_inq_vpids cfc_vpids; | ||
587 | u8 cfc_sn[IPR_SERIAL_NUM_LEN]; | ||
588 | __be32 errors_detected; | 581 | __be32 errors_detected; |
589 | __be32 errors_logged; | 582 | __be32 errors_logged; |
590 | u8 ioa_data[12]; | 583 | u8 ioa_data[12]; |
591 | struct ipr_hostrcb_device_data_entry dev_entry[3]; | 584 | struct ipr_hostrcb_device_data_entry dev[3]; |
592 | u8 reserved[444]; | ||
593 | }__attribute__((packed, aligned (4))); | 585 | }__attribute__((packed, aligned (4))); |
594 | 586 | ||
595 | struct ipr_hostrcb_type_04_error { | 587 | struct ipr_hostrcb_type_04_error { |
596 | struct ipr_std_inq_vpids ioa_vpids; | 588 | struct ipr_vpd ioa_vpd; |
597 | u8 ioa_sn[IPR_SERIAL_NUM_LEN]; | 589 | struct ipr_vpd cfc_vpd; |
598 | struct ipr_std_inq_vpids cfc_vpids; | ||
599 | u8 cfc_sn[IPR_SERIAL_NUM_LEN]; | ||
600 | u8 ioa_data[12]; | 590 | u8 ioa_data[12]; |
601 | struct ipr_hostrcb_array_data_entry array_member[10]; | 591 | struct ipr_hostrcb_array_data_entry array_member[10]; |
602 | __be32 exposed_mode_adn; | 592 | __be32 exposed_mode_adn; |
603 | __be32 array_id; | 593 | __be32 array_id; |
604 | struct ipr_std_inq_vpids incomp_dev_vpids; | 594 | struct ipr_vpd incomp_dev_vpd; |
605 | u8 incomp_dev_sn[IPR_SERIAL_NUM_LEN]; | ||
606 | __be32 ioa_data2; | 595 | __be32 ioa_data2; |
607 | struct ipr_hostrcb_array_data_entry array_member2[8]; | 596 | struct ipr_hostrcb_array_data_entry array_member2[8]; |
608 | struct ipr_res_addr last_func_vset_res_addr; | 597 | struct ipr_res_addr last_func_vset_res_addr; |
609 | u8 vset_serial_num[IPR_SERIAL_NUM_LEN]; | 598 | u8 vset_serial_num[IPR_SERIAL_NUM_LEN]; |
610 | u8 protection_level[8]; | 599 | u8 protection_level[8]; |
611 | u8 reserved[124]; | ||
612 | }__attribute__((packed, aligned (4))); | 600 | }__attribute__((packed, aligned (4))); |
613 | 601 | ||
614 | struct ipr_hostrcb_error { | 602 | struct ipr_hostrcb_error { |