• Andreas Noever's avatar
    thunderbolt: Fix resume quirk for Falcon Ridge 4C. · 25eb7e5c
    Andreas Noever authored
    The quirk 'quirk_apple_wait_for_thunderbolt' did not fire on Falcon
    Ridge 4C controllers with subdevice/subvendor set to zero. This lead
    to lost pci devices on system resume.
    
    Older thunderbolt controllers (pre Falcon Ridge) used the same device id
    for bridges and for the controller. On Apple hardware the subvendor- &
    subdevice-ids were set for the controller, but not for bridges. So that
    is what was used to differentiate between the two. Starting with Falcon
    Ridge bridges and controllers received different device ids.
    Additionally on some MacBookPro models (but not all) the
    subvendor/subdevice was zeroed.
    
    Starting with a42fb351 (thunderbolt: Allow loading of module on recent
    Apple MacBooks with thunderbolt 2 controller) the thunderbolt driver
    binds to all Falcon Ridge 4C controllers (irregardless of
    subvendor/subdevice). The corresponding quirk was not updated.
    
    This commit changes the quirk to check the device class instead of its
    subvendor-/subdeviceids. This works for all generations of Thunderbolt
    controllers.
    Signed-off-by: default avatarAndreas Noever <andreas.noever@gmail.com>
    Reviewed-by: default avatarLukas Wunner <lukas@wunner.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    25eb7e5c
quirks.c 155 KB