X-MimeOLE: Produced By Microsoft Exchange V6.5
Received: by onstor-exch02.onstor.net 
	id <01C7C00B.6EBAD65D@onstor-exch02.onstor.net>; Fri, 6 Jul 2007 12:22:53 -0800
MIME-Version: 1.0
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
Content-class: urn:content-classes:message
Subject: RE: Please review
Date: Fri, 6 Jul 2007 12:22:50 -0800
Message-ID: <BB375AF679D4A34E9CA8DFA650E2B04E046A88D2@onstor-exch02.onstor.net>
In-Reply-To: <20070705183902.078a1abc@ripper.onstor.net>
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
Thread-Topic: Please review
Thread-Index: Ace/bm6DD98DhQo8SN2V08EmQSZUowAhE/Pw
References: <BB375AF679D4A34E9CA8DFA650E2B04E045C1535@onstor-exch02.onstor.net> <20070705183902.078a1abc@ripper.onstor.net>
From: "Maxim Kozlovsky" <maxim.kozlovsky@onstor.com>
To: "Andy Sharp" <andy.sharp@onstor.com>



>-----Original Message-----
>From: Andy Sharp
>Sent: Thursday, July 05, 2007 6:39 PM
>To: Maxim Kozlovsky
>Subject: Re: Please review
>
>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.
[MK] There must be. What is it?
>
>     line 141
>     #define MGMT_BUTT_ALIGN ALIGN(addr, 32)
[MK] OK
>
>     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.
[MK] Always using virt_to_phys/phys_to_virt does not work for some
reason, probably because what it is calling "phys address" is not
exactly a "phys address" for Linux.
>
>     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.
>
[MK] Because he wrote it originally. I preserved the original style
whenever possible including the Caps, comments, lines going pass the end
of the screen, braces etc.
>
>     line 629
>     ooh, nice use of MV_WRITE
>     there are kernel macros for handling the c0 and cause registers,
>     we can hunt those down.
[MK] I don't think so, this is the inbound message register, the
interpretation is entirely user-defined.
>
>     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
>      */
[MK] OK
>
>
>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.
[MK] Huh?
>
>nfx-tree/code/sm-anpssc/anpssctest.c
>
>     looks good

