From patchwork Tue Jul 2 13:35:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 11027699 X-Patchwork-Delegate: bhelgaas@google.com Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6F12113B1 for ; Tue, 2 Jul 2019 11:28:17 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5A6E2284A5 for ; Tue, 2 Jul 2019 11:28:17 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4943F284B3; Tue, 2 Jul 2019 11:28:17 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCC93284A5 for ; Tue, 2 Jul 2019 11:28:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726193AbfGBL2Q (ORCPT ); Tue, 2 Jul 2019 07:28:16 -0400 Received: from szxga07-in.huawei.com ([45.249.212.35]:57426 "EHLO huawei.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725867AbfGBL2Q (ORCPT ); Tue, 2 Jul 2019 07:28:16 -0400 Received: from DGGEMS401-HUB.china.huawei.com (unknown [172.30.72.59]) by Forcepoint Email with ESMTP id 544329EB6D970CEBF76A; Tue, 2 Jul 2019 19:28:09 +0800 (CST) Received: from huawei.com (10.175.100.202) by DGGEMS401-HUB.china.huawei.com (10.3.19.201) with Microsoft SMTP Server id 14.3.439.0; Tue, 2 Jul 2019 19:28:00 +0800 From: Miaohe Lin To: , , , , , , CC: , Subject: [PATCH] net: pci: Fix hotplug event timeout with shpchp Date: Tue, 2 Jul 2019 13:35:19 +0000 Message-ID: <1562074519-205047-1-git-send-email-linmiaohe@huawei.com> X-Mailer: git-send-email 1.8.3.4 MIME-Version: 1.0 X-Originating-IP: [10.175.100.202] X-CFilter-Loop: Reflected Sender: linux-pci-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pci@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Hotplug a network card would take more than 5 seconds in qemu + shpchp scene. It’s because 5 seconds delayed_work in func handle_button_press_event with case STATIC_STATE. And this will break some protocols with timeout within 5 seconds. Signed-off-by: Miaohe Lin --- drivers/pci/hotplug/shpchp_ctrl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/pci/hotplug/shpchp_ctrl.c b/drivers/pci/hotplug/shpchp_ctrl.c index 078003dcde5b..cbb00acaba0d 100644 --- a/drivers/pci/hotplug/shpchp_ctrl.c +++ b/drivers/pci/hotplug/shpchp_ctrl.c @@ -478,7 +478,7 @@ static void handle_button_press_event(struct slot *p_slot) p_slot->hpc_ops->green_led_blink(p_slot); p_slot->hpc_ops->set_attention_status(p_slot, 0); - queue_delayed_work(p_slot->wq, &p_slot->work, 5*HZ); + queue_delayed_work(p_slot->wq, &p_slot->work, 0); break; case BLINKINGOFF_STATE: case BLINKINGON_STATE: