Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 02 Sep 2000 19:15:59 +0900
From:      ikob <ikob@koganei.wide.ad.jp>
To:        msmith@FreeBSD.ORG
Cc:        freebsd-hackers@FreeBSD.ORG
Subject:   Re: IEEE1394 driver system for -current 
Message-ID:  <20000902191559C.ikob@koganei.wide.ad.jp>
In-Reply-To: <200008250233.TAA00857@mass.osd.bsdi.com>
References:  <399E5A33.B552E780@koganei.wide.ad.jp> <200008250233.TAA00857@mass.osd.bsdi.com>

next in thread | previous in thread | raw e-mail | index | archive | help

Thanks Mike, and sorry for late responce,

I basically understand your comment. I think the code clean-up
is important befor committing. However, as you pointed out, I
would like to consider structure of my code for according the
treatment of device on -current on going. I basically respect
current structure already implemented and USB experience could
be used for IEEE1394. I have not understood  NEWBUS designe 
architecture and I have watched the architecture in the source
only. (Someonelet me know the pointer!!)

After investigating the archtecture, I will decide the new
structure of IEEE1394.
                                              ikob@koganei.wide.ad.jp


From: Mike Smith <msmith@FreeBSD.ORG>
Subject: Re: IEEE1394 driver system for -current 
Date: Thu, 24 Aug 2000 19:33:02 -0700
Message-ID: <200008250233.TAA00857@mass.osd.bsdi.com>

msmith> 
msmith> There are several things that need to be fixed.  I'm not going to be nice 
msmith> about the code, because it needs some major work before it is ready, but 
msmith> I do think that it is worth using your code (and your skills) in some 
msmith> form.
msmith> 
msmith> 1) The code is very messy.  This makes it hard to read.  It needs to be 
msmith>    reformatted before committing to reduce whitespace/style changes 
msmith>    afterwards.
msmith> 
msmith> 2) There are a lot of "magic numbers" (numeric values for registers and 
msmith>    so forth) rather than defined constants.  This makes it hard to work 
msmith>    out what parts of the code are doing.
msmith> 
msmith> 3) The code lacks structure.  There are some very clear divisions that 
msmith>    should be made between the various components in the 1394 stack, and
msmith>    these are not being made.  Fixing this will involve moving a lot of 
msmith>    code around, and should be done before the code is committed.
msmith> 
msmith>    1394 can be looked at as being quite similar to USB (the predominant 
msmith>    interface model is OHCI, also used for USB).  The obvious software
msmith>    components are:
msmith> 
msmith>     a) Host adapter driver (eg. TI Lynx, NEC, Adaptec, etc.)
msmith>     b) Generic 1394 layer
msmith>     c) Peripheral/protocol driver layer (eg. DV, CAM shim, etc)
msmith>     c') Layered peripheral/protocol driver layer
msmith> 
msmith>    The interface between layers a) and b), and between layers b) and c)
msmith>    and between layers c) and c') should all be clearly defined.  Using
msmith>    newbus and defining these interactions in terms of parent-child 
msmith>    relationships and bus methods will make this very easy.
msmith> 
msmith> Having said so many cruel things about your code, it's clear that you've
msmith> spent a lot of time making your stack work, and during that time you must
msmith> have accumulated a lot of experience with these peripherals.  I understand
msmith> that Warner has proposed you be granted CVS commit access in order to work
msmith> on your code in the FreeBSD CVS repository, and I'm in favour of this.  I
msmith> would, however, like to see the above issues addressed before the initial
msmith> import.
msmith> 
msmith> One option that you might want to consider is working with Bill Paul on 
msmith> the cleanup and restructuring process.  Bill has a lot of experience with 
msmith> network-like peripherals, and with the way in which we like things to be 
msmith> done.  In combination with your experience with 1394 in general, I think 
msmith> this would result in some very good and useful code.  I've already spoken 
msmith> to Bill about this, and he seemed interested.  (Apologies if I'm dumping 
msmith> you in it here, pal. 8)
msmith> 
msmith> In summary, then, I would encourage you to consider the points above, and
msmith> engage in some discussion (either on the -arch list or on a new
msmith> freebsd-1394 list) about how to go about reorganising and cleaning up your
msmith> code ready for committing as soon as practical.
msmith> 
msmith> Regards,
msmith> 
msmith> 


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000902191559C.ikob>