[Top] [All Lists]

Re: Submission #3 for S2io 10GbE driver

To: raghavendra.koushik@xxxxxxxxx
Subject: Re: Submission #3 for S2io 10GbE driver
From: Jeff Garzik <jgarzik@xxxxxxxxx>
Date: Mon, 01 Mar 2004 01:53:33 -0500
Cc: leonid.grossman@xxxxxxxx, netdev@xxxxxxxxxxx, shemminger@xxxxxxxx, hch@xxxxxxxxxxxxx, ravinandan.arakali@xxxxxxxx, raghavendra.koushik@xxxxxxxx
In-reply-to: <4223A04BF7D1B941A25246ADD0462FF50115AD10@xxxxxxxxxxxxxxxxxxxx>
References: <4223A04BF7D1B941A25246ADD0462FF50115AD10@xxxxxxxxxxxxxxxxxxxx>
Sender: netdev-bounce@xxxxxxxxxxx
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030703
raghavendra.koushik@xxxxxxxxx wrote:
 Regarding Point # 37

37) kill all of this:

+/*  OS related system calls */
+#ifndef readq
+static inline u64 read64(void *addr)
+       u64 ret = 0;
+       ret = readl(addr + 4);
+       (u64) ret <<= 32;
+       (u64) ret |= readl(addr);


I agree that read/write(32,16,8) are not used so can be eliminated,
but the read/write64 macros are essential because not all platforms
have defined the readq and writeq system calls. i386 for example
doesn't have readq/writeq and to write into the 64 bit registers
of the NIC, I use 2 successive 32 bits (readl/writel) operation to
achieve the 64 bit equivalent. This procedure does work on all the
platforms that we have tested on.

The code should use the kernel API -- readq/writeq -- not define its own API. With regards to the missing readq/writeq on some architectures...

Short term, if some arches do not provide readq/writeq, provide your own definition (i.e. rename your write64 to a conditionally-defined writeq).

Long term, all Linux platforms need to provide readq/writeq, so we need to modify the architectures with the missing pieces.

Confidentiality Notice

The information contained in this electronic message and any attachments to 
this message are intended
for the exclusive use of the addressee(s) and may contain confidential or 
privileged information. If
you are not the intended recipient, please notify the sender at Wipro or 
Mailadmin@xxxxxxxxx immediately
and destroy all copies of this message and any attachments.

Oh really? ;-) You should talk to your lawyers and sysadmins about sending email to open source people and lists...



<Prev in Thread] Current Thread [Next in Thread>
  • Re: Submission #3 for S2io 10GbE driver, Jeff Garzik <=