AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:<20070705183851.3eefae58@ripper.onstor.net>
CFG:
PT:0
S:andy.sharp@onstor.com
RQ:
SSV:onstor-exch02.onstor.net
NSV:
SSH:
R:<maxim.kozlovsky@onstor.com>
MAID:1
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/andys@onstor.net@onstor-exch02.onstor.net/INBOX	0	BB375AF679D4A34E9CA8DFA650E2B04E045C1535@onstor-exch02.onstor.net
X-Sylpheed-End-Special-Headers: 1
Date: Thu, 5 Jul 2007 18:39:02 -0700
From: Andrew Sharp <andy.sharp@onstor.com>
To: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
Subject: Re: Please review
Message-ID: <20070705183902.078a1abc@ripper.onstor.net>
In-Reply-To: <BB375AF679D4A34E9CA8DFA650E2B04E045C1535@onstor-exch02.onstor.net>
References: <BB375AF679D4A34E9CA8DFA650E2B04E045C1535@onstor-exch02.onstor.net>
Organization: Onstor
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

On Mon, 2 Jul 2007 18:02:40 -0700 "Maxim Kozlovsky"
<maxim.kozlovsky@onstor.com> wrote:

> Change 24434 by maximk@maximk-5 on 2007/07/02 17:57:22 *pending*
> 
>         mgmtbus port to linux. fragmentation support.
> 
> Affected files ...
> 
> ...
> //depot/cougar/linux/kernel/linux-mips-2.6/drivers/ssc-mgmt-bus/mgmt-bus
> .c#1 edit
> ...
> //depot/cougar/linux/kernel/linux-mips-2.6/drivers/ssc-mgmt-bus/mgmt-bus
> .h#1 add
> ...
> //depot/cougar/linux/kernel/linux-mips-2.6/include/net/neteee/edesc.h#1
> add
> ...
> //depot/cougar/linux/kernel/linux-mips-2.6/include/net/neteee/eee.h#2
> edit
> ... //depot/cougar/linux/kernel/linux-mips-2.6/net/neteee/neteee.c#2
> edit
> ... //depot/cougar/nfx-tree/code/sm-anpssc/anpssctest.c#1 edit
> 

linux/kernel/linux-mips-2.6/drivers/ssc-mgmt-bus/mgmt-bus.c

     we need to review some of these files together, this one is a
     candidate for that, but here is some low hanging fruit:

     line 133
     what is Mips_IOSyncDCache?  there are standard kernel functions
for this.

     line 141
     #define MGMT_BUTT_ALIGN ALIGN(addr, 32)

     line 151
     why do you need the qualifiers?  virt-to-phys and phys-to-virt
     should work fine no matter what.   i thought this was all done with a
     PCI driver anyway.  That's what you said when I asked you if the
     mgmt_bus driver used these shared memory areas.

     line 166
     ah, very dangerous to link to my Piece of #@!^@!#%&! allocation
     routine!!

     line 184, 186, 247, 376
     no Studly Caps, PlEaSe
     btw, why does tim get the blame for all these functions? ~:^)

     line 537, 543, etc
     consistent commenting style?  except for debugging code which will
     eventually be deleted, C++ commenting should not be used.

     line 544
     wtf is up with this brace?  wow.  there are a bunch of these.  tim
     has obviously been here trying to foist this grotesque abomination on
     us all.

     line 629
     ooh, nice use of MV_WRITE
     there are kernel macros for handling the c0 and cause registers,
     we can hunt those down.

     all the functions which don't have comments need to have comments
     added above them.  i don't give a !@#% about using some template,
     but you can if you want.  i care that the style is kernel style so it
     doesn't look like 10 different people wrote this spaghetti code.

     pretty good first cut of this driver, i must say.

linux/kernel/linux-mips-2.6/drivers/ssc-mgmt-bus/mgmt-bus.h

     >>add linux/kernel/linux-mips-2.6/drivers/ssc-mgmt-bus/mgmt-bus.h

     fix all the trailing whitespace, and no, this is not an approved
     style:

     typedef struct
     {
     	...
     } foo_eatme_t;

     In fact, we should not be using typedef struct anyway, it's really
     monkey spank microsoft donkey coding.  simply define the
     structure(s), and declare variables to be struct foo.  typedefs are a
     useless form of obfuscation that leads to confusion and long
     maintenance periods. they also compile _really_ slowly.

     fix the comment style please! thank you!

     line 64
     excellent

linux/kernel/linux-mips-2.6/include/net/neteee/edesc.h

     >>add linux/kernel/linux-mips-2.6/include/net/neteee/edesc.h

     fix the #!^!#$%! trailing whitespace....

     comments are

     /*
      * foo
      */


linux/kernel/linux-mips-2.6/include/net/neteee/eee.h

     looks good

linux/kernel/linux-mips-2.6/net/neteee/neteee.c

     line 47
     hmm, just trying to mess with the c-preprocessor?

     line 746
     since you're just copying the data into and outa skb's, why not use
     uncached addresses exclusively for share memory regions?  unless
     there are some places where we just add a pointer into a structure,
     but that is dangerous so i hope we aren't doing that.

nfx-tree/code/sm-anpssc/anpssctest.c

     looks good

