Re: [OpenWrt-Devel] WMAC LED Problems

2012-08-14 Thread LEO Airwarosu Yoichi Shinoda

Peter,

I believe 'led' should come after 'done'.

If 'done' comes after 'led', something 'led' configured
for so called status_led will be wiped and it is set
to default-on by /etc/diag.sh done.

Am I missing something?

--- shinoda

On 2012/08/03, at 0:21, Peter Naulls wrote:

 On 08/01/2012 09:03 PM, LEO Airwarosu Yoichi Shinoda wrote:
 On 2012/08/01, at 22:39, Peter Naulls wrote:
 
 The problem here is that the LED handling is done in the wrong
 order.  I submitted a fix/patch(?) for this months ago, but
 it seems to have been ignored or lost.  I can dig it out
 again - the fix is pretty simple.
 
 
 I would definitely would like to take a look at it.
 
 
 Ah yes:
 
 
 
 Index: base-files/files/etc/init.d/led
 ===
 --- base-files/files/etc/init.d/led (revision 31054)
 +++ base-files/files/etc/init.d/led (working copy)
 @@ -1,7 +1,7 @@
 #!/bin/sh /etc/rc.common
 # (C) 2008 openwrt.org
 
 -START=96
 +START=94
 
 load_led() {
local name
 
 
 ___
 openwrt-devel mailing list
 openwrt-devel@lists.openwrt.org
 https://lists.openwrt.org/mailman/listinfo/openwrt-devel

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] WMAC LED Problems

2012-08-02 Thread Andy Botting
Hi Shinoda,

 - I wonder if other non-buffalo units with wmac leds are dealing
   with the problem.

I've just recently bought the Buffalo WBMR-HP-G300H and it doesn't
seem to have any power/status LEDs on startup. I didn't have any LEDs
at all until I set them up myself.

I'm not sure if it's the same problem you're seeing, or if it just a
case of not having some sensible default status LED setup.

cheers,

Andy
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] WMAC LED Problems

2012-08-02 Thread Peter Naulls

On 08/01/2012 09:03 PM, LEO Airwarosu Yoichi Shinoda wrote:

On 2012/08/01, at 22:39, Peter Naulls wrote:


The problem here is that the LED handling is done in the wrong
order.  I submitted a fix/patch(?) for this months ago, but
it seems to have been ignored or lost.  I can dig it out
again - the fix is pretty simple.



I would definitely would like to take a look at it.



Ah yes:



Index: base-files/files/etc/init.d/led
===
--- base-files/files/etc/init.d/led (revision 31054)
+++ base-files/files/etc/init.d/led (working copy)
@@ -1,7 +1,7 @@
 #!/bin/sh /etc/rc.common
 # (C) 2008 openwrt.org

-START=96
+START=94

 load_led() {
local name


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] WMAC LED Problems

2012-08-02 Thread LEO Airwarosu Yoichi Shinoda
On 2012/08/01, at 15:45, LEO Airwarosu Yoichi Shinoda wrote:

 WZR-HP-AG300H
 - Current /etc/diag.sh does not support boot/init progress
  indication.
 
 - Wmac leds REQUIRES phy initialization (by means of wifi
  command execution) to start working. After the first
  phy initialization, they continue to work fine.


Okay, after playing around with files under
compat-wireless/driver/net/wireless/ath/ath9k
using numerous printk()s, I tracked down the problem down
to ath9k_hw_reset(), where

if (AR_SREV_9280_20_OR_LATER(ah))
   REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);

is executed. After this register write, wmac leds start to work.

By replicating these lines at the end of ath9k_hw_post_init(),
which is executed during the attach phase, and where it looked
most appropriate for an ath9k_hw novice, I could successfully
manipulate all leds on the wmacs without bringing up corresponding
interfaces.

Being without technical reference manuals for the wmac,
I wonder why something called INPUT has anything to do
with outputs, and wonder if I can disable the gpio jtag
functionality when the wmac is attached.
But nevertheless, I now have a working image.

So, what should I do next? Report to the ath9k-devel list and
ask for technically correct patch?

BTW, my current patch is as follows if someone is interested.

--- 
build_dir/linux-ar71xx_generic/compat-wireless-2012-07-16/drivers/net/wireless/ath/ath9k/hw.c-orig
  2012-07-28 13:12:14.387929391 +0900
+++ 
build_dir/linux-ar71xx_generic/compat-wireless-2012-07-16/drivers/net/wireless/ath/ath9k/hw.c
   2012-08-03 07:08:04.019333507 +0900
@@ -578,6 +578,9 @@
ath9k_hw_ani_init(ah);
}
 
+   if (AR_SREV_9280_20_OR_LATER(ah))
+   REG_SET_BIT(ah, AR_GPIO_INPUT_EN_VAL, AR_GPIO_JTAG_DISABLE);
+
return 0;
 }

--- shinoda



___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] WMAC LED Problems

2012-08-01 Thread LEO Airwarosu Yoichi Shinoda
The problem of wmac based leds on WZR-HP-AG300H stimulated
some research on status of led support on other buffalo
units with wmac based leds.

The following results and observations are based on the
trunk revision r32910.

COMMON
- Wmac based leds do not appear in the /sys/class/leds
  directory until the corresponding phy is recognized and
  initialized, which happens during regular init.
  This suggest that we can not use wmac based leds to
  indicate the boot/init progress.

WZR-HP-G300NH2
- Current /etc/diag.sh uses buffalo:red:diag for indicating
  boot/init progress. This led is connected to the platform's
  gpio, so it works. However, the problem is that it REMAINS
  LIT when the boot/init completes. VERY mis-leading.

- Wmac leds works fine WITHOUT phy initialization (by means
  of wifi command execution).

WZR-HP-G450H
- Current /etc/diag.sh does not support boot/init progress
  indication.

- Wmac leds works fine WITHOUT phy initialization (by means
  of wifi command execution).

WZR-HP-AG300H
- Current /etc/diag.sh does not support boot/init progress
  indication.

- Wmac leds REQUIRES phy initialization (by means of wifi
  command execution) to start working. After the first
  phy initialization, they continue to work fine.

OBSERVATION
- If we can initiate the phy recognition before preinit,
  it would solve the entire problem, but I suspect this is
  extremely hard.

- Using the buffalo:red:diag in the /etc/diag.sh seems to be the
  only solution, but it must be turned off when done.

- The dependency on phy initialization on AG300H must be investigated.
  As WZR-HP-G300NH2 and WZR-HP-AG300H uses the same phy driver,
  there must be some discrepancy between AR9220/AR9223 and AR9280.

- I wonder if other non-buffalo units with wmac leds are dealing
  with the problem. 

Comments are welcome.

--- shinoda

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] WMAC LED Problems

2012-08-01 Thread Peter Naulls

On 07/31/2012 11:45 PM, LEO Airwarosu Yoichi Shinoda wrote:

The problem of wmac based leds on WZR-HP-AG300H stimulated
some research on status of led support on other buffalo
units with wmac based leds.

The following results and observations are based on the
trunk revision r32910.

COMMON
- Wmac based leds do not appear in the /sys/class/leds
   directory until the corresponding phy is recognized and
   initialized, which happens during regular init.
   This suggest that we can not use wmac based leds to
   indicate the boot/init progress.

WZR-HP-G300NH2
- Current /etc/diag.sh uses buffalo:red:diag for indicating
   boot/init progress. This led is connected to the platform's
   gpio, so it works. However, the problem is that it REMAINS
   LIT when the boot/init completes. VERY mis-leading.


The problem here is that the LED handling is done in the wrong
order.  I submitted a fix/patch(?) for this months ago, but
it seems to have been ignored or lost.  I can dig it out
again - the fix is pretty simple.

But yes, the requirement to enable WLAN first is a bit
annoying.  In many of our deployments, we don't even
use that - we use G300NH, G300NH2 and AG300H.


___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] WMAC LED Problems

2012-08-01 Thread LEO Airwarosu Yoichi Shinoda
On 2012/08/01, at 22:39, Peter Naulls wrote:

 The problem here is that the LED handling is done in the wrong
 order.  I submitted a fix/patch(?) for this months ago, but
 it seems to have been ignored or lost.  I can dig it out
 again - the fix is pretty simple.


I would definitely would like to take a look at it.

--- shinoda

___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel