public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Nishanth Aravamudan <nacc@us.ibm.com>
To: Mark Gross <mgross@linux.intel.com>
Cc: "Bouchard, Sebastien" <Sebastien.Bouchard@ca.kontron.com>,
	"'linux-kernel@vger.kernel.org'" <linux-kernel@vger.kernel.org>,
	"Lorenzini, Mario" <mario.lorenzini@ca.kontron.com>,
	mark.gross@intel.com
Subject: Re: Patch of a new driver for kernel 2.4.x that need review
Date: Tue, 9 Aug 2005 10:51:08 -0700	[thread overview]
Message-ID: <20050809175108.GB2766@us.ibm.com> (raw)
In-Reply-To: <200508090956.27686.mgross@linux.intel.com>

On 09.08.2005 [09:56:27 -0700], Mark Gross wrote:
> On Monday 08 August 2005 08:35, Mark Gross wrote:
> > On Wednesday 06 July 2005 14:14, Mark Gross wrote:
> > > On Wednesday 22 June 2005 08:12, Bouchard, Sebastien wrote:
> > > > Hi,
> > > >
> > > > Here is a driver (only for 2.4.x) I've done to provide support
> > > > of a hardware module (available on some ATCA board) used with
> > > > telecom expension card on the new ATCA platform. This module
> > > > provide redundant reference clock for telecom hardware with
> > > > alarm handling when there is a new event (ex.: one of the ref
> > > > clock is gone).  This char driver provide IOCTL for
> > > > configuration of this module and interrupt handler for
> > > > processing alarm events.
> > > >
> > > > I send this driver so people in this mailing list can do a
> > > > review of the code.
> > > >
> > > > Please reply me directly to my email, i'm not subscribed to the
> > > > mailing list.
> > > >
> > > > Thanks
> > > > Sebastien Bouchard
> > > > Software designer
> > > > Kontron Canada Inc.
> > > > <mailto:sebastien.bouchard@ca.kontron.com>
> > > > <http://www.kontron.com/>
> > > 
> > > I'm helping out a bit with the maintaining of this driver for
> > > Sebastien.   The following is a 2.6.12 port of Sebastien's 2.4
> > > driver.  
> > > 
> > > --mgross
> > 
> > The following is an update to the earlier 2.6 driver that uses a
> > sysfs interface to implement the IOCTL functions.  I put the
> > attributes under /sys/class/misc/tlclk.
> > 
> > I can't say I'm a believer in the "goodness" of using sysfs over the
> > IOCTL's, as it added quite a bit of code bloat to this driver, but
> > hay it should work well enough anyway.
> > 
> > Also, note this device, is accessed / controlled via the FPGA on the
> > ATCA, its function is to synchronize signaling hardware across
> > blades in an ATCA Chassis.  It tends to not talk to the OS. 
> > 
> > Please tell me what you think :)
> Again but with email word wrap turned off :(
> Also fixes my miss use of kcalloc parameter list.

<snip>

> diff -urN -X dontdiff linux-2.6.12.3/drivers/char/tlclk.c linux-2.6.12.3-tlclk/drivers/char/tlclk.c
> --- linux-2.6.12.3/drivers/char/tlclk.c 1969-12-31 16:00:00.000000000 -0800
> +++ linux-2.6.12.3-tlclk/drivers/char/tlclk.c 2005-08-09 09:37:58.000000000 -0700

<snip>

> +irqreturn_t tlclk_interrupt(int irq, void *dev_id, struct pt_regs *regs)

<snip>

> +  switchover_timer.expires = jiffies + 1; /* TIMEOUT in ~10ms */

This is not a 10 millisecond timeout, it is a 1 jiffy timeout. Yes, in
2.4, where HZ=100 by default, or in 2.6 with CONFIG_HZ set to 100, that
corresponds to 10 millseconds (or so ;), but not with HZ=250 or 1000. I
think you want:

switchover_timer.expires = jiffies + msecs_to_jiffies(10);

which will handle rounding correctly.

Also, consider using TIMER_INITIALIZER() for setting these timer fields.

<snip>

Thanks,
Nish

  reply	other threads:[~2005-08-09 17:51 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-22 15:12 Patch of a new driver for kernel 2.4.x that need review Bouchard, Sebastien
2005-06-22 19:43 ` Pekka Enberg
2005-06-22 20:32   ` Willy Tarreau
2005-06-22 20:59     ` Bill Gatliff
2005-06-22 21:58       ` Willy Tarreau
2005-06-23  4:58       ` Pekka Enberg
2005-06-23  4:16     ` Pekka J Enberg
2005-06-23  4:49       ` Willy Tarreau
2005-07-06 21:11         ` Mark Gross
2005-07-07  6:00           ` Pekka J Enberg
2005-07-07  6:50             ` Dmitry Torokhov
2005-07-07  6:55               ` Pekka J Enberg
2005-07-07  7:13                 ` Dmitry Torokhov
2005-07-07  7:43                   ` Pekka J Enberg
2005-07-07  6:10           ` Pekka J Enberg
2005-06-22 20:04 ` Pekka Enberg
2005-06-23 21:42   ` Alan Cox
2005-06-22 21:18 ` Jesper Juhl
2005-07-06 21:14 ` Mark Gross
2005-07-06 22:49   ` randy_dunlap
2005-07-06 22:57   ` Greg KH
2005-08-08 15:35   ` Mark Gross
2005-08-09  7:17     ` Pekka Enberg
2005-08-09 16:56     ` Mark Gross
2005-08-09 17:51       ` Nishanth Aravamudan [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-07-07  8:15 moreau francis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050809175108.GB2766@us.ibm.com \
    --to=nacc@us.ibm.com \
    --cc=Sebastien.Bouchard@ca.kontron.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mario.lorenzini@ca.kontron.com \
    --cc=mark.gross@intel.com \
    --cc=mgross@linux.intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox