* [PATCH 0/2]: Use correct DMA device in SCSI/libata @ 2012-03-22 16:32 Lin Ming 2012-03-22 16:32 ` [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue Lin Ming 2012-03-22 16:32 ` [PATCH 2/2] libata: Pass correct DMA device to scsi host Lin Ming 0 siblings, 2 replies; 5+ messages in thread From: Lin Ming @ 2012-03-22 16:32 UTC (permalink / raw) To: James E.J. Bottomley Cc: J�rg Sommer, Jeff Garzik, Tejun Heo, Sergei Shtylyov, linux-scsi, linux-ide Hi, These 2 patches fix bug report at: http://marc.info/?l=linux-ide&m=133177818318187&w=2 Please see the patches for more detail. [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue [PATCH 2/2] libata: Pass correct DMA device to scsi host Thanks, Lin Ming ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue 2012-03-22 16:32 [PATCH 0/2]: Use correct DMA device in SCSI/libata Lin Ming @ 2012-03-22 16:32 ` Lin Ming 2012-03-27 4:56 ` Lin Ming 2012-03-22 16:32 ` [PATCH 2/2] libata: Pass correct DMA device to scsi host Lin Ming 1 sibling, 1 reply; 5+ messages in thread From: Lin Ming @ 2012-03-22 16:32 UTC (permalink / raw) To: James E.J. Bottomley Cc: J�rg Sommer, Jeff Garzik, Tejun Heo, Sergei Shtylyov, linux-scsi, linux-ide [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1471 bytes --] From: Lin Ming <ming.m.lin@intel.com> 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@alea.gnuu.de> Signed-off-by: Lin Ming <ming.m.lin@intel.com> --- 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-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue 2012-03-22 16:32 ` [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue Lin Ming @ 2012-03-27 4:56 ` Lin Ming 0 siblings, 0 replies; 5+ messages in thread From: Lin Ming @ 2012-03-27 4:56 UTC (permalink / raw) To: James E.J. Bottomley Cc: Jörg Sommer, Jeff Garzik, Tejun Heo, Sergei Shtylyov, linux-scsi, linux-ide On Fri, Mar 23, 2012 at 12:32 AM, Lin Ming <mlin@ss.pku.edu.cn> wrote: > From: Lin Ming <ming.m.lin@intel.com> > > 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@alea.gnuu.de> > Signed-off-by: Lin Ming <ming.m.lin@intel.com> 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 ^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/2] libata: Pass correct DMA device to scsi host 2012-03-22 16:32 [PATCH 0/2]: Use correct DMA device in SCSI/libata Lin Ming 2012-03-22 16:32 ` [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue Lin Ming @ 2012-03-22 16:32 ` Lin Ming 2012-03-22 17:22 ` Jeff Garzik 1 sibling, 1 reply; 5+ messages in thread From: Lin Ming @ 2012-03-22 16:32 UTC (permalink / raw) To: James E.J. Bottomley Cc: J�rg Sommer, Jeff Garzik, Tejun Heo, Sergei Shtylyov, linux-scsi, linux-ide [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #1: Type: text/plain; charset=UTF-8, Size: 1101 bytes --] From: Lin Ming <ming.m.lin@intel.com> Use scsi_add_host_with_dma in ata_scsi_add_hosts to pass in the correct DMA device(ATA host). 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> --- drivers/ata/libata-scsi.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-) diff --git a/drivers/ata/libata-scsi.c b/drivers/ata/libata-scsi.c index 508a60b..321797f 100644 --- a/drivers/ata/libata-scsi.c +++ b/drivers/ata/libata-scsi.c @@ -3399,7 +3399,8 @@ int ata_scsi_add_hosts(struct ata_host *host, struct scsi_host_template *sht) */ shost->max_host_blocked = 1; - rc = scsi_add_host(ap->scsi_host, &ap->tdev); + rc = scsi_add_host_with_dma(ap->scsi_host, + &ap->tdev, ap->host->dev); if (rc) goto err_add; } -- 1.7.2.5 -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH 2/2] libata: Pass correct DMA device to scsi host 2012-03-22 16:32 ` [PATCH 2/2] libata: Pass correct DMA device to scsi host Lin Ming @ 2012-03-22 17:22 ` Jeff Garzik 0 siblings, 0 replies; 5+ messages in thread From: Jeff Garzik @ 2012-03-22 17:22 UTC (permalink / raw) To: Lin Ming, James E.J. Bottomley Cc: �, Jeff Garzik, Tejun Heo, Sergei Shtylyov, linux-scsi, linux-ide On 03/22/2012 12:32 PM, Lin Ming wrote: > From: Lin Ming<ming.m.lin@intel.com> > > Use scsi_add_host_with_dma in ata_scsi_add_hosts to pass in the > correct DMA device(ATA host). > > 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> Acked-by: Jeff Garzik <jgarzik@redhat.com> -- To unsubscribe from this list: send the line "unsubscribe linux-scsi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-27 4:56 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-03-22 16:32 [PATCH 0/2]: Use correct DMA device in SCSI/libata Lin Ming 2012-03-22 16:32 ` [PATCH 1/2] [SCSI] scsi_lib: use correct DMA device in __scsi_alloc_queue Lin Ming 2012-03-27 4:56 ` Lin Ming 2012-03-22 16:32 ` [PATCH 2/2] libata: Pass correct DMA device to scsi host Lin Ming 2012-03-22 17:22 ` Jeff Garzik
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).