lkml.org 
[lkml]   [2013]   [Dec]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 1/6] GenWQE PCI support, health monitoring and recovery
From
Date
Hi Greg,

Am Mittwoch, den 27.11.2013, 11:20 -0800 schrieb Greg KH:
> On Wed, Nov 06, 2013 at 01:45:38PM +0100, Frank Haverkamp wrote:
> > +/*
> > + * Flags for extended output (dbg_print)
> > + * We define different levels of debugging for the appropriate unit.
> > + */
> > +#define dbg_card 0x00000001
> > +#define dbg_card_ddcb 0x00000004
> > +#define dbg_card_regs 0x00000008
> > +#define dbg_card_sglist 0x00000400
> > +#define dbg_card_pinning 0x00000800
> > +
> > +#define genwqe_dprintk(_cd, dbg_unit, fmt, ...) do { \
> > + struct genwqe_dev *__cd = (_cd); \
> > + if ((_cd)->debug & (dbg_unit)) \
> > + dev_info(&__cd->pci_dev->dev, fmt, \
> > + ## __VA_ARGS__); \
> > + } while (0)
>
> Ugh, really? How is a debugging printk being sent out with dev_info()?
>
> And why not just use dynamic kernel debugging and not create your own
> masks and macros? We are trying to make everything use the same
> infrastructure, please don't create new ones for every individual driver
> in the kernel, that's a mess.

I removed the genwqe_dprintk function completely. Our debug flag I kept
for the moment, because I like to use the kernel hexdump functions to
print my control blocks for debugging:

if (cd->debug & dbg_card_ddcb) {
dev_dbg(&pci_dev->dev, "FINISHED DDCB#%d\n", req->num);
genwqe_hexdump(pci_dev, pddcb, sizeof(*pddcb));
}

Or is there something allowing me to do those hexdumps with the
dynamic_debug feature too? dynamic_hex_dump() looks like what I want.
So let me try to use that and get rid of my own debug support.

>
> thanks,
>
> greg k-h
>

Regards

Frank





\
 
 \ /
  Last update: 2013-12-03 15:21    [W:0.157 / U:1.348 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site