Displaying 20 results from an estimated 48 matches for "pci_map_singl".
Did you mean:
pci_map_single
2013 Aug 20
2
[PATCH] VMXNET3: Add support for virtual IOMMU
We can't just do virt_to_phys() on memory that we pass to the device and
expect it to work in presence of a virtual IOMMU. We need to add IOMMU
mappings for such DMAs to work correctly. Fix that with
pci_alloc_consistent() where possible, or pci_map_single() where the
mapping is short-lived or we don't control the allocation (netdev).
Also fix two small bugs:
1) use after free of rq->buf_info in vmxnet3_rq_destroy()
2) a cpu_to_le32() that should have been a cpu_to_le64()
Acked-by: George Zhang <georgezhang at vmware.com>
Acked-by: Ad...
2013 Aug 20
2
[PATCH] VMXNET3: Add support for virtual IOMMU
We can't just do virt_to_phys() on memory that we pass to the device and
expect it to work in presence of a virtual IOMMU. We need to add IOMMU
mappings for such DMAs to work correctly. Fix that with
pci_alloc_consistent() where possible, or pci_map_single() where the
mapping is short-lived or we don't control the allocation (netdev).
Also fix two small bugs:
1) use after free of rq->buf_info in vmxnet3_rq_destroy()
2) a cpu_to_le32() that should have been a cpu_to_le64()
Acked-by: George Zhang <georgezhang at vmware.com>
Acked-by: Ad...
2012 Oct 12
13
Dom0 physical networking/swiotlb/something issue in 3.7-rc1
...this interface.
I suspect that the issue is that the compound pages allocated in this
way are not backed by contiguous mfns and so things fall apart when the
driver tries to do DMA.
However I don''t understand why the swiotlb is not fixing this up
successfully? The tg3 driver seems to use pci_map_single on this data.
Any thoughts? Perhaps the swiotlb (either generically or in the Xen
backend) doesn''t correctly handle compound pages?
Ideally we would also fix this at the point of allocation to avoid the
bouncing -- I suppose that would involve using the DMA API in
netdev_alloc_frag?
We...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...[0]);
+ tq->buf_info = dma_zalloc_coherent(&adapter->pdev->dev, sz,
+ &tq->buf_info_pa, GFP_KERNEL);
if (!tq->buf_info)
goto err;
@@ -578,7 +583,8 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx,
break;
}
- rbi->dma_addr = pci_map_single(adapter->pdev,
+ rbi->dma_addr = dma_map_single(
+ &adapter->pdev->dev,
rbi->skb->data, rbi->len,
PCI_DMA_FROMDEVICE);
} else {
@@ -595,7 +601,8 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx,
rq->stats.rx_buf_alloc_...
2013 Aug 23
1
[PATCH] VMXNET3: Add support for virtual IOMMU
...[0]);
+ tq->buf_info = dma_zalloc_coherent(&adapter->pdev->dev, sz,
+ &tq->buf_info_pa, GFP_KERNEL);
if (!tq->buf_info)
goto err;
@@ -578,7 +583,8 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx,
break;
}
- rbi->dma_addr = pci_map_single(adapter->pdev,
+ rbi->dma_addr = dma_map_single(
+ &adapter->pdev->dev,
rbi->skb->data, rbi->len,
PCI_DMA_FROMDEVICE);
} else {
@@ -595,7 +601,8 @@ vmxnet3_rq_alloc_rx_buf(struct vmxnet3_rx_queue *rq, u32 ring_idx,
rq->stats.rx_buf_alloc_...
2013 Aug 21
0
[PATCH] VMXNET3: Add support for virtual IOMMU
...ue, 20 Aug 2013 10:33:32 -0700
> We can't just do virt_to_phys() on memory that we pass to the device and
> expect it to work in presence of a virtual IOMMU. We need to add IOMMU
> mappings for such DMAs to work correctly. Fix that with
> pci_alloc_consistent() where possible, or pci_map_single() where the
> mapping is short-lived or we don't control the allocation (netdev).
>
> Also fix two small bugs:
> 1) use after free of rq->buf_info in vmxnet3_rq_destroy()
> 2) a cpu_to_le32() that should have been a cpu_to_le64()
>
> Acked-by: George Zhang <georgez...
2006 May 12
7
Xen Kernel (3.0.2) breaks b44 module
I have a new laptop (Dell 9400) that I am trying to work with Xen 3.0.
Xen works fine, runs windows XP under HVM.
But, the Xen kernel on Dom0 has a few problems with some of the hardware.
The network card is a Broadcom 4400 10/100BaseT.
Normally loading the b44 module gives this:
Apr 28 20:07:53 ipanema kernel: [4294683.185000] b44.c:v0.97 (Nov 30, 2005)
Apr 28 20:07:53 ipanema kernel:
2009 Feb 10
3
[PATCH 2/2] Use correct config option for ixgbe VMDq
...XEN_NETDEV2_BACKEND
+#ifdef CONFIG_XEN_NETDEV2_VMQ
if ((adapter->flags & IXGBE_FLAG_VMDQ_ENABLED) &&
rx_ring->queue_index) {
skb = vmq_alloc_skb(adapter->netdev,
@@ -604,7 +604,7 @@ static void ixgbe_alloc_rx_buffers(struc
bi->skb = skb;
bi->dma = pci_map_single(pdev, skb->data, bufsz,
PCI_DMA_FROMDEVICE);
-#ifdef CONFIG_XEN_NETDEV2_BACKEND
+#ifdef CONFIG_XEN_NETDEV2_VMQ
}
#endif
}
@@ -1056,7 +1056,7 @@ static bool ixgbe_clean_rx_irq(struct ix
cleaned = true;
skb = rx_buffer_info->skb;
rx_buffer_info->...
2009 Sep 30
1
SCSI driver for VMware's virtual HBA - V5.
...return;
> +
> + sg = scsi_sglist(cmd);
> + count = scsi_sg_count(cmd);
> + if (count != 0) {
> + int segs = scsi_dma_map(cmd);
> + if (segs > 1) {
> + pvscsi_create_sg(ctx, sg, segs);
> +
> + e->flags |= PVSCSI_FLAG_CMD_WITH_SG_LIST;
> + ctx->sglPA = pci_map_single(adapter->dev, ctx->sgl,
> + SGL_SIZE, PCI_DMA_TODEVICE);
> + e->dataAddr = ctx->sglPA;
> + } else
> + e->dataAddr = sg_dma_address(sg);
> + } else {
> + /*
> + * In case there is no S/G list, scsi_sglist points
> + * directly to the buffer....
2009 Sep 30
1
SCSI driver for VMware's virtual HBA - V5.
...return;
> +
> + sg = scsi_sglist(cmd);
> + count = scsi_sg_count(cmd);
> + if (count != 0) {
> + int segs = scsi_dma_map(cmd);
> + if (segs > 1) {
> + pvscsi_create_sg(ctx, sg, segs);
> +
> + e->flags |= PVSCSI_FLAG_CMD_WITH_SG_LIST;
> + ctx->sglPA = pci_map_single(adapter->dev, ctx->sgl,
> + SGL_SIZE, PCI_DMA_TODEVICE);
> + e->dataAddr = ctx->sglPA;
> + } else
> + e->dataAddr = sg_dma_address(sg);
> + } else {
> + /*
> + * In case there is no S/G list, scsi_sglist points
> + * directly to the buffer....
2009 Oct 13
1
SCSI driver for VMware's virtual HBA - V6.
...fflen;
+ e->dataAddr = 0;
+ if (bufflen == 0)
+ return;
+
+ sg = scsi_sglist(cmd);
+ count = scsi_sg_count(cmd);
+ if (count != 0) {
+ int segs = scsi_dma_map(cmd);
+ if (segs > 1) {
+ pvscsi_create_sg(ctx, sg, segs);
+
+ e->flags |= PVSCSI_FLAG_CMD_WITH_SG_LIST;
+ ctx->sglPA = pci_map_single(adapter->dev, ctx->sgl,
+ SGL_SIZE, PCI_DMA_TODEVICE);
+ e->dataAddr = ctx->sglPA;
+ } else
+ e->dataAddr = sg_dma_address(sg);
+ } else {
+ /*
+ * In case there is no S/G list, scsi_sglist points
+ * directly to the buffer.
+ */
+ ctx->dataPA = pci_map_sing...
2009 Oct 13
1
SCSI driver for VMware's virtual HBA - V6.
...fflen;
+ e->dataAddr = 0;
+ if (bufflen == 0)
+ return;
+
+ sg = scsi_sglist(cmd);
+ count = scsi_sg_count(cmd);
+ if (count != 0) {
+ int segs = scsi_dma_map(cmd);
+ if (segs > 1) {
+ pvscsi_create_sg(ctx, sg, segs);
+
+ e->flags |= PVSCSI_FLAG_CMD_WITH_SG_LIST;
+ ctx->sglPA = pci_map_single(adapter->dev, ctx->sgl,
+ SGL_SIZE, PCI_DMA_TODEVICE);
+ e->dataAddr = ctx->sglPA;
+ } else
+ e->dataAddr = sg_dma_address(sg);
+ } else {
+ /*
+ * In case there is no S/G list, scsi_sglist points
+ * directly to the buffer.
+ */
+ ctx->dataPA = pci_map_sing...
2009 Jan 27
5
[PATCH 2/2] Add VMDq support to ixgbe
...}
+ if (!skb) {
+ adapter->alloc_rx_buff_failed++;
+ goto no_buffers;
+ }
+
+ skb->dev = adapter->netdev;
/*
* Make buffer alignment 2 beyond a 16 byte boundary
@@ -572,7 +607,11 @@ static void ixgbe_alloc_rx_buffers(struc
bi->skb = skb;
bi->dma = pci_map_single(pdev, skb->data, bufsz,
PCI_DMA_FROMDEVICE);
+#ifdef CONFIG_XEN_NETDEV2_BACKEND
+ }
+#endif
}
+
/* Refresh the desc even if buffer_addrs didn''t change because
* each write-back erases this info. */
if (adapter->flags & IXGBE_FLAG_RX_PS...
2004 Apr 30
2
Can not compile zaptel at SuSE 9.0
.../pci-dma-compat.h:22: error: structure has no member
named `dev'
/usr/include/asm-generic/pci-dma-compat.h: In function
`pci_free_consistent':
/usr/include/asm-generic/pci-dma-compat.h:29: error: structure has no member
named `dev'
/usr/include/asm-generic/pci-dma-compat.h: In function `pci_map_single':
/usr/include/asm-generic/pci-dma-compat.h:35: error: structure has no member
named `dev'
/usr/include/asm-generic/pci-dma-compat.h: In function `pci_unmap_single':
/usr/include/asm-generic/pci-dma-compat.h:42: error: structure has no member
named `dev'
/usr/include/asm-generic/pc...
2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
...io, iter) {
memcpy(pci_addr_out + offset,
- page_address(bvec->bv_page) + bvec->bv_offset,
- bvec->bv_len);
- offset += bvec->bv_len;
+ page_address(bvec.bv_page) + bvec.bv_offset,
+ bvec.bv_len);
+ offset += bvec.bv_len;
}
} else {
dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
@@ -2103,19 +2104,19 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
u32 offset = 0;
u32 bytes_to_copy =
le16_to_cpu(mpi_reply->ResponseDataLength);
- bio_for_each_segment(bvec, rsp->bio, i) {
- if (bytes_to_...
2013 Mar 27
0
[PATCH 04/22] block: Convert bio_for_each_segment() to bvec_iter
...io, iter) {
memcpy(pci_addr_out + offset,
- page_address(bvec->bv_page) + bvec->bv_offset,
- bvec->bv_len);
- offset += bvec->bv_len;
+ page_address(bvec.bv_page) + bvec.bv_offset,
+ bvec.bv_len);
+ offset += bvec.bv_len;
}
} else {
dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
@@ -2103,19 +2104,19 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
u32 offset = 0;
u32 bytes_to_copy =
le16_to_cpu(mpi_reply->ResponseDataLength);
- bio_for_each_segment(bvec, rsp->bio, i) {
- if (bytes_to_...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...io, iter) {
memcpy(pci_addr_out + offset,
- page_address(bvec->bv_page) + bvec->bv_offset,
- bvec->bv_len);
- offset += bvec->bv_len;
+ page_address(bvec.bv_page) + bvec.bv_offset,
+ bvec.bv_len);
+ offset += bvec.bv_len;
}
} else {
dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
@@ -2103,19 +2104,19 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
u32 offset = 0;
u32 bytes_to_copy =
le16_to_cpu(mpi_reply->ResponseDataLength);
- bio_for_each_segment(bvec, rsp->bio, i) {
- if (bytes_to_...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...io, iter) {
memcpy(pci_addr_out + offset,
- page_address(bvec->bv_page) + bvec->bv_offset,
- bvec->bv_len);
- offset += bvec->bv_len;
+ page_address(bvec.bv_page) + bvec.bv_offset,
+ bvec.bv_len);
+ offset += bvec.bv_len;
}
} else {
dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
@@ -2103,19 +2104,19 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
u32 offset = 0;
u32 bytes_to_copy =
le16_to_cpu(mpi_reply->ResponseDataLength);
- bio_for_each_segment(bvec, rsp->bio, i) {
- if (bytes_to_...
2013 Aug 07
0
[PATCH 07/22] block: Convert bio_for_each_segment() to bvec_iter
...io, iter) {
memcpy(pci_addr_out + offset,
- page_address(bvec->bv_page) + bvec->bv_offset,
- bvec->bv_len);
- offset += bvec->bv_len;
+ page_address(bvec.bv_page) + bvec.bv_offset,
+ bvec.bv_len);
+ offset += bvec.bv_len;
}
} else {
dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
@@ -2103,19 +2104,19 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
u32 offset = 0;
u32 bytes_to_copy =
le16_to_cpu(mpi_reply->ResponseDataLength);
- bio_for_each_segment(bvec, rsp->bio, i) {
- if (bytes_to_...
2013 Oct 29
0
[PATCH 07/23] block: Convert bio_for_each_segment() to bvec_iter
...io, iter) {
memcpy(pci_addr_out + offset,
- page_address(bvec->bv_page) + bvec->bv_offset,
- bvec->bv_len);
- offset += bvec->bv_len;
+ page_address(bvec.bv_page) + bvec.bv_offset,
+ bvec.bv_len);
+ offset += bvec.bv_len;
}
} else {
dma_addr_out = pci_map_single(ioc->pdev, bio_data(req->bio),
@@ -2106,19 +2107,19 @@ _transport_smp_handler(struct Scsi_Host *shost, struct sas_rphy *rphy,
u32 offset = 0;
u32 bytes_to_copy =
le16_to_cpu(mpi_reply->ResponseDataLength);
- bio_for_each_segment(bvec, rsp->bio, i) {
- if (bytes_to_...