- 28 3月, 2014 10 次提交
-
-
由 Michal Kazior 提交于
Since copy engine allocation has been revised the ath10k_pci_ce_deinit() now simply zeroes copy engine registers. It's probably a good idea to do that before reseting for a more graceful device reset. Before ath10k_pci_ce_deinit() freed copy engine ringbuffer memory so it was required to call it after resetting. Otherwise it was possible for device to access unmapped/freed copy engine ringbuffer memory. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
Definitions by which copy engine structure are allocated do not change so it doesn't make much sense to re-create those structures each time device is booted (e.g. due to firmware recovery). This should decrease chance of memory allocation failures. While at it remove per_transfer_context pointer indirection. The array has been trailing the copy engine ringbuffer structure anyway. This also saves pointer size worth of bytes for each copy engine ringbuffer. Reported-By: NAvery Pennarun <apenwarr@gmail.com> Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
This allows to use GFP_KERNEL allocation. This should decrease chance of allocation failure, e.g. during firmware recovery. Reported-By: NAvery Pennarun <apenwarr@gmail.com> Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
Hopefully this makes it easier to debug problems in the future. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
To make it easier to debug pci problems improve the log messages in pci.c. Also change some debug messages to warning messages to more easily catch problems. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
It always contains the same constant, no need to have a separate variable for it. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
We do not really support older firmware API 1 anymore, so better remove MODULE_FIRMWARE() declarations for them and only list for API 2 files. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
The parameter name was ath10k_target_ps, but actually it should be just target_ps. Module parameter names should not use the ath10k_ prefix. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
As cold reset is not reliable with CUS223 boards, make it possible to disable cold reset entirely and only use warm reset. This makes it also easier to debug warm reset problems. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
ath10k_pci_wait_for_target_init() did really follow the style used elsewhere in ath10k. Use ath10k_pci_read/write() wrappers, simplify the while loop and improve warning messages. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
- 28 2月, 2014 4 次提交
-
-
由 Michal Kazior 提交于
One of the premises was to guarantee serialized completion handling for upper layers (HTC/WMI/HTT). Since quite some time now it is no longer necessary. The other premise was to batch up tx/rx completions to take advantage of hot caches. However frame tx/rx completion indications come in on a single pipe already so they are already batched up. More meaningful batching is done in HTT itself. This means PCI completion is no longer necessary to keep around. It just wastes memory, cycles and SLOC. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
Going through full htc tx path for htt tx is a waste of resources. By skipping it it's possible to easily submit scatter-gather to the pci hif for reduced host cpu load and improved performance. The new approach uses dma pool to store the following metadata for each tx request: * msdu fragment list * htc header * htt tx command The htt tx command contains a msdu prefetch. Instead of copying it original mapped msdu address is used to submit a second scatter-gather item to hif to make a complete htt tx command. The htt tx command itself hands over dma mapped pointers to msdus and completion of the command itself doesn't mean the frame has been sent and can be unmapped/freed. This is why htc tx completion is skipped for htt tx as all tx related resources are freed upon htt tx completion indication event (which also implicitly means htt tx command itself was completed). Since now each htt tx request effectively consists of 2 copy engine items CE_HTT_H2T_MSG_SRC_NENTRIES is updated to allow maximum of TARGET_10X_NUM_MSDU_DESC msdus being queued. This keeps the tx path resource management simple. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
PCI is capable of handling scatter-gather lists. This can be used to avoid copying memory. Change the name of the callback while at to reflect its purpose. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
The flag wasn't used anymore. No need to keep it. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
- 14 2月, 2014 3 次提交
-
-
由 Alexander Gordeev 提交于
As result deprecation of MSI-X/MSI enablement functions pci_enable_msix() and pci_enable_msi_block() all drivers using these two interfaces need to be updated to use the new pci_enable_msi_range() and pci_enable_msix_range() interfaces. Signed-off-by: NAlexander Gordeev <agordeev@redhat.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Alexander Gordeev 提交于
In case IRQ configuration is unknown possibly enabled MSIs are left enabled in ath10k_pci_deinit_irq(). This update fixes the described misbehaviour. Signed-off-by: NAlexander Gordeev <agordeev@redhat.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Alexander Gordeev 提交于
The documentation states that pci_enable_msi_block() returns the number of requests 'could have been allocated', not 'could allocate'. IOW, MSIs are *not* enabled if a positive value returned. kvalo: add commit log based on Alexander's email Signed-off-by: NAlexander Gordeev <agordeev@redhat.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
- 13 2月, 2014 1 次提交
-
-
由 Michal Kazior 提交于
Hardware CUS232 version 2 has some issues with cold reset that lead to Data Bus Errors or system hangs in some cases. It's safer to use warm reset when possible as it shouldn't trigger the aforementioned issues. Prefer warm reset over cold reset. However since warm reset doesn't work after FW crash make sure to fallback to cold reset when booting up the HW. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NMarek Puzyniak <marek.puzyniak@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
- 23 1月, 2014 1 次提交
-
-
由 Chun-Yeow Yeoh 提交于
10.x FW has no structure member sw_version_1. Thus, both fw_version_release and fw_version_build are not available. The provided fw_version_major is also wrong. Fix this by using the fw_version from struct wiphy. Signed-off-by: NChun-Yeow Yeoh <yeohchunyeow@gmail.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
- 27 11月, 2013 8 次提交
-
-
由 Michal Kazior 提交于
This can be useful for testing and debugging. This introduces new ath10k_pci module parameter `irq_mode`. By default it is 0, meaning automatic irq mode (MSI-X as long as both target HW and host platform supports it). The parameter works on a best effort basis. kvalo: fix typo "ayto" Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
It's possible for FW to panic during early boot. The patch re-introduces support to detect and print those crashes. This introduces an additional irq handler that is set for the duration of early boot and shutdown. The handler is then overriden with regular handlers upon hif start(). Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
Preparation for code re-use. Also use ioread/write wrappers. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
It's impossible to rely on disable_irq() and/or CE interrupt masking with legacy shared interrupts. Other devices sharing the same irq line may assert it while ath10k is doing something that requires no interrupts. Irq handlers are now registered after all preparations are complete so spurious/foreign interrupts won't do any harm. The handlers are unregistered when no interrupts are required (i.e. during driver teardown). This also removes the ability to receive FW early indication (since interrupts are not registered until early boot is complete). This is not mission critical (it's more of a hint that early boot failed due to unexpected FW crash) and will be re-added in a follow up patch. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
The function did a couple of things: it allocated CE completions, registered CE callbacks and enabled CE interrupts through HW registers. This cannot be so. Split the function into one that allocates CE completions and the other one that starts off CE operation. This is required for future legacy shared interrupt handling. This also fixes possible memory leak if post rx failed. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
It's not really necessary for interrupts to be used for BMI. BMI already assumes there's only one caller at a time and it works directly with CE. Make BMI poll for CE completions instead of waiting for interrupts. This makes disabling interrupts during early boot possible. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
Hardware waits until host signals whether it has chosen MSI(-X) or shared legacy interrupts. It is not required for the driver to register interrupt handlers immediately. This patch prepares the pci irq code for more changes. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
ath10k assumed all interrupts were directed to it. This isn't the case for legacy shared interrupts. ath10k consumed interrupts for other devices. Check device irq status and return IRQ_NONE when appropriate. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
- 20 11月, 2013 2 次提交
-
-
由 Kalle Valo 提交于
This makes ath10k a lot less spammy by default. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Kalle Valo 提交于
Convert the MSI failure warnings to a debug message to make them less spammy. Also convert the irq mode printout to a single print to make it easier to show it only once. Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
- 13 11月, 2013 11 次提交
-
-
由 Michal Kazior 提交于
This should make sure the device won't issue any interrupts nor access any memory after the driver is stopped/freed thus avoid memory corruption in some cases. Reported-By: NBen Greear <greearb@candelatech.com> Reported-By: NJanusz Dziedzic <janusz.dziedzic@tieto.com> Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
Add missing error reporting and adjust other prints to make everything more consistent. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
This patch moves irq registering after necessary structures have been allocated and initialized. This should prevent interrupts from causing tasklet access invalid memory pointers. Reported-By: NBen Greear <greearb@candelatech.com> Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
In case firmware crashes it may report CE completions for entries that were never submitted/filled with meaningful data. This in turn led to NULL dereferences. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
This shouldn't be silenced. This will be necessary for PCI init code reordering. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
This removes some remaining direct use of the wake register which could interfere with power state tracking of the target device. This will allow initialization code reordering. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
The check doesn't make much sense. If the address were to be 0x0000 the check would fail. In this case a 0 address isn't wrong. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
What the function does is to actually wait for the firmware indication bit to be set. Prerequisite for this is having interrupts registered. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
The function will soon be called from more than 1 place. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
It was possible for FW error tasklet to be executed during teardown. This could lead to system crashes and/or memory corruption. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-
由 Michal Kazior 提交于
It wasn't really useful to have it to begin with. This makes it a little simpler to re-arrange PCI init code as some function depended on ar_pci->ce_count being set. Signed-off-by: NMichal Kazior <michal.kazior@tieto.com> Signed-off-by: NKalle Valo <kvalo@qca.qualcomm.com>
-