Modify

Opened 6 years ago

Closed 5 years ago

Last modified 4 years ago

#11704 closed defect (fixed)

ath5k: failed to warm reset the MAC Chip

Reported by: socram8888@… Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: ath5k compat-wireless mac80211 arv4518pw Cc:

Description

I am trying to compile the latest trunk for the MIPS Lantiq Danube platform, and specifically to the SMC7908A/ARV4518PW

Every time I try to setup the Wireless using uci (uci set wireless.radio0.disabled=0; uci commit), after rebooting, I get the following messages on the startup log:

[   11.136000] ath5k 0000:00:0e.0: registered as 'phy0'
[   11.160000] ath5k: phy0: Atheros AR2417 chip found (MAC: 0xf0, PHY: 0x70)
...
[   21.652000] ath5k: phy0: failed to warm reset the MAC Chip

By messing a bit with compat-wireless ath5k reset.c file, and using a patch found on the Internet, I added a second ath5k_hw_nic_reset call after the first (which was returning an EAGAIN error) and some more debug dialogs. Now it looks like this:

[   11.136000] ath5k 0000:00:0e.0: registered as 'phy0'
[   11.144000] ath5k: phy0: MAC Chip reset OK!
[   11.144000] ath5k: phy0: ath5k_hw_nic_wakeup ERROR: NO CHANNEL
[   11.160000] ath5k: phy0: Atheros AR2417 chip found (MAC: 0xf0, PHY: 0x70)
...
[   21.200000] ath5k: phy0: MAC Chip reset OK!
[   21.204000] ath5k: phy0: ath5k_hw_nic_wakeup finished
[   21.652000] ath5k: phy0: failed to warm reset the MAC Chip on first attempt (return: -11). Retrying...
[   21.680000] ath5k: phy0: MAC Chip reset OK!

Unfortunately, altough now it correctly resets the MAC chip, the entire machine crashes just before the end of the ath5k_hw_nic_wakeup function.

I'm not an expert in Linux, so I can't help too much, but as is virtually impossible to brick this device, I won't mind testing any idea that may fix this.

Attached is the patch file I've been using with the current trunk version from the SVN (just copy it to /package/mac80211/patches/)

Attachments (1)

888-retry-mac-reset.patch (1.0 KB) - added by socram8888@… 6 years ago.
The patch

Download all attachments as: .zip

Change History (6)

Changed 6 years ago by socram8888@…

The patch

comment:1 in reply to: ↑ description Changed 5 years ago by ppvazquezfer@…

Replying to socram8888@…:

By messing a bit with compat-wireless ath5k reset.c file, and using a patch found on the Internet, I added a second ath5k_hw_nic_reset call after the first (which was returning an EAGAIN error) and some more debug dialogs. Now it looks like this:

[   11.136000] ath5k 0000:00:0e.0: registered as 'phy0'
[   11.144000] ath5k: phy0: MAC Chip reset OK!
[   11.144000] ath5k: phy0: ath5k_hw_nic_wakeup ERROR: NO CHANNEL
[   11.160000] ath5k: phy0: Atheros AR2417 chip found (MAC: 0xf0, PHY: 0x70)
...
[   21.200000] ath5k: phy0: MAC Chip reset OK!
[   21.204000] ath5k: phy0: ath5k_hw_nic_wakeup finished
[   21.652000] ath5k: phy0: failed to warm reset the MAC Chip on first attempt (return: -11). Retrying...
[   21.680000] ath5k: phy0: MAC Chip reset OK!

Unfortunately, altough now it correctly resets the MAC chip, the entire machine crashes just before the end of the ath5k_hw_nic_wakeup function.

There is a funny comment at the beginning of the function:

	/*
	 * Put chipset on warm reset...
	 *
	 * Note: putting PCI core on warm reset on PCI-E cards
	 * results card to hang and always return 0xffff... so
	 * we ignore that flag for PCI-E cards. On PCI cards
	 * this flag gets cleared after 64 PCI clocks.
	 */

The problem seems to be: how much pci clocks has the Danube PCI bus?

comment:2 Changed 5 years ago by ppvazquezfer@…

I think i've found how to make the wifi work in the arv4518pw.

comment:3 Changed 5 years ago by pepvf@…

There is a patch for this issue in Attitude Adjustment. Tested and works as expected.
http://patchwork.openwrt.org/patch/3556/

There is not an issue with PCI clocks, only a typo in the PCI configuration.

comment:4 Changed 5 years ago by jow

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

Patch merged in r36510

comment:5 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

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.