Re: [PATCH v4 2/5] HCD files for the DWC2 driver

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Feb 21, 2013 at 07:52:27PM +0000, Paul Zimmerman wrote:
> > From: Felipe Balbi [mailto:balbi@xxxxxx]
> > Sent: Thursday, February 21, 2013 1:16 AM
> > 
> > On Tue, Feb 19, 2013 at 06:50:05PM -0800, Paul Zimmerman wrote:
> > 
> > > +#ifdef DWC2_TRACK_MISSED_SOFS
> > > +#warning Compiling code to track missed SOFs
> > > +#define FRAME_NUM_ARRAY_SIZE 1000
> > > +
> > > +/* This function is for debug only */
> > > +static void dwc2_track_missed_sofs(struct dwc2_hsotg *hsotg)
> > > +{
> > > +	static u16 frame_num_array[FRAME_NUM_ARRAY_SIZE];
> > > +	static u16 last_frame_num_array[FRAME_NUM_ARRAY_SIZE];
> > 
> > you could turn this into a list_head and everytime you find a missed
> > sof, you allocate a e.g. struct dwc2_missec_isoc_data and add that to a
> > list of missed isocs. The only "problem" is that you would have to
> > allocate with GFP_ATOMIC.
> 
> Actually, this function is called on every SOF, not just when one is
> missed, so that wouldn't make much difference. I guess I should
> rename this to dwc2_track_sofs().
> 
> I didn't notice the static allocations before, I will change that to use
> kmalloc() at init time.

cool. Thanks.

-- 
balbi

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux