From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.0 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CBA5EC43381 for ; Sat, 30 Mar 2019 19:55:43 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 8E6102184D for ; Sat, 30 Mar 2019 19:55:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1553975743; bh=kkFRKYn4USFFBOpzplkqHRk9C6yq/yXU8fsfWeWjQj0=; h=Subject:To:Cc:From:Date:List-ID:From; b=B2MF3NdxbFxFlvhW59Ci2cPOPpqx9uuinH5lrYJtPVs9h7Sgf14QUEYGm2hPwrli4 TnjiePsCkpkGud994mcnnVxv10PN5zdFCw6CxQ5lD1NrX+zxS5IFXknT6yWssUKXWU P+vvnF4FVqBT/dl1utlw/IkaKjpuo26OPWK+OWcs= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730924AbfC3Tzn (ORCPT ); Sat, 30 Mar 2019 15:55:43 -0400 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:36197 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730815AbfC3Tzn (ORCPT ); Sat, 30 Mar 2019 15:55:43 -0400 Received: from compute6.internal (compute6.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id B976E20DCE; Sat, 30 Mar 2019 15:55:41 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Sat, 30 Mar 2019 15:55:41 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; bh=gs0GjE LWkbNM3bHQ2nrn5N+FcH8tn+s/EiOlSnTiw6A=; b=vhLLqG+Cl9E/gNrpKB7is3 obAVZLl8xezkE9CZsgrYO/FxagIe3ZUFIwlx6lDoH19e93qJvsQ4d/7qAqpFZ15m jZebyfdQo3xAzsrvDDINriAwRXs50tQhJnwlHZ9FIbvQqdgJgFDWY0UNDHkoONqF VuTCm/oJ0fyUClb8Boly+eH0+y/2Jfr+olibrFnlQFqqiTrmsCFQh9gikxOIoxZW i7mOl4Kqy6LHWcZB3WESNPMl5pLHPUFdUAeJs5KmFlpt7n7rhImYWEmSN6gKg0hD /8Qa6dlbrBdYo8UDzDCgTS8cKTkkoXs2pQGLaxV7r8qC6qVuDHLEnYo43BEwXOcQ == X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedutddrkeelgddufedvucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucenucfjughrpefuvffhfffkgggtgfesthekredttd dtlfenucfhrhhomhepoehgrhgvghhkhheslhhinhhugihfohhunhgurghtihhonhdrohhr gheqnecukfhppeeivddrudduledrudeiiedrleenucfrrghrrghmpehmrghilhhfrhhomh epghhrvghgsehkrhhorghhrdgtohhmnecuvehluhhsthgvrhfuihiivgepud X-ME-Proxy: Received: from localhost (unknown [62.119.166.9]) by mail.messagingengine.com (Postfix) with ESMTPA id 6C939E464B; Sat, 30 Mar 2019 15:55:40 -0400 (EDT) Subject: FAILED: patch "[PATCH] phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs" failed to apply to 4.9-stable tree To: wens@csie.org, gregkh@linuxfoundation.org, stable@vger.kernel.org Cc: From: Date: Sat, 30 Mar 2019 20:55:38 +0100 Message-ID: <15539757383467@kroah.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ANSI_X3.4-1968 Content-Transfer-Encoding: 8bit Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org The patch below does not apply to the 4.9-stable tree. If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to . thanks, greg k-h ------------------ original commit in Linus's tree ------------------ >From 1396929e8a903db80425343cacca766a18ad6409 Mon Sep 17 00:00:00 2001 From: Chen-Yu Tsai Date: Fri, 22 Mar 2019 16:51:07 +0800 Subject: [PATCH] phy: sun4i-usb: Support set_mode to USB_HOST for non-OTG PHYs While only the first PHY supports mode switching, the remaining PHYs work in USB host mode. They should support set_mode with mode=USB_HOST instead of failing. This is especially needed now that the USB core does set_mode for all USB ports, which was added in commit b97a31348379 ("usb: core: comply to PHY framework"). Make set_mode with mode=USB_HOST a no-op instead of failing for the non-OTG USB PHYs. Fixes: 6ba43c291961 ("phy-sun4i-usb: Add support for phy_set_mode") Signed-off-by: Chen-Yu Tsai Cc: stable Signed-off-by: Greg Kroah-Hartman diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c index 5163097b43df..4bbd9ede38c8 100644 --- a/drivers/phy/allwinner/phy-sun4i-usb.c +++ b/drivers/phy/allwinner/phy-sun4i-usb.c @@ -485,8 +485,11 @@ static int sun4i_usb_phy_set_mode(struct phy *_phy, struct sun4i_usb_phy_data *data = to_sun4i_usb_phy_data(phy); int new_mode; - if (phy->index != 0) + if (phy->index != 0) { + if (mode == PHY_MODE_USB_HOST) + return 0; return -EINVAL; + } switch (mode) { case PHY_MODE_USB_HOST: