Skip to contentSkip to conversation

st must check phys and hw segments limits now

PATCH In review Mike Christie 1 participant 1 message Nov 8, 2005

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 8/10 st must check phys and hw segments limits now

We have two segments limitations. Previously st made its own scatterlists that got sent to LLDs so it could ignore max_phys_segments.

drivers/scsi/st.c +2 -1
index 2d8592d..5e61e48 100644
@@ -3889,7 +3889,8 @@ static int st_probe(struct device *dev)
 		return -ENODEV;
 	}
 
-	i = SDp->host->sg_tablesize;
+	i = min(SDp->request_queue->max_hw_segments,
+		SDp->request_queue->max_phys_segments);
 	if (st_max_sg_segs < i)
 		i = st_max_sg_segs;
 	buffer = new_tape_buffer(1, (SDp->host)->unchecked_isa_dma, i);