1. 22 6月, 2012 2 次提交
    • I
      wlcore: Change read/write ops to return errors · 02eb1d9d
      Ido Yariv 提交于
      While bus operations may fail, either due to HW or FW issues, these are
      never propagated to higher layers. As a result, the core driver has no
      way of knowing that the operations failed, and will only recover if high
      level logic requires it (e.g. no command completion).
      
      Change read/write bus operations to return errors to let higher layer
      functionality handle these.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      02eb1d9d
    • I
      wlcore: Fix sdio out-of-sync power state · 645865fc
      Ido Yariv 提交于
      wl12xx_sdio_power_off() manually powers down the card regardless of the
      runtime pm state. If wl12xx_sdio_power_on() is called before the card
      was suspended by runtime PM, it will not power up the card.
      
      As part of the HW detection, the chip's power is toggled. Since this
      happens in the context of probing sdio, the power reference counter will
      be higher than zero. As a result, when wl12xx_sdio_power_off() is
      called, the chip will be powered down while still having a positive
      power reference counter. If the interface is quickly activated, the
      driver might try to transfer data to a powered off chip.
      
      Fix this by ensuring that wl12xx_sdio_power_on() explicitly powers on
      the chip in case runtime pm claims the chip is already powered on. To
      avoid cases in which it is not possible to determine if the chip was
      really powered on (card's power reference counter is positive), operate
      on the mmc_card instead of the function.
      
      Also verify that the chip is indeed powered on before powering off, to
      avoid wrong reference counter values in error cases.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      645865fc
  2. 05 6月, 2012 2 次提交
  3. 12 4月, 2012 4 次提交
  4. 15 2月, 2012 4 次提交
  5. 08 11月, 2011 1 次提交
  6. 12 10月, 2011 1 次提交
    • L
      wl12xx: use the same plat dev name for both SPI and SDIO · ccb62000
      Luciano Coelho 提交于
      There's no need to have the bus name included in the platform device
      name that we create.  The core driver doesn't need to know about the
      type of bus it uses.  Any differences between the buses that need to
      be handled differently in the core, can be passed in the platform data
      (as the pwr_in_suspend boolean does).
      
      Use "wl12xx" for the device name in both bus drivers.  Rename the
      platform driver name to "wl12xx_driver", just to differentiate from
      the platform device names.
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      ccb62000
  7. 11 10月, 2011 5 次提交
  8. 24 8月, 2011 1 次提交
    • I
      wl12xx: Fix validation of pm_runtime_get_sync return value · a15f1c45
      Ido Yariv 提交于
      wl1271_sdio_power_on checks if the return value of pm_runtime_get_sync
      is non-zero, and if so bails out.
      However, pm_runtime_get_sync can return a positive number which does not
      suggest an error has occurred. This is problematic for two reasons:
      
      1. The function will needlessly bail out without decrementing back the
         runtime PM reference counter.
      2. wl1271_power_on only checks if wl1271_power_on return value is
         negative. This means that wl1271_power_on will continue even if
         wl1271_sdio_power_on bailed out. As a result, sdio transactions will
         be initiated without properly enabling the sdio function and claiming
         the host. This could even lead to a kernel panic.
      
      Fix this by only checking that the return value of pm_runtime_get_sync
      is non-negative.
      Signed-off-by: NIdo Yariv <ido@wizery.com>
      Acked-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NJohn W. Linville <linville@tuxdriver.com>
      a15f1c45
  9. 22 8月, 2011 1 次提交
  10. 06 7月, 2011 1 次提交
  11. 27 6月, 2011 6 次提交
  12. 19 5月, 2011 1 次提交
    • L
      wl12xx: fix compilation error when CONFIG_PM is not set · f634a4e7
      Luciano Coelho 提交于
      There was a compilation error when PM is not enabled:
      
        CC [M]  drivers/net/wireless/wl12xx/main.o
      drivers/net/wireless/wl12xx/main.c:3653: error: unknown field 'suspend' specified in initializer
      drivers/net/wireless/wl12xx/main.c:3653: warning: initialization from incompatible pointer type
      drivers/net/wireless/wl12xx/main.c:3654: error: unknown field 'resume' specified in initializer
      drivers/net/wireless/wl12xx/main.c:3654: warning: initialization from incompatible pointer type
      
      Fix this by adding #ifdef's in the appropriate places.
      
      Cc: Eliad Peller <eliad@wizery.com>
      Signed-off-by: NLuciano Coelho <coelho@ti.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f634a4e7
  13. 13 5月, 2011 4 次提交
  14. 19 4月, 2011 7 次提交