提交 6f381fa3 编写于 作者: L Lin Ming 提交者: James Bottomley

[SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue

Currently, __scsi_alloc_queue uses SCSI host's parent device
as DMA device to set segment boundary. But the parent device may not
refer to the DMA device. For example, for ATA disk, SCSI host's parent
device now refers to ATA port.

Since commit d139b9bd([SCSI] scsi_lib_dma: fix bug with dma maps on
nested scsi objects), a new field Scsi_Host->dma_dev was introduced
to refer to the real DMA device.

Use ->dma_dev in __scsi_alloc_queue to correctly set segment
boundary.

Bug report: http://marc.info/?l=linux-ide&m=133177818318187&w=2Reported-and-tested-by: NJörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: NLin Ming <ming.m.lin@intel.com>
Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
上级 c6f5c930
......@@ -1638,7 +1638,7 @@ struct request_queue *__scsi_alloc_queue(struct Scsi_Host *shost,
request_fn_proc *request_fn)
{
struct request_queue *q;
struct device *dev = shost->shost_gendev.parent;
struct device *dev = shost->dma_dev;
q = blk_init_queue(request_fn, NULL);
if (!q)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册