Re: [PATCH 2/5] pciehp: Don't enable presence notification while surprise removal is not supported.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Jul 11, 2012 at 1:48 PM, Bjorn Helgaas <bhelgaas@xxxxxxxxxx> wrote:
>>
>> When hotplug surprise is supported, attention button may not there.
>> So have to use present bit to trigger the sequence online work, and
>> offline clean up work.
>
> Well, there is an "Attention Button Present" bit.  Why wouldn't we use
> that instead of trying to infer the button's presence from Hot-Plug
> Surprise?

so you want this ?

diff --git a/drivers/pci/hotplug/pciehp_ctrl.c
b/drivers/pci/hotplug/pciehp_ctrl.c
index 27f4429..f103a4ca 100644
--- a/drivers/pci/hotplug/pciehp_ctrl.c
+++ b/drivers/pci/hotplug/pciehp_ctrl.c
@@ -463,7 +463,7 @@ static void interrupt_event_handler(struct
work_struct *work)
                break;
        case INT_PRESENCE_ON:
        case INT_PRESENCE_OFF:
-               if (!HP_SUPR_RM(ctrl))
+               if (ATTN_BUTTN(ctrl))
                        break;
                ctrl_dbg(ctrl, "Surprise Removal\n");
                handle_surprise_event(p_slot);

that should keep current user expected behavior that kernel only bring
the card online after press the button.
--
To unsubscribe from this list: send the line "unsubscribe linux-pci" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux