WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] [linux-2.6.18-xen] [PVSCSI] Fix some issues

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [linux-2.6.18-xen] [PVSCSI] Fix some issues
From: "Xen patchbot-linux-2.6.18-xen" <patchbot-linux-2.6.18-xen@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 09 Dec 2008 08:40:18 -0800
Delivery-date: Tue, 09 Dec 2008 08:40:12 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1228827794 0
# Node ID 8761101c3ed59296bec2525264ef619cdd40d0f5
# Parent  eccc622d03af649ed32981d979263893f99d75f4
[PVSCSI] Fix some issues

Signed-off-by: James Harper <james.harper@xxxxxxxxxxxxxxxx>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@xxxxxxxxxxxxxx>
Signed-off-by: Jun Kamada <kama@xxxxxxxxxxxxxx>
---
 drivers/xen/scsiback/emulate.c |  150 +++++++++++++++++++++++------------------
 1 files changed, 85 insertions(+), 65 deletions(-)

diff -r eccc622d03af -r 8761101c3ed5 drivers/xen/scsiback/emulate.c
--- a/drivers/xen/scsiback/emulate.c    Tue Dec 09 13:02:38 2008 +0000
+++ b/drivers/xen/scsiback/emulate.c    Tue Dec 09 13:03:14 2008 +0000
@@ -73,6 +73,11 @@
 #define VSCSI_MAX_SCSI_OP_CODE         256
 static unsigned char bitmap[VSCSI_MAX_SCSI_OP_CODE];
 
+#define NO_EMULATE(cmd) \
+       bitmap[cmd] = VSCSIIF_NEED_CMD_EXEC; \
+       pre_function[cmd] = NULL; \
+       post_function[cmd] = NULL
+
 
 
 /*
@@ -377,74 +382,89 @@ void scsiback_emulation_init(void)
        */
 
        /*
-         This command is Non emulation.
+         Following commands do not require emulation.
        */
-       bitmap[TEST_UNIT_READY] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[TEST_UNIT_READY] = NULL;
-       post_function[TEST_UNIT_READY] = NULL;
-
-       bitmap[REZERO_UNIT] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[REZERO_UNIT] = NULL;
-       post_function[REZERO_UNIT] = NULL;
-
-       bitmap[REQUEST_SENSE] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[REQUEST_SENSE] = NULL;
-       post_function[REQUEST_SENSE] = NULL;
-
-       bitmap[FORMAT_UNIT] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[FORMAT_UNIT] = NULL;
-       post_function[FORMAT_UNIT] = NULL;
-
-       bitmap[READ_BLOCK_LIMITS] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[READ_BLOCK_LIMITS] = NULL;
-       post_function[READ_BLOCK_LIMITS] = NULL;
-
-       bitmap[READ_6] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[READ_6] = NULL;
-       post_function[READ_6] = NULL;
-
-       bitmap[WRITE_6] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[WRITE_6] = NULL;
-       post_function[WRITE_6] = NULL;
-
-       bitmap[WRITE_FILEMARKS] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[WRITE_FILEMARKS] = NULL;
-       post_function[WRITE_FILEMARKS] = NULL;
-
-       bitmap[SPACE] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[SPACE] = NULL;
-       post_function[SPACE] = NULL;
-
-       bitmap[INQUIRY] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[INQUIRY] = NULL;
-       post_function[INQUIRY] = NULL;
-
-       bitmap[ERASE] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[ERASE] = NULL;
-       post_function[ERASE] = NULL;
-
-       bitmap[MODE_SENSE] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[MODE_SENSE] = NULL;
-       post_function[MODE_SENSE] = NULL;
-
-       bitmap[SEND_DIAGNOSTIC] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[SEND_DIAGNOSTIC] = NULL;
-       post_function[SEND_DIAGNOSTIC] = NULL;
-
-       bitmap[READ_CAPACITY] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[READ_CAPACITY] = NULL;
-       post_function[READ_CAPACITY] = NULL;
-
-       bitmap[READ_10] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[READ_10] = NULL;
-       post_function[READ_10] = NULL;
-
-       bitmap[WRITE_10] = VSCSIIF_NEED_CMD_EXEC;
-       pre_function[WRITE_10] = NULL;
-       post_function[WRITE_10] = NULL;
+       NO_EMULATE(TEST_UNIT_READY);       /*0x00*/
+       NO_EMULATE(REZERO_UNIT);           /*0x01*/
+       NO_EMULATE(REQUEST_SENSE);         /*0x03*/
+       NO_EMULATE(FORMAT_UNIT);           /*0x04*/
+       NO_EMULATE(READ_BLOCK_LIMITS);     /*0x05*/
+       /*NO_EMULATE(REASSIGN_BLOCKS);       *//*0x07*/
+       /*NO_EMULATE(INITIALIZE_ELEMENT_STATUS); *//*0x07*/
+       NO_EMULATE(READ_6);                /*0x08*/
+       NO_EMULATE(WRITE_6);               /*0x0a*/
+       /*NO_EMULATE(SEEK_6);                *//*0x0b*/
+       /*NO_EMULATE(READ_REVERSE);          *//*0x0f*/
+       NO_EMULATE(WRITE_FILEMARKS);       /*0x10*/
+       NO_EMULATE(SPACE);                 /*0x11*/
+       NO_EMULATE(INQUIRY);               /*0x12*/
+       /*NO_EMULATE(RECOVER_BUFFERED_DATA); *//*0x14*/
+       /*NO_EMULATE(MODE_SELECT);           *//*0x15*/
+       /*NO_EMULATE(RESERVE);               *//*0x16*/
+       /*NO_EMULATE(RELEASE);               *//*0x17*/
+       /*NO_EMULATE(COPY);                  *//*0x18*/
+       NO_EMULATE(ERASE);                 /*0x19*/
+       NO_EMULATE(MODE_SENSE);            /*0x1a*/
+       /*NO_EMULATE(START_STOP);            *//*0x1b*/
+       /*NO_EMULATE(RECEIVE_DIAGNOSTIC);    *//*0x1c*/
+       NO_EMULATE(SEND_DIAGNOSTIC);       /*0x1d*/
+       /*NO_EMULATE(ALLOW_MEDIUM_REMOVAL);  *//*0x1e*/
+
+       /*NO_EMULATE(SET_WINDOW);            *//*0x24*/
+       NO_EMULATE(READ_CAPACITY);         /*0x25*/
+       NO_EMULATE(READ_10);               /*0x28*/
+       NO_EMULATE(WRITE_10);              /*0x2a*/
+       /*NO_EMULATE(SEEK_10);               *//*0x2b*/
+       /*NO_EMULATE(POSITION_TO_ELEMENT);   *//*0x2b*/
+       /*NO_EMULATE(WRITE_VERIFY);          *//*0x2e*/
+       /*NO_EMULATE(VERIFY);                *//*0x2f*/
+       /*NO_EMULATE(SEARCH_HIGH);           *//*0x30*/
+       /*NO_EMULATE(SEARCH_EQUAL);          *//*0x31*/
+       /*NO_EMULATE(SEARCH_LOW);            *//*0x32*/
+       /*NO_EMULATE(SET_LIMITS);            *//*0x33*/
+       /*NO_EMULATE(PRE_FETCH);             *//*0x34*/
+       /*NO_EMULATE(READ_POSITION);         *//*0x34*/
+       /*NO_EMULATE(SYNCHRONIZE_CACHE);     *//*0x35*/
+       /*NO_EMULATE(LOCK_UNLOCK_CACHE);     *//*0x36*/
+       /*NO_EMULATE(READ_DEFECT_DATA);      *//*0x37*/
+       /*NO_EMULATE(MEDIUM_SCAN);           *//*0x38*/
+       /*NO_EMULATE(COMPARE);               *//*0x39*/
+       /*NO_EMULATE(COPY_VERIFY);           *//*0x3a*/
+       /*NO_EMULATE(WRITE_BUFFER);          *//*0x3b*/
+       /*NO_EMULATE(READ_BUFFER);           *//*0x3c*/
+       /*NO_EMULATE(UPDATE_BLOCK);          *//*0x3d*/
+       /*NO_EMULATE(READ_LONG);             *//*0x3e*/
+       /*NO_EMULATE(WRITE_LONG);            *//*0x3f*/
+       /*NO_EMULATE(CHANGE_DEFINITION);     *//*0x40*/
+       /*NO_EMULATE(WRITE_SAME);            *//*0x41*/
+       /*NO_EMULATE(READ_TOC);              *//*0x43*/
+       /*NO_EMULATE(LOG_SELECT);            *//*0x4c*/
+       /*NO_EMULATE(LOG_SENSE);             *//*0x4d*/
+       /*NO_EMULATE(MODE_SELECT_10);        *//*0x55*/
+       /*NO_EMULATE(RESERVE_10);            *//*0x56*/
+       /*NO_EMULATE(RELEASE_10);            *//*0x57*/
+       /*NO_EMULATE(MODE_SENSE_10);         *//*0x5a*/
+       /*NO_EMULATE(PERSISTENT_RESERVE_IN); *//*0x5e*/
+       /*NO_EMULATE(PERSISTENT_RESERVE_OUT); *//*0x5f*/
+       /*           REPORT_LUNS             *//*0xa0*//*Full emulaiton*/
+       /*NO_EMULATE(MOVE_MEDIUM);           *//*0xa5*/
+       /*NO_EMULATE(EXCHANGE_MEDIUM);       *//*0xa6*/
+       /*NO_EMULATE(READ_12);               *//*0xa8*/
+       /*NO_EMULATE(WRITE_12);              *//*0xaa*/
+       /*NO_EMULATE(WRITE_VERIFY_12);       *//*0xae*/
+       /*NO_EMULATE(SEARCH_HIGH_12);        *//*0xb0*/
+       /*NO_EMULATE(SEARCH_EQUAL_12);       *//*0xb1*/
+       /*NO_EMULATE(SEARCH_LOW_12);         *//*0xb2*/
+       /*NO_EMULATE(READ_ELEMENT_STATUS);   *//*0xb8*/
+       /*NO_EMULATE(SEND_VOLUME_TAG);       *//*0xb6*/
+       /*NO_EMULATE(WRITE_LONG_2);          *//*0xea*/
+       /*NO_EMULATE(READ_16);               *//*0x88*/
+       /*NO_EMULATE(WRITE_16);              *//*0x8a*/
+       /*NO_EMULATE(VERIFY_16);              *//*0x8f*/
+       /*NO_EMULATE(SERVICE_ACTION_IN);     *//*0x9e*/
 
        /*
-         This command is Full emulation.
+         Following commands require emulation.
        */
        pre_function[REPORT_LUNS] = __report_luns;
        bitmap[REPORT_LUNS] = (VSCSIIF_NEED_EMULATE_REQBUF | 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [linux-2.6.18-xen] [PVSCSI] Fix some issues, Xen patchbot-linux-2.6.18-xen <=