summaryrefslogtreecommitdiffstats
path: root/drivers/net/wimax/i2400m/usb-fw.c
Commit message (Collapse)AuthorAgeFilesLines
* wimax/i2400m: fix bad assignment of return value in i2400mu_tx_bulk_outInaky Perez-Gonzalez2009-11-031-1/+0
| | | | | | | The function was always setting the return value to the amount of bytes transferred, overwriting the error code in error paths. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* wimax/i2400m: handle USB stallsInaky Perez-Gonzalez2009-11-031-0/+22
| | | | | | | | | | | | | | | | | | | When the device stalls, clear it and retry; if it keeps failing too often, reset the device. This specially happens when running on virtual machines; the real hardware doesn't seem to trip on stalls too much, except for a few reports in the mailing list (still to be confirmed this is the cause, although it seems likely. NOTE: it is not clear if the URB has to be resubmitted fully or start only at the offset of the first transaction sent. Can't find documentation to clarify one end or the other. Tests that just resubmit the whole URB seemed to work in my environment. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* wimax/i2400m: Fix USB timeout specifications (to ms from HZ)Inaky Perez-Gonzalez2009-11-031-1/+1
| | | | | | | | | The USB code was incorrectly specifiying timeouts to be in jiffies vs msecs. On top of that, lower it to 200ms, as 1s is really too long (doesn't allow the watchdog to trip a reset if the device timesout too often). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* wimax/i2400m: workaround not-so-working %zd printf formatInaky Perez-Gonzalez2009-10-191-2/+2
| | | | | | | The kernel's %zd modifier does not really work. Use %ld (has to cast ssize_t to long). Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* wimax/i2400m: be smarter about copying command buffer to bm_cmd_bufInaky Perez-Gonzalez2009-10-191-1/+2
| | | | | | | | | | | | | | | | | | Because some underlying bus APIs (like USB) don't like data buffers in the stack or vmalloced areas, the i2400m driver provides a scratch buffer (i2400m->bm_cmd_buf) for said low-level drivers to copy command data to before passing it to said API. This is only used during boot mode. However, at some the code was copying the buffer even when the command was already specified in said buffer. This is ok, but it needs to be more careful. As thus, change so that: (a) the copy happens only if command buffer is not the scratch buffer (b) use memmove() in case there is overlapping Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* wimax/i2400m: USB driver uses a configurable endpoint mapDirk Brandewie2009-10-191-2/+3
| | | | | | | | | Newer generations of the i2400m USB WiMAX device use a different endpoint map; in order to make it easy to support it, we make the endpoint-to-function mapeable instead of static. Signed-off-by: Dirk Brandewie <dirk.j.brandewie@intel.com> Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com>
* i2400m/USB: firmware upload backendInaky Perez-Gonzalez2009-01-071-0/+340
This implements the backends for the generic driver (i2400m) to be able to load firmware to the USB device. Signed-off-by: Inaky Perez-Gonzalez <inaky@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>