aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/scsi_debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/scsi_debug.c')
-rw-r--r--drivers/scsi/scsi_debug.c37
1 files changed, 18 insertions, 19 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c
index 161af1ded888..1a9106353f72 100644
--- a/drivers/scsi/scsi_debug.c
+++ b/drivers/scsi/scsi_debug.c
@@ -2059,25 +2059,24 @@ static struct sdebug_dev_info * devInfoReg(struct scsi_device * sdev)
2059 return NULL; 2059 return NULL;
2060 } 2060 }
2061 } 2061 }
2062 if (open_devip) { 2062
2063 open_devip->channel = sdev->channel; 2063 open_devip->channel = sdev->channel;
2064 open_devip->target = sdev->id; 2064 open_devip->target = sdev->id;
2065 open_devip->lun = sdev->lun; 2065 open_devip->lun = sdev->lun;
2066 open_devip->sdbg_host = sdbg_host; 2066 open_devip->sdbg_host = sdbg_host;
2067 open_devip->reset = 1; 2067 open_devip->reset = 1;
2068 open_devip->used = 1; 2068 open_devip->used = 1;
2069 memset(open_devip->sense_buff, 0, SDEBUG_SENSE_LEN); 2069 memset(open_devip->sense_buff, 0, SDEBUG_SENSE_LEN);
2070 if (scsi_debug_dsense) 2070 if (scsi_debug_dsense)
2071 open_devip->sense_buff[0] = 0x72; 2071 open_devip->sense_buff[0] = 0x72;
2072 else { 2072 else {
2073 open_devip->sense_buff[0] = 0x70; 2073 open_devip->sense_buff[0] = 0x70;
2074 open_devip->sense_buff[7] = 0xa; 2074 open_devip->sense_buff[7] = 0xa;
2075 } 2075 }
2076 if (sdev->lun == SAM2_WLUN_REPORT_LUNS) 2076 if (sdev->lun == SAM2_WLUN_REPORT_LUNS)
2077 open_devip->wlun = SAM2_WLUN_REPORT_LUNS & 0xff; 2077 open_devip->wlun = SAM2_WLUN_REPORT_LUNS & 0xff;
2078 return open_devip; 2078
2079 } 2079 return open_devip;
2080 return NULL;
2081} 2080}
2082 2081
2083static void mk_sense_buffer(struct sdebug_dev_info * devip, int key, 2082static void mk_sense_buffer(struct sdebug_dev_info * devip, int key,