Modify

Opened 10 years ago

Closed 10 years ago

#2389 closed defect (fixed)

r8771: acx kernel module hangs unit when rmmoded

Reported by: nabcore Owned by: developers
Priority: low Milestone: Kamikaze 8.09 RC1
Component: kernel Version:
Keywords: ar7 acx Cc:

Description

On DG834G(v2), the unit hangs when the acx kernel module is removed. This bug has existed for a while and is not specific to the changeset.

(Module has already been insmoded with "insmod acx debug=0xffff" in the following example)

root@Bunny:/# rmmod acx
94951253 ==> acxpci_e_cleanup_module
94951253   ==> acxpci_e_remove
94951254     ==> acxpci_s_issue_cmd_timeo_debug
issue_cmd(cmd:ACX1xx_CMD_DISABLE_TX,buflen:0,timeout:50ms,type:0xFFFFFFFF)
input buffer (len=0):

cmd_type:0000 cmd_status:0000 [Idle]
94951255       ==> acx_s_msleep
94951258       <== acx_s_msleep
cmd_type:0006 cmd_status:0001 [Success]
issue_cmd(ACX1xx_CMD_DISABLE_TX): took 4 jiffies to complete
94951259     <== acxpci_s_issue_cmd_timeo_debug: 00000000
94951259     ==> acxpci_s_issue_cmd_timeo_debug
issue_cmd(cmd:ACX1xx_CMD_DISABLE_RX,buflen:0,timeout:50ms,type:0xFFFFFFFF)
input buffer (len=0):

cmd_type:0000 cmd_status:0000 [Idle]
94951261       ==> acx_s_msleep
94951263       <== acx_s_msleep
cmd_type:0005 cmd_status:0001 [Success]
issue_cmd(ACX1xx_CMD_DISABLE_RX): took 4 jiffies to complete
94951264     <== acxpci_s_issue_cmd_timeo_debug: 00000000
switching off power LED to save power
Please report in case toggling the power LED doesn't work for your card!
94951264     ==> acxpci_l_reset_mac
acxpci_l_reset_mac: enable soft reset...

Looking into acxpci_l_reset_mac()

static void
acxpci_l_reset_mac(acx_device_t *adev)
{
        u16 temp;

        FN_ENTER;

        /* halt eCPU */
        temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
        write_reg16(adev, IO_ACX_ECPU_CTRL, temp);

        /* now do soft reset of eCPU, set bit */
        temp = read_reg16(adev, IO_ACX_SOFT_RESET) | 0x1;
        log(L_DEBUG, "%s: enable soft reset...\n", __func__);
        write_reg16(adev, IO_ACX_SOFT_RESET, temp);
        write_flush(adev);

        /* now clear bit again: deassert eCPU reset */
        log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
        write_reg16(adev, IO_ACX_SOFT_RESET, temp & ~0x1);

        /* now start a burst read from initial EEPROM */
        temp = read_reg16(adev, IO_ACX_EE_START) | 0x1;
        write_reg16(adev, IO_ACX_EE_START, temp);
        write_flush(adev);

        FN_EXIT0;
}


Hence, it must be the call:

write_reg16(adev, IO_ACX_SOFT_RESET, temp);

that is hanging the unit

Attachments (0)

Change History (5)

comment:1 Changed 10 years ago by nabcore

Interestedly, this only happens if the firmware has been loaded. If one insmods the acx module without the firmware being present, then rmmod-ing the acx module after does not cause a crash.

comment:2 Changed 10 years ago by nacore

Modded the acx code a bit to pinpoint where exactly this was going wrong:

        temp = read_reg16(adev, IO_ACX_ECPU_CTRL) | 0x1;
        log(L_DEBUG, "%s: About to write_reg16...\n", __func__);
        write_reg16(adev, IO_ACX_ECPU_CTRL, temp);

        /* now do soft reset of eCPU, set bit */
        temp = read_reg16(adev, IO_ACX_SOFT_RESET) | 0x1;
        log(L_DEBUG, "%s: enable soft reset...\n", __func__);
        write_reg16(adev, IO_ACX_SOFT_RESET, temp);
        log(L_DEBUG, "%s: About to write_flush...\n", __func__);
        write_flush(adev);

        /* now clear bit again: deassert eCPU reset */
        log(L_DEBUG, "%s: disable soft reset and go to init mode...\n", __func__);
        write_reg16(adev, IO_ACX_SOFT_RESET, temp & ~0x1);

And the output:

.....
[42949456.620000] switching off power LED to save power
[42949456.620000] Please report in case toggling the power LED doesn't work for your card!
[42949456.620000] 94945662     ==> acxpci_l_reset_mac
[42949456.620000] acxpci_l_reset_mac: About to write_reg16...
[42949456.620000] acxpci_l_reset_mac: enable soft reset...
[42949456.620000] acxpci_l_reset_mac: About to write_flush...

Hence it's crashing on write_flush(adev)

comment:3 Changed 10 years ago by ejka

Resetting ecpu will kill vlynq. writing to dead vlynq will lockup the device. There is currently no known workaround. You can try sleeping a bit there and see if vlynq error irq is issued. Then that can be handled somehow.

comment:4 Changed 10 years ago by nabcore

Since the vlynq-pci has been removed in r9143, this no longer happens

root@Bunny:/# rmmod acx-mac80211
[42949619.360000] switching off power LED to save power
[42949619.370000] closed device
[42949619.370000] removing device phy1
[42949619.540000] removing /proc entry driver/acx_
[42949619.540000] removing /proc entry driver/acx__diag
[42949619.550000] removing /proc entry driver/acx__eeprom
[42949619.550000] removing /proc entry driver/acx__phy
[42949619.670000] Trying to free already-free IRQ 80

Hence this can be closed.

comment:5 Changed 10 years ago by matteo

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

Fixed in r9144

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.