Re: [ath9k-devel] need help: ath9k_htc driver not working

2013-04-15 Thread Oleksij Rempel
Hi Izhar,

Am 15.04.2013 14:48, schrieb izhar eyal:
> Hi Guys,
> I hope this is the right mailing list for help on bugs.
>
> Here are the detail:
> - have kernel 2.6.35.13 running on imx27, trying to use a TL-WN722N
> dongle (Atheros AR9271).

that is a bit too old.

> - compiled ath9k_htc (tried both as statically linked and as kernel
> modules, same problem)
> - using firmware htc_9271.fw (rev 1.3)...also tried older ones with same
> result

older should not work. but i do not know what firmware version was 
supported on this kernel.

> - firmware is loaded successfully by being compiled with the kernel (a
> menuconfig option, directory /firmware)

I'm not sure that firmware source would be available in this old kernel. 
Are you sure? Or do you mean, pre compiled firmware was build in in module?

> - using REG_READ to get device registers returns always the same value:
> 0x01020101
> this is why I get timeout on reading RTC register 0x7044 (probably the
> first read that uses ath9k_hw_wait function).

hmm... do this dongle gets enough power?


some parts of your dmesg are interesting:
--- this adapter was initiated at "usb 1-1:1.0"

> [4.82] usb 1-1: configuration #1 chosen from 1 choice
> [4.82] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
> [4.82] usb 1-1:1.0: uevent
> [4.82] drivers/usb/core/inode.c: creating file '002'
> [4.82] usb 1-1: new device strings: Mfr=16, Product=32,
> SerialNumber=48
> [4.82] usb 1-1: Product: USB2.0 WLAN
> [4.82] usb 1-1: Manufacturer: ATHEROS
> [4.82] usb 1-1: SerialNumber: 12345
> [4.82] usbcore: registered new interface driver cdc_acm
> [4.82] cdc_acm: v0.25:USB Abstract Control Model driver for USB
> modems and ISDN adapters
> [4.82] usbcore: registered new interface driver libusual
> [4.83] usbcore: registered new interface driver usbserial
> [4.83] drivers/usb/serial/usb-serial.c: USB Serial support
> registered for generic

but now "1-1:1.0" is serial driver". Hmmm... do i miss some thing?

> [4.83] usbserial_generic 1-1:1.0: usb_probe_interface
> [4.83] usbserial_generic 1-1:1.0: usb_probe_interface - got id
> [4.83] usbcore: registered new interface driver usbserial_generic
> [4.83] drivers/usb/serial/usb-serial.c: USB Serial Driver core


now "1-1:1.0" is unregistred.

> <7>[  301.292000] usb 1-1: unregistering interface 1-1:1.0
> <7>[  301.292000] device: 'ep_01': device_unregister
> <7>[  301.292000] PM: Removing info for No Bus:ep_01

here is time out.

> <7>[  341.596000] *ath: timeout (10 us) on reg 0x7044: 0x01020101 &
> 0x000f != 0x0002*
> <7>[  341.596000] *ath: RTC not waking up*
> <7>[  341.596000] *ath: Couldn't reset chip*
> <7>[  341.596000] *ath: Unable to initialize hardware; initialization
> status: -5*
> <7>[  341.596000] ath: Unable to initialize hardware; initialization
> status: -5
> <3>[  341.596000] Failed to initialize the device
> <7>[  341.596000] usb 1-1: unlink qh1-0e01/c665a760 start 0 [1/3 us]
> <7>[  341.60] usb usb1: clear tt buffer port 1, a3 ep2 t40008d80

and ath9k_hif_usb confirms that "1-1:1.0" is our device.

> <4>[  341.60] ath9k_hif_usb: probe of 1-1:1.0 failed with error -22
> <7>[  341.60] device: 'ep_01': device_add
> <7>[  341.60] PM: Adding info for No Bus:ep_01
> <7>[  341.60] device: 'ep_82': device_add
> <7>[  341.60] PM: Adding info for No Bus:ep_82

i have some of ath9k_htc devices and all of them work with current 
firmware and 3.8.0-rc7 kernel... it is a bit old, but currently i do not 
have time to test never one.

> Is this a hardware issue?

try exclude some part from the chain. do this adapter works on other 
hardware? Do other usb hardware works on your host? For example usb 
stick? Is it working at full speed? Do usb hist provide enough power?

> software issue?

can you test this kernel on other host?

> can the system clock or other
> clocks be the issue?

i can't help you here.

> If you have any insights please respond.

You can use serial pins on the device to see if it is alive.
check this links:
https://github.com/qca/open-ath9k-htc-firmware/blob/master/docs/uart
http://wikidevi.com/wiki/AR9271

> thanks,
> izhar :)
>
>
> ___
> ath9k-devel mailing list
> ath9k-devel@lists.ath9k.org
> https://lists.ath9k.org/mailman/listinfo/ath9k-devel
>


-- 
Regards,
Oleksij
___
ath9k-devel mailing list
ath9k-devel@lists.ath9k.org
https://lists.ath9k.org/mailman/listinfo/ath9k-devel


[ath9k-devel] need help: ath9k_htc driver not working

2013-04-15 Thread izhar eyal
Hi Guys,
I hope this is the right mailing list for help on bugs.

Here are the detail:
- have kernel 2.6.35.13 running on imx27, trying to use a TL-WN722N dongle
(Atheros AR9271).
- compiled ath9k_htc (tried both as statically linked and as kernel
modules, same problem)
- using firmware htc_9271.fw (rev 1.3)...also tried older ones with same
result
- firmware is loaded successfully by being compiled with the kernel (a
menuconfig option, directory /firmware)

- using REG_READ to get device registers returns always the same value:
0x01020101
this is why I get timeout on reading RTC register 0x7044 (probably the
first read that uses ath9k_hw_wait function).

here is my printout:
[4.20] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller
[4.20] drivers/usb/core/inode.c: creating file 'devices'
[4.20] drivers/usb/core/inode.c: creating file '001'
[4.20] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus
number 1
[4.20] fsl-ehci fsl-ehci.0: reset hcs_params 0x10011 dbg=0 ind cc=0
pcc=0 ordered ports=1
[4.20] fsl-ehci fsl-ehci.0: reset hcc_params 0006 thresh 0 uframes
256/512/1024 park
[4.20] fsl-ehci fsl-ehci.0: park 0
[4.20] fsl-ehci fsl-ehci.0: reset command 080b02 park=3 ithresh=8
period=1024 Reset HALT
[4.20] fsl-ehci fsl-ehci.0: ...powerdown ports...
[4.23] fsl-ehci fsl-ehci.0: irq 55, io mem 0x10024400
[4.23] fsl-ehci fsl-ehci.0: reset command 080b02 park=3 ithresh=8
period=1024 Reset HALT
[4.23] fsl-ehci fsl-ehci.0: init command 010009 (park)=0 ithresh=1
period=256 RUN
[4.25] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00, driver 10
Dec 2004
[4.25] usb usb1: default language 0x0409
[4.25] usb usb1: uevent
[4.25] usb usb1: usb_probe_device
[4.25] usb usb1: configuration #1 chosen from 1 choice
[4.25] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[4.25] usb 1-0:1.0: uevent
[4.25] hub 1-0:1.0: usb_probe_interface
[4.25] hub 1-0:1.0: usb_probe_interface - got id
[4.25] hub 1-0:1.0: USB hub found
[4.25] hub 1-0:1.0: 1 port detected
[4.25] hub 1-0:1.0: standalone hub
[4.25] hub 1-0:1.0: individual port power switching
[4.25] hub 1-0:1.0: individual port over-current protection
[4.25] hub 1-0:1.0: Single TT
[4.25] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[4.25] hub 1-0:1.0: power on to power good time: 20ms
[4.25] hub 1-0:1.0: local power source is good
[4.25] hub 1-0:1.0: enabling power on all ports
[4.36] hub 1-0:1.0: state 7 ports 1 chg  evt 
[4.36] drivers/usb/core/inode.c: creating file '001'
[4.36] usb usb1: new device strings: Mfr=3, Product=2,
SerialNumber=1
[4.36] usb usb1: Product: Freescale On-Chip EHCI Host Controller
[4.36] usb usb1: Manufacturer: Linux 2.6.24.6 ehci_hcd
[4.36] usb usb1: SerialNumber: fsl-ehci.0
[4.36] initializing FSL-SOC USB Controller
[4.36] fsl-ehci fsl-ehci.1: Found HC with no IRQ. Check fsl-ehci.1
setup!
[4.36] fsl-ehci fsl-ehci.0: GetStatus port 1 status c0001803 POWER
sig=j CSC CONNECT
[4.36] hub 1-0:1.0: port 1, status 0101, change 0001, 12 Mb/s
[4.52] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms
status 0x101
[4.64] usb 1-1: new full speed USB device using fsl-ehci and
address 2
[4.81] usb 1-1: not running at top speed; connect to a high speed
hub
[4.81] usb 1-1: default language 0x0409
[4.81] usb 1-1: uevent
[4.81] usb 1-1: usb_probe_device
[4.82] usb 1-1: configuration #1 chosen from 1 choice
[4.82] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[4.82] usb 1-1:1.0: uevent
[4.82] drivers/usb/core/inode.c: creating file '002'
[4.82] usb 1-1: new device strings: Mfr=16, Product=32,
SerialNumber=48
[4.82] usb 1-1: Product: USB2.0 WLAN
[4.82] usb 1-1: Manufacturer: ATHEROS
[4.82] usb 1-1: SerialNumber: 12345
[4.82] usbcore: registered new interface driver cdc_acm
[4.82] cdc_acm: v0.25:USB Abstract Control Model driver for USB
modems and ISDN adapters
[4.82] usbcore: registered new interface driver libusual
[4.83] usbcore: registered new interface driver usbserial
[4.83] drivers/usb/serial/usb-serial.c: USB Serial support
registered for generic
[4.83] usbserial_generic 1-1:1.0: usb_probe_interface
[4.83] usbserial_generic 1-1:1.0: usb_probe_interface - got id
[4.83] usbcore: registered new interface driver usbserial_generic
[4.83] drivers/usb/serial/usb-serial.c: USB Serial Driver core

...
...
... some non-relevant prints
...

<7>[  301.292000] hub 1-0:1.0: state 7 ports 1 chg  evt 0002
<7>[  301.292000] mxc-ehci mxc-ehci.2: GetStatus port 1 status cc00100a
POWER sig=se0 PEC CSC
<7>[  301.292000] hub 1-0:1.0: port