1. 07 3月, 2016 1 次提交
    • L
      iwlwifi: pcie: forbid RTPM on device removal · 4479a899
      Luca Coelho 提交于
      The pci driver keeps any unbound device in active state and forbids
      runtime PM.  When our driver gets probed, we take control of the
      state.  When the device is released (i.e. during unbind or module
      removal), we should return the state to what it was before.  To do so,
      we need to forbid RTPM in the driver remove op.
      
      Additionally, remove an unnecessary pm_runtime_disable() call, move
      the initial ref_count setting to a better place and add some comments
      explaining what is going on.
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      4479a899
  2. 02 3月, 2016 1 次提交
  3. 28 2月, 2016 6 次提交
  4. 15 2月, 2016 2 次提交
    • A
      iwlwifi: pcie: fix erroneous return value · 20aa99bb
      Anton Protopopov 提交于
      The iwl_trans_pcie_start_fw() function may return the positive value EIO
      instead of -EIO in case of error.
      Signed-off-by: NAnton Protopopov <a.s.protopopov@gmail.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      20aa99bb
    • E
      iwlwifi: pcie: fix RF-Kill vs. firmware load race · a6bd005f
      Emmanuel Grumbach 提交于
      When we load the firmware, we hold trans_pcie->mutex to
      avoid nested flows. We also rely on the ISR to wake up the
      thread when the DMA has finished copying a chunk. During
      this flow, we enable the RF-Kill interrupt.
      
      The problem is that the RF-Kill interrupt handler can take
      the mutex and bring the device down. This means that if
      we load the firmware while the RF-Kill switch is enabled
      (which will happen when we load the INIT firmware to read
      the device's capabilities and register to mac80211), we
      may get an RF-Kill interrupt immediately and the ISR will
      be waiting for the mutex held by the thread that is
      currently loading the firmware. At this stage, the ISR
      won't be able to service the DMA's interrupt needed to
      wake up the thread that load the firmware. We are in a
      deadlock situation which ends when the thread that loads
      the firmware fails on timeout and releases the mutex.
      
      To fix this, take the mutex later in the flow, disable
      the interrupts and synchronize_irq() to give a chance to
      the RF-Kill interrupt to run and complete.
      After that, mask all the interrupts besides the DMA
      interrupt and proceed with firmware load. Make sure to
      check that there was no RF-Kill interrupt when the
      interrupts were disabled.
      
      This fixes https://bugzilla.kernel.org/show_bug.cgi?id=111361Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      a6bd005f
  5. 01 2月, 2016 5 次提交
  6. 31 1月, 2016 3 次提交
    • S
      iwlwifi: pcie: add 9000 series multi queue rx DMA support · 96a6497b
      Sara Sharon 提交于
      The 9000 series introduces several changes in the device
      DMA operation.
      As the device now supports multi-queue rx, several DMA channels
      should be configured.
      The flows of providing the device with the allocated RBDs now
      changes as well - the device maintains a separate table of used
      and free table.
      
      The hardware may use the free table to feed RBDs to any queue.
      This requires maintaing a shared table to map returned RBDs to
      the original RXB - for that purpose the VID is introduced - an
      internal identifier of the RB placed in the lower 12 bits and
      returned by HW in the used data.
      
      Another change is the support of 64 bit DMA address.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      96a6497b
    • S
      iwlwifi: pcie: add infrastructure for multi-queue rx · 78485054
      Sara Sharon 提交于
      The 9000 series devices will support multi rx queues.
      Current code has one static rx queue - change it to allocate
      a number of queues per the device capability (pre-9000 devices
      have the number of rx queues set to one).
      
      Subsequent generalizations are:
      
      Change the code to access an explicit numbered rx queue only
      when the queue number is known - when handling interrupt, when
      accessing the default queue and when iterating the queues.
      The rest of the functions will receive the rx queue as a pointer.
      
      Generalize the warning in allocation failure to consider the
      allocator status instead of a single rx queue status.
      
      Move the rx initial pool of memory buffers to be shared among
      all the queues and allocated to the default queue on init.
      Signed-off-by: NSara Sharon <sara.sharon@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      78485054
    • E
      iwlwifi: pcie: buffer packets to avoid overflowing Tx queues · 3955525d
      Emmanuel Grumbach 提交于
      When the Tx queues are full above a threshold, we
      immediately stop the mac80211's queue to stop getting new
      packets. This worked until TSO was enabled.
      With TSO, one single packet from mac80211 can use many
      descriptors since a large send needs to be split into
      several segments.
      This means that stopping mac80211's queues is not enough
      and we also need to ensure that we don't overflow the Tx
      queues with one single packet from mac80211.
      Add code to transport layer to do just that. Stop
      mac80211's queue as soon as the queue is full above the
      same threshold as before, and keep pushing the current
      packet along with its segments on the queue, but check
      that we don't overflow. If that would happen, buffer the
      segments, and send them when there is room in the Tx queue
      again. Of course, we first need to send the buffered
      segments and only then, wake up mac80211's queues.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      3955525d
  7. 25 1月, 2016 2 次提交
  8. 08 1月, 2016 3 次提交
  9. 21 12月, 2015 3 次提交
  10. 20 12月, 2015 3 次提交
  11. 13 12月, 2015 4 次提交
    • L
      iwlwifi: replace d0i3_mode and wowlan_d0i3 with more generic variables · b7282643
      Luca Coelho 提交于
      The d0i3_mode variable is used to distinguish between transports that
      handle d0i3 entry during suspend by themselves (i.e. the slave
      transports) and those which rely on the op_mode layer to do it.  The
      reason why the former do it by themselves is that they need to
      transition from d0i3 in runtime_suspend into d0i3 in system-wide
      suspend and this transition needs to happen before the op_mode's
      suspend flow is called.
      
      The wowlan_d0i3 element is also a bit confusing, because it just
      reflects the wowlan->any value for the trans to understand.  This is a
      bit unclear in the code and not generic enough for future use.
      
      To make it clearer and to generalize the platform power mode settings,
      introduce two variables to indicate the platform power management
      modes used by the transport.
      
      Additionally, in order not to take too big a step in one patch, treat
      this new variables semantically in the same way as the old d0i3_mode
      element, introducing a iwl_mvm_enter_d0i3_on_suspend() function to
      help with that.
      
      This commit also adds the foundation for a new concept where the
      firmware configuration state (i.e. D0, D3 or D0i3) is abstracted from
      the platform PM mode we are in (i.e. runtime suspend or system-wide
      suspend).
      Signed-off-by: NLuca Coelho <luciano.coelho@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      b7282643
    • S
      iwlwifi: update host command messages to new format · 39bdb17e
      Sharon Dvir 提交于
      Host commands now have a group id, express this in printed messages.
      Signed-off-by: NSharon Dvir <sharon.dvir@intel.com>
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      39bdb17e
    • E
      iwlwifi: trans: support a callback for ASYNC commands · dcbb4746
      Emmanuel Grumbach 提交于
      This allows the op_mode to request from the transport to
      call a callback when an ASYNC commands is completed by
      the firmware. The same callback will be called for all the
      commands. Pass the command whose response triggers the
      callback as a parameter to the callback itself.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      dcbb4746
    • E
      iwlwifi: pcie: allow the op_mode to block the tx queues · 0cd58eaa
      Emmanuel Grumbach 提交于
      In certain flows (see next patches), the op_mode may need to
      block the Tx queues for a short period. Provide an API for
      that. The transport is in charge of counting the number of
      times the queues are blocked since the op_mode may block the
      queues several times in a row before unblocking them.
      Signed-off-by: NEmmanuel Grumbach <emmanuel.grumbach@intel.com>
      0cd58eaa
  12. 02 12月, 2015 6 次提交
  13. 26 11月, 2015 1 次提交