[lkml]   [2011]   [Dec]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH] usb: fix number of mapped SG DMA entries
* Alan Stern | 2011-12-04 11:59:32 [-0500]:

>On Sat, 3 Dec 2011, Clemens Ladisch wrote:
>> Add a new field num_mapped_sgs to struct urb so that we have a place to
>> store the number of mapped entries and can also retain the original
>> value of entries in num_sgs. Previously, usb_hcd_map_urb_for_dma()
>> would overwrite this with the number of mapped entries, which would
>> break dma_unmap_sg() because it requires the original number of entries.
>> This fixes warnings like the following when using USB storage devices:
>> ------------[ cut here ]------------
>> WARNING: at lib/dma-debug.c:902 check_unmap+0x4e4/0x695()
>> ehci_hcd 0000:00:12.2: DMA-API: device driver frees DMA sg list with different entry count [map count=4] [unmap count=1]
>Interesting. Do you have any idea why this warning didn't show up
>earlier? Is there perhaps a Kconfig option I ought to be using?

My question here is why don't we map the complete sg list but only
one entry. What happens to the remaining few sg list entries? Don't we
sent too less data?
Is there anything special you do to get into this kind of situation?
Like 16GiB of memory on 32bit with highmem and a brutal disk/io test
case so?

>Alan Stern


 \ /
  Last update: 2011-12-15 13:41    [W:0.065 / U:3.740 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site