From mboxrd@z Thu Jan 1 00:00:00 1970 From: Samuel Kvasnica Subject: vscsi 2TB patches Date: Mon, 3 Jan 2011 21:11:29 +0100 Message-ID: <4D222D71.9020508@list.ims.co.at> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------010502050507080600040800" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --------------010502050507080600040800 Content-Type: text/plain; charset="US-ASCII" Content-Disposition: inline Hello xen developers, the current xen vscsi driver implementation has a nasty >2TB limitation. Both the backend and frontend driver need a patch - included in the attachments. Basically, for the frontend, just the max_cmd_len needs to be set correctly. For for the backend, at least the READ_16 and WRITE_16 scsi commands vere missing. I also enabled/added some more scsi commands to allow tape drives and autoloader work properly. Could please somebody here take care to add this to mainstream code ? SuSE people were not interested really and the original author is not really known, i.e. "Copyright by Fujitsu Limited". I'm really sick of patching every new kernel over and over... best ragards, Sam --------------010502050507080600040800 Content-Type: text/plain; name="scsiback_2TB_fix.patch" Content-Disposition: attachment; filename="scsiback_2TB_fix.patch" diff -r ./scsiback.orig/emulate.c scsiback/emulate.c 30a31,35 > /* > * Patched to support >2TB drives + allow tape & autoloader operations > * 2010, Samuel Kvasnica, IMS Nanofabrication AG > */ > 384,385c389,390 < NO_EMULATE(TEST_UNIT_READY); /*0x00*/ < NO_EMULATE(REZERO_UNIT); /*0x01*/ --- > NO_EMULATE(TEST_UNIT_READY); /*0x00*/ /* sd,st */ > NO_EMULATE(REZERO_UNIT); /*0x01*/ /* st */ 388c393 < NO_EMULATE(READ_BLOCK_LIMITS); /*0x05*/ --- > NO_EMULATE(READ_BLOCK_LIMITS); /*0x05*/ /* st */ 390,393c395,398 < /*NO_EMULATE(INITIALIZE_ELEMENT_STATUS); *//*0x07*/ < NO_EMULATE(READ_6); /*0x08*/ < NO_EMULATE(WRITE_6); /*0x0a*/ < /*NO_EMULATE(SEEK_6); *//*0x0b*/ --- > NO_EMULATE(INITIALIZE_ELEMENT_STATUS); /*0x07*/ /* ch */ > NO_EMULATE(READ_6); /*0x08*/ /* sd,st */ > NO_EMULATE(WRITE_6); /*0x0a*/ /* sd,st */ > NO_EMULATE(SEEK_6); /*0x0b*/ 395,396c400,401 < NO_EMULATE(WRITE_FILEMARKS); /*0x10*/ < NO_EMULATE(SPACE); /*0x11*/ --- > NO_EMULATE(WRITE_FILEMARKS); /*0x10*/ /* st */ > NO_EMULATE(SPACE); /*0x11*/ /* st */ 399c404 < /*NO_EMULATE(MODE_SELECT); *//*0x15*/ --- > NO_EMULATE(MODE_SELECT); /*0x15*/ /* st */ 403,406c408,411 < NO_EMULATE(ERASE); /*0x19*/ < NO_EMULATE(MODE_SENSE); /*0x1a*/ < /*NO_EMULATE(START_STOP); *//*0x1b*/ < /*NO_EMULATE(RECEIVE_DIAGNOSTIC); *//*0x1c*/ --- > NO_EMULATE(ERASE); /*0x19*/ /* st */ > NO_EMULATE(MODE_SENSE); /*0x1a*/ /* st */ > NO_EMULATE(START_STOP); /*0x1b*/ /* sd,st */ > NO_EMULATE(RECEIVE_DIAGNOSTIC); /*0x1c*/ 408c413 < /*NO_EMULATE(ALLOW_MEDIUM_REMOVAL); *//*0x1e*/ --- > NO_EMULATE(ALLOW_MEDIUM_REMOVAL); /*0x1e*/ 411,415c416,420 < 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(READ_CAPACITY); /*0x25*/ /* sd */ > NO_EMULATE(READ_10); /*0x28*/ /* sd */ > NO_EMULATE(WRITE_10); /*0x2a*/ /* sd */ > NO_EMULATE(SEEK_10); /*0x2b*/ /* st */ > NO_EMULATE(POSITION_TO_ELEMENT); /*0x2b*/ /* ch */ 421,427c426,432 < /*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(SET_LIMITS); /*0x33*/ > NO_EMULATE(PRE_FETCH); /*0x34*/ /* st! */ > NO_EMULATE(READ_POSITION); /*0x34*/ /* st */ > NO_EMULATE(SYNCHRONIZE_CACHE); /*0x35*/ /* sd */ > NO_EMULATE(LOCK_UNLOCK_CACHE); /*0x36*/ > NO_EMULATE(READ_DEFECT_DATA); /*0x37*/ > NO_EMULATE(MEDIUM_SCAN); /*0x38*/ 430,431c435,436 < /*NO_EMULATE(WRITE_BUFFER); *//*0x3b*/ < /*NO_EMULATE(READ_BUFFER); *//*0x3c*/ --- > NO_EMULATE(WRITE_BUFFER); /*0x3b*/ > NO_EMULATE(READ_BUFFER); /*0x3c*/ /* osst */ 437,439c442,444 < /*NO_EMULATE(READ_TOC); *//*0x43*/ < /*NO_EMULATE(LOG_SELECT); *//*0x4c*/ < /*NO_EMULATE(LOG_SENSE); *//*0x4d*/ --- > NO_EMULATE(READ_TOC); /*0x43*/ /* sr */ > NO_EMULATE(LOG_SELECT); /*0x4c*/ > NO_EMULATE(LOG_SENSE); /*0x4d*/ /* st! */ 443c448 < /*NO_EMULATE(MODE_SENSE_10); *//*0x5a*/ --- > NO_EMULATE(MODE_SENSE_10); /*0x5a*/ /* scsi_lib */ 447,448c452,455 < /*NO_EMULATE(MOVE_MEDIUM); *//*0xa5*/ < /*NO_EMULATE(EXCHANGE_MEDIUM); *//*0xa6*/ --- > NO_EMULATE(MAINTENANCE_IN); /*0xa3*/ /* IFT alua */ > NO_EMULATE(MAINTENANCE_OUT); /*0xa4*/ /* IFT alua */ > NO_EMULATE(MOVE_MEDIUM); /*0xa5*/ /* ch */ > NO_EMULATE(EXCHANGE_MEDIUM); /*0xa6*/ /* ch */ 455,456c462,463 < /*NO_EMULATE(READ_ELEMENT_STATUS); *//*0xb8*/ < /*NO_EMULATE(SEND_VOLUME_TAG); *//*0xb6*/ --- > NO_EMULATE(READ_ELEMENT_STATUS); /*0xb8*/ /* ch */ > NO_EMULATE(SEND_VOLUME_TAG); /*0xb6*/ /* ch */ 458,461c465,468 < /*NO_EMULATE(READ_16); *//*0x88*/ < /*NO_EMULATE(WRITE_16); *//*0x8a*/ < /*NO_EMULATE(VERIFY_16); *//*0x8f*/ < /*NO_EMULATE(SERVICE_ACTION_IN); *//*0x9e*/ --- > NO_EMULATE(READ_16); /*0x88*/ /* sd >2TB */ > NO_EMULATE(WRITE_16); /*0x8a*/ /* sd >2TB */ > NO_EMULATE(VERIFY_16); /*0x8f*/ > NO_EMULATE(SERVICE_ACTION_IN); /*0x9e*/ /* sd >2TB */ 462a470 > /* st: QFA_REQUEST_BLOCK, QFA_SEEK_BLOCK */ --------------010502050507080600040800 Content-Type: text/plain; name="scsifront_2TB_fix.patch" Content-Disposition: attachment; filename="scsifront_2TB_fix.patch" diff -r ./scsifront.orig/xenbus.c ./scsifront/xenbus.c 30c30,34 < --- > > /* > * Patched to support >2TB drives > * 2010, Samuel Kvasnica, IMS Nanofabrication AG > */ 125d128 < 222a226 > host->max_cmd_len = VSCSIIF_MAX_COMMAND_SIZE; --------------010502050507080600040800 Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --------------010502050507080600040800--