Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Pete Popov <ppopov@mvista.com>
To: Hartvig Ekner <hartvig@ekner.info>
Cc: Linux MIPS mailing list <linux-mips@linux-mips.org>
Subject: Re: Patches for Au1000: PCI int problem, DB1500 board reset & ethernet
Date: 13 Mar 2003 14:45:38 -0800	[thread overview]
Message-ID: <1047595537.819.131.camel@zeus.mvista.com> (raw)
In-Reply-To: <3E70E52E.B6FF1C2A@ekner.info>

On Thu, 2003-03-13 at 12:08, Hartvig Ekner wrote:
> Hi,
> 
> The first patch below fixes interrupt setup for DB1500. The PCI interrupts 
> were polarized wrongly, causing a deadlock when used.

Applied. Thanks for catching that one. I had tested the Db1500 pci slot
with a graphics card. I guess the interrupt handling doesn't get tested
with a frame buffer driver :)

> The second patch adds board reset using HW register for DB1500.

I want to see if this is applicable to all Db boards before checking it
in.

> The third patch reverses interrupt handling order for RX & TX to 
> minimize packet loss in high-load situations.

Applied. Though I wonder about the performance when the target is
transmitting heavily vs receiving.

Pete

> 
> /Hartvig
> 
> 
> 
> ______________________________________________________________________
> 
> Index: irq.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/common/irq.c,v
> retrieving revision 1.11.2.14
> diff -u -r1.11.2.14 irq.c
> --- irq.c	26 Feb 2003 21:14:24 -0000	1.11.2.14
> +++ irq.c	13 Mar 2003 19:45:57 -0000
> @@ -430,14 +430,10 @@
>  			case AU1000_IRDA_RX_INT:
>  
>  			case AU1000_MAC0_DMA_INT:
> -#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_DB1500)
> -			case AU1000_MAC1_DMA_INT:
> -#endif
> -#ifdef CONFIG_MIPS_PB1500
> +#if defined(CONFIG_MIPS_PB1000) || defined(CONFIG_MIPS_DB1000) || defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_DB1500)
>  			case AU1000_MAC1_DMA_INT:
>  #endif
>  			case AU1500_GPIO_204:
> -
>  				setup_local_irq(i, INTC_INT_HIGH_LEVEL, 0);
>  				irq_desc[i].handler = &level_irq_type;
>  				break;
> @@ -446,7 +442,7 @@
>  			case AU1000_GPIO_15:
>  #endif
>  		        case AU1000_USB_HOST_INT:
> -#ifdef CONFIG_MIPS_PB1500
> +#if defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_DB1500)
>  			case AU1000_PCI_INTA:
>  			case AU1000_PCI_INTB:
>  			case AU1000_PCI_INTC:
> @@ -488,9 +484,9 @@
>  			case AU1000_RTC_MATCH0_INT:
>  			case AU1000_RTC_MATCH1_INT:
>  			case AU1000_RTC_MATCH2_INT:
> -			        setup_local_irq(i, INTC_INT_RISE_EDGE, 0);
> -                                irq_desc[i].handler = &rise_edge_irq_type;
> -                                break;
> +				setup_local_irq(i, INTC_INT_RISE_EDGE, 0);
> +				irq_desc[i].handler = &rise_edge_irq_type;
> +				break;
>  
>  				 // Careful if you change match 2 request!
>  				 // The interrupt handler is called directly
> 
> ______________________________________________________________________
> 
> Index: reset.c
> ===================================================================
> RCS file: /home/cvs/linux/arch/mips/au1000/common/reset.c,v
> retrieving revision 1.2.2.8
> diff -u -r1.2.2.8 reset.c
> --- reset.c	11 Dec 2002 06:12:29 -0000	1.2.2.8
> +++ reset.c	13 Mar 2003 19:46:03 -0000
> @@ -111,15 +111,13 @@
>  	set_c0_config(CONF_CM_UNCACHED);
>  	flush_cache_all();
>  	write_c0_wired(0);
> - 
> -#ifdef CONFIG_MIPS_PB1500
> -	au_writel(0x00000000, 0xAE00001C);
> -#endif
>  
> -#ifdef CONFIG_MIPS_PB1100
> +#if defined(CONFIG_MIPS_PB1500) || defined(CONFIG_MIPS_PB1100) || defined(CONFIG_MIPS_DB1500)
> +	/* Do a HW reset if the board can do it */
> +
>  	au_writel(0x00000000, 0xAE00001C);
>  #endif
> - 
> +
>  	__asm__ __volatile__("jr\t%0"::"r"(0xbfc00000));
>  }
>  
> 
> ______________________________________________________________________
> 
> Index: au1000_eth.c
> ===================================================================
> RCS file: /home/cvs/linux/drivers/net/au1000_eth.c,v
> retrieving revision 1.5.2.15
> diff -u -r1.5.2.15 au1000_eth.c
> --- au1000_eth.c	3 Mar 2003 06:40:30 -0000	1.5.2.15
> +++ au1000_eth.c	13 Mar 2003 20:01:51 -0000
> @@ -1414,8 +1414,11 @@
>  		printk(KERN_ERR "%s: isr: null dev ptr\n", dev->name);
>  		return;
>  	}
> -	au1000_tx_ack(dev);
> +
> +	/* Handle RX interrupts first to minimize chance of overrun */
> +
>  	au1000_rx(dev);
> +	au1000_tx_ack(dev);
>  }
>  
> 

  reply	other threads:[~2003-03-13 22:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-13 20:08 Patches for Au1000: PCI int problem, DB1500 board reset & ethernet Hartvig Ekner
2003-03-13 22:45 ` Pete Popov [this message]
2003-03-13 22:50 ` Pete Popov

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=1047595537.819.131.camel@zeus.mvista.com \
    --to=ppopov@mvista.com \
    --cc=hartvig@ekner.info \
    --cc=linux-mips@linux-mips.org \
    /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