WN721N cannot be initialized

hong zhang henryzhang62 at yahoo.com
Sat Nov 14 09:15:42 UTC 2009


I add printk() in following and device_id is correct 0x9271 but becomes 0x0 in ath9k_hw_init(ah). see log right after two functions.
 
static int ath_init_htc_priv(u16 devid, struct ath_htc_priv *priv)
{
.......................
	ath_print(common, ATH_DBG_CONFIG, "HW about to be initialized...\n");
printk("%s ah->hw_version.devid = %x,ah->ptr = %p\n", __FUNCTION__, ah->hw_version.devid, ah);

	r = ath9k_hw_init(ah);
	if (r)
		goto failed_hw_init;
..........
}

int ath9k_hw_init(struct ath_hw *ah)
{
	struct ath_common *common = ath9k_hw_common(ah);
	int r = 0;
printk("%s ah->hw_version.devid = %x,ah->ptr = %p\n", __FUNCTION__, ah->hw_version.devid, ah);
	if (!ath9k_hw_devid_supported(ah->hw_version.devid)) {
		ath_print(common, ATH_DBG_FATAL,
			  "Unsupported device ID: 0x%0x\n",
			  ah->hw_version.devid);
		return -EOPNOTSUPP;
	}
..........

}

[   13.862493] ath_htc_hw_probe target->device_id = 9271
[   13.862497] probe_htc_9k_device device_id = 9271
[   13.862598] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.863571] usb 1-3: HTC epid 1 upstream 6 downstream 3 :: WMI control service
[   13.863576] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.863670] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.864581] usb 1-3: HTC epid 2 upstream 5 downstream 2 :: WMI beacon service
[   13.864587] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.864679] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.865602] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.865616] usb 1-3: HTC epid 3 upstream 6 downstream 2 :: WMI management service
[   13.865700] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.866600] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.866614] usb 1-3: HTC epid 4 upstream 1 downstream 2 :: WMI BE data service
[   13.866698] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.867601] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.867614] usb 1-3: HTC epid 5 upstream 1 downstream 2 :: WMI BK data service
[   13.867698] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.868581] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.868593] usb 1-3: HTC epid 6 upstream 6 downstream 2 :: WMI VI data service
[   13.868677] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.869581] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.869595] usb 1-3: HTC epid 7 upstream 6 downstream 2 :: WMI VO data service
[   13.869678] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.870580] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.870673] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.871579] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.871671] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.872580] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.872674] usb 1-3: link qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.873187] ath: HW about to be initialized...
[   13.873191] ath_init_htc_priv ah->hw_version.devid = 9271,ah->ptr = f6428000
[   13.873194] ath9k_hw_init ah->hw_version.devid = 0,ah->ptr = f6428000
[   13.873197] ath: Unsupported device ID: 0
[   13.873200] usb 1-3: failed to initialize device
[   13.873209] usb 1-3: initializing 0x9271 device failed: -95
[   13.873212] usb 1-3: hw probe failed
[   13.873261] usb 1-3: unlink qh0-00ff/f6af2480 start 0 [2/0 us]
[   13.873371] ath_hif_usb: probe of 1-3:1.0 failed with error -95
[   13.873432] usbcore: registered new interface driver ath_hif_usb
[   13.873655] modprobe used greatest stack depth: 5088 bytes left

--- On Fri, 11/13/09, Luis R. Rodriguez <mcgrof at gmail.com> wrote:

> From: Luis R. Rodriguez <mcgrof at gmail.com>
> Subject: Re: WN721N cannot be initialized
> To: "hong zhang" <henryzhang62 at yahoo.com>
> Cc: devel at linuxdriverproject.org, "Stephen Chen" <Stephen.Chen at atheros.com>
> Date: Friday, November 13, 2009, 4:05 PM
> On Thu, Nov 12, 2009 at 10:54 PM,
> hong zhang <henryzhang62 at yahoo.com>
> wrote:
> > List,
> >
> > I bought WN721N ar9721 but it could not be
> initialized. device_id is 9721
> > in function ath_init_htc_priv(). After ah passed to
> ath9k_hw_init(ah),
> >device_id becomes 0.
> 
> The device ID on the ath_hw comes all the way from the usb
> device ID.
> 
> This is initialized based on the value passed during
> probe:
> 
> ah->hw_version.devid = devid;
> 
> That is when probe_htc_9k_device() is called. This is the
> hw_probe
> callback for the 9k atheros hardware family. This gets
> called by the
> HTC driver during ath_htc_hw_probe() :
> 
> int ath_htc_hw_probe(void *hif_handle, enum
> ath_hif_transports transport)
> {
>         ...
>         target->device_id =
> hif->ops->get_device_id(hif_handle);
>         ...
>         r =
> ath_htc_9k_hw_ops->hw_probe(target, target->dev,
> target->device_id);
>         if (r) {
>                
> dev_err(target->dev, "initializing 0x%0x device failed:
> %d\n",
>                
>         target->device_id, r);
>                
> goto fail;
>         }
>         ...
> }
> 
> The hif_handle is passed by HIF during probe, which is done
> in
> ath_hif_usb_probe():
> 
> static int ath_hif_usb_probe(struct usb_interface
> *interface,
>                
>              const
> struct usb_device_id *id)
> {
>            ....
>        
>    hif_dev->device_id = id->idProduct;
>            ....
>         /* Probe hardware now */
>         r = ath_htc_hw_probe(hif_dev,
> ATH_HIF_USB);
>         if (r) {
>                
> dev_err(&hif_dev->udev->dev, "hw probe
> failed\n");
>                
> goto fail;
>         }
>            ....
> }
> 
> > Very strange. Does anyone have similar experience?
> 
> Can you paste the output with debugging completely
> enabled?
> 
> modprobe ath9k_htc debug=0xfffffff
> 
> before plugging the device in. Also can you please boot
> with
> ignore_loglevel appended to your kernel boot paramters for
> grub.
> 
>   Luis
> 


      



More information about the devel mailing list