kernel-fxtec-pro1x/drivers/net/wireless/iwlwifi
Emmanuel Grumbach ebed633c61 iwlwifi: fix the Transmit Frame Descriptor rings
The logic that allows to have a short TFD queue was completely wrong.
We do maintain 256 Transmit Frame Descriptors, but they point to
recycled buffers. We used to attach and de-attach different TFDs for
the same buffer and it worked since they pointed to the same buffer.

Also zero the number of BDs after unmapping a TFD. This seems not
necessary since we don't reclaim the same TFD twice, but I like
housekeeping.

This patch solves this warning:

[ 6427.079855] WARNING: at lib/dma-debug.c:866 check_unmap+0x727/0x7a0()
[ 6427.079859] Hardware name: Latitude E6410
[ 6427.079865] iwlwifi 0000:02:00.0: DMA-API: device driver tries to free DMA memory it has not allocated [device address=0x00000000296d393c] [size=8 bytes]
[ 6427.079870] Modules linked in: ...
[ 6427.079950] Pid: 6613, comm: ifconfig Tainted: G           O 3.3.3 #5
[ 6427.079954] Call Trace:
[ 6427.079963]  [<c10337a2>] warn_slowpath_common+0x72/0xa0
[ 6427.079982]  [<c1033873>] warn_slowpath_fmt+0x33/0x40
[ 6427.079988]  [<c12dcb77>] check_unmap+0x727/0x7a0
[ 6427.079995]  [<c12dcdaa>] debug_dma_unmap_page+0x5a/0x80
[ 6427.080024]  [<fe2312ac>] iwlagn_unmap_tfd+0x12c/0x180 [iwlwifi]
[ 6427.080048]  [<fe231349>] iwlagn_txq_free_tfd+0x49/0xb0 [iwlwifi]
[ 6427.080071]  [<fe228e37>] iwl_tx_queue_unmap+0x67/0x90 [iwlwifi]
[ 6427.080095]  [<fe22d221>] iwl_trans_pcie_stop_device+0x341/0x7b0 [iwlwifi]
[ 6427.080113]  [<fe204b0e>] iwl_down+0x17e/0x260 [iwlwifi]
[ 6427.080132]  [<fe20efec>] iwlagn_mac_stop+0x6c/0xf0 [iwlwifi]
[ 6427.080168]  [<fd8480ce>] ieee80211_stop_device+0x5e/0x190 [mac80211]
[ 6427.080198]  [<fd833208>] ieee80211_do_stop+0x288/0x620 [mac80211]
[ 6427.080243]  [<fd8335b7>] ieee80211_stop+0x17/0x20 [mac80211]
[ 6427.080250]  [<c148dac1>] __dev_close_many+0x81/0xd0
[ 6427.080270]  [<c148db3d>] __dev_close+0x2d/0x50
[ 6427.080276]  [<c148d152>] __dev_change_flags+0x82/0x150
[ 6427.080282]  [<c148e3e3>] dev_change_flags+0x23/0x60
[ 6427.080289]  [<c14f6320>] devinet_ioctl+0x6a0/0x770
[ 6427.080296]  [<c14f8705>] inet_ioctl+0x95/0xb0
[ 6427.080304]  [<c147a0f0>] sock_ioctl+0x70/0x270

Cc: stable@vger.kernel.org
Reported-by: Antonio Quartulli <ordex@autistici.org>
Tested-by: Antonio Quartulli <ordex@autistici.org>
Signed-off-by: Emmanuel Grumbach <emmanuel.grumbach@intel.com>
Reviewed-by: Wey-Yi W Guy <wey-yi.w.guy@intel.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2012-05-25 11:12:40 -04:00
..
iwl-1000.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-07 23:35:40 -04:00
iwl-2000.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-07 23:35:40 -04:00
iwl-5000.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-07 23:35:40 -04:00
iwl-6000.c iwlwifi: use 6000G2B for 6030 device series 2012-05-08 21:53:49 -04:00
iwl-agn-calib.c iwlwifi: remove TX/RX frame statistics 2012-04-23 14:27:56 -07:00
iwl-agn-calib.h iwlwifi: remove TX/RX frame statistics 2012-04-23 14:27:56 -07:00
iwl-agn-devices.c iwlwifi: remove TX/RX frame statistics 2012-04-23 14:27:56 -07:00
iwl-agn-hw.h iwlwifi: move OTP defines 2012-04-23 14:30:01 -07:00
iwl-agn-lib.c iwlwifi: make sure reduced tx power bit is valid 2012-05-15 17:27:53 -04:00
iwl-agn-rs.c iwlwifi: update BT traffic load states correctly 2012-05-25 11:12:40 -04:00
iwl-agn-rs.h iwlwifi: move antenna definitions to config 2012-04-23 14:29:50 -07:00
iwl-agn-rx.c iwlwifi: dont pull too much payload in skb head 2012-05-18 13:31:25 -04:00
iwl-agn-rxon.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next 2012-05-22 15:18:06 -04:00
iwl-agn-sta.c drivers/net: Convert compare_ether_addr to ether_addr_equal 2012-05-10 23:33:01 -04:00
iwl-agn-tt.c iwlwifi: clean up module parameters 2012-04-23 14:30:51 -07:00
iwl-agn-tt.h iwlwifi: update Copyright 2012-01-24 14:08:36 -05:00
iwl-agn-tx.c iwlwifi: don't disable AGG queues that are not enabled 2012-05-15 17:27:54 -04:00
iwl-agn.c iwlwifi: support explicit monitor interface 2012-05-16 13:08:21 -04:00
iwl-agn.h iwlwifi: modify #ifdef to avoid sparse complain 2012-05-08 21:53:43 -04:00
iwl-cfg.h iwlwifi: make config const 2012-03-06 15:16:11 -05:00
iwl-commands.h iwlwifi: fix scan_cmd_size allocation 2012-05-16 13:08:17 -04:00
iwl-config.h iwlwifi: move antenna definitions to config 2012-04-23 14:29:50 -07:00
iwl-csr.h iwlwifi: added HBUS_TARG_TEST_REG 2012-04-16 14:35:32 -07:00
iwl-debug.c iwlwifi: clean up iwl-shared.h includes 2012-04-23 14:21:38 -07:00
iwl-debug.h iwlwifi: clean up module parameters 2012-04-23 14:30:51 -07:00
iwl-debugfs.c iwlwifi: clean up module parameters 2012-04-23 14:30:51 -07:00
iwl-dev.h iwlwifi: add checking for the condition to reduce tx power 2012-05-08 20:56:08 -04:00
iwl-devtrace.c iwlwifi: update Copyright 2012-01-24 14:08:36 -05:00
iwl-devtrace.h iwlwifi: make tracing use device as identifier 2012-03-07 13:51:52 -05:00
iwl-drv.c iwlwifi: add option to disable 5GHz band 2012-05-08 20:56:09 -04:00
iwl-drv.h iwlwifi: move driver defines to iwl-drv.h 2012-04-23 14:29:02 -07:00
iwl-eeprom.c iwlwifi: remove TX/RX frame statistics 2012-04-23 14:27:56 -07:00
iwl-eeprom.h iwlwifi: move OTP defines 2012-04-23 14:30:01 -07:00
iwl-fh.h iwlwifi: fix hardware queue programming 2012-04-24 14:14:55 -04:00
iwl-fw-file.h iwlwifi: remove uCode alternatives mechanism 2012-04-16 14:34:44 -07:00
iwl-fw.h iwlwifi: include net/mac80211.h to avoid compiler error 2012-04-23 14:21:53 -07:00
iwl-io.c iwlwifi: cleanup/fix memory barriers 2012-03-08 13:59:50 -05:00
iwl-io.h iwlwifi: remove unneeded includes 2012-04-18 07:31:33 -07:00
iwl-led.c iwlwifi: clean up module parameters 2012-04-23 14:30:51 -07:00
iwl-led.h iwlwifi: update Copyright 2012-01-24 14:08:36 -05:00
iwl-mac80211.c iwlwifi: support explicit monitor interface 2012-05-16 13:08:21 -04:00
iwl-modparams.h iwlwifi: remove the iwl_shared reference 2012-05-08 21:53:44 -04:00
iwl-notif-wait.c iwlwifi: extend notification wait 2012-04-09 16:37:15 -04:00
iwl-notif-wait.h iwlwifi: extend notification wait 2012-04-09 16:37:15 -04:00
iwl-op-mode.h iwlwifi: Added foreward declaration for iwl_cfg in op_mode 2012-04-18 07:31:57 -07:00
iwl-pci.c iwlwifi: clean up module parameters 2012-04-23 14:30:51 -07:00
iwl-phy-db.c iwlwifi: don't use shared for the logger any more 2012-04-18 07:31:11 -07:00
iwl-phy-db.h iwlwifi: don't use shared for the logger any more 2012-04-18 07:31:11 -07:00
iwl-power.c iwlwifi: fix power index handling 2012-05-15 17:27:53 -04:00
iwl-power.h iwlwifi: clean up module parameters 2012-04-23 14:30:51 -07:00
iwl-prph.h iwlwifi: fix hardware queue programming 2012-04-24 14:14:55 -04:00
iwl-scan.c iwlwifi: invert the order of ssid list in scan cmd 2012-05-16 13:08:19 -04:00
iwl-testmode.c Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2012-04-26 15:03:48 -04:00
iwl-testmode.h iwlwifi: add testmode command for rx forwarding 2012-03-08 13:59:52 -05:00
iwl-trans-pcie-int.h iwlwifi: fix the Transmit Frame Descriptor rings 2012-05-25 11:12:40 -04:00
iwl-trans-pcie-rx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-07 23:35:40 -04:00
iwl-trans-pcie-tx.c iwlwifi: fix the Transmit Frame Descriptor rings 2012-05-25 11:12:40 -04:00
iwl-trans-pcie.c iwlwifi: fix the Transmit Frame Descriptor rings 2012-05-25 11:12:40 -04:00
iwl-trans.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2012-05-07 23:35:40 -04:00
iwl-ucode.c iwlwifi: remove TX/RX frame statistics 2012-04-23 14:27:56 -07:00
Kconfig iwlwifi: change the default P2P support to "Yes" 2012-04-12 14:24:35 -07:00
Makefile iwlwifi: remove TX/RX frame statistics 2012-04-23 14:27:56 -07:00