lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20230110081938.30308-1-yangyinglu@loongson.cn>
Date:   Tue, 10 Jan 2023 16:19:38 +0800
From:   yangyinglu <yangyinglu@...ngson.cn>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        Alan Stern <stern@...land.harvard.edu>,
        Mathias Nyman <mathias.nyman@...ux.intel.com>,
        Douglas Anderson <dianders@...omium.org>,
        Eugeniu Rosca <erosca@...adit-jv.com>,
        Bhuvanesh Surachari <Bhuvanesh_Surachari@...tor.com>,
        Matthias Kaehlcke <mka@...omium.org>,
        Kai-Heng Feng <kai.heng.feng@...onical.com>,
        Ray Chi <raychi@...gle.com>,
        Michael Grzeschik <m.grzeschik@...gutronix.de>,
        linux-usb@...r.kernel.org, linux-kernel@...r.kernel.org
Cc:     Yinbo Zhu <zhuyinbo@...ngson.cn>,
        yangyinglu <yangyinglu@...ngson.cn>
Subject: [PATCH v1] usb: handle warm-reset port requests on hub_init

USB-C storage device not detected on USB 3.0 host when
plugged in after boot, so need to warm-reset port

Signed-off-by: yangyinglu <yangyinglu@...ngson.cn>
---
 drivers/usb/core/hub.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/usb/core/hub.c b/drivers/usb/core/hub.c
index 77e73fc8d673..bd4496b80c2d 100644
--- a/drivers/usb/core/hub.c
+++ b/drivers/usb/core/hub.c
@@ -1159,7 +1159,7 @@ static void hub_activate(struct usb_hub *hub, enum hub_activation_type type)
 		}
 
 		/* Make sure a warm-reset request is handled by port_event */
-		if (type == HUB_RESUME &&
+		if ((type == HUB_RESUME || type == HUB_INIT2) &&
 		    hub_port_warm_reset_required(hub, port1, portstatus))
 			set_bit(port1, hub->event_bits);
 
-- 
2.20.1

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ