aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/block/ps3disk.c9
-rw-r--r--include/linux/blkdev.h6
2 files changed, 7 insertions, 8 deletions
diff --git a/drivers/block/ps3disk.c b/drivers/block/ps3disk.c
index d797e209951d..4b0d6c7f4c66 100644
--- a/drivers/block/ps3disk.c
+++ b/drivers/block/ps3disk.c
@@ -199,7 +199,8 @@ static void ps3disk_do_request(struct ps3_storage_device *dev,
199 if (blk_fs_request(req)) { 199 if (blk_fs_request(req)) {
200 if (ps3disk_submit_request_sg(dev, req)) 200 if (ps3disk_submit_request_sg(dev, req))
201 break; 201 break;
202 } else if (req->cmd_type == REQ_TYPE_FLUSH) { 202 } else if (req->cmd_type == REQ_TYPE_LINUX_BLOCK &&
203 req->cmd[0] == REQ_LB_OP_FLUSH) {
203 if (ps3disk_submit_flush_request(dev, req)) 204 if (ps3disk_submit_flush_request(dev, req))
204 break; 205 break;
205 } else { 206 } else {
@@ -257,7 +258,8 @@ static irqreturn_t ps3disk_interrupt(int irq, void *data)
257 return IRQ_HANDLED; 258 return IRQ_HANDLED;
258 } 259 }
259 260
260 if (req->cmd_type == REQ_TYPE_FLUSH) { 261 if (req->cmd_type == REQ_TYPE_LINUX_BLOCK &&
262 req->cmd[0] == REQ_LB_OP_FLUSH) {
261 read = 0; 263 read = 0;
262 num_sectors = req->hard_cur_sectors; 264 num_sectors = req->hard_cur_sectors;
263 op = "flush"; 265 op = "flush";
@@ -405,7 +407,8 @@ static void ps3disk_prepare_flush(struct request_queue *q, struct request *req)
405 407
406 dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__); 408 dev_dbg(&dev->sbd.core, "%s:%u\n", __func__, __LINE__);
407 409
408 req->cmd_type = REQ_TYPE_FLUSH; 410 req->cmd_type = REQ_TYPE_LINUX_BLOCK;
411 req->cmd[0] = REQ_LB_OP_FLUSH;
409} 412}
410 413
411static unsigned long ps3disk_mask; 414static unsigned long ps3disk_mask;
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index e9eb35c9bf26..f131776f029e 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -54,7 +54,6 @@ enum rq_cmd_type_bits {
54 REQ_TYPE_PM_SUSPEND, /* suspend request */ 54 REQ_TYPE_PM_SUSPEND, /* suspend request */
55 REQ_TYPE_PM_RESUME, /* resume request */ 55 REQ_TYPE_PM_RESUME, /* resume request */
56 REQ_TYPE_PM_SHUTDOWN, /* shutdown request */ 56 REQ_TYPE_PM_SHUTDOWN, /* shutdown request */
57 REQ_TYPE_FLUSH, /* flush request */
58 REQ_TYPE_SPECIAL, /* driver defined type */ 57 REQ_TYPE_SPECIAL, /* driver defined type */
59 REQ_TYPE_LINUX_BLOCK, /* generic block layer message */ 58 REQ_TYPE_LINUX_BLOCK, /* generic block layer message */
60 /* 59 /*
@@ -76,11 +75,8 @@ enum rq_cmd_type_bits {
76 * 75 *
77 */ 76 */
78enum { 77enum {
79 /*
80 * just examples for now
81 */
82 REQ_LB_OP_EJECT = 0x40, /* eject request */ 78 REQ_LB_OP_EJECT = 0x40, /* eject request */
83 REQ_LB_OP_FLUSH = 0x41, /* flush device */ 79 REQ_LB_OP_FLUSH = 0x41, /* flush request */
84 REQ_LB_OP_DISCARD = 0x42, /* discard sectors */ 80 REQ_LB_OP_DISCARD = 0x42, /* discard sectors */
85}; 81};
86 82