Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH 1/2] scsi: define minimum CDB size
@ 2026-10-29  9:26 Dmitry Antipov
  2026-10-29  9:26 ` [PATCH 2/2] scsi: add basic CDB check to bsg_sg_io() Dmitry Antipov
  0 siblings, 1 reply; 3+ messages in thread
From: Dmitry Antipov @ 2026-10-29  9:26 UTC (permalink / raw)
  To: Jens Axboe, Fujita Tomonori, James Bottomley, Martin Petersen
  Cc: linux-block, linux-scsi, lvc-project, Dmitry Antipov

According to SPC3, fixed length CDB can't be shorter
than 6 bytes, so define the convenient SCSI_MIN_CDB_SIZE.

Signed-off-by: Dmitry Antipov <dmantipov@yandex.ru>
---
 include/scsi/scsi_proto.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/scsi/scsi_proto.h b/include/scsi/scsi_proto.h
index 9c7d31aa6bae..c7d2c38be4b2 100644
--- a/include/scsi/scsi_proto.h
+++ b/include/scsi/scsi_proto.h
@@ -187,6 +187,7 @@
  *	SCSI command lengths
  */
 
+#define SCSI_MIN_CDB_SIZE 6
 #define SCSI_MAX_VARLEN_CDB_SIZE 260
 
 /* defined in T10 SCSI Primary Commands-2 (SPC2) */
-- 
2.56.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-29  9:48 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-29  9:26 [PATCH 1/2] scsi: define minimum CDB size Dmitry Antipov
2026-10-29  9:26 ` [PATCH 2/2] scsi: add basic CDB check to bsg_sg_io() Dmitry Antipov
2026-10-29  9:48   ` sashiko-bot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox