@@ -377,9 +377,10 @@ void
pci_dma_sync_sg(struct pci_dev *hwdev, struct scatterlist *sg,
int nelems, int direction)
-Synchronise a single contiguous or scatter/gather mapping. All the
-parameters must be the same as those passed into the single mapping
+Synchronise a single contiguous or scatter/gather mapping. The
+device and handle must be the same as those passed into the single mapping
+API. The size can be less than the original mapping if only part
+of the mapping needs to be accessed.
Notes: You must do this:
@@ -285,11 +285,9 @@ static struct dma_debug_entry *hash_buck
- * If we have multiple matches but no perfect-fit, just return
- * NULL.
+ * If we have multiple matches but no perfect-fit
+ * return best value and let caller deal with it.
- ret = (matches == 1) ? ret : NULL;