• Andrey Yurovsky's avatar
    libertas: fix card cleanup order in SDIO driver · 23b149c1
    Andrey Yurovsky authored
    The SDIO driver sets the surpriseremoved flag before calling
    lbs_remove_card.  With IEEE PS enabled, lbs_remove_card must issue a
    command to exit IEEE PS mode, however with that flag set the command
    path is blocked and the card is never taken out of IEEE PS mode.  This
    step is required to ensure that the driver can be reloaded.  This patch
    moves the setting of surpriseremoved after lbs_remove_card is called.
    
    Tested with V9 firmware by ensuring that IEEE PS is disabled when the
    driver is removed.  Reloading the driver is not fully tested due to a
    separate issue with module reload in the SDIO driver, however this
    patch at least leaves the card in a better state when we bring the
    driver down.
    Signed-off-by: default avatarAndrey Yurovsky <andrey@cozybit.com>
    Acked-by: default avatarDan Williams <dcbw@redhat.com>
    Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
    23b149c1
if_sdio.c 24.1 KB