Hello!

I'm trying to prepare an old driver for Atmel based USB 802.11b devices
for inclusion into the kernel.  It still needs work on the 802.11 side,
but now USB is giving me headaches.

The driver stopped working after I upgraded from Linux 2.6.22 to Linux
2.6.23-rc1.  No compile errors or warnings needed to be fixed.

The driver cannot read the firmware version and the MAC address anymore.
It reports bogus values to the kernel log:

eth0: MAC address 5a:5a:5a:5a:5a:5a
eth0: firmware version 192.247.68-127

The MAC address is read as a part of the configuration block in
at76_get_hw_cfg(), which is just a wrapper around usb_control_msg():

static inline int at76_get_hw_cfg(struct usb_device *udev,
                                  union at76_hwcfg *buf, int buf_size)
{
        return usb_control_msg(udev, usb_rcvctrlpipe(udev, 0), 0x33,
                               USB_TYPE_VENDOR | USB_DIR_IN |
                               USB_RECIP_INTERFACE, ((0x0a << 8) | 0x02), 0,
                               buf, buf_size, USB_CTRL_GET_TIMEOUT);
}

I was able to check that the data buffer remains unchanged even though
the data size is not 0.  Actually, the return code is 0, which indicates
that 0 bytes have been read.  But why?  And why is it not an error?

I'll appreciate if some of the USB developers have a brief look at the
driver.  Sure, I can debug deeper into usb_control_msg(), but most
likely the driver is just doing something stupid.

The patch for the kernel:
http://80211libre.org/at76/at76_usb.patch

Driver sources available for browsing:
http://80211libre.org/at76/

git repository (standalone sources without the kernel):
http://git.80211libre.org/at76_usb.git

The system is Fedora 7 x86_64 with a custom kernel.  The kernel
configuration is available here:
http://80211libre.org/linux/.config

-- 
Regards,
Pavel Roskin


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
linux-usb-devel@lists.sourceforge.net
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-devel

Reply via email to