ia64/linux-2.6.18-xen.hg

changeset 756:eccc622d03af

[PVSCSI] bug fix report_lun

Signed-off-by: James Harper <james.harper@bendigoit.com.au>
Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
author Keir Fraser <keir.fraser@citrix.com>
date Tue Dec 09 13:02:38 2008 +0000 (2008-12-09)
parents 3669e92f24cd
children 8761101c3ed5
files drivers/xen/scsiback/common.h drivers/xen/scsiback/emulate.c drivers/xen/scsiback/scsiback.c
line diff
     1.1 --- a/drivers/xen/scsiback/common.h	Tue Dec 09 13:02:20 2008 +0000
     1.2 +++ b/drivers/xen/scsiback/common.h	Tue Dec 09 13:02:38 2008 +0000
     1.3 @@ -112,6 +112,8 @@ typedef struct {
     1.4  
     1.5  	uint16_t rqid;
     1.6  	
     1.7 +	uint16_t v_chn, v_tgt;
     1.8 +
     1.9  	uint8_t nr_segments;
    1.10  	uint8_t cmnd[VSCSIIF_MAX_COMMAND_SIZE];
    1.11  	uint8_t cmd_len;
     2.1 --- a/drivers/xen/scsiback/emulate.c	Tue Dec 09 13:02:20 2008 +0000
     2.2 +++ b/drivers/xen/scsiback/emulate.c	Tue Dec 09 13:02:38 2008 +0000
     2.3 @@ -208,8 +208,8 @@ static int __nr_luns_under_host(struct v
     2.4  static void __report_luns(pending_req_t *pending_req, void *data)
     2.5  {
     2.6  	struct vscsibk_info *info   = pending_req->info;
     2.7 -	unsigned int        channel = pending_req->sdev->channel;
     2.8 -	unsigned int        target  = pending_req->sdev->id;
     2.9 +	unsigned int        channel = pending_req->v_chn;
    2.10 +	unsigned int        target  = pending_req->v_tgt;
    2.11  	unsigned int        nr_seg  = pending_req->nr_segments;
    2.12  	unsigned char *cmd = (unsigned char *)pending_req->cmnd;
    2.13  	
     3.1 --- a/drivers/xen/scsiback/scsiback.c	Tue Dec 09 13:02:20 2008 +0000
     3.2 +++ b/drivers/xen/scsiback/scsiback.c	Tue Dec 09 13:02:38 2008 +0000
     3.3 @@ -513,8 +513,8 @@ static int prepare_pending_reqs(struct v
     3.4  
     3.5  	pending_req->info       = info;
     3.6  
     3.7 -	vir.chn = ring_req->channel;
     3.8 -	vir.tgt = ring_req->id;
     3.9 +	pending_req->v_chn = vir.chn = ring_req->channel;
    3.10 +	pending_req->v_tgt = vir.tgt = ring_req->id;
    3.11  	vir.lun = ring_req->lun;
    3.12  
    3.13  	rmb();