summaryrefslogtreecommitdiff
path: root/drivers/usb/storage/usb.c
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2012-07-08 07:05:28 +0400
committerJames Bottomley <JBottomley@Parallels.com>2012-07-20 11:59:00 +0400
commiteaa05dfcdb12cf3a7bedf8918dc8699c00944384 (patch)
treef05101a4a1353bbb578fa2a83634ab7404335873 /drivers/usb/storage/usb.c
parentb81478d82e389dd0961760f5ff6f56b50d29db6d (diff)
downloadlinux-eaa05dfcdb12cf3a7bedf8918dc8699c00944384.tar.xz
[SCSI] usb-storage: add support for write cache quirk
Add support for write cache quirk on usb hdd. scsi driver will be set to wce by detecting write cache quirk in quirk list when plugging usb hdd. Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Pankaj Kumar <pankaj.km@samsung.com> Signed-off-by: Amit Sahrawat <a.sahrawat@samsung.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/usb/storage/usb.c')
-rw-r--r--drivers/usb/storage/usb.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/usb/storage/usb.c b/drivers/usb/storage/usb.c
index e23c30ab66da..d012fe4329e7 100644
--- a/drivers/usb/storage/usb.c
+++ b/drivers/usb/storage/usb.c
@@ -473,7 +473,7 @@ static void adjust_quirks(struct us_data *us)
US_FL_CAPACITY_OK | US_FL_IGNORE_RESIDUE |
US_FL_SINGLE_LUN | US_FL_NO_WP_DETECT |
US_FL_NO_READ_DISC_INFO | US_FL_NO_READ_CAPACITY_16 |
- US_FL_INITIAL_READ10);
+ US_FL_INITIAL_READ10 | US_FL_WRITE_CACHE);
p = quirks;
while (*p) {
@@ -529,6 +529,9 @@ static void adjust_quirks(struct us_data *us)
case 'o':
f |= US_FL_CAPACITY_OK;
break;
+ case 'p':
+ f |= US_FL_WRITE_CACHE;
+ break;
case 'r':
f |= US_FL_IGNORE_RESIDUE;
break;