summaryrefslogtreecommitdiffstats
path: root/drivers/scsi/ufs/ufshci.h
diff options
context:
space:
mode:
authorAkinobu Mita <akinobu.mita@gmail.com>2014-07-01 23:00:32 +0900
committerChristoph Hellwig <hch@lst.de>2014-07-25 17:17:02 -0400
commiteeda47499f01878d60b3db8883fbbafc3c6a2a54 (patch)
treea81d23f82d1b104844b7207bc75c956cd057643d /drivers/scsi/ufs/ufshci.h
parentb2a6c5223c1e1fe293e965685a8373a6a7aca5fe (diff)
downloadlinux-eeda47499f01878d60b3db8883fbbafc3c6a2a54.tar.bz2
ufs: adjust queue settings to PRDT limitations
The data byte count field of PRDT indicates the length of data block which is a segment of data transfer for SCSI commands. The value of this field shall have Dword granularity and the the maximum of length is 256KB. This adjusts dma pad mask and max segment size to the above-mentioned PRDT limitations. Signed-off-by: Akinobu Mita <mita@fixstars.com> Reviewed-by: Subhash Jadavani <subhashj@codeaurora.org> Tested-by: Dolev Raviv <draviv@codeaurora.org> Acked-by: Vinayak Holikatti <vinholikatti@gmail.com> Signed-off-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'drivers/scsi/ufs/ufshci.h')
-rw-r--r--drivers/scsi/ufs/ufshci.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/scsi/ufs/ufshci.h b/drivers/scsi/ufs/ufshci.h
index 9abc7e32b43d..e1b844bc9460 100644
--- a/drivers/scsi/ufs/ufshci.h
+++ b/drivers/scsi/ufs/ufshci.h
@@ -296,6 +296,11 @@ enum {
MASK_OCS = 0x0F,
};
+/* The maximum length of the data byte count field in the PRDT is 256KB */
+#define PRDT_DATA_BYTE_COUNT_MAX (256 * 1024)
+/* The granularity of the data byte count field in the PRDT is 32-bit */
+#define PRDT_DATA_BYTE_COUNT_PAD 4
+
/**
* struct ufshcd_sg_entry - UFSHCI PRD Entry
* @base_addr: Lower 32bit physical address DW-0