mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
[SCSI] set to WCE if usb cache quirk is present.
Make use of USB quirk method to identify such HDD while reading the cache status in sd_probe(). If cache quirk is present for the HDD, lets assume that cache is enabled and make WCE bit equal to 1. Signed-off-by: Namjae Jeon <[email protected]> Signed-off-by: Pankaj Kumar <[email protected]> Signed-off-by: Amit Sahrawat <[email protected]> Signed-off-by: James Bottomley <[email protected]>
This commit is contained in:
parent
365a715009
commit
b81478d82e
2 changed files with 8 additions and 2 deletions
|
|
@ -2261,8 +2261,13 @@ bad_sense:
|
|||
sd_printk(KERN_ERR, sdkp, "Asking for cache data failed\n");
|
||||
|
||||
defaults:
|
||||
sd_printk(KERN_ERR, sdkp, "Assuming drive cache: write through\n");
|
||||
sdkp->WCE = 0;
|
||||
if (sdp->wce_default_on) {
|
||||
sd_printk(KERN_NOTICE, sdkp, "Assuming drive cache: write back\n");
|
||||
sdkp->WCE = 1;
|
||||
} else {
|
||||
sd_printk(KERN_ERR, sdkp, "Assuming drive cache: write through\n");
|
||||
sdkp->WCE = 0;
|
||||
}
|
||||
sdkp->RCD = 0;
|
||||
sdkp->DPOFUA = 0;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue