linux/drivers
Gabor Juhos 10af87c3d9 rt2x00: rt2x00queue: initialize data_queue fields earlier
Support for rt2800 device is broken since my
'rt2x00: rt2x00dev: use rt2x00dev->tx->limit'
patch. The changelog of that commit says that the
TX data queue is initialized already when the
rt2x00lib_probe_hw() function is called.

However as Jakub noticed it, this statement is not
correct. The queue->limit field is initialized in
the rt2x00queue_alloc_entries routine and that is
not yet called when rt2x00lib_probe_hw() runs.
Because the value of tx->limit contains zero, the
driver tries to allocate a kernel fifo with zero
size and kfifo_alloc rejects that with -EINVAL.

  PCI: Enabling device 0000:01:00.0 (0000 -> 0002)
  ieee80211 phy1: rt2x00_set_rt: Info - RT chipset 3071, rev 021c detected
  ieee80211 phy1: rt2x00_set_rf: Info - RF chipset 0008 detected
  ieee80211 phy1: rt2x00lib_probe_dev: Error - Failed to initialize hw
  rt2800pci: probe of 0000:01:00.0 failed with error -22

Move the data_queue field initialization from
the rt2x00queue_alloc_entries routine into the
rt2x00queue_init function. The initialization
code is not strictly related to the allocation,
and the change ensures that the queue_data fields
can be used in the probe routines.

The patch also introduces a helper function in
order to be able to get the correct data_queue_desc
structure for a given queue. This helper is only
needed temporarily and it will be removed later.

Reported-by: Jakub Kicinski <moorray@wp.pl>
Signed-off-by: Gabor Juhos <juhosg@openwrt.org>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2013-06-10 15:37:34 -04:00
..
accessibility
acpi ACPICA fixes for 3.10-rc1 2013-05-09 16:33:42 -07:00
amba
ata ARM: arm-soc: late cleanups 2013-05-07 11:22:14 -07:00
atm atm: he: use mdelay instead of large udelay constants 2013-04-29 13:26:48 -04:00
auxdisplay
base Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input 2013-05-01 13:20:04 -07:00
bcma bcma: support SPROM rev 10 2013-05-22 15:08:44 -04:00
block Merge git://git.infradead.org/users/willy/linux-nvme 2013-05-09 16:35:00 -07:00
bluetooth Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2013-05-01 14:08:52 -07:00
bus
cdrom block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
char aio: don't include aio.h in sched.h 2013-05-07 20:16:25 -07:00
clk ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
clocksource ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
connector
cpufreq Merge branch 'pm-cpufreq' 2013-04-29 00:08:46 +02:00
cpuidle cpuidle: add maintainer entry 2013-04-26 22:30:25 +02:00
crypto Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2013-05-02 14:53:12 -07:00
dca
devfreq
dio
dma Merge branch 'for-linus' of git://git.infradead.org/users/vkoul/slave-dma 2013-05-09 09:46:45 -07:00
edac Two small EDAC fixes. 2013-05-09 10:11:08 -07:00
eisa PCI changes for the v3.10 merge window: 2013-04-29 09:30:25 -07:00
extcon Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
firewire IEEE 1394 (FireWire) subsystem changes: 2013-05-09 10:11:48 -07:00
firmware Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
gpio Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
gpu Merge branch 'drm-next' of git://people.freedesktop.org/~airlied/linux 2013-05-02 19:40:34 -07:00
hid HID: debug: fix RCU preemption issue 2013-05-06 13:07:33 +02:00
hsi
hv Merge branch 'x86-paravirt-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2013-04-30 08:41:21 -07:00
hwmon Merge branch 'hwmon-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging 2013-05-04 13:44:38 -07:00
hwspinlock A single patch from Vincent extending OMAP's hwspinlock support to OMAP5. 2013-05-07 14:01:27 -07:00
i2c Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
ide block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
idle Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux 2013-05-11 15:23:17 -07:00
iio
infiniband InfiniBand/RDMA changes for the 3.10 merge window: 2013-05-08 15:29:48 -07:00
input Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
iommu IOMMU Updates for Linux v3.10 2013-05-06 14:59:13 -07:00
ipack
irqchip ARM: late Exynos multiplatform changes 2013-05-07 11:28:42 -07:00
isdn Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
leds Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
lguest Lots of virtio work which wasn't quite ready for last merge window. Plus 2013-05-02 14:14:04 -07:00
macintosh Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
mailbox
md dm cache: set config value 2013-05-10 14:37:21 +01:00
media Merge branch 'i2c/for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux 2013-05-02 14:38:53 -07:00
memory
memstick block_device_operations->release() should return void 2013-05-07 02:16:21 -04:00
message Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-block 2013-05-08 10:13:35 -07:00
mfd For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
misc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
mmc Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-07 15:14:53 -07:00
mtd - Lots of cleanups from Artem, including deletion of some obsolete drivers 2013-05-09 10:15:46 -07:00
net rt2x00: rt2x00queue: initialize data_queue fields earlier 2013-06-10 15:37:34 -04:00
nfc
ntb
nubus nubus: Kill nubus_proc_detach_device() 2013-05-04 14:47:26 -04:00
of net: of_mdio: fix behavior on missing phy device 2013-05-08 13:13:29 -07:00
oprofile
parisc parisc: fix partly 16/64k PAGE_SIZE boot 2013-05-06 23:08:32 +02:00
parport
pci PCI updates for v3.10: 2013-05-09 10:21:44 -07:00
pcmcia
pinctrl Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
platform - Artem's removal of dead code continues (RPX, MBX860) 2013-05-10 09:09:47 -07:00
pnp Merge branch 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc 2013-05-02 10:16:16 -07:00
power For 3.10 we have a few new MFD drivers for: 2013-05-05 17:36:20 -07:00
pps Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
ps3
ptp
pwm
rapidio
regulator Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
remoteproc This pull request contains: 2013-05-07 14:04:56 -07:00
reset
rpmsg A small pull request consisting of: 2013-05-07 14:02:00 -07:00
rtc Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2013-05-09 14:34:58 -07:00
s390 Merge branch 'for-3.10/core' of git://git.kernel.dk/linux-block 2013-05-08 10:13:35 -07:00
sbus
scsi Merge branch 'postmerge' into for-linus 2013-05-10 07:54:01 -07:00
sfi
sh
sn
spi Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
ssb - Lots of cleanups from Artem, including deletion of some obsolete drivers 2013-05-09 10:15:46 -07:00
ssbi
staging Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
target Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs 2013-05-01 17:51:54 -07:00
tc
thermal Merge branch 'cpu_cooling-doc-comments-update' of .git into next 2013-04-27 09:28:56 +08:00
tty Merge git://git.infradead.org/users/eparis/audit 2013-05-11 14:29:11 -07:00
uio
usb Merge branch 'stable' of git://git.kernel.org/pub/scm/linux/kernel/git/cmetcalf/linux-tile 2013-05-09 14:34:58 -07:00
uwb uwb: rename random32() to prandom_u32() 2013-04-29 18:28:43 -07:00
vfio vfio updates for v3.10 2013-05-02 14:02:32 -07:00
vhost vhost: more fixes for 3.10 2013-05-07 10:13:52 -07:00
video Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus 2013-05-10 07:48:05 -07:00
virt
virtio
vlynq
vme
w1 Removal of GENERIC_GPIO for v3.10 2013-05-09 09:59:16 -07:00
watchdog watchdog: Fix race condition in registration code 2013-05-09 08:13:41 +02:00
xen Bug-fixes: 2013-05-11 16:19:30 -07:00
zorro proc: Supply PDE attribute setting accessor functions 2013-05-01 17:29:18 -04:00
Kconfig ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00
Makefile ARM: arm-soc driver changes for 3.10 2013-05-04 12:31:18 -07:00