Modify

Opened 10 years ago

Closed 10 years ago

#2461 closed defect (fixed)

r9088 AR7 on Netgear DG834G v2 is broken

Reported by: nabcore Owned by: ejka
Priority: high Milestone: Kamikaze 8.09 RC1
Component: kernel Version:
Keywords: ar7 Cc:

Description

[42949372.960000] Linux version 2.6.22.4 (user@host) (gcc version 4.1.2) #1 Mon Oct 1 23:14:51 BST 2007
[42949372.960000] CPU revision is: 00018448
[42949372.960000] TI AR7 (TNETD7300), ID: 0x0005, Revision: 0x02
[42949372.960000] Determined physical RAM map:
[42949372.960000]  memory: 01000000 @ 14000000 (usable)
[42949372.960000] Built 1 zonelists.  Total pages: 4064
[42949372.960000] Kernel command line: init=/etc/preinit rootfstype=squashfs,jffs2 console=ttyS0,115200n8
[42949372.960000] Primary instruction cache 16kB, physically tagged, 4-way, linesize 16 bytes.
[42949372.960000] Primary data cache 16kB, 4-way, linesize 16 bytes.
[42949372.960000] Synthesized TLB refill handler (20 instructions).
[42949372.960000] Synthesized TLB load handler fastpath (32 instructions).
[42949372.960000] Synthesized TLB store handler fastpath (32 instructions).
[42949372.960000] Synthesized TLB modify handler fastpath (31 instructions).
[42949372.960000] PID hash table entries: 64 (order: 6, 256 bytes)
[42949372.960000] Using 75.000 MHz high precision timer.
[42949372.960000] Dentry cache hash table entries: 2048 (order: 1, 8192 bytes)
[42949372.970000] Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
[42949373.000000] Memory: 12572k/16384k available (1996k kernel code, 3812k reserved, 424k data, 104k init, 0k highmem)
[42949373.220000] Mount-cache hash table entries: 512
[42949373.230000] NET: Registered protocol family 16
[42949373.280000] vlynq0: regs 0x08611800, irq 29, mem 0x04000000
[42949373.290000] vlynq1: regs 0x08611c00, irq 33, mem 0x0c000000
[42949373.440000] vlynq-pci: attaching device TI TNETW1130 at vlynq0
...hang....

I'm putting money on this being caused by r9086

Attachments (1)

bootlog (1.4 KB) - added by brian at rapsure.net 10 years ago.
The boot log for the Actiontec GT701. This modem stops at the same spot as the Dlink.

Download all attachments as: .zip

Change History (11)

comment:1 Changed 10 years ago by nabcore

Attempting:

dev->divisor = vlynq_ldiv{1,2,3} 

in vlynq-pci.c

They all boot!

comment:2 Changed 10 years ago by brian at rapsure.net

This is also occurring with me as well on the Actiontec GT701.

comment:3 Changed 10 years ago by nico

Can you attach a build log as well?
Thanks!

comment:4 Changed 10 years ago by nico

I meant a boot log, sorry...

comment:5 Changed 10 years ago by nabcore

Trying some experiments:

With the following mods in
/scratch/openwrt/trunk/build_dir/linux-ar7/linux-2.6.22.4/arch/mips/ar7/vlynq.c

int vlynq_linked(struct vlynq_device *dev)
{
        int i;

        for (i = 0; i < 10000; i++)
                if (vlynq_reg_read(dev->local->status) & VLYNQ_STATUS_LINK)
                        return 1;
                else
                        cpu_relax();

        return 0;
}

and printk()s here

        case vlynq_div_auto:
                /* First try locally supplied clock */
                vlynq_reg_write(dev->remote->control, 0);
                for (i = vlynq_ldiv1; i <= vlynq_ldiv8; i++) {
                        printk("Attempting using local clock divisor %d\n", i);
                        vlynq_reg_write(dev->local->control,
                                        VLYNQ_CTRL_CLOCK_INT |
                                        VLYNQ_CTRL_CLOCK_DIV(i - vlynq_ldiv1));
                        if (vlynq_linked(dev)) {
                                printk(KERN_DEBUG
                                       "%s: using local clock divisor %d\n",
                                       dev->dev.bus_id, i - vlynq_ldiv1 + 1);
                                return vlynq_setup_irq(dev);
                        }
                }
                /* Then remotely supplied clock */
                vlynq_reg_write(dev->local->control, 0);
                for (i = vlynq_rdiv1; i <= vlynq_rdiv8; i++) {
                        printk("Attempting using remote clock divisor %d\n", i);
                        vlynq_reg_write(dev->remote->control,
                                        VLYNQ_CTRL_CLOCK_INT |
                                        VLYNQ_CTRL_CLOCK_DIV(i - vlynq_rdiv1));
                        if (vlynq_linked(dev)) {
                                printk(KERN_DEBUG
                                       "%s: using remote clock divisor %d\n",
                                       dev->dev.bus_id, i - vlynq_rdiv1 + 1);
                                return vlynq_setup_irq(dev);
                        }
                }
                /* At last, externally supplied clock */
                printk("Attempting using external clock\n");
                vlynq_reg_write(dev->remote->control, 0);
                if (vlynq_linked(dev)) {
                        printk(KERN_DEBUG "%s: using external clock\n",
                               dev->dev.bus_id);

I obtain the following:

[42949373.280000] vlynq0: regs 0x08611800, irq 29, mem 0x04000000
[42949373.290000] vlynq1: regs 0x08611c00, irq 33, mem 0x0c000000
[42949373.440000] Attempting using local clock divisor 1
[42949373.440000] vlynq-pci: attaching device TI TNETW1130 at vlynq0
[42949373.590000] Attempting using local clock divisor 1
[42949373.590000] Attempting using local clock divisor 2
[42949373.600000] Attempting using local clock divisor 3
[42949373.610000] Attempting using local clock divisor 4
[42949373.610000] Attempting using local clock divisor 5
[42949373.620000] Attempting using local clock divisor 6
[42949373.630000] Attempting using local clock divisor 7
[42949373.630000] Attempting using local clock divisor 8
[42949373.640000] Attempting using remote clock divisor 9
[42949373.650000] Attempting using remote clock divisor 10
[42949373.660000] Attempting using remote clock divisor 11
[42949373.660000] Attempting using remote clock divisor 12
[42949373.670000] Attempting using remote clock divisor 13
[42949373.680000] Attempting using remote clock divisor 14
[42949373.680000] Attempting using remote clock divisor 15
..hang..

comment:6 Changed 10 years ago by nabcore

Attempting with:

int vlynq_linked(struct vlynq_device *dev)
{
        int i;

        for (i = 0; i < 100; i++)
                if (vlynq_reg_read(dev->local->status) & VLYNQ_STATUS_LINK)
                        return 1;
                else
                        msleep(1);

        return 0;
}

Yields:

[42949373.290000] vlynq1: regs 0x08611c00, irq 33, mem 0x0c000000
[42949373.440000] Attempting using local clock divisor 1
[42949373.460000] vlynq-pci: attaching device TI TNETW1130 at vlynq0
[42949373.600000] Attempting using local clock divisor 1
[42949375.610000] Attempting using local clock divisor 2
[42949377.610000] Attempting using local clock divisor 3
[42949379.610000] Attempting using local clock divisor 4
[42949381.610000] Attempting using local clock divisor 5
[42949383.610000] Attempting using local clock divisor 6
[42949385.610000] Attempting using local clock divisor 7
[42949387.610000] Attempting using local clock divisor 8
[42949389.610000] Attempting using remote clock divisor 9
[42949391.610000] Attempting using remote clock divisor 10
[42949393.610000] Attempting using remote clock divisor 11
[42949395.610000] Attempting using remote clock divisor 12
[42949397.610000] Attempting using remote clock divisor 13
[42949399.610000] Attempting using remote clock divisor 14
[42949401.610000] Attempting using remote clock divisor 15
..hang...

Changed 10 years ago by brian at rapsure.net

The boot log for the Actiontec GT701. This modem stops at the same spot as the Dlink.

comment:7 Changed 10 years ago by nabcore

I've been examing the local and remote status registers for the vlynq devices. One prints the local and remote status registers with these modifications:

                for (i = vlynq_ldiv1; i <= vlynq_ldiv8; i++) {
                        printk("Attempting using local clock divisor %d\n", i);
                        vlynq_reg_write(dev->local->control,
                                        VLYNQ_CTRL_CLOCK_INT |
                                        VLYNQ_CTRL_CLOCK_DIV(i - vlynq_ldiv1));
                        printk("%s: local status: 0x%08x\n",dev->dev.bus_id, dev->local->status);
                        printk("%s: remote status: 0x%08x\n",dev->dev.bus_id, dev->remote->status);
                        if (vlynq_linked(dev)) {
                                printk(KERN_DEBUG
                                       "%s: using local clock divisor %d\n",
                                       dev->dev.bus_id, i - vlynq_ldiv1 + 1);
                                return vlynq_setup_irq(dev);
                        }
                }
                /* Then remotely supplied clock */
                vlynq_reg_write(dev->local->control, 0);
                for (i = vlynq_rdiv1; i <= vlynq_rdiv8; i++) {
                        printk("Attempting using remote clock divisor %d\n", i);
                        vlynq_reg_write(dev->remote->control,
                                        VLYNQ_CTRL_CLOCK_INT |
                                        VLYNQ_CTRL_CLOCK_DIV(i - vlynq_rdiv1));
                        printk("%s: local status: 0x%08x\n",dev->dev.bus_id, dev->local->status);
                        printk("%s: remote status: 0x%08x\n",dev->dev.bus_id, dev->remote->status);
                        if (vlynq_linked(dev)) {
                                printk(KERN_DEBUG
                                       "%s: using remote clock divisor %d\n",
                                       dev->dev.bus_id, i - vlynq_rdiv1 + 1);
                                return vlynq_setup_irq(dev);
                        }

The output from this is:

[42949373.000000] Memory: 12572k/16384k available (1996k kernel code, 3812k reserved, 424k data, 104k init, 0k highmem)
[42949373.220000] Mount-cache hash table entries: 512
[42949373.230000] NET: Registered protocol family 16
[42949373.280000] vlynq0: regs 0x08611800, irq 29, mem 0x04000000
[42949373.290000] vlynq1: regs 0x08611c00, irq 33, mem 0x0c000000
[42949373.440000] Attempting using local clock divisor 1
[42949373.440000] vlynq0: local status: 0x01000140
[42949373.450000] vlynq0: remote status: 0x01000103
[42949373.450000] vlynq-pci: attaching device TI TNETW1130 at vlynq0
[42949373.600000] Attempting using local clock divisor 1
[42949373.600000] vlynq1: local status: 0x00000040
...hang...

Looking at some VLYNQ specs http://focus.ti.com/general/docs/lit/getliterature.tsp?baseLiteratureNumber=sprue36
(page 29) gives a list of what dev->local->status (STAT register) corresponds to.

It's interesting to note on vlynq0's local status (0x01000140), bits 27-24 (SWIDTHIN), indicate that 1 RX pin is being used, whereas with vlynq1's local status (0x00000040, this is 0, hence *no* RX pins are being used. Could one possibly check for this before going ahead and probing the clock divisor, hence preventing this hang?

comment:8 Changed 10 years ago by matteo

  • Owner changed from developers to ejka

comment:9 Changed 10 years ago by nabcore

r9143 seems to have fixed this, hence this can be closed. Thanks.

comment:10 Changed 10 years ago by olli

  • Resolution set to fixed
  • Status changed from new to closed

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.