On 4/1/09 9:13 PM, "Raymond Higgs" <[email protected]> wrote:
> Linux on 390 Port <[email protected]> wrote on 04/01/2009 12:55:10 > PM: >> Thus the complete lack of comments in the QDIO code in Linux and the > minimal >> formatting. Just this side of closed-source. > I work on channel firmware. I haven't looked at the zfcp/qeth/cio code, > but I have some experience writing linux device drivers. In my > experiences, I have found that comments in the linux kernel are sparse > everywhere. Are there really less comments in this code than other parts > of the kernel? Yes. There are no comments at all, and the code is visually and logically structured in such a way to give as little information about what it's doing as possible and to make it as difficult to understand as possible. In some ways it looks like it was deliberately obscured in terms of function names, variables, etc. The networking driver in OpenSolaris shares some of the same problems, for what I suspect are a lot of the same -- non-technical -- reasons. Let me be clear: I'm not blaming the folks in the German labs who wrote it -- it was probably the only compromise they could strike with the lawyers to get the source out there -- but boy, is that code hard to follow for something that is essentially setting up a shared memory buffer and managing toggling access to that buffer between the QDIO device and main CPUs using an undocumented instruction. The whole thing seems designed to make understanding what that undocumented instruction does hard, even though there are articles in the publically available IBM Systems Journal that describe it's behavior in detail. It'll be interesting to see if Linux and/or VM TCPIP gets a DIAG2A8 interface driver at some point. If so, a lot of that code ugliness could go away, as that interface IS documented. The other code will probably have to stick around to deal with the run-in-LPAR requirement, though. You know, some day if you're bored, it'd be really cool if all you folks get together and teach DIAG250 how to directly play nice with SCSI, and then all the current QDIO device interfaces would use documented interfaces. Life Would Be Good. But there I go causing trouble again... -- db ---------------------------------------------------------------------- For LINUX-390 subscribe / signoff / archive access instructions, send email to [email protected] with the message: INFO LINUX-390 or visit http://www.marist.edu/htbin/wlvindex?LINUX-390
