All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sergei Shtylyov <sshtylyov@mvista.com>
To: Lin Ming <ming.m.lin@intel.com>
Cc: "James E.J. Bottomley" <JBottomley@parallels.com>,
	"Jörg Sommer" <joerg@alea.gnuu.de>,
	"Jeff Garzik" <jgarzik@redhat.com>, "Tejun Heo" <tj@kernel.org>,
	linux-scsi@vger.kernel.org, linux-ide@vger.kernel.org
Subject: Re: [PATCH] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue
Date: Thu, 22 Mar 2012 15:24:23 +0400	[thread overview]
Message-ID: <4F6B0BE7.8050707@mvista.com> (raw)
In-Reply-To: <1332395550.3793.58.camel@minggr>

Hello.

On 22-03-2012 9:52, Lin Ming wrote:

> 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_device was introduced

    Only the field is named 'dma_dev', isn't it?

> to refer to the real DMA device.

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

> And use scsi_add_host_with_dma in ata_scsi_add_hosts to pass in the
> correct DMA device.

    Perhaps this should be split into two patches.

> 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>
[...]

> diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
> index f85cfa6..486088b 100644
> --- a/drivers/scsi/scsi_lib.c
> +++ b/drivers/scsi/scsi_lib.c
> @@ -1642,7 +1642,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)

WBR, Sergei

  reply	other threads:[~2012-03-22 11:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-22  5:52 [PATCH] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue Lin Ming
2012-03-22 11:24 ` Sergei Shtylyov [this message]
2012-03-22 15:28   ` Lin Ming

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F6B0BE7.8050707@mvista.com \
    --to=sshtylyov@mvista.com \
    --cc=JBottomley@parallels.com \
    --cc=jgarzik@redhat.com \
    --cc=joerg@alea.gnuu.de \
    --cc=linux-ide@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ming.m.lin@intel.com \
    --cc=tj@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.