aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/aacraid/aacraid.h
diff options
context:
space:
mode:
authorSalyzyn, Mark <mark_salyzyn@adaptec.com>2007-05-18 14:51:34 -0400
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-05-22 11:52:21 -0400
commit9d399cc7feac3faf66768566e04e16c750aad25f (patch)
tree52e4102a2f4fe12f4f730873525f07c1e00e86f4 /drivers/scsi/aacraid/aacraid.h
parent0f06bb34f2dcd0c72aac7777995ef7cb733496e8 (diff)
[SCSI] aacraid: add support for FUA
Back in the beginning of last year we disabled mode page 8 and mode page 3f requests through device quirk bits instead of enhancing the driver to respond to these mode pages because there was no apparent added value. The Firmware that supports the new communication commands supports the ability to force a write around of the adapter cache on a command by command basis. In the attached patch we enable mode page 8 and 3f and spoof the results as needed in order to *convince* the layers above to submit writes with the FUA (Force Unit Attention) bit set if the file system or application requires it, if the Firmware supports the write through, or instead to submit a SYNCHRONIZE_CACHE if the Firmware does not. The added value here is for file systems that benefit from this functionality and for clustering or redundancy scenarios. Caveats: By convince, we are responding with a minimal short 3 byte content mode page 8, with only the data the SCSI layer needs and that we can fill confidently. Applications that require the customarily larger mode page 8 results may be confused by this(?). The FUA, or the SYNCHRONIZE_CACHE only affect the cache on the controller. Our firmware by default ensure that the underlying physical drives of the array have their cache turned off so normally this is not a problem. This attached patch is against current scsi-misc-2.6 and was unit tested on RHEL5. Since this is a feature enhancement, it should not be considered for any current stabilization efforts. Signed-off-by: Mark Salyzyn <aacraid@adaptec.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
Diffstat (limited to 'drivers/scsi/aacraid/aacraid.h')
-rw-r--r--drivers/scsi/aacraid/aacraid.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/drivers/scsi/aacraid/aacraid.h b/drivers/scsi/aacraid/aacraid.h
index 45ca3e801619..c45725e9224f 100644
--- a/drivers/scsi/aacraid/aacraid.h
+++ b/drivers/scsi/aacraid/aacraid.h
@@ -469,7 +469,7 @@ struct adapter_ops
469 int (*adapter_deliver)(struct fib * fib); 469 int (*adapter_deliver)(struct fib * fib);
470 int (*adapter_bounds)(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba); 470 int (*adapter_bounds)(struct aac_dev * dev, struct scsi_cmnd * cmd, u64 lba);
471 int (*adapter_read)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count); 471 int (*adapter_read)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count);
472 int (*adapter_write)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count); 472 int (*adapter_write)(struct fib * fib, struct scsi_cmnd * cmd, u64 lba, u32 count, int fua);
473 int (*adapter_scsi)(struct fib * fib, struct scsi_cmnd * cmd); 473 int (*adapter_scsi)(struct fib * fib, struct scsi_cmnd * cmd);
474 /* Administrative operations */ 474 /* Administrative operations */
475 int (*adapter_comm)(struct aac_dev * dev, int comm); 475 int (*adapter_comm)(struct aac_dev * dev, int comm);
@@ -1054,8 +1054,8 @@ struct aac_dev
1054#define aac_adapter_read(fib,cmd,lba,count) \ 1054#define aac_adapter_read(fib,cmd,lba,count) \
1055 ((fib)->dev)->a_ops.adapter_read(fib,cmd,lba,count) 1055 ((fib)->dev)->a_ops.adapter_read(fib,cmd,lba,count)
1056 1056
1057#define aac_adapter_write(fib,cmd,lba,count) \ 1057#define aac_adapter_write(fib,cmd,lba,count,fua) \
1058 ((fib)->dev)->a_ops.adapter_write(fib,cmd,lba,count) 1058 ((fib)->dev)->a_ops.adapter_write(fib,cmd,lba,count,fua)
1059 1059
1060#define aac_adapter_scsi(fib,cmd) \ 1060#define aac_adapter_scsi(fib,cmd) \
1061 ((fib)->dev)->a_ops.adapter_scsi(fib,cmd) 1061 ((fib)->dev)->a_ops.adapter_scsi(fib,cmd)
@@ -1213,6 +1213,9 @@ struct aac_write64
1213 __le32 block; 1213 __le32 block;
1214 __le16 pad; 1214 __le16 pad;
1215 __le16 flags; 1215 __le16 flags;
1216#define IO_TYPE_WRITE 0x00000000
1217#define IO_TYPE_READ 0x00000001
1218#define IO_SUREWRITE 0x00000008
1216 struct sgmap64 sg; // Must be last in struct because it is variable 1219 struct sgmap64 sg; // Must be last in struct because it is variable
1217}; 1220};
1218struct aac_write_reply 1221struct aac_write_reply