From 978e073a288ea6f7d503ad7a2572e46ca10ccb29 Mon Sep 17 00:00:00 2001 From: Vladislav Bolkhovitin Date: Wed, 24 Aug 2011 00:20:06 +0000 Subject: [PATCH] Mode pages cleanup git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3829 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index ae1fd434d..679593a50 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -1818,16 +1818,11 @@ out: return; } -/* - * <> - * - * ToDo: revise them - */ static int vdisk_err_recov_pg(unsigned char *p, int pcontrol, struct scst_vdisk_dev *virt_dev) { /* Read-Write Error Recovery page for mode_sense */ - const unsigned char err_recov_pg[] = {0x1, 0xa, 0xc0, 11, 240, 0, 0, 0, - 5, 0, 0xff, 0xff}; + const unsigned char err_recov_pg[] = {0x1, 0xa, 0xc0, 1, 0, 0, 0, 0, + 1, 0, 0xff, 0xff}; memcpy(p, err_recov_pg, sizeof(err_recov_pg)); if (1 == pcontrol) @@ -1894,8 +1889,8 @@ static int vdisk_format_pg(unsigned char *p, int pcontrol, static int vdisk_caching_pg(unsigned char *p, int pcontrol, struct scst_vdisk_dev *virt_dev) { /* Caching page for mode_sense */ - const unsigned char caching_pg[] = {0x8, 18, 0x10, 0, 0xff, 0xff, 0, 0, - 0xff, 0xff, 0xff, 0xff, 0x80, 0x14, 0, 0, 0, 0, 0, 0}; + const unsigned char caching_pg[] = {0x8, 0x12, 0x0, 0, 0, 0, 0, 0, + 0, 0, 0, 0, 0x80, 0x14, 0, 0, 0, 0, 0, 0}; memcpy(p, caching_pg, sizeof(caching_pg)); p[2] |= !(virt_dev->wt_flag || virt_dev->nv_cache) ? WCE : 0;