Skip to contentSkip to conversation

SCSI: Get SG_ALL out of the way

PATCH In review Boaz Harrosh 1 participant 2 messages Aug 9, 2007 SCSI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 SCSI: Get SG_ALL out of the way

Jens hi playing with sglist and iscsi I stumbled on this. You might want to add it to the sglist tree. Or maybe James wants to include it for next merge window.

===============================================================

- Some 50 scsi drivers use SG_ALL for their .sg_tablesize So a value of 255 is a bit specific. Change it to ~0 as meaning MAX_ what ever unsigned type it will ever be.

---
 include/scsi/scsi_host.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/scsi/scsi_host.h +1 -1
index 88f6871..b84a4eb 100644
@@ -30,7 +30,7 @@ struct blk_queue_tags;
  *	 used in one scatter-gather request.
  */
 #define SG_NONE 0
-#define SG_ALL 0xff
+#define SG_ALL (~0)
 
 
 #define DISABLE_CLUSTERING 0
Signature · 1 line
1.5.2.2.249.g45fd
#1 lore raw
Quoted 20 lines · Boaz Harrosh

Jens hi playing with sglist and iscsi I stumbled on this. You might want to add it to the sglist tree. Or maybe James wants to include it for next merge window.

===============================================================

- Some 50 scsi drivers use SG_ALL for their .sg_tablesize So a value of 255 is a bit specific. Change it to ~0 as meaning MAX_ what ever unsigned type it will ever be.

---
 include/scsi/scsi_host.h |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
include/scsi/scsi_host.h +0 -0
index 88f6871..b84a4eb 100644

include/scsi/scsi_host.h struct blk_queue_tags; · line 36

Quoted 8 lines
include/scsi/scsi_host.h +1 -1
@@ -30,7 +30,7 @@ struct blk_queue_tags;
  *	 used in one scatter-gather request.
  */
 #define SG_NONE 0
-#define SG_ALL 0xff
+#define SG_ALL (~0)
 
 
 #define DISABLE_CLUSTERING 0

Sorry about that patch. I just did a make allmodconfig and it appears that some drivers use this constant as an Array size. I will submit a new Patch.

Boaz