On Thu, 2005-02-24 at 23:21 -0500, Doug Ledford wrote:
Don't use cmd->request->nr_hw_segments as it may not be initialized
(SG_IO in particular bypasses anything that initializes this and just
uses scsi_do_req to insert a scsi_request directly on the head of the
queue)
should we fix that in the SG_IO layer ?
Possibly/probably.
For SCSI drivers specifically, using nr_hw_segments is pointless unless cmd->use_sg goes away. At which point tons of SCSI drivers want changing anyway.
n_sg = dma_map_sg(..., cmd->use_sg, ...)
will always do the right thing, when the cmd contains a scatterlist.
Deviate from the norm and pay the price, really...
Jeff
- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html