diff options
| author | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-12-20 23:03:50 -0500 |
|---|---|---|
| committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2005-12-20 23:03:50 -0500 |
| commit | 041387d98460b3947587929ef3a4773b8c48538f (patch) | |
| tree | 3330eebba3fa1aa7c13479e527f07b03d7fb53ed /lib/swiotlb.c | |
| parent | 56f0356321a876a1a356712f2486d6188a3b4992 (diff) | |
| parent | b05948d9b7167e23af88cc65b9ffa4687eaf1f0d (diff) | |
Manual merge with Linus (conflict in drivers/input/misc/wistron_bnts.c)
Diffstat (limited to 'lib/swiotlb.c')
| -rw-r--r-- | lib/swiotlb.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/swiotlb.c b/lib/swiotlb.c index 57216f3544ca..1ff8dcebf7c6 100644 --- a/lib/swiotlb.c +++ b/lib/swiotlb.c | |||
| @@ -704,8 +704,9 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems, | |||
| 704 | addr = SG_ENT_VIRT_ADDRESS(sg); | 704 | addr = SG_ENT_VIRT_ADDRESS(sg); |
| 705 | dev_addr = virt_to_phys(addr); | 705 | dev_addr = virt_to_phys(addr); |
| 706 | if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { | 706 | if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) { |
| 707 | sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir)); | 707 | void *map = map_single(hwdev, addr, sg->length, dir); |
| 708 | if (!sg->dma_address) { | 708 | sg->dma_address = virt_to_bus(map); |
| 709 | if (!map) { | ||
| 709 | /* Don't panic here, we expect map_sg users | 710 | /* Don't panic here, we expect map_sg users |
| 710 | to do proper error handling. */ | 711 | to do proper error handling. */ |
| 711 | swiotlb_full(hwdev, sg->length, dir, 0); | 712 | swiotlb_full(hwdev, sg->length, dir, 0); |
