diff options
| author | Gabor Juhos <[email protected]> | 2013-06-03 21:39:53 +0000 |
|---|---|---|
| committer | John W. Linville <[email protected]> | 2013-06-10 19:37:34 +0000 |
| commit | 10af87c3d99112b3ca279cadd874cd542e4f6699 (patch) | |
| tree | afab71296e00c2bd4c8e5c1288a181ca6b118fa1 /net/unix/sysctl_net_unix.c | |
| parent | rtlwifi: initialize local array and set value. (diff) | |
| download | kernel-10af87c3d99112b3ca279cadd874cd542e4f6699.tar.gz kernel-10af87c3d99112b3ca279cadd874cd542e4f6699.zip | |
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 <[email protected]>
Signed-off-by: Gabor Juhos <[email protected]>
Signed-off-by: John W. Linville <[email protected]>
Diffstat (limited to 'net/unix/sysctl_net_unix.c')
0 files changed, 0 insertions, 0 deletions
