Merge branch 'for-3.10/drivers' of git://git.kernel.dk/linux-block
[linux-drm-fsl-dcu.git] / drivers / block / mtip32xx / mtip32xx.h
index 8e8334c9dd0f08139c9061bfced2111fe661c208..3bb8a295fbe4d96d51b429812748ebe293ebb98d 100644 (file)
@@ -52,6 +52,9 @@
 #define MTIP_FTL_REBUILD_MAGIC         0xED51
 #define MTIP_FTL_REBUILD_TIMEOUT_MS    2400000
 
+/* unaligned IO handling */
+#define MTIP_MAX_UNALIGNED_SLOTS       8
+
 /* Macro to extract the tag bit number from a tag value. */
 #define MTIP_TAG_BIT(tag)      (tag & 0x1F)
 
@@ -333,6 +336,8 @@ struct mtip_cmd {
 
        int scatter_ents; /* Number of scatter list entries used */
 
+       int unaligned; /* command is unaligned on 4k boundary */
+
        struct scatterlist sg[MTIP_MAX_SG]; /* Scatter list entries */
 
        int retries; /* The number of retries left for this command. */
@@ -452,6 +457,10 @@ struct mtip_port {
         * command slots available.
         */
        struct semaphore cmd_slot;
+
+       /* Semaphore to control queue depth of unaligned IOs */
+       struct semaphore cmd_slot_unal;
+
        /* Spinlock for working around command-issue bug. */
        spinlock_t cmd_issue_lock[MTIP_MAX_SLOT_GROUPS];
 };
@@ -502,6 +511,8 @@ struct driver_data {
 
        int isr_binding;
 
+       int unal_qdepth; /* qdepth of unaligned IO queue */
+
        struct list_head online_list; /* linkage for online list */
 
        struct list_head remove_list; /* linkage for removing list */