1. 22 3月, 2018 3 次提交
  2. 21 3月, 2018 2 次提交
  3. 20 3月, 2018 2 次提交
  4. 19 3月, 2018 2 次提交
  5. 18 3月, 2018 5 次提交
  6. 17 3月, 2018 3 次提交
  7. 16 3月, 2018 4 次提交
    • F
      net: systemport: Rewrite __bcm_sysport_tx_reclaim() · 484d802d
      Florian Fainelli 提交于
      There is no need for complex checking between the last consumed index
      and current consumed index, a simple subtraction will do.
      
      This also eliminates the possibility of a permanent transmit queue stall
      under the following conditions:
      
      - one CPU bursts ring->size worth of traffic (up to 256 buffers), to the
        point where we run out of free descriptors, so we stop the transmit
        queue at the end of bcm_sysport_xmit()
      
      - because of our locking, we have the transmit process disable
        interrupts which means we can be blocking the TX reclamation process
      
      - when TX reclamation finally runs, we will be computing the difference
        between ring->c_index (last consumed index by SW) and what the HW
        reports through its register
      
      - this register is masked with (ring->size - 1) = 0xff, which will lead
        to stripping the upper bits of the index (register is 16-bits wide)
      
      - we will be computing last_tx_cn as 0, which means there is no work to
        be done, and we never wake-up the transmit queue, leaving it
        permanently disabled
      
      A practical example is e.g: ring->c_index aka last_c_index = 12, we
      pushed 256 entries, HW consumer index = 268, we mask it with 0xff = 12,
      so last_tx_cn == 0, nothing happens.
      
      Fixes: 80105bef ("net: systemport: add Broadcom SYSTEMPORT Ethernet MAC driver")
      Signed-off-by: NFlorian Fainelli <f.fainelli@gmail.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      484d802d
    • H
      Bluetooth: hci_bcm: Set pulsed_host_wake flag in sleep parameters · e07c99b0
      Hans de Goede 提交于
      The IRQ output of the bcm bt-device is really a level IRQ signal, which
      signals a logical high as long as the device's buffer contains data. Since
      the draining in the buffer is done in the tty driver, we cannot (easily)
      wait in a threaded interrupt handler for the draining, after which the
      IRQ should go low again.
      
      So instead we treat the IRQ as an edge interrupt. This opens the window
      for a theoretical race where we wakeup, read some data and then autosuspend
      *before* the IRQ has gone (logical) low, followed by the device just at
      that moment receiving more data, causing the IRQ to stay high and we never
      see an edge.
      
      Since we call pm_runtime_mark_last_busy() on every received byte, there
      should be plenty time for the IRQ to go (logical) low before we ever
      suspend, so this should never happen, but after commit 43fff768
      ("Bluetooth: hci_bcm: Streamline runtime PM code"), which has been reverted
      since, this was actually happening causing the device to get stuck in
      runtime suspend.
      
      The bcm bt-device actually has a workaround for this, if we set the
      pulsed_host_wake flag in the sleep parameters, then the device monitors
      if the host is draining the buffer and if not then after a timeout the
      device will pulse the IRQ line, causing us to see an edge, fixing the
      stuck in suspend condition.
      
      This commit sets the pulsed_host_wake flag to fix the (mostly theoretical)
      race caused by us treating the IRQ as an edge IRQ.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Reviewed-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      e07c99b0
    • H
      Revert "Bluetooth: hci_bcm: Streamline runtime PM code" · b09c6152
      Hans de Goede 提交于
      This reverts commit 43fff768 ("Bluetooth: hci_bcm: Streamline runtime
      PM code"). The commit msg for this commit states "No functional change
      intended.", but replacing:
      
       pm_runtime_get();
       pm_runtime_mark_last_busy();
       pm_runtime_put_autosuspend();
      
      with:
      
       pm_request_resume();
      
      Does result in a functional change, pm_request_resume() only calls
      pm_runtime_mark_last_busy() if the device was suspended before the call.
      
      This results in the following happening:
      
      1) Device is runtime suspended
      2) Device drives host_wake IRQ logically high as it starts receiving data
      3) bcm_host_wake() gets called, causes the device to runtime-resume,
         current time gets marked as last_busy time
      4) After 5 seconds the autosuspend timer expires and the dev autosuspends
         as no one has been calling pm_runtime_mark_last_busy(), the device was
         resumed during those 5 seconds, so all the pm_request_resume() calls
         while receiving data and/or bcm_host_wake() calls were nops
      5) If 4) happens while the device has (just received) data in its buffer to
         be read by the host the IRQ line is *already* / still logically high
         when we autosuspend and since we use an edge triggered IRQ, the IRQ
         will never trigger, causing the device to get stuck in suspend
      
      Therefor this commit has to be reverted, so that we avoid the device
      getting stuck in suspend.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Acked-by: NLukas Wunner <lukas@wunner.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      b09c6152
    • T
      Bluetooth: btusb: Fix quirk for Atheros 1525/QCA6174 · f44cb4b1
      Takashi Iwai 提交于
      The Atheros 1525/QCA6174 BT doesn't seem working properly on the
      recent kernels, as it tries to load a wrong firmware
      ar3k/AthrBT_0x00000200.dfu and it fails.
      
      This seems to have been a problem for some time, and the known
      workaround is to apply BTUSB_QCA_ROM quirk instead of BTUSB_ATH3012.
      
      The device in question is:
      
      T: Bus=01 Lev=01 Prnt=01 Port=09 Cnt=03 Dev#=  4 Spd=12   MxCh= 0
      D: Ver= 1.10 Cls=e0(wlcon) Sub=01 Prot=01 MxPS=64 #Cfgs=  1
      P: Vendor=0cf3 ProdID=3004 Rev= 0.01
      C:* #Ifs= 2 Cfg#= 1 Atr=e0 MxPwr=100mA
      I:* If#= 0 Alt= 0 #EPs= 3 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=81(I) Atr=03(Int.) MxPS=  16 Ivl=1ms
      E: Ad=82(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      E: Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
      I:* If#= 1 Alt= 0 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS=   0 Ivl=1ms
      I: If#= 1 Alt= 1 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS=   9 Ivl=1ms
      I: If#= 1 Alt= 2 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS=  17 Ivl=1ms
      I: If#= 1 Alt= 3 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS=  25 Ivl=1ms
      I: If#= 1 Alt= 4 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS=  33 Ivl=1ms
      I: If#= 1 Alt= 5 #EPs= 2 Cls=e0(wlcon) Sub=01 Prot=01 Driver=btusb
      E: Ad=83(I) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      E: Ad=03(O) Atr=01(Isoc) MxPS=  49 Ivl=1ms
      
      Bugzilla: http://bugzilla.opensuse.org/show_bug.cgi?id=1082504Reported-by: NIvan Levshin <ivan.levshin@microfocus.com>
      Tested-by: NIvan Levshin <ivan.levshin@microfocus.com>
      Cc: <stable@vger.kernel.org>
      Signed-off-by: NTakashi Iwai <tiwai@suse.de>
      Signed-off-by: NMarcel Holtmann <marcel@holtmann.org>
      f44cb4b1
  8. 15 3月, 2018 7 次提交
  9. 14 3月, 2018 2 次提交
  10. 13 3月, 2018 3 次提交
  11. 12 3月, 2018 7 次提交