Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 15266
b: refs/heads/master
c: 7e87023
h: refs/heads/master
v: v3
  • Loading branch information
Andi Kleen authored and Linus Torvalds committed Dec 20, 2005
1 parent 0481230 commit c80d2e4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7ca0b3bf695632003a2a0f98b9fc1451b0483346
refs/heads/master: 7e8702334841b6da4b8f564dc1771ca17c59a621
5 changes: 3 additions & 2 deletions trunk/lib/swiotlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -704,8 +704,9 @@ swiotlb_map_sg(struct device *hwdev, struct scatterlist *sg, int nelems,
addr = SG_ENT_VIRT_ADDRESS(sg);
dev_addr = virt_to_phys(addr);
if (swiotlb_force || address_needs_mapping(hwdev, dev_addr)) {
sg->dma_address = (dma_addr_t) virt_to_phys(map_single(hwdev, addr, sg->length, dir));
if (!sg->dma_address) {
void *map = map_single(hwdev, addr, sg->length, dir);
sg->dma_address = virt_to_bus(map);
if (!map) {
/* Don't panic here, we expect map_sg users
to do proper error handling. */
swiotlb_full(hwdev, sg->length, dir, 0);
Expand Down

0 comments on commit c80d2e4

Please sign in to comment.