[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20130129110228.GA20242@lunn.ch>
Date: Tue, 29 Jan 2013 12:02:28 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Soeren Moch <smoch@....de>
Cc: Andrew Lunn <andrew@...n.ch>, Arnd Bergmann <arnd@...db.de>,
Jason Cooper <jason@...edaemon.net>,
Greg KH <gregkh@...uxfoundation.org>,
Thomas Petazzoni <thomas.petazzoni@...e-electrons.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@...fujitsu.com>,
linux-kernel@...r.kernel.org, Michal Hocko <mhocko@...e.cz>,
linux-mm@...ck.org, Kyungmin Park <kyungmin.park@...sung.com>,
Mel Gorman <mgorman@...e.de>,
Andrew Morton <akpm@...ux-foundation.org>,
Marek Szyprowski <m.szyprowski@...sung.com>,
linaro-mm-sig@...ts.linaro.org,
linux-arm-kernel@...ts.infradead.org,
Sebastian Hesselbarth <sebastian.hesselbarth@...il.com>
Subject: Re: [PATCH v2] mm: dmapool: use provided gfp flags for all
dma_alloc_coherent() calls
> Now I activated the debug messages in em28xx. From the messages I
> see no correlation of the pool exhaustion and lost sync. Also I
> cannot see any error messages from the em28xx driver.
> I see a lot of init_isoc/stop_urbs (maybe EPG scan?) without
> draining the coherent pool (checked with 'cat
> /debug/dma-api/num_free_entries', which gave stable numbers), but
> after half an hour there are only init_isoc messages without
> corresponding stop_urbs messages and num_free_entries decreased
> until coherent pool exhaustion.
Hi Soeren
em28xx_stop_urbs() is only called by em28xx_stop_streaming().
em28xx_stop_streaming() is only called by em28xx_stop_feed()
when 0 == dvb->nfeeds.
em28xx_stop_feed()and em28xx_start_feed() look O.K, dvb->nfeeds is
protected by a mutex etc.
Now, em28xx_init_isoc() is also called by buffer_prepare(). This uses
em28xx_alloc_isoc() to do the actual allocation, and that function
sets up the urb such that on completion the function
em28xx_irq_callback() is called.
It looks like there might be issues here:
Once the data has been copied out, it resubmits the urb:
urb->status = usb_submit_urb(urb, GFP_ATOMIC);
if (urb->status) {
em28xx_isocdbg("urb resubmit failed (error=%i)\n",
urb->status);
}
However, if the ubs_submit_urb fails, it looks like the urb is lost.
If you look at other code submitting urbs you have this pattern:
rc = usb_submit_urb(isoc_bufs->urb[i], GFP_ATOMIC);
if (rc) {
em28xx_err("submit of urb %i failed (error=%i)\n", i,
rc);
em28xx_uninit_isoc(dev, mode);
return rc;
}
Do you have your build such that you would see "urb resubmit failed"
in your logs? Are there any?
Andrew
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists