diff options
author | brking@us.ibm.com <brking@us.ibm.com> | 2005-11-01 18:02:08 -0500 |
---|---|---|
committer | James Bottomley <jejb@mulgrave.(none)> | 2005-11-06 14:09:06 -0500 |
commit | c8f7489251269b9c4d516c3075b902d2b067b1b3 (patch) | |
tree | 9d660cbc49c461f331208b9b0029b5459ef74451 /drivers/scsi | |
parent | 32d29776f8fe8293f7c5273624ec8fbd2b936bfa (diff) |
[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')
-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 { | |||
403 | struct ipr_ioasa_vset { | 403 | struct ipr_ioasa_vset { |
404 | __be32 failing_lba_hi; | 404 | __be32 failing_lba_hi; |
405 | __be32 failing_lba_lo; | 405 | __be32 failing_lba_lo; |
406 | __be32 ioa_data[22]; | 406 | __be32 reserved; |
407 | }__attribute__((packed, aligned (4))); | 407 | }__attribute__((packed, aligned (4))); |
408 | 408 | ||
409 | struct ipr_ioasa_af_dasd { | 409 | struct ipr_ioasa_af_dasd { |
410 | __be32 failing_lba; | 410 | __be32 failing_lba; |
411 | __be32 reserved[2]; | ||
411 | }__attribute__((packed, aligned (4))); | 412 | }__attribute__((packed, aligned (4))); |
412 | 413 | ||
413 | struct ipr_ioasa_gpdd { | 414 | struct ipr_ioasa_gpdd { |
414 | u8 end_state; | 415 | u8 end_state; |
415 | u8 bus_phase; | 416 | u8 bus_phase; |
416 | __be16 reserved; | 417 | __be16 reserved; |
417 | __be32 ioa_data[23]; | 418 | __be32 ioa_data[2]; |
418 | }__attribute__((packed, aligned (4))); | 419 | }__attribute__((packed, aligned (4))); |
419 | 420 | ||
420 | struct ipr_ioasa_raw { | 421 | struct ipr_auto_sense { |
421 | __be32 ioa_data[24]; | 422 | __be16 auto_sense_len; |
422 | }__attribute__((packed, aligned (4))); | 423 | __be16 ioa_data_len; |
424 | __be32 data[SCSI_SENSE_BUFFERSIZE/sizeof(__be32)]; | ||
425 | }; | ||
423 | 426 | ||
424 | struct ipr_ioasa { | 427 | struct ipr_ioasa { |
425 | __be32 ioasc; | 428 | __be32 ioasc; |
@@ -446,6 +449,8 @@ struct ipr_ioasa { | |||
446 | __be32 fd_res_handle; | 449 | __be32 fd_res_handle; |
447 | 450 | ||
448 | __be32 ioasc_specific; /* status code specific field */ | 451 | __be32 ioasc_specific; /* status code specific field */ |
452 | #define IPR_ADDITIONAL_STATUS_FMT 0x80000000 | ||
453 | #define IPR_AUTOSENSE_VALID 0x40000000 | ||
449 | #define IPR_IOASC_SPECIFIC_MASK 0x00ffffff | 454 | #define IPR_IOASC_SPECIFIC_MASK 0x00ffffff |
450 | #define IPR_FIELD_POINTER_VALID (0x80000000 >> 8) | 455 | #define IPR_FIELD_POINTER_VALID (0x80000000 >> 8) |
451 | #define IPR_FIELD_POINTER_MASK 0x0000ffff | 456 | #define IPR_FIELD_POINTER_MASK 0x0000ffff |
@@ -454,8 +459,9 @@ struct ipr_ioasa { | |||
454 | struct ipr_ioasa_vset vset; | 459 | struct ipr_ioasa_vset vset; |
455 | struct ipr_ioasa_af_dasd dasd; | 460 | struct ipr_ioasa_af_dasd dasd; |
456 | struct ipr_ioasa_gpdd gpdd; | 461 | struct ipr_ioasa_gpdd gpdd; |
457 | struct ipr_ioasa_raw raw; | ||
458 | } u; | 462 | } u; |
463 | |||
464 | struct ipr_auto_sense auto_sense; | ||
459 | }__attribute__((packed, aligned (4))); | 465 | }__attribute__((packed, aligned (4))); |
460 | 466 | ||
461 | struct ipr_mode_parm_hdr { | 467 | struct ipr_mode_parm_hdr { |