diff options
| author | Tomas Winkler <tomas.winkler@intel.com> | 2015-07-28 09:54:25 -0400 |
|---|---|---|
| committer | James Bottomley <JBottomley@Odin.com> | 2015-09-06 14:02:41 -0400 |
| commit | f2d3fd29ba6226218533ad3fbba2312ae122663f (patch) | |
| tree | eb8d34e7cc5c704a724d0f33a6853478a317b53c /drivers/scsi | |
| parent | 299b6c07ea134d4f9d7cb743194bf9c1941585b2 (diff) | |
scsi_debug: fix REPORT LUNS Well Known LU
The use case to report 'REPORT LUNS WLUN' described
in scsi_debug documentation didn't work because:
scsi_scan_host_selected() checks for:
lun < shost->max_lun
To fix this we set:
max_lun = SCSI_W_LUN_REPORT_LUNS + 1;
Signed-off-by: Tomas Winkler <tomas.winkler@intel.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
Diffstat (limited to 'drivers/scsi')
| -rw-r--r-- | drivers/scsi/scsi_debug.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/scsi/scsi_debug.c b/drivers/scsi/scsi_debug.c index faa4ddd8decf..2e0b3d7dc40f 100644 --- a/drivers/scsi/scsi_debug.c +++ b/drivers/scsi/scsi_debug.c | |||
| @@ -700,7 +700,7 @@ static void sdebug_max_tgts_luns(void) | |||
| 700 | else | 700 | else |
| 701 | hpnt->max_id = scsi_debug_num_tgts; | 701 | hpnt->max_id = scsi_debug_num_tgts; |
| 702 | /* scsi_debug_max_luns; */ | 702 | /* scsi_debug_max_luns; */ |
| 703 | hpnt->max_lun = SCSI_W_LUN_REPORT_LUNS; | 703 | hpnt->max_lun = SCSI_W_LUN_REPORT_LUNS + 1; |
| 704 | } | 704 | } |
| 705 | spin_unlock(&sdebug_host_list_lock); | 705 | spin_unlock(&sdebug_host_list_lock); |
| 706 | } | 706 | } |
| @@ -5340,7 +5340,8 @@ static int sdebug_driver_probe(struct device * dev) | |||
| 5340 | hpnt->max_id = scsi_debug_num_tgts + 1; | 5340 | hpnt->max_id = scsi_debug_num_tgts + 1; |
| 5341 | else | 5341 | else |
| 5342 | hpnt->max_id = scsi_debug_num_tgts; | 5342 | hpnt->max_id = scsi_debug_num_tgts; |
| 5343 | hpnt->max_lun = SCSI_W_LUN_REPORT_LUNS; /* = scsi_debug_max_luns; */ | 5343 | /* = scsi_debug_max_luns; */ |
| 5344 | hpnt->max_lun = SCSI_W_LUN_REPORT_LUNS + 1; | ||
| 5344 | 5345 | ||
| 5345 | host_prot = 0; | 5346 | host_prot = 0; |
| 5346 | 5347 | ||
