From: "Jan Beulich" Subject: [PATCH] linux-2.6.18: vscsi >2TB patch Date: Mon, 24 Jan 2011 12:35:31 +0000 Message-ID: <4D3D8023020000780002E249@vpn.id2.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=__Part69451403.1__=" 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" Cc: samuel.kvasnica@ims.co.at List-Id: xen-devel@lists.xenproject.org This is a MIME message. If you are reading this text, you may want to consider changing to a mail reader or gateway that understands how to properly handle MIME multipart messages. --=__Part69451403.1__= Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline From: Samuel Kvasnica Subject: vscsi >2TB patch This patch fixes current 2TB limitation of the xen vscsi driver. Both frontend (command size) and backend (missing READ_16/WRITE_16 commands) driver need a fix. Also an scsi command added to support ALUA. Tested thoroughly on 4TB external RAID. I also enabled some more commands to allow operating LTO tape drives and autoloaders (tested on HP Ultrium 1/8 + Bacula). Still more scsi commands might be missing for other specific devices=20 (why not to enable all scsi commands by default ?). This patch was tested on opensuse xenified kernels 2.6.31-2.6.34.7 in paravirtualized domU. Signed-off-by: Samuel Kvasnica Acked-by: Jan Beulich --- a/drivers/xen/scsiback/emulate.c +++ b/drivers/xen/scsiback/emulate.c @@ -28,6 +28,11 @@ * IN THE SOFTWARE. */ =20 +/* +* Patched to support >2TB drives + allow tape & autoloader operations +* 2010, Samuel Kvasnica, IMS Nanofabrication AG +*/ + #include #include #include @@ -384,85 +389,88 @@ void scsiback_emulation_init(void) /* Following commands do not require emulation. */ - 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 */ NO_EMULATE(REQUEST_SENSE); /*0x03*/ NO_EMULATE(FORMAT_UNIT); /*0x04*/ - NO_EMULATE(READ_BLOCK_LIMITS); /*0x05*/ + NO_EMULATE(READ_BLOCK_LIMITS); /*0x05*/ /* st */ /*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(INITIALIZE_ELEMENT_STATUS); /*0x07*/ /* ch */ + NO_EMULATE(READ_6); /*0x08*/ /* sd,st */ + NO_EMULATE(WRITE_6); /*0x0a*/ /* sd,st */ + NO_EMULATE(SEEK_6); /*0x0b*/ /*NO_EMULATE(READ_REVERSE); *//*0x0f*/ - NO_EMULATE(WRITE_FILEMARKS); /*0x10*/ - NO_EMULATE(SPACE); /*0x11*/ + NO_EMULATE(WRITE_FILEMARKS); /*0x10*/ /* st */ + NO_EMULATE(SPACE); /*0x11*/ /* st */ NO_EMULATE(INQUIRY); /*0x12*/ /*NO_EMULATE(RECOVER_BUFFERED_DATA); *//*0x14*/ - /*NO_EMULATE(MODE_SELECT); *//*0x15*/ + NO_EMULATE(MODE_SELECT); /*0x15*/ /* st */ /*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(ERASE); /*0x19*/ /* st */ + NO_EMULATE(MODE_SENSE); /*0x1a*/ /* st */ + NO_EMULATE(START_STOP); /*0x1b*/ /* sd,st */ + NO_EMULATE(RECEIVE_DIAGNOSTIC); /*0x1c*/ NO_EMULATE(SEND_DIAGNOSTIC); /*0x1d*/ - /*NO_EMULATE(ALLOW_MEDIUM_REMOVAL); *//*0x1e*/ + NO_EMULATE(ALLOW_MEDIUM_REMOVAL); /*0x1e*/ =20 /*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(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 */ /*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(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*/ /*NO_EMULATE(COMPARE); *//*0x39*/ /*NO_EMULATE(COPY_VERIFY); *//*0x3a*/ - /*NO_EMULATE(WRITE_BUFFER); *//*0x3b*/ - /*NO_EMULATE(READ_BUFFER); *//*0x3c*/ + NO_EMULATE(WRITE_BUFFER); /*0x3b*/ + NO_EMULATE(READ_BUFFER); /*0x3c*/ /* osst */ /*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(READ_TOC); /*0x43*/ /* sr */ + NO_EMULATE(LOG_SELECT); /*0x4c*/ + NO_EMULATE(LOG_SENSE); /*0x4d*/ /* st! */ /*NO_EMULATE(MODE_SELECT_10); *//*0x55*/ /*NO_EMULATE(RESERVE_10); *//*0x56*/ /*NO_EMULATE(RELEASE_10); *//*0x57*/ - /*NO_EMULATE(MODE_SENSE_10); *//*0x5a*/ + NO_EMULATE(MODE_SENSE_10); /*0x5a*/ /* scsi_lib */ /*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(MAINTENANCE_IN); /*0xa3*/ /* IFT alua */ + NO_EMULATE(MAINTENANCE_OUT); /*0xa4*/ /* IFT alua */ + NO_EMULATE(MOVE_MEDIUM); /*0xa5*/ /* ch */ + NO_EMULATE(EXCHANGE_MEDIUM); /*0xa6*/ /* ch */ /*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(READ_ELEMENT_STATUS); /*0xb8*/ /* ch */ + NO_EMULATE(SEND_VOLUME_TAG); /*0xb6*/ /* ch */ /*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*/ + 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 */ =20 +/* st: QFA_REQUEST_BLOCK, QFA_SEEK_BLOCK might be needed ? */ /* Following commands require emulation. */ --- a/drivers/xen/scsifront/scsifront.c +++ b/drivers/xen/scsifront/scsifront.c @@ -357,6 +357,11 @@ static int scsifront_queuecommand(struct int ref_cnt; uint16_t rqid; =20 +/* debug printk to identify more missing scsi commands + printk(KERN_INFO "scsicmd: len=3D%i, 0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,= 0x%x,0x%x,0x%x,0x%x",sc->cmd_len, + sc->cmnd[0],sc->cmnd[1],sc->cmnd[2],sc->cmnd[3],sc->cmnd[4]= , + sc->cmnd[5],sc->cmnd[6],sc->cmnd[7],sc->cmnd[8],sc->cmnd[9]= ); +*/ if (RING_FULL(&info->ring)) { goto out_host_busy; } --- a/drivers/xen/scsifront/xenbus.c +++ b/drivers/xen/scsifront/xenbus.c @@ -27,7 +27,11 @@ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER = DEALINGS * IN THE SOFTWARE. */ -=20 + +/* +* Patched to support >2TB drives +* 2010, Samuel Kvasnica, IMS Nanofabrication AG +*/ =20 #include #include "common.h" @@ -219,6 +223,7 @@ static int scsifront_probe(struct xenbus host->max_channel =3D 0; host->max_lun =3D VSCSIIF_MAX_LUN; host->max_sectors =3D (VSCSIIF_SG_TABLESIZE - 1) * PAGE_SIZE / = 512; + host->max_cmd_len =3D VSCSIIF_MAX_COMMAND_SIZE; =20 err =3D scsi_add_host(host, &dev->dev); if (err) { --=__Part69451403.1__= Content-Type: text/plain; name="xen-vscsi-2Tb.patch" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="xen-vscsi-2Tb.patch" From: Samuel Kvasnica =0ASubject: vscsi >2TB = patch=0A=0AThis patch fixes current 2TB limitation of the xen vscsi = driver.=0ABoth frontend (command size) and backend (missing READ_16/WRITE_1= 6=0Acommands) driver need a fix. Also an scsi command added to support=0AAL= UA. Tested thoroughly on 4TB external RAID.=0A=0AI also enabled some more = commands to allow operating LTO tape=0Adrives and autoloaders (tested on = HP Ultrium 1/8 + Bacula).=0A=0AStill more scsi commands might be missing = for other specific devices =0A(why not to enable all scsi commands by = default ?).=0A=0AThis patch was tested on opensuse xenified kernels = 2.6.31-2.6.34.7=0Ain paravirtualized domU.=0A=0ASigned-off-by: Samuel = Kvasnica =0AAcked-by: Jan Beulich =0A=0A--- a/drivers/xen/scsiback/emulate.c=0A+++ b/drivers/xen/scsib= ack/emulate.c=0A@@ -28,6 +28,11 @@=0A * IN THE SOFTWARE.=0A */=0A = =0A+/*=0A+* Patched to support >2TB drives + allow tape & autoloader = operations=0A+* 2010, Samuel Kvasnica, IMS Nanofabrication AG=0A+*/=0A+=0A = #include =0A #include =0A #include = =0A@@ -384,85 +389,88 @@ void scsiback_emulation_init(v= oid)=0A /*=0A Following commands do not require emulation.=0A = */=0A- NO_EMULATE(TEST_UNIT_READY); /*0x00*/=0A- NO_EMULATE(REZERO_U= NIT); /*0x01*/=0A+ NO_EMULATE(TEST_UNIT_READY); = /*0x00*/ /* sd,st */=0A+ NO_EMULATE(REZERO_UNIT); = /*0x01*/ /* st */=0A NO_EMULATE(REQUEST_SENSE); /*0x03*/=0A = NO_EMULATE(FORMAT_UNIT); /*0x04*/=0A- NO_EMULATE(READ_BLOCK_LIMIT= S); /*0x05*/=0A+ NO_EMULATE(READ_BLOCK_LIMITS); /*0x05*/ /* st = */=0A /*NO_EMULATE(REASSIGN_BLOCKS); *//*0x07*/=0A- /*NO_EMULAT= E(INITIALIZE_ELEMENT_STATUS); *//*0x07*/=0A- NO_EMULATE(READ_6); = /*0x08*/=0A- NO_EMULATE(WRITE_6); /*0x0a*/=0A- = /*NO_EMULATE(SEEK_6); *//*0x0b*/=0A+ NO_EMULATE(INITIALI= ZE_ELEMENT_STATUS); /*0x07*/ /* ch */=0A+ NO_EMULATE(READ_6); = /*0x08*/ /* sd,st */=0A+ NO_EMULATE(WRITE_6); = /*0x0a*/ /* sd,st */=0A+ NO_EMULATE(SEEK_6); = /*0x0b*/=0A /*NO_EMULATE(READ_REVERSE); *//*0x0f*/=0A- = NO_EMULATE(WRITE_FILEMARKS); /*0x10*/=0A- NO_EMULATE(SPACE); = /*0x11*/=0A+ NO_EMULATE(WRITE_FILEMARKS); /*0x10*/ /* st = */=0A+ NO_EMULATE(SPACE); /*0x11*/ /* st */=0A = NO_EMULATE(INQUIRY); /*0x12*/=0A /*NO_EMULATE(RECOVER_BUFFER= ED_DATA); *//*0x14*/=0A- /*NO_EMULATE(MODE_SELECT); = *//*0x15*/=0A+ NO_EMULATE(MODE_SELECT); /*0x15*/ /* st */=0A = /*NO_EMULATE(RESERVE); *//*0x16*/=0A /*NO_EMULATE(RELEAS= E); *//*0x17*/=0A /*NO_EMULATE(COPY); = *//*0x18*/=0A- NO_EMULATE(ERASE); /*0x19*/=0A- = NO_EMULATE(MODE_SENSE); /*0x1a*/=0A- /*NO_EMULATE(START_STOP); = *//*0x1b*/=0A- /*NO_EMULATE(RECEIVE_DIAGNOSTIC); = *//*0x1c*/=0A+ NO_EMULATE(ERASE); /*0x19*/ /* st */=0A+ = NO_EMULATE(MODE_SENSE); /*0x1a*/ /* st */=0A+ NO_EMULATE(= START_STOP); /*0x1b*/ /* sd,st */=0A+ NO_EMULATE(RECEIVE_= DIAGNOSTIC); /*0x1c*/=0A NO_EMULATE(SEND_DIAGNOSTIC); = /*0x1d*/=0A- /*NO_EMULATE(ALLOW_MEDIUM_REMOVAL); *//*0x1e*/=0A+ = NO_EMULATE(ALLOW_MEDIUM_REMOVAL); /*0x1e*/=0A =0A /*NO_EMULATE(SET_WI= NDOW); *//*0x24*/=0A- NO_EMULATE(READ_CAPACITY); = /*0x25*/=0A- NO_EMULATE(READ_10); /*0x28*/=0A- NO_EMULATE(= WRITE_10); /*0x2a*/=0A- /*NO_EMULATE(SEEK_10); = *//*0x2b*/=0A- /*NO_EMULATE(POSITION_TO_ELEMENT); *//*0x2b*/=0A+= NO_EMULATE(READ_CAPACITY); /*0x25*/ /* sd */=0A+ = NO_EMULATE(READ_10); /*0x28*/ /* sd */=0A+ NO_EMULATE(= WRITE_10); /*0x2a*/ /* sd */=0A+ NO_EMULATE(SEEK_10); = /*0x2b*/ /* st */=0A+ NO_EMULATE(POSITION_TO_ELEMENT); = /*0x2b*/ /* ch */=0A /*NO_EMULATE(WRITE_VERIFY); *//*0x2e*/=0A = /*NO_EMULATE(VERIFY); *//*0x2f*/=0A /*NO_EMULAT= E(SEARCH_HIGH); *//*0x30*/=0A /*NO_EMULATE(SEARCH_EQUAL);= *//*0x31*/=0A /*NO_EMULATE(SEARCH_LOW); = *//*0x32*/=0A- /*NO_EMULATE(SET_LIMITS); *//*0x33*/=0A- = /*NO_EMULATE(PRE_FETCH); *//*0x34*/=0A- /*NO_EMULATE(READ_P= OSITION); *//*0x34*/=0A- /*NO_EMULATE(SYNCHRONIZE_CACHE); = *//*0x35*/=0A- /*NO_EMULATE(LOCK_UNLOCK_CACHE); *//*0x36*/=0A-= /*NO_EMULATE(READ_DEFECT_DATA); *//*0x37*/=0A- /*NO_EMULAT= E(MEDIUM_SCAN); *//*0x38*/=0A+ NO_EMULATE(SET_LIMITS); = /*0x33*/=0A+ NO_EMULATE(PRE_FETCH); /*0x34*/ /* st! = */=0A+ NO_EMULATE(READ_POSITION); /*0x34*/ /* st */=0A+ = NO_EMULATE(SYNCHRONIZE_CACHE); /*0x35*/ /* sd */=0A+ NO_EMULATE(= LOCK_UNLOCK_CACHE); /*0x36*/=0A+ NO_EMULATE(READ_DEFECT_DATA); = /*0x37*/=0A+ NO_EMULATE(MEDIUM_SCAN); /*0x38*/=0A /*NO_EMULAT= E(COMPARE); *//*0x39*/=0A /*NO_EMULATE(COPY_VERIFY); = *//*0x3a*/=0A- /*NO_EMULATE(WRITE_BUFFER); = *//*0x3b*/=0A- /*NO_EMULATE(READ_BUFFER); *//*0x3c*/=0A+ = NO_EMULATE(WRITE_BUFFER); /*0x3b*/=0A+ NO_EMULATE(READ_BUFFER); = /*0x3c*/ /* osst */=0A /*NO_EMULATE(UPDATE_BLOCK); = *//*0x3d*/=0A /*NO_EMULATE(READ_LONG); *//*0x3e*/=0A = /*NO_EMULATE(WRITE_LONG); *//*0x3f*/=0A /*NO_EMULATE(CHANGE= _DEFINITION); *//*0x40*/=0A /*NO_EMULATE(WRITE_SAME); = *//*0x41*/=0A- /*NO_EMULATE(READ_TOC); *//*0x43*/=0A-= /*NO_EMULATE(LOG_SELECT); *//*0x4c*/=0A- /*NO_EMULAT= E(LOG_SENSE); *//*0x4d*/=0A+ NO_EMULATE(READ_TOC); = /*0x43*/ /* sr */=0A+ NO_EMULATE(LOG_SELECT); = /*0x4c*/=0A+ NO_EMULATE(LOG_SENSE); /*0x4d*/ /* st! */=0A = /*NO_EMULATE(MODE_SELECT_10); *//*0x55*/=0A /*NO_EMULATE(RESERV= E_10); *//*0x56*/=0A /*NO_EMULATE(RELEASE_10); = *//*0x57*/=0A- /*NO_EMULATE(MODE_SENSE_10); *//*0x5a*/=0A+= NO_EMULATE(MODE_SENSE_10); /*0x5a*/ /* scsi_lib */=0A = /*NO_EMULATE(PERSISTENT_RESERVE_IN); *//*0x5e*/=0A /*NO_EMULATE(PERSIS= TENT_RESERVE_OUT); *//*0x5f*/=0A /* REPORT_LUNS = *//*0xa0*//*Full emulaiton*/=0A- /*NO_EMULATE(MOVE_MEDIUM); = *//*0xa5*/=0A- /*NO_EMULATE(EXCHANGE_MEDIUM); *//*0xa6*/=0A+= NO_EMULATE(MAINTENANCE_IN); /*0xa3*/ /* IFT alua */=0A+ = NO_EMULATE(MAINTENANCE_OUT); /*0xa4*/ /* IFT alua */=0A+ NO_EMULATE(= MOVE_MEDIUM); /*0xa5*/ /* ch */=0A+ NO_EMULATE(EXCHANGE_MEDIUM)= ; /*0xa6*/ /* ch */=0A /*NO_EMULATE(READ_12); = *//*0xa8*/=0A /*NO_EMULATE(WRITE_12); *//*0xaa*/=0A = /*NO_EMULATE(WRITE_VERIFY_12); *//*0xae*/=0A /*NO_EMULATE(SEARCH= _HIGH_12); *//*0xb0*/=0A /*NO_EMULATE(SEARCH_EQUAL_12); = *//*0xb1*/=0A /*NO_EMULATE(SEARCH_LOW_12); *//*0xb2*/=0A-= /*NO_EMULATE(READ_ELEMENT_STATUS); *//*0xb8*/=0A- /*NO_EMULAT= E(SEND_VOLUME_TAG); *//*0xb6*/=0A+ NO_EMULATE(READ_ELEMENT_STA= TUS); /*0xb8*/ /* ch */=0A+ NO_EMULATE(SEND_VOLUME_TAG); = /*0xb6*/ /* ch */=0A /*NO_EMULATE(WRITE_LONG_2); *//*0xea*/=0A-= /*NO_EMULATE(READ_16); *//*0x88*/=0A- /*NO_EMULAT= E(WRITE_16); *//*0x8a*/=0A- /*NO_EMULATE(VERIFY_16); = *//*0x8f*/=0A- /*NO_EMULATE(SERVICE_ACTION_IN); *//*0x9e*/=0A+= NO_EMULATE(READ_16); /*0x88*/ /* sd >2TB */=0A+ = NO_EMULATE(WRITE_16); /*0x8a*/ /* sd >2TB */=0A+ NO_EMULATE(= VERIFY_16); /*0x8f*/=0A+ NO_EMULATE(SERVICE_ACTION_IN); = /*0x9e*/ /* sd >2TB */=0A =0A+/* st: QFA_REQUEST_BLOCK, QFA_SEEK_BLOCK = might be needed ? */=0A /*=0A Following commands require = emulation.=0A */=0A--- a/drivers/xen/scsifront/scsifront.c=0A+++ = b/drivers/xen/scsifront/scsifront.c=0A@@ -357,6 +357,11 @@ static int = scsifront_queuecommand(struct=0A int ref_cnt;=0A uint16_t = rqid;=0A =0A+/* debug printk to identify more missing scsi commands=0A+ = printk(KERN_INFO "scsicmd: len=3D%i, 0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%x,0x%= x,0x%x,0x%x",sc->cmd_len,=0A+ sc->cmnd[0],sc->cmnd[1],sc->cmnd[2]= ,sc->cmnd[3],sc->cmnd[4],=0A+ sc->cmnd[5],sc->cmnd[6],sc->cmnd[7]= ,sc->cmnd[8],sc->cmnd[9]);=0A+*/=0A if (RING_FULL(&info->ring)) {=0A = goto out_host_busy;=0A }=0A--- a/drivers/xen/scsifront/xenbus.c=0A= +++ b/drivers/xen/scsifront/xenbus.c=0A@@ -27,7 +27,11 @@=0A * FROM, OUT = OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS=0A * = IN THE SOFTWARE.=0A */=0A- =0A+=0A+/*=0A+* Patched to support >2TB = drives=0A+* 2010, Samuel Kvasnica, IMS Nanofabrication AG=0A+*/=0A =0A = #include =0A #include "common.h"=0A@@ -219,6 +223,7 @@ = static int scsifront_probe(struct xenbus=0A host->max_channel =3D = 0;=0A host->max_lun =3D VSCSIIF_MAX_LUN;=0A host->max_sectors = =3D (VSCSIIF_SG_TABLESIZE - 1) * PAGE_SIZE / 512;=0A+ host->max_cmd_len = =3D VSCSIIF_MAX_COMMAND_SIZE;=0A =0A err =3D scsi_add_host(host, = &dev->dev);=0A if (err) {=0A --=__Part69451403.1__= 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 --=__Part69451403.1__=--