diff options
author | brking@us.ibm.com <brking@us.ibm.com> | 2005-11-02 00:02:08 +0100 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-11-06 20:09:06 +0100 |
commit | c8f7489251269b9c4d516c3075b902d2b067b1b3 (patch) | |
tree | 9d660cbc49c461f331208b9b0029b5459ef74451 /drivers/scsi/ipr.h | |
parent | [SCSI] ipr: Module parm to disable RAID 0 auto create (diff) | |
download | linux-c8f7489251269b9c4d516c3075b902d2b067b1b3.tar.xz linux-c8f7489251269b9c4d516c3075b902d2b067b1b3.zip |
[SCSI] ipr: Handle device autosense
Some newer ipr adapters are capable of returning autosense from
devices that support it. This patch adds the data structures for
the autosense buffer.
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 | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/drivers/scsi/ipr.h b/drivers/scsi/ipr.h index 8aad480e9b64..b8ae30669127 100644 --- a/drivers/scsi/ipr.h +++ b/drivers/scsi/ipr.h @@ -403,23 +403,26 @@ struct ipr_ioadl_desc { struct ipr_ioasa_vset { __be32 failing_lba_hi; __be32 failing_lba_lo; - __be32 ioa_data[22]; + __be32 reserved; }__attribute__((packed, aligned (4))); struct ipr_ioasa_af_dasd { __be32 failing_lba; + __be32 reserved[2]; }__attribute__((packed, aligned (4))); struct ipr_ioasa_gpdd { u8 end_state; u8 bus_phase; __be16 reserved; - __be32 ioa_data[23]; + __be32 ioa_data[2]; }__attribute__((packed, aligned (4))); -struct ipr_ioasa_raw { - __be32 ioa_data[24]; -}__attribute__((packed, aligned (4))); +struct ipr_auto_sense { + __be16 auto_sense_len; + __be16 ioa_data_len; + __be32 data[SCSI_SENSE_BUFFERSIZE/sizeof(__be32)]; +}; struct ipr_ioasa { __be32 ioasc; @@ -446,6 +449,8 @@ struct ipr_ioasa { __be32 fd_res_handle; __be32 ioasc_specific; /* status code specific field */ +#define IPR_ADDITIONAL_STATUS_FMT 0x80000000 +#define IPR_AUTOSENSE_VALID 0x40000000 #define IPR_IOASC_SPECIFIC_MASK 0x00ffffff #define IPR_FIELD_POINTER_VALID (0x80000000 >> 8) #define IPR_FIELD_POINTER_MASK 0x0000ffff @@ -454,8 +459,9 @@ struct ipr_ioasa { struct ipr_ioasa_vset vset; struct ipr_ioasa_af_dasd dasd; struct ipr_ioasa_gpdd gpdd; - struct ipr_ioasa_raw raw; } u; + + struct ipr_auto_sense auto_sense; }__attribute__((packed, aligned (4))); struct ipr_mode_parm_hdr { |