Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 25c26354 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

Merge branch 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6

* 'irq-upstream' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/misc-2.6:
  [SPARC, XEN, NET/CXGB3] use irq_handler_t where appropriate
  drivers/char/riscom8: clean up irq handling
  isdn/sc: irq handler clean
  isdn/act2000: fix major bug. clean irq handler.
  char/pcmcia/synclink_cs: trim trailing whitespace
  drivers/char/ip2: separate polling and irq-driven work entry points
  drivers/char/ip2: split out irq core logic into separate function
  [NETDRVR] lib82596, netxen: delete pointless tests from irq handler
  Eliminate pointless casts from void* in a few driver irq handlers.
  [PARPORT] Remove unused 'irq' argument from parport irq functions
  [PARPORT] Kill useful 'irq' arg from parport_{generic_irq,ieee1284_interrupt}
  [PARPORT] Consolidate code copies into a single generic irq handler
parents d8581969 7c239975
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -479,7 +479,7 @@ EXPORT_SYMBOL(pdma_areasize);

extern void floppy_hardint(void);

static irqreturn_t (*floppy_irq_handler)(int irq, void *dev_id);
static irq_handler_t floppy_irq_handler;

void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
{
@@ -500,7 +500,7 @@ void sparc_floppy_irq(int irq, void *dev_id, struct pt_regs *regs)
}

int sparc_floppy_request_irq(int irq, unsigned long flags,
			     irqreturn_t (*irq_handler)(int irq, void *))
			     irq_handler_t irq_handler)
{
	floppy_irq_handler = irq_handler;
	return request_fast_irq(irq, floppy_hardint, flags, "floppy");
+2 −2
Original line number Diff line number Diff line
@@ -383,7 +383,7 @@ static void unbind_from_irq(unsigned int irq)
}

int bind_evtchn_to_irqhandler(unsigned int evtchn,
			      irqreturn_t (*handler)(int, void *),
			      irq_handler_t handler,
			      unsigned long irqflags,
			      const char *devname, void *dev_id)
{
@@ -402,7 +402,7 @@ int bind_evtchn_to_irqhandler(unsigned int evtchn,
EXPORT_SYMBOL_GPL(bind_evtchn_to_irqhandler);

int bind_virq_to_irqhandler(unsigned int virq, unsigned int cpu,
			    irqreturn_t (*handler)(int, void *),
			    irq_handler_t handler,
			    unsigned long irqflags, const char *devname, void *dev_id)
{
	unsigned int irq;
+3 −2
Original line number Diff line number Diff line
@@ -1382,8 +1382,9 @@ static inline void rx_data_av_handler (hrz_dev * dev) {

/********** interrupt handler **********/

static irqreturn_t interrupt_handler(int irq, void *dev_id) {
  hrz_dev * dev = (hrz_dev *) dev_id;
static irqreturn_t interrupt_handler(int irq, void *dev_id)
{
  hrz_dev *dev = dev_id;
  u32 int_source;
  unsigned int irq_ok;
  
+45 −24
Original line number Diff line number Diff line
@@ -752,7 +752,7 @@ ip2_loadmain(int *iop, int *irqp, unsigned char *firmware, int firmsize)
					continue;
				rc = request_irq( ip2config.irq[i], ip2_interrupt,
					IP2_SA_FLAGS | (ip2config.type[i] == PCI ? IRQF_SHARED : 0),
					pcName, (void *)&pcName);
					pcName, i2BoardPtrTable[i]);
				if (rc) {
					printk(KERN_ERR "IP2: an request_irq failed: error %d\n",rc);
					ip2config.irq[i] = CIR_POLL;
@@ -1166,26 +1166,10 @@ ip2_interrupt_bh(struct work_struct *work)
/*                                                                            */
/*                                                                            */
/******************************************************************************/
static irqreturn_t
ip2_interrupt(int irq, void *dev_id)
static void
ip2_irq_work(i2eBordStrPtr pB)
{
	int i;
	i2eBordStrPtr  pB;
	int handled = 0;

	ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq );

	/* Service just the boards on the list using this irq */
	for( i = 0; i < i2nBoards; ++i ) {
		pB = i2BoardPtrTable[i];

//		Only process those boards which match our IRQ.
//			IRQ = 0 for polled boards, we won't poll "IRQ" boards

		if ( pB && (pB->i2eUsingIrq == irq) ) {
			handled = 1;
#ifdef USE_IQI

	if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) {
//		Disable his interrupt (will be enabled when serviced)
//		This is mostly to protect from reentrancy.
@@ -1197,18 +1181,55 @@ ip2_interrupt(int irq, void *dev_id)
//		Make sure the immediate queue is flagged to fire.
	}
#else

//	We are using immediate servicing here.  This sucks and can
//	cause all sorts of havoc with ppp and others.  The failsafe
//	check on iiSendPendingMail could also throw a hairball.

	i2ServiceBoard( pB );

#endif /* USE_IQI */
}

static void
ip2_polled_interrupt(void)
{
	int i;
	i2eBordStrPtr  pB;
	const int irq = 0;

	ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, irq );

	/* Service just the boards on the list using this irq */
	for( i = 0; i < i2nBoards; ++i ) {
		pB = i2BoardPtrTable[i];

//		Only process those boards which match our IRQ.
//			IRQ = 0 for polled boards, we won't poll "IRQ" boards

		if ( pB && (pB->i2eUsingIrq == irq) ) {
			ip2_irq_work(pB);
		}
	}

	++irq_counter;

	ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
}

static irqreturn_t
ip2_interrupt(int irq, void *dev_id)
{
	i2eBordStrPtr pB = dev_id;

	ip2trace (ITRC_NO_PORT, ITRC_INTR, 99, 1, pB->i2eUsingIrq );

	ip2_irq_work(pB);

	++irq_counter;

	ip2trace (ITRC_NO_PORT, ITRC_INTR, ITRC_RETURN, 0 );
	return IRQ_RETVAL(handled);
	return IRQ_HANDLED;
}

/******************************************************************************/
@@ -1231,7 +1252,7 @@ ip2_poll(unsigned long arg)
	// Just polled boards, IRQ = 0 will hit all non-interrupt boards.
	// It will NOT poll boards handled by hard interrupts.
	// The issue of queued BH interrups is handled in ip2_interrupt().
	ip2_interrupt(0, NULL);
	ip2_polled_interrupt();

	PollTimer.expires = POLL_TIMEOUT;
	add_timer( &PollTimer );
+2 −2
Original line number Diff line number Diff line
@@ -267,9 +267,9 @@ static ssize_t pp_write (struct file * file, const char __user * buf,
	return bytes_written;
}

static void pp_irq (int irq, void * private)
static void pp_irq (void *private)
{
	struct pp_struct * pp = (struct pp_struct *) private;
	struct pp_struct *pp = private;

	if (pp->irqresponse) {
		parport_write_control (pp->pdev->port, pp->irqctl);
Loading