scsi_debug: Make CRC_T10DIF support optional
PATCH 1/1 scsi_debug: Make CRC_T10DIF support optional
Not all scsi_debug users need data integrity support. Hence modify the scsi_debug driver such that it becomes possible to build this driver without data integrity support.
---
drivers/scsi/Kconfig | 2 +-
drivers/scsi/Makefile | 2 +
drivers/scsi/scsi_debug-dif.h | 65 +++++
drivers/scsi/scsi_debug_dif.c | 224 +++++++++++++++
.../scsi/{scsi_debug.c => scsi_debug_main.c} | 257 ++----------------
5 files changed, 308 insertions(+), 242 deletions(-)
create mode 100644 drivers/scsi/scsi_debug-dif.h
create mode 100644 drivers/scsi/scsi_debug_dif.c
rename drivers/scsi/{scsi_debug.c => scsi_debug_main.c} (97%)drivers/scsi/Kconfig +1 -1
@@ -1227,7 +1227,7 @@ config SCSI_WD719X config SCSI_DEBUG tristate "SCSI debugging host and device simulator" depends on SCSI - select CRC_T10DIF + select CRC_T10DIF if SCSI_DEBUG = y help This pseudo driver simulates one or more hosts (SCSI initiators), each with one or more targets, each with one or more logical units.
drivers/scsi/Makefile +2 -0
@@ -156,6 +156,8 @@ obj-$(CONFIG_SCSI_HISI_SAS) += hisi_sas/ # This goes last, so that "real" scsi devices probe earlier obj-$(CONFIG_SCSI_DEBUG) += scsi_debug.o +scsi_debug-y += scsi_debug_main.o +scsi_debug-$(CONFIG_CRC_T10DIF) += scsi_debug_dif.o scsi_mod-y += scsi.o hosts.o scsi_ioctl.o \ scsicam.o scsi_error.o scsi_lib.o scsi_mod-$(CONFIG_SCSI_CONSTANTS) += constants.o
drivers/scsi/scsi_debug-dif.h new file +65 -0
65 lines not on this page · raw message
drivers/scsi/scsi_debug_dif.c new file +224 -0
224 lines not on this page · raw message
drivers/scsi/scsi_debug_main.c renamed from drivers/scsi/scsi_debug.c +16 -241
359 lines not on this page · raw message
Quoted 6 lines · Bart Van Assche
Not all
scsi_debugusers need data integrity support. Hence modify thescsi_debugdriver such that it becomes possible to build this driver without data integrity support.Cc Douglas Gilbert<[email protected]>Signed-off-by Bart Van Assche<[email protected]>
Quoted 7 lines
---
drivers/scsi/Kconfig | 2 +-
drivers/scsi/Makefile | 2 +
drivers/scsi/scsi_debug-dif.h | 65 +++++
drivers/scsi/scsi_debug_dif.c | 224 +++++++++++++++
.../scsi/{scsi_debug.c => scsi_debug_main.c} | 257 ++----------------
5 files changed, 308 insertions(+), 242 deletions(-)That's a pretty light commit message for so many modifications.
Thanks,
John
Quoted 15 lines · John Garry
Quoted 6 lines · Bart Van Assche
Not all
scsi_debugusers need data integrity support. Hence modify thescsi_debugdriver such that it becomes possible to build this driver without data integrity support.Cc Douglas Gilbert<[email protected]>Signed-off-by Bart Van Assche<[email protected]>Quoted 7 lines
---
drivers/scsi/Kconfig | 2 +- drivers/scsi/Makefile | 2 + drivers/scsi/scsi_debug-dif.h | 65 +++++ drivers/scsi/scsi_debug_dif.c | 224 +++++++++++++++.../scsi/{scsi_debug.c=> scsi_debug_main.c} | 257 ++----------------5 files changed, 308 insertions(+), 242 deletions(-)
Quoted 1 line
That's a pretty light commit message for so many modifications.
Hi John,
Thanks for having taken a look. The patch description is short because this patch doesn't do much: it splits the scsi_debug source code in two files and modifies the Kconfig and Makefile. No functional changes are present in this patch.
Thanks,
Bart.
Quoted 18 lines · Bart Van Assche
Quoted 14 lines
Quoted 6 lines
Not all
scsi_debugusers need data integrity support. Hence modify thescsi_debugdriver such that it becomes possible to build this driver without data integrity support.Cc Douglas Gilbert<[email protected]>Signed-off-by Bart Van Assche<[email protected]>Quoted 7 lines
---
drivers/scsi/Kconfig | 2 +- drivers/scsi/Makefile | 2 + drivers/scsi/scsi_debug-dif.h | 65 +++++ drivers/scsi/scsi_debug_dif.c | 224 +++++++++++++++.../scsi/{scsi_debug.c=> scsi_debug_main.c} | 257 ++----------------5 files changed, 308 insertions(+), 242 deletions(-)Quoted 1 line
That's a pretty light commit message for so many modifications.
Hi John,
Quoted 7 lines
Thanks for having taken a look. The patch description is short because this patch doesn't do much: it
splits the
scsi_debugsource code in two
files and modifies theKconfigandMakefile. No functional changes are present in this patch.
I think that this info is useful.
About this:
drivers/scsi/Kconfig config SCSI_WD719X · line 1230
Quoted 5 lines · Bart Van Assche
config
SCSI_DEBUG
tristate "SCSI debugging host and device simulator" depends on SCSIdrivers/scsi/Kconfig +1
-1- select CRC_T10DIF + select CRC_T10DIF if SCSI_DEBUG = y
So this means that we select CRC_T10DIF if SCSI_DEBUG is only built-in, right?
Thanks,
John
Quoted 8 lines · John Garry
Quoted 5 lines · Bart Van Assche
config
SCSI_DEBUG
tristate "SCSI debugging host and device simulator" depends on SCSI
- selectCRC_T10DIF
+ selectCRC_T10DIFifSCSI_DEBUG= ySo this means that we select
CRC_T10DIFifSCSI_DEBUGis only built-in, right?
Yes, that's correct. Without "select CRC_T10DIF if SCSI_DEBUG = y" the build fails if CRC_T10DIF=m and SCSI_DEBUG=y.
Thanks,
Bart.