Re: [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 23, 2012 at 12:32 AM, Lin Ming <mlin@xxxxxxxxxxxxx> wrote:
> From: Lin Ming <ming.m.lin@xxxxxxxxx>
>
> 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 d139b9b([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@xxxxxxxxxxxx>
> Signed-off-by: Lin Ming <ming.m.lin@xxxxxxxxx>

Hi James,

Jeff has acked patch 2.

Will you apply these 2 patches?

Thanks,
Lin Ming

> ---
>  drivers/scsi/scsi_lib.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index a33b2b6..fa2636e2 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1637,7 +1637,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)
> --
> 1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-ide" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Filesystems]     [Linux SCSI]     [Linux RAID]     [Git]     [Kernel Newbies]     [Linux Newbie]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Samba]     [Device Mapper]

  Powered by Linux