]> git.baikalelectronics.ru Git - kernel.git/commit
[SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue
authorLin Ming <ming.m.lin@intel.com>
Thu, 12 Apr 2012 05:50:38 +0000 (13:50 +0800)
committerJames Bottomley <JBottomley@Parallels.com>
Sun, 22 Apr 2012 17:56:18 +0000 (18:56 +0100)
commit4704719fbece8b91bf812e9905819db3e18c553b
treed7edabad4302a22eb625493dfe7f195ff2161641
parent2943656615c0f4642ec2cae381cd872020b24258
[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 c16191d([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=2

Reported-and-tested-by: Jörg Sommer <joerg@alea.gnuu.de>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/scsi_lib.c