mirror of
https://github.com/joel16/android_kernel_sony_msm8994.git
synced 2024-11-23 12:10:29 +00:00
scsi: Adjust DBD setting in mode sense for caching mode page per LLD
Host sends MODE_SENSE_10 with caching mode page, to check if the device supports the cache feature. Some LLD standards requires DBD field to be set to 1. This patch allows LLD to define the setting of DBD if required. Change-Id: I7f6c0ff6613516c3ef49aacc0679b96b8bd9ccc8 Signed-off-by: Maya Erez <merez@codeaurora.org>
This commit is contained in:
parent
c3e1cf6f53
commit
1c4c656660
@ -2332,6 +2332,7 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer)
|
||||
{
|
||||
int len = 0, res;
|
||||
struct scsi_device *sdp = sdkp->device;
|
||||
struct Scsi_Host *host = sdp->host;
|
||||
|
||||
int dbd;
|
||||
int modepage;
|
||||
@ -2363,7 +2364,10 @@ sd_read_cache_type(struct scsi_disk *sdkp, unsigned char *buffer)
|
||||
dbd = 8;
|
||||
} else {
|
||||
modepage = 8;
|
||||
dbd = 0;
|
||||
if (host->set_dbd_for_caching)
|
||||
dbd = 8;
|
||||
else
|
||||
dbd = 0;
|
||||
}
|
||||
|
||||
/* cautiously ask */
|
||||
|
@ -685,6 +685,13 @@ struct Scsi_Host {
|
||||
* units along with standard LUs.
|
||||
*/
|
||||
unsigned report_wlus:1;
|
||||
|
||||
/*
|
||||
* Set "DBD" field in mode_sense caching mode page in case it is
|
||||
* mandatory by LLD standard.
|
||||
*/
|
||||
unsigned set_dbd_for_caching:1;
|
||||
|
||||
/*
|
||||
* Optional work queue to be utilized by the transport
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user