public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
* Ethernet issue in most recent git?
@ 2006-01-19 17:49 Dirk Behme
  2006-01-19 18:11 ` Anderson Briglia
  2006-01-19 18:12 ` Tony Lindgren
  0 siblings, 2 replies; 7+ messages in thread
From: Dirk Behme @ 2006-01-19 17:49 UTC (permalink / raw)
  To: linux-omap-open-source

Hi,

has anybody else problems with ethernet with 2.6.16-rc1-omap1 on OSK?

# mount -t nfs -o nolock 192.0.0.1:/home/omap_linux/nfs /mnt/nfs
NETDEV WATCHDOG: eth0: transmit timed out
mount: RPC: Unable to receive; errno = No route to host
mount: nfsmount failed: Bad file descriptor
mount: Mounting 192.0.0.1:/home/omap_linux/nfs on /mnt/nfs failed: 
Invalid argument
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:0E:99:02:02:42
           inet addr:192.0.0.2  Bcast:192.0.0.255  Mask:255.255.255.0
           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
           TX packets:20 errors:1 dropped:0 overruns:0 carrier:1
           collisions:0 txqueuelen:1000
           RX bytes:0 (0.0 B)  TX bytes:840 (840.0 B)
           Interrupt:160 Base address:0x1300 DMA chan:ff
# cat /proc/interrupts
            CPU0
...
160:          1   eth0
...
Err:          0

Telnet and ping don't work as well. I imagine that I doesn't change any 
configuration, only kernel update form git. UBoots tftpboot works quite 
well.

Regards

Dirk

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet issue in most recent git?
  2006-01-19 17:49 Ethernet issue in most recent git? Dirk Behme
@ 2006-01-19 18:11 ` Anderson Briglia
  2006-01-19 19:48   ` Tony Lindgren
  2006-01-19 18:12 ` Tony Lindgren
  1 sibling, 1 reply; 7+ messages in thread
From: Anderson Briglia @ 2006-01-19 18:11 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source

Dirk Behme wrote:
> Hi,
> 
> has anybody else problems with ethernet with 2.6.16-rc1-omap1 on OSK?
> 
> # mount -t nfs -o nolock 192.0.0.1:/home/omap_linux/nfs /mnt/nfs
> NETDEV WATCHDOG: eth0: transmit timed out
> mount: RPC: Unable to receive; errno = No route to host
> mount: nfsmount failed: Bad file descriptor
> mount: Mounting 192.0.0.1:/home/omap_linux/nfs on /mnt/nfs failed:
> Invalid argument
> # ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:0E:99:02:02:42
>           inet addr:192.0.0.2  Bcast:192.0.0.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:20 errors:1 dropped:0 overruns:0 carrier:1
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:840 (840.0 B)
>           Interrupt:160 Base address:0x1300 DMA chan:ff
> # cat /proc/interrupts
>            CPU0
> ...
> 160:          1   eth0
> ...
> Err:          0
> 
> Telnet and ping don't work as well. I imagine that I doesn't change any
> configuration, only kernel update form git. UBoots tftpboot works quite
> well.

I tested here and I had the same problems on H2 and OSK as well.

Regards,

Anderson Briglia
INdT - Manaus

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet issue in most recent git?
  2006-01-19 17:49 Ethernet issue in most recent git? Dirk Behme
  2006-01-19 18:11 ` Anderson Briglia
@ 2006-01-19 18:12 ` Tony Lindgren
  2006-01-19 20:12   ` Dirk Behme
  1 sibling, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2006-01-19 18:12 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source

Hi,

* Dirk Behme <dirk.behme@de.bosch.com> [060119 09:55]:
> Hi,
> 
> has anybody else problems with ethernet with 2.6.16-rc1-omap1 on OSK?
> 
> # mount -t nfs -o nolock 192.0.0.1:/home/omap_linux/nfs /mnt/nfs
> NETDEV WATCHDOG: eth0: transmit timed out
> mount: RPC: Unable to receive; errno = No route to host
> mount: nfsmount failed: Bad file descriptor
> mount: Mounting 192.0.0.1:/home/omap_linux/nfs on /mnt/nfs failed: 
> Invalid argument
> # ifconfig
> eth0      Link encap:Ethernet  HWaddr 00:0E:99:02:02:42
>           inet addr:192.0.0.2  Bcast:192.0.0.255  Mask:255.255.255.0
>           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
>           RX packets:0 errors:0 dropped:0 overruns:0 frame:0
>           TX packets:20 errors:1 dropped:0 overruns:0 carrier:1
>           collisions:0 txqueuelen:1000
>           RX bytes:0 (0.0 B)  TX bytes:840 (840.0 B)
>           Interrupt:160 Base address:0x1300 DMA chan:ff
> # cat /proc/interrupts
>            CPU0
> ...
> 160:          1   eth0
> ...
> Err:          0
> 
> Telnet and ping don't work as well. I imagine that I doesn't change any 
> configuration, only kernel update form git. UBoots tftpboot works quite 
> well.

Same problem here. I'd assume it's the recent "IRQ type flags" patch
that does not work properly for omap gpio interrupts.

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet issue in most recent git?
  2006-01-19 18:11 ` Anderson Briglia
@ 2006-01-19 19:48   ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2006-01-19 19:48 UTC (permalink / raw)
  To: Anderson Briglia; +Cc: linux-omap-open-source

* Anderson Briglia <anderson.briglia@indt.org.br> [060119 11:38]:
> Dirk Behme wrote:
> > 
> > Telnet and ping don't work as well. I imagine that I doesn't change any
> > configuration, only kernel update form git. UBoots tftpboot works quite
> > well.
> 
> I tested here and I had the same problems on H2 and OSK as well.

Nfsroot seems to work on H4 though.

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet issue in most recent git?
  2006-01-19 18:12 ` Tony Lindgren
@ 2006-01-19 20:12   ` Dirk Behme
  2006-01-19 21:58     ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Dirk Behme @ 2006-01-19 20:12 UTC (permalink / raw)
  To: Tony Lindgren; +Cc: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 1560 bytes --]

Tony Lindgren wrote:
>>Telnet and ping don't work as well. I imagine that I doesn't change any 
>>configuration, only kernel update form git. UBoots tftpboot works quite 
>>well.
> 
> Same problem here. I'd assume it's the recent "IRQ type flags" patch
> that does not work properly for omap gpio interrupts.

Thanks for the hint! Please try quick hack for OSK ethernet in the
attachment.

With

-- cut --
[PATCH] IRQ type flags
/include/asm-arm/irq.h
blob:59975ee43cf139138503288801c7d8758dada859 ->
blob:7772432d3fd7750506943eaf88ea7eda9e720a7d
--- include/asm-arm/irq.h
+++ include/asm-arm/irq.h
@@ -25,10 +25,14 @@ extern void disable_irq_nosync(unsigned
extern void disable_irq(unsigned int);
extern void enable_irq(unsigned int);
-#define __IRQT_FALEDGE (1 << 0)
-#define __IRQT_RISEDGE (1 << 1)
-#define __IRQT_LOWLVL (1 << 2)
-#define __IRQT_HIGHLVL (1 << 3)
+/*
+ * These correspond with the SA_TRIGGER_* defines, and therefore the
+ * IRQRESOURCE_IRQ_* defines.
+ */
+#define __IRQT_RISEDGE (1 << 0)
+#define __IRQT_FALEDGE (1 << 1)
+#define __IRQT_HIGHLVL (1 << 2)
+#define __IRQT_LOWLVL (1 << 3)
#define IRQT_NOEDGE (0)
#define IRQT_RISING (__IRQT_RISEDGE)
-- cut --

http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blobdiff;h=7772432d3fd7750506943eaf88ea7eda9e720a7d;hp=59975ee43cf139138503288801c7d8758dada859;hb=9ded96f24c3a5fcbef954e88c443385a1af37eb9;f=include/asm-arm/irq.h

the meaning of __IRQT_RISEDGE and __IRQT_FALEDGE was inverted :( So I
think we have to exchange _all_ places in OMAP code where these are used?

Dirk



[-- Attachment #2: osk_ethernet_quick_hack.patch --]
[-- Type: text/plain, Size: 548 bytes --]

--- ./arch/arm/plat-omap/gpio.c_orig	2006-01-19 20:32:07.709178640 +0100
+++ ./arch/arm/plat-omap/gpio.c	2006-01-19 20:58:59.275183368 +0100
@@ -448,8 +448,11 @@ static int _set_gpio_triggering(struct g
 		/* We allow only edge triggering, i.e. two lowest bits */
 		if (trigger & ~IRQT_BOTHEDGE)
 			BUG();
-		/* NOTE: knows __IRQT_{FAL,RIS}EDGE match OMAP hardware */
 		trigger &= 0x03;
+		if(trigger == 0x01)
+			trigger = 0x02;
+		else
+			trigger = 0x01;
 		l = __raw_readl(reg);
 		l &= ~(3 << (gpio << 1));
 		l |= trigger << (gpio << 1);


[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet issue in most recent git?
  2006-01-19 20:12   ` Dirk Behme
@ 2006-01-19 21:58     ` Tony Lindgren
  2006-01-19 23:21       ` Tony Lindgren
  0 siblings, 1 reply; 7+ messages in thread
From: Tony Lindgren @ 2006-01-19 21:58 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source

* Dirk Behme <dirk.behme@de.bosch.com> [060119 12:13]:
> Tony Lindgren wrote:
> >>Telnet and ping don't work as well. I imagine that I doesn't change any 
> >>configuration, only kernel update form git. UBoots tftpboot works quite 
> >>well.
> >
> >Same problem here. I'd assume it's the recent "IRQ type flags" patch
> >that does not work properly for omap gpio interrupts.
> 
> Thanks for the hint! Please try quick hack for OSK ethernet in the
> attachment.
> 
> With
> 
> -- cut --
> [PATCH] IRQ type flags
> /include/asm-arm/irq.h
> blob:59975ee43cf139138503288801c7d8758dada859 ->
> blob:7772432d3fd7750506943eaf88ea7eda9e720a7d
> --- include/asm-arm/irq.h
> +++ include/asm-arm/irq.h
> @@ -25,10 +25,14 @@ extern void disable_irq_nosync(unsigned
> extern void disable_irq(unsigned int);
> extern void enable_irq(unsigned int);
> -#define __IRQT_FALEDGE (1 << 0)
> -#define __IRQT_RISEDGE (1 << 1)
> -#define __IRQT_LOWLVL (1 << 2)
> -#define __IRQT_HIGHLVL (1 << 3)
> +/*
> + * These correspond with the SA_TRIGGER_* defines, and therefore the
> + * IRQRESOURCE_IRQ_* defines.
> + */
> +#define __IRQT_RISEDGE (1 << 0)
> +#define __IRQT_FALEDGE (1 << 1)
> +#define __IRQT_HIGHLVL (1 << 2)
> +#define __IRQT_LOWLVL (1 << 3)
> #define IRQT_NOEDGE (0)
> #define IRQT_RISING (__IRQT_RISEDGE)

Ah, that explains!

> 
> http://source.mvista.com/git/gitweb.cgi?p=linux-omap-2.6.git;a=blobdiff;h=7772432d3fd7750506943eaf88ea7eda9e720a7d;hp=59975ee43cf139138503288801c7d8758dada859;hb=9ded96f24c3a5fcbef954e88c443385a1af37eb9;f=include/asm-arm/irq.h
> 
> the meaning of __IRQT_RISEDGE and __IRQT_FALEDGE was inverted :( So I
> think we have to exchange _all_ places in OMAP code where these are used?

We should be able to just remap them in gpio.c. I believe there's a note
there somewhere saying that by coincidence the bits are the same in omap
hw as in irq.h...

Tony

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: Ethernet issue in most recent git?
  2006-01-19 21:58     ` Tony Lindgren
@ 2006-01-19 23:21       ` Tony Lindgren
  0 siblings, 0 replies; 7+ messages in thread
From: Tony Lindgren @ 2006-01-19 23:21 UTC (permalink / raw)
  To: Dirk Behme; +Cc: linux-omap-open-source

[-- Attachment #1: Type: text/plain, Size: 478 bytes --]

* Tony Lindgren <tony@atomide.com> [060119 14:08]:
> * Dirk Behme <dirk.behme@de.bosch.com> [060119 12:13]:
> > 
> > the meaning of __IRQT_RISEDGE and __IRQT_FALEDGE was inverted :( So I
> > think we have to exchange _all_ places in OMAP code where these are used?
> 
> We should be able to just remap them in gpio.c. I believe there's a note
> there somewhere saying that by coincidence the bits are the same in omap
> hw as in irq.h...

I'll push the following patch today:



[-- Attachment #2: patch-gpio-irqtype --]
[-- Type: text/plain, Size: 697 bytes --]

diff --git a/arch/arm/plat-omap/gpio.c b/arch/arm/plat-omap/gpio.c
index efba093..cf5ad29 100644
--- a/arch/arm/plat-omap/gpio.c
+++ b/arch/arm/plat-omap/gpio.c
@@ -448,11 +448,14 @@ static int _set_gpio_triggering(struct g
 		/* We allow only edge triggering, i.e. two lowest bits */
 		if (trigger & ~IRQT_BOTHEDGE)
 			BUG();
-		/* NOTE: knows __IRQT_{FAL,RIS}EDGE match OMAP hardware */
-		trigger &= 0x03;
 		l = __raw_readl(reg);
 		l &= ~(3 << (gpio << 1));
-		l |= trigger << (gpio << 1);
+		if (trigger == IRQT_RISING)
+			l |= 2 << gpio;
+		else if (trigger == IRQT_FALLING)
+			l |= 1 << gpio;
+		else
+			goto bad;
 		break;
 	case METHOD_GPIO_730:
 		reg += OMAP730_GPIO_INT_CONTROL;

[-- Attachment #3: Type: text/plain, Size: 0 bytes --]



^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2006-01-19 23:21 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-19 17:49 Ethernet issue in most recent git? Dirk Behme
2006-01-19 18:11 ` Anderson Briglia
2006-01-19 19:48   ` Tony Lindgren
2006-01-19 18:12 ` Tony Lindgren
2006-01-19 20:12   ` Dirk Behme
2006-01-19 21:58     ` Tony Lindgren
2006-01-19 23:21       ` Tony Lindgren

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox