Re: About Interrupts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Mar 08, 2005 at 03:50:46PM +0530, Dhanashri Bhate wrote:
> > You can't randomly free interrupts, and you're certainly not supposed
> > to free interrupts when you just *enabled* the interrupt source on the
> > device.
> 
> right, will change this. but can i replace the existing driver by
> doing this?  i mean, free irq -> then request irq -> enable
> interrupts

Each driver must request_irq() and free_irq() its own interrupt. IOW:
if the serial driver is unloaded, the interrupt is free. Besides,
you're supposed to call free_irq() with a pointer to your own device
structure, not a NULL pointer.

> > > Another program that polls COM1 works fine. 
> >
> > Two drivers competing for the same piece of hardware, that's a recipe
> > for disaster. Remove the standard serial module and retry your own
> > module.
> 
> i was trying to read COM1 by 2 ways, by polling COM port which works
> fine.  The interrupt driven is not.

First of all, fix the request_irq()/free_irq() mess. Then figure out if
you get interrupts at all. If that's all ok, check the irq handling and
if your bottom half is called at all.

> these two are not loaded at the same time, I am loading only one of
> these at a time.

Good.

> so i guess i'm not able to disable the standard COM1 irq handler?

"rmmod 8250" does the trick over here. (IIRC the module is called
"serial" in linux-2.4).


Erik

-- 
Erik Mouw
J.A.K.Mouw@xxxxxxxxxxxxxx  mouw@xxxxxxxxxxxx

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux