Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

[SCSI] scsi_debug: Logical Block Provisioning (SBC3r26)

Update scsi_debug to support the Logical Block Provisioning commands and
bits as defined in SBC3r26. The old tp* parameters have been
transitioned to the new lbp* scheme found in the draft standard.

The old tpu option to enable UNMAP is now called lbpu. tpws to signal
support for WRITE SAME(16) with the UNMAP bit set is now lbpws. Support
for WRITE SAME(10) with the UNMAP bit set is also available using the
lpuws10 parameter.

Limiting the maximum number of blocks per WRITE SAME command has been
implemented and is available via the write_same_length module parameter.

As part of the renaming process the parameter lists have been sorted
alphabetically (request from Doug).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Acked-by: Douglas Gilbert <dgilbert@interlog.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>

authored by

Martin K. Petersen and committed by
James Bottomley
5b94e232 c98a0eb0

+110 -83
+110 -83
drivers/scsi/scsi_debug.c
··· 89 89 /* With these defaults, this driver will make 1 host with 1 target 90 90 * (id 0) containing 1 logical unit (lun 0). That is 1 device. 91 91 */ 92 + #define DEF_ATO 1 92 93 #define DEF_DELAY 1 93 94 #define DEF_DEV_SIZE_MB 8 95 + #define DEF_DIF 0 96 + #define DEF_DIX 0 97 + #define DEF_D_SENSE 0 94 98 #define DEF_EVERY_NTH 0 99 + #define DEF_FAKE_RW 0 100 + #define DEF_GUARD 0 101 + #define DEF_LBPU 0 102 + #define DEF_LBPWS 0 103 + #define DEF_LBPWS10 0 104 + #define DEF_LOWEST_ALIGNED 0 105 + #define DEF_NO_LUN_0 0 95 106 #define DEF_NUM_PARTS 0 96 107 #define DEF_OPTS 0 97 - #define DEF_SCSI_LEVEL 5 /* INQUIRY, byte2 [5->SPC-3] */ 98 - #define DEF_PTYPE 0 99 - #define DEF_D_SENSE 0 100 - #define DEF_NO_LUN_0 0 101 - #define DEF_VIRTUAL_GB 0 102 - #define DEF_FAKE_RW 0 103 - #define DEF_VPD_USE_HOSTNO 1 104 - #define DEF_SECTOR_SIZE 512 105 - #define DEF_DIX 0 106 - #define DEF_DIF 0 107 - #define DEF_GUARD 0 108 - #define DEF_ATO 1 109 - #define DEF_PHYSBLK_EXP 0 110 - #define DEF_LOWEST_ALIGNED 0 111 108 #define DEF_OPT_BLKS 64 109 + #define DEF_PHYSBLK_EXP 0 110 + #define DEF_PTYPE 0 111 + #define DEF_SCSI_LEVEL 5 /* INQUIRY, byte2 [5->SPC-3] */ 112 + #define DEF_SECTOR_SIZE 512 113 + #define DEF_UNMAP_ALIGNMENT 0 114 + #define DEF_UNMAP_GRANULARITY 1 112 115 #define DEF_UNMAP_MAX_BLOCKS 0xFFFFFFFF 113 116 #define DEF_UNMAP_MAX_DESC 256 114 - #define DEF_UNMAP_GRANULARITY 1 115 - #define DEF_UNMAP_ALIGNMENT 0 116 - #define DEF_TPWS 0 117 - #define DEF_TPU 0 117 + #define DEF_VIRTUAL_GB 0 118 + #define DEF_VPD_USE_HOSTNO 1 119 + #define DEF_WRITESAME_LENGTH 0xFFFF 118 120 119 121 /* bit mask values for scsi_debug_opts */ 120 122 #define SCSI_DEBUG_OPT_NOISE 1 ··· 157 155 #define SCSI_DEBUG_CANQUEUE 255 158 156 159 157 static int scsi_debug_add_host = DEF_NUM_HOST; 158 + static int scsi_debug_ato = DEF_ATO; 160 159 static int scsi_debug_delay = DEF_DELAY; 161 160 static int scsi_debug_dev_size_mb = DEF_DEV_SIZE_MB; 161 + static int scsi_debug_dif = DEF_DIF; 162 + static int scsi_debug_dix = DEF_DIX; 163 + static int scsi_debug_dsense = DEF_D_SENSE; 162 164 static int scsi_debug_every_nth = DEF_EVERY_NTH; 165 + static int scsi_debug_fake_rw = DEF_FAKE_RW; 166 + static int scsi_debug_guard = DEF_GUARD; 167 + static int scsi_debug_lowest_aligned = DEF_LOWEST_ALIGNED; 163 168 static int scsi_debug_max_luns = DEF_MAX_LUNS; 164 169 static int scsi_debug_max_queue = SCSI_DEBUG_CANQUEUE; 165 - static int scsi_debug_num_parts = DEF_NUM_PARTS; 166 - static int scsi_debug_no_uld = 0; 167 - static int scsi_debug_num_tgts = DEF_NUM_TGTS; /* targets per host */ 168 - static int scsi_debug_opts = DEF_OPTS; 169 - static int scsi_debug_scsi_level = DEF_SCSI_LEVEL; 170 - static int scsi_debug_ptype = DEF_PTYPE; /* SCSI peripheral type (0==disk) */ 171 - static int scsi_debug_dsense = DEF_D_SENSE; 172 170 static int scsi_debug_no_lun_0 = DEF_NO_LUN_0; 173 - static int scsi_debug_virtual_gb = DEF_VIRTUAL_GB; 174 - static int scsi_debug_fake_rw = DEF_FAKE_RW; 175 - static int scsi_debug_vpd_use_hostno = DEF_VPD_USE_HOSTNO; 176 - static int scsi_debug_sector_size = DEF_SECTOR_SIZE; 177 - static int scsi_debug_dix = DEF_DIX; 178 - static int scsi_debug_dif = DEF_DIF; 179 - static int scsi_debug_guard = DEF_GUARD; 180 - static int scsi_debug_ato = DEF_ATO; 181 - static int scsi_debug_physblk_exp = DEF_PHYSBLK_EXP; 182 - static int scsi_debug_lowest_aligned = DEF_LOWEST_ALIGNED; 171 + static int scsi_debug_no_uld = 0; 172 + static int scsi_debug_num_parts = DEF_NUM_PARTS; 173 + static int scsi_debug_num_tgts = DEF_NUM_TGTS; /* targets per host */ 183 174 static int scsi_debug_opt_blks = DEF_OPT_BLKS; 184 - static unsigned int scsi_debug_unmap_max_desc = DEF_UNMAP_MAX_DESC; 185 - static unsigned int scsi_debug_unmap_max_blocks = DEF_UNMAP_MAX_BLOCKS; 186 - static unsigned int scsi_debug_unmap_granularity = DEF_UNMAP_GRANULARITY; 175 + static int scsi_debug_opts = DEF_OPTS; 176 + static int scsi_debug_physblk_exp = DEF_PHYSBLK_EXP; 177 + static int scsi_debug_ptype = DEF_PTYPE; /* SCSI peripheral type (0==disk) */ 178 + static int scsi_debug_scsi_level = DEF_SCSI_LEVEL; 179 + static int scsi_debug_sector_size = DEF_SECTOR_SIZE; 180 + static int scsi_debug_virtual_gb = DEF_VIRTUAL_GB; 181 + static int scsi_debug_vpd_use_hostno = DEF_VPD_USE_HOSTNO; 182 + static unsigned int scsi_debug_lbpu = DEF_LBPU; 183 + static unsigned int scsi_debug_lbpws = DEF_LBPWS; 184 + static unsigned int scsi_debug_lbpws10 = DEF_LBPWS10; 187 185 static unsigned int scsi_debug_unmap_alignment = DEF_UNMAP_ALIGNMENT; 188 - static unsigned int scsi_debug_tpws = DEF_TPWS; 189 - static unsigned int scsi_debug_tpu = DEF_TPU; 186 + static unsigned int scsi_debug_unmap_granularity = DEF_UNMAP_GRANULARITY; 187 + static unsigned int scsi_debug_unmap_max_blocks = DEF_UNMAP_MAX_BLOCKS; 188 + static unsigned int scsi_debug_unmap_max_desc = DEF_UNMAP_MAX_DESC; 189 + static unsigned int scsi_debug_write_same_length = DEF_WRITESAME_LENGTH; 190 190 191 191 static int scsi_debug_cmnd_count = 0; 192 192 ··· 209 205 #define SDEBUG_SENSE_LEN 32 210 206 211 207 #define SCSI_DEBUG_MAX_CMD_LEN 32 208 + 209 + static unsigned int scsi_debug_lbp(void) 210 + { 211 + return scsi_debug_lbpu | scsi_debug_lbpws | scsi_debug_lbpws10; 212 + } 212 213 213 214 struct sdebug_dev_info { 214 215 struct list_head dev_list; ··· 736 727 /* Optimal Transfer Length */ 737 728 put_unaligned_be32(scsi_debug_opt_blks, &arr[8]); 738 729 739 - if (scsi_debug_tpu) { 730 + if (scsi_debug_lbpu) { 740 731 /* Maximum Unmap LBA Count */ 741 732 put_unaligned_be32(scsi_debug_unmap_max_blocks, &arr[16]); 742 733 ··· 753 744 /* Optimal Unmap Granularity */ 754 745 put_unaligned_be32(scsi_debug_unmap_granularity, &arr[24]); 755 746 756 - return 0x3c; /* Mandatory page length for thin provisioning */ 747 + /* Maximum WRITE SAME Length */ 748 + put_unaligned_be64(scsi_debug_write_same_length, &arr[32]); 749 + 750 + return 0x3c; /* Mandatory page length for Logical Block Provisioning */ 757 751 758 752 return sizeof(vpdb0_data); 759 753 } ··· 779 767 memset(arr, 0, 0x8); 780 768 arr[0] = 0; /* threshold exponent */ 781 769 782 - if (scsi_debug_tpu) 770 + if (scsi_debug_lbpu) 783 771 arr[1] = 1 << 7; 784 772 785 - if (scsi_debug_tpws) 773 + if (scsi_debug_lbpws) 786 774 arr[1] |= 1 << 6; 775 + 776 + if (scsi_debug_lbpws10) 777 + arr[1] |= 1 << 5; 787 778 788 779 return 0x8; 789 780 } ··· 846 831 arr[n++] = 0x89; /* ATA information */ 847 832 arr[n++] = 0xb0; /* Block limits (SBC) */ 848 833 arr[n++] = 0xb1; /* Block characteristics (SBC) */ 849 - arr[n++] = 0xb2; /* Thin provisioning (SBC) */ 834 + if (scsi_debug_lbp()) /* Logical Block Prov. (SBC) */ 835 + arr[n++] = 0xb2; 850 836 arr[3] = n - 4; /* number of supported VPD pages */ 851 837 } else if (0x80 == cmd[2]) { /* unit serial number */ 852 838 arr[1] = cmd[2]; /*sanity */ ··· 895 879 } else if (0xb1 == cmd[2]) { /* Block characteristics (SBC) */ 896 880 arr[1] = cmd[2]; /*sanity */ 897 881 arr[3] = inquiry_evpd_b1(&arr[4]); 898 - } else if (0xb2 == cmd[2]) { /* Thin provisioning (SBC) */ 882 + } else if (0xb2 == cmd[2]) { /* Logical Block Prov. (SBC) */ 899 883 arr[1] = cmd[2]; /*sanity */ 900 884 arr[3] = inquiry_evpd_b2(&arr[4]); 901 885 } else { ··· 1069 1053 arr[13] = scsi_debug_physblk_exp & 0xf; 1070 1054 arr[14] = (scsi_debug_lowest_aligned >> 8) & 0x3f; 1071 1055 1072 - if (scsi_debug_tpu || scsi_debug_tpws) 1073 - arr[14] |= 0x80; /* TPE */ 1056 + if (scsi_debug_lbp()) 1057 + arr[14] |= 0x80; /* LBPME */ 1074 1058 1075 1059 arr[15] = scsi_debug_lowest_aligned & 0xff; 1076 1060 ··· 2100 2084 if (ret) 2101 2085 return ret; 2102 2086 2087 + if (num > scsi_debug_write_same_length) { 2088 + mk_sense_buffer(devip, ILLEGAL_REQUEST, INVALID_FIELD_IN_CDB, 2089 + 0); 2090 + return check_condition_result; 2091 + } 2092 + 2103 2093 write_lock_irqsave(&atomic_rw, iflags); 2104 2094 2105 2095 if (unmap && scsi_debug_unmap_granularity) { ··· 2717 2695 /sys/bus/pseudo/drivers/scsi_debug directory is changed. 2718 2696 */ 2719 2697 module_param_named(add_host, scsi_debug_add_host, int, S_IRUGO | S_IWUSR); 2698 + module_param_named(ato, scsi_debug_ato, int, S_IRUGO); 2720 2699 module_param_named(delay, scsi_debug_delay, int, S_IRUGO | S_IWUSR); 2721 2700 module_param_named(dev_size_mb, scsi_debug_dev_size_mb, int, S_IRUGO); 2701 + module_param_named(dif, scsi_debug_dif, int, S_IRUGO); 2702 + module_param_named(dix, scsi_debug_dix, int, S_IRUGO); 2722 2703 module_param_named(dsense, scsi_debug_dsense, int, S_IRUGO | S_IWUSR); 2723 2704 module_param_named(every_nth, scsi_debug_every_nth, int, S_IRUGO | S_IWUSR); 2724 2705 module_param_named(fake_rw, scsi_debug_fake_rw, int, S_IRUGO | S_IWUSR); 2706 + module_param_named(guard, scsi_debug_guard, int, S_IRUGO); 2707 + module_param_named(lbpu, scsi_debug_lbpu, int, S_IRUGO); 2708 + module_param_named(lbpws, scsi_debug_lbpws, int, S_IRUGO); 2709 + module_param_named(lbpws10, scsi_debug_lbpws10, int, S_IRUGO); 2710 + module_param_named(lowest_aligned, scsi_debug_lowest_aligned, int, S_IRUGO); 2725 2711 module_param_named(max_luns, scsi_debug_max_luns, int, S_IRUGO | S_IWUSR); 2726 2712 module_param_named(max_queue, scsi_debug_max_queue, int, S_IRUGO | S_IWUSR); 2727 2713 module_param_named(no_lun_0, scsi_debug_no_lun_0, int, S_IRUGO | S_IWUSR); 2728 2714 module_param_named(no_uld, scsi_debug_no_uld, int, S_IRUGO); 2729 2715 module_param_named(num_parts, scsi_debug_num_parts, int, S_IRUGO); 2730 2716 module_param_named(num_tgts, scsi_debug_num_tgts, int, S_IRUGO | S_IWUSR); 2717 + module_param_named(opt_blks, scsi_debug_opt_blks, int, S_IRUGO); 2731 2718 module_param_named(opts, scsi_debug_opts, int, S_IRUGO | S_IWUSR); 2719 + module_param_named(physblk_exp, scsi_debug_physblk_exp, int, S_IRUGO); 2732 2720 module_param_named(ptype, scsi_debug_ptype, int, S_IRUGO | S_IWUSR); 2733 2721 module_param_named(scsi_level, scsi_debug_scsi_level, int, S_IRUGO); 2722 + module_param_named(sector_size, scsi_debug_sector_size, int, S_IRUGO); 2723 + module_param_named(unmap_alignment, scsi_debug_unmap_alignment, int, S_IRUGO); 2724 + module_param_named(unmap_granularity, scsi_debug_unmap_granularity, int, S_IRUGO); 2725 + module_param_named(unmap_max_blocks, scsi_debug_unmap_max_blocks, int, S_IRUGO); 2726 + module_param_named(unmap_max_desc, scsi_debug_unmap_max_desc, int, S_IRUGO); 2734 2727 module_param_named(virtual_gb, scsi_debug_virtual_gb, int, S_IRUGO | S_IWUSR); 2735 2728 module_param_named(vpd_use_hostno, scsi_debug_vpd_use_hostno, int, 2736 2729 S_IRUGO | S_IWUSR); 2737 - module_param_named(sector_size, scsi_debug_sector_size, int, S_IRUGO); 2738 - module_param_named(dix, scsi_debug_dix, int, S_IRUGO); 2739 - module_param_named(dif, scsi_debug_dif, int, S_IRUGO); 2740 - module_param_named(guard, scsi_debug_guard, int, S_IRUGO); 2741 - module_param_named(ato, scsi_debug_ato, int, S_IRUGO); 2742 - module_param_named(physblk_exp, scsi_debug_physblk_exp, int, S_IRUGO); 2743 - module_param_named(opt_blks, scsi_debug_opt_blks, int, S_IRUGO); 2744 - module_param_named(lowest_aligned, scsi_debug_lowest_aligned, int, S_IRUGO); 2745 - module_param_named(unmap_max_blocks, scsi_debug_unmap_max_blocks, int, S_IRUGO); 2746 - module_param_named(unmap_max_desc, scsi_debug_unmap_max_desc, int, S_IRUGO); 2747 - module_param_named(unmap_granularity, scsi_debug_unmap_granularity, int, S_IRUGO); 2748 - module_param_named(unmap_alignment, scsi_debug_unmap_alignment, int, S_IRUGO); 2749 - module_param_named(tpu, scsi_debug_tpu, int, S_IRUGO); 2750 - module_param_named(tpws, scsi_debug_tpws, int, S_IRUGO); 2730 + module_param_named(write_same_length, scsi_debug_write_same_length, int, 2731 + S_IRUGO | S_IWUSR); 2751 2732 2752 2733 MODULE_AUTHOR("Eric Youngdale + Douglas Gilbert"); 2753 2734 MODULE_DESCRIPTION("SCSI debug adapter driver"); ··· 2758 2733 MODULE_VERSION(SCSI_DEBUG_VERSION); 2759 2734 2760 2735 MODULE_PARM_DESC(add_host, "0..127 hosts allowed(def=1)"); 2736 + MODULE_PARM_DESC(ato, "application tag ownership: 0=disk 1=host (def=1)"); 2761 2737 MODULE_PARM_DESC(delay, "# of jiffies to delay response(def=1)"); 2762 2738 MODULE_PARM_DESC(dev_size_mb, "size in MB of ram shared by devs(def=8)"); 2739 + MODULE_PARM_DESC(dif, "data integrity field type: 0-3 (def=0)"); 2740 + MODULE_PARM_DESC(dix, "data integrity extensions mask (def=0)"); 2763 2741 MODULE_PARM_DESC(dsense, "use descriptor sense format(def=0 -> fixed)"); 2764 2742 MODULE_PARM_DESC(every_nth, "timeout every nth command(def=0)"); 2765 2743 MODULE_PARM_DESC(fake_rw, "fake reads/writes instead of copying (def=0)"); 2744 + MODULE_PARM_DESC(guard, "protection checksum: 0=crc, 1=ip (def=0)"); 2745 + MODULE_PARM_DESC(lbpu, "enable LBP, support UNMAP command (def=0)"); 2746 + MODULE_PARM_DESC(lbpws, "enable LBP, support WRITE SAME(16) with UNMAP bit (def=0)"); 2747 + MODULE_PARM_DESC(lbpws10, "enable LBP, support WRITE SAME(10) with UNMAP bit (def=0)"); 2748 + MODULE_PARM_DESC(lowest_aligned, "lowest aligned lba (def=0)"); 2766 2749 MODULE_PARM_DESC(max_luns, "number of LUNs per target to simulate(def=1)"); 2767 2750 MODULE_PARM_DESC(max_queue, "max number of queued commands (1 to 255(def))"); 2768 2751 MODULE_PARM_DESC(no_lun_0, "no LU number 0 (def=0 -> have lun 0)"); 2769 2752 MODULE_PARM_DESC(no_uld, "stop ULD (e.g. sd driver) attaching (def=0))"); 2770 2753 MODULE_PARM_DESC(num_parts, "number of partitions(def=0)"); 2771 2754 MODULE_PARM_DESC(num_tgts, "number of targets per host to simulate(def=1)"); 2755 + MODULE_PARM_DESC(opt_blks, "optimal transfer length in block (def=64)"); 2772 2756 MODULE_PARM_DESC(opts, "1->noise, 2->medium_err, 4->timeout, 8->recovered_err... (def=0)"); 2757 + MODULE_PARM_DESC(physblk_exp, "physical block exponent (def=0)"); 2773 2758 MODULE_PARM_DESC(ptype, "SCSI peripheral type(def=0[disk])"); 2774 2759 MODULE_PARM_DESC(scsi_level, "SCSI level to simulate(def=5[SPC-3])"); 2775 - MODULE_PARM_DESC(virtual_gb, "virtual gigabyte size (def=0 -> use dev_size_mb)"); 2776 - MODULE_PARM_DESC(vpd_use_hostno, "0 -> dev ids ignore hostno (def=1 -> unique dev ids)"); 2777 2760 MODULE_PARM_DESC(sector_size, "logical block size in bytes (def=512)"); 2778 - MODULE_PARM_DESC(physblk_exp, "physical block exponent (def=0)"); 2779 - MODULE_PARM_DESC(opt_blks, "optimal transfer length in block (def=64)"); 2780 - MODULE_PARM_DESC(lowest_aligned, "lowest aligned lba (def=0)"); 2781 - MODULE_PARM_DESC(dix, "data integrity extensions mask (def=0)"); 2782 - MODULE_PARM_DESC(dif, "data integrity field type: 0-3 (def=0)"); 2783 - MODULE_PARM_DESC(guard, "protection checksum: 0=crc, 1=ip (def=0)"); 2784 - MODULE_PARM_DESC(ato, "application tag ownership: 0=disk 1=host (def=1)"); 2761 + MODULE_PARM_DESC(unmap_alignment, "lowest aligned thin provisioning lba (def=0)"); 2762 + MODULE_PARM_DESC(unmap_granularity, "thin provisioning granularity in blocks (def=1)"); 2785 2763 MODULE_PARM_DESC(unmap_max_blocks, "max # of blocks can be unmapped in one cmd (def=0xffffffff)"); 2786 2764 MODULE_PARM_DESC(unmap_max_desc, "max # of ranges that can be unmapped in one cmd (def=256)"); 2787 - MODULE_PARM_DESC(unmap_granularity, "thin provisioning granularity in blocks (def=1)"); 2788 - MODULE_PARM_DESC(unmap_alignment, "lowest aligned thin provisioning lba (def=0)"); 2789 - MODULE_PARM_DESC(tpu, "enable TP, support UNMAP command (def=0)"); 2790 - MODULE_PARM_DESC(tpws, "enable TP, support WRITE SAME(16) with UNMAP bit (def=0)"); 2765 + MODULE_PARM_DESC(virtual_gb, "virtual gigabyte size (def=0 -> use dev_size_mb)"); 2766 + MODULE_PARM_DESC(vpd_use_hostno, "0 -> dev ids ignore hostno (def=1 -> unique dev ids)"); 2767 + MODULE_PARM_DESC(write_same_length, "Maximum blocks per WRITE SAME cmd (def=0xffff)"); 2791 2768 2792 2769 static char sdebug_info[256]; 2793 2770 ··· 3177 3150 { 3178 3151 ssize_t count; 3179 3152 3180 - if (scsi_debug_tpu == 0 && scsi_debug_tpws == 0) 3153 + if (!scsi_debug_lbp()) 3181 3154 return scnprintf(buf, PAGE_SIZE, "0-%u\n", 3182 3155 sdebug_store_sectors); 3183 3156 ··· 3360 3333 memset(dif_storep, 0xff, dif_size); 3361 3334 } 3362 3335 3363 - /* Thin Provisioning */ 3364 - if (scsi_debug_tpu || scsi_debug_tpws) { 3336 + /* Logical Block Provisioning */ 3337 + if (scsi_debug_lbp()) { 3365 3338 unsigned int map_bytes; 3366 3339 3367 3340 scsi_debug_unmap_max_blocks = ··· 3691 3664 errsts = resp_readcap16(SCpnt, devip); 3692 3665 else if (cmd[1] == SAI_GET_LBA_STATUS) { 3693 3666 3694 - if (scsi_debug_tpu == 0 && scsi_debug_tpws == 0) { 3667 + if (scsi_debug_lbp() == 0) { 3695 3668 mk_sense_buffer(devip, ILLEGAL_REQUEST, 3696 3669 INVALID_COMMAND_OPCODE, 0); 3697 3670 errsts = check_condition_result; ··· 3802 3775 } 3803 3776 break; 3804 3777 case WRITE_SAME_16: 3778 + case WRITE_SAME: 3805 3779 if (cmd[1] & 0x8) { 3806 - if (scsi_debug_tpws == 0) { 3780 + if ((*cmd == WRITE_SAME_16 && scsi_debug_lbpws == 0) || 3781 + (*cmd == WRITE_SAME && scsi_debug_lbpws10 == 0)) { 3807 3782 mk_sense_buffer(devip, ILLEGAL_REQUEST, 3808 3783 INVALID_FIELD_IN_CDB, 0); 3809 3784 errsts = check_condition_result; ··· 3814 3785 } 3815 3786 if (errsts) 3816 3787 break; 3817 - /* fall through */ 3818 - case WRITE_SAME: 3819 3788 errsts = check_readiness(SCpnt, 0, devip); 3820 3789 if (errsts) 3821 3790 break; ··· 3825 3798 if (errsts) 3826 3799 break; 3827 3800 3828 - if (scsi_debug_unmap_max_desc == 0 || scsi_debug_tpu == 0) { 3801 + if (scsi_debug_unmap_max_desc == 0 || scsi_debug_lbpu == 0) { 3829 3802 mk_sense_buffer(devip, ILLEGAL_REQUEST, 3830 3803 INVALID_COMMAND_OPCODE, 0); 3831 3804 errsts = check_condition_result;