k2_fw_usb_api: add delay after mac reset

We need some time between MAC reset and next operation. This will
avoid some freezes on module and firmware reload.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
k2_fw_usb_api: fix typo in reg address

this was writing defenetly to wrong address.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
k2_fw_usb_api: fix typo in usb reg address

we was writing to wrond register.
0x100ae = ep3
0x100af = ep4

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
if_ath.c: make ath_hal_reg_write_tgt more readable

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
k2_fw_usb_api: add warning on oversized buffer.

Currently i do not know how to fix this bug. It is reproducable on:
Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
After module reload, first packet with data size over 64 Byte will brake EP4
buffer. Size register will show bigger value as existing size of buffer.
Last buffer part will be corrupt.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
k2_fw_usb_api: prevent buffer overflow.

This was reproduced on intel USB 3.0 controller.
After getting corrupt packet we was jumping bejond allocated buffer.
Insted of oopsing we can at lest warn hier.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
docs: add chip images for documentation

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
k2_fw_usb_api: workaround for EP4 bug.

This patch is workaround for xhci related issue.
After usb port resume FIFO on EP4 can't accept Bulck stream longer then
64 Bytes.
Currently we have no better way then just completly reset chip.
Side effect of this workaround - disconnection event for this device.
It means, module will be reloaded and we will get new usb minor id.
This is why, we should not do it on each firmware restart.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
help linker to find u8UsbDeviceDescriptor on k2

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
patch bcdDevice value for k2 to make easy firmware detection.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
fix u8 to u16 conversation

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
patch bcdDevice value for magpie to make easy firmware detection.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
remove transfer type patches for EP3 and EP4

here is comment from kernel source which has enought explanation:
* Some buggy high speed devices have bulk endpoints using
* maxpacket sizes other than 512.  High speed HCDs may not
* be able to handle that particular bug, so let's warn...

in our case EP3 and EP4 have maxpacket sizes = 64!!!

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
Merge pull request #38 from olerem/next

Fixes for reboot issues
hif/usb_api: remove dup code - usb_reg_out_patch

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
hif/usb_api: remove dup code - usb_reg_in_patch

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
hif/usb_api: remove dup code - ep6 fix

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
hif/usb_api: remove dup code - bGet_descriptor_patch

In this patch i also remove eeprom check. It was never
executed any way.

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
hif/usb_api: remove dup code - _fw_usbfifo_recv_command

and _fw_usbfifo_init

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>
hif/usb_api: unify platform specific patch file names

Signed-off-by: Oleksij Rempel <linux@rempel-privat.de>