Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2826441pxb; Mon, 1 Nov 2021 02:37:45 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwCCk7TIA2mM8rhmv7PEO73lHV8jlTNNL1DJ1xaSY6N79nBQSEF+Co4xpf3l9cpqNVZ7Pra X-Received: by 2002:aa7:dc0b:: with SMTP id b11mr39579111edu.227.1635759465201; Mon, 01 Nov 2021 02:37:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1635759465; cv=none; d=google.com; s=arc-20160816; b=NJp+5bA8y1RfnT1I6lTBXrbzHEV8+pxfGOb3uDaacL0HQgDtVg4z7Vxp9PSkcnLtxc 8DSsqEJIuVQY4vFFmo7nzu45bBqCppgrzgbyZdnXsxlGM8GNrs2BJ/Fq1kBBuuo7KOBm +xJnL0WFtBe7zXIBx129Z0rhGWb6htcvpHCjpGSytdIIWtTw8IGjTzCbVwvpaWzK9BHo C/rXKqALNfS1VUQH8BssvJOQYH5HWhij0mum04JQMYe5lARhIJA329bojmueGXiBwijv PJxmJViu+x+uuZZf8F+FS8s/UJcATb4U08fi2u5sEzhMRSOUzy6Y2quQC0C4F+J2GRPc leFw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=McI43gVGY4MfuFPl0mGLMH+ASv68o+QgeZlTJ6MLH68=; b=WgAHualLyFmSkzJhpxJxHpnndYrpY9nAWhL+6/K5HkIB/Y7YGE2ji2LQmJ3A7/OyUb 5hpxo2KLfiRnoUOAf2pvLYulVtftEQsiyLkN9Ck13w2tp3SVgBtkcfGnsPwtHsfy33IT 2zeYcFizhvEmnoWR0Lur6ezbgHgEY7OhczNWPnGIIA/LwBnMF6BRyjAJ5OIayPZqblXa 0DNM1Lwg+SryfWC4tpwQkWuqA2+Ma8/V4et9AKlJviRV4TxYCZgbzWDDBz6B5aBNxfia xh7GkcdgEmYwO9wiXTP1y0B4/oYQks+kxOiMozEYM/ULyRH1quR3OqLl2c+ZcxZk6TF1 JGeQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vB/Elo1W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id qk12si23604154ejc.631.2021.11.01.02.37.12; Mon, 01 Nov 2021 02:37:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b="vB/Elo1W"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233403AbhKAJgt (ORCPT + 99 others); Mon, 1 Nov 2021 05:36:49 -0400 Received: from mail.kernel.org ([198.145.29.99]:43530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233552AbhKAJdl (ORCPT ); Mon, 1 Nov 2021 05:33:41 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 8DB1D6124F; Mon, 1 Nov 2021 09:24:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1635758698; bh=uW2ikQZZ73LWKOLheC8qD8eADTA8itKW9FqmnTgLSC0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=vB/Elo1W6pim9DP+rdwRA//bFaEQQivalB54+38Ee+5ilZMfcnFy60H5vhszJYch2 vDyD4lTETUbej00zMgvNSngBnncFF+GZlSbRFUsCIB3pgVtYpc0L/IrRxcD0aintuz 2nBNM47bfg8Enck133rAfBDHbVoLTfuwnfR7X60s= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Johan Hovold , Ulf Hansson Subject: [PATCH 5.10 20/77] mmc: vub300: fix control-message timeouts Date: Mon, 1 Nov 2021 10:17:08 +0100 Message-Id: <20211101082516.150274749@linuxfoundation.org> X-Mailer: git-send-email 2.33.1 In-Reply-To: <20211101082511.254155853@linuxfoundation.org> References: <20211101082511.254155853@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Johan Hovold commit 8c8171929116cc23f74743d99251eedadf62341a upstream. USB control-message timeouts are specified in milliseconds and should specifically not vary with CONFIG_HZ. Fixes: 88095e7b473a ("mmc: Add new VUB300 USB-to-SD/SDIO/MMC driver") Cc: stable@vger.kernel.org # 3.0 Signed-off-by: Johan Hovold Link: https://lore.kernel.org/r/20211025115608.5287-1-johan@kernel.org Signed-off-by: Ulf Hansson Signed-off-by: Greg Kroah-Hartman --- drivers/mmc/host/vub300.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) --- a/drivers/mmc/host/vub300.c +++ b/drivers/mmc/host/vub300.c @@ -576,7 +576,7 @@ static void check_vub300_port_status(str GET_SYSTEM_PORT_STATUS, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x0000, 0x0000, &vub300->system_port_status, - sizeof(vub300->system_port_status), HZ); + sizeof(vub300->system_port_status), 1000); if (sizeof(vub300->system_port_status) == retval) new_system_port_status(vub300); } @@ -1241,7 +1241,7 @@ static void __download_offload_pseudocod SET_INTERRUPT_PSEUDOCODE, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x0000, 0x0000, - xfer_buffer, xfer_length, HZ); + xfer_buffer, xfer_length, 1000); kfree(xfer_buffer); if (retval < 0) goto copy_error_message; @@ -1284,7 +1284,7 @@ static void __download_offload_pseudocod SET_TRANSFER_PSEUDOCODE, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x0000, 0x0000, - xfer_buffer, xfer_length, HZ); + xfer_buffer, xfer_length, 1000); kfree(xfer_buffer); if (retval < 0) goto copy_error_message; @@ -1991,7 +1991,7 @@ static void __set_clock_speed(struct vub usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0), SET_CLOCK_SPEED, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - 0x00, 0x00, buf, buf_array_size, HZ); + 0x00, 0x00, buf, buf_array_size, 1000); if (retval != 8) { dev_err(&vub300->udev->dev, "SET_CLOCK_SPEED" " %dkHz failed with retval=%d\n", kHzClock, retval); @@ -2013,14 +2013,14 @@ static void vub300_mmc_set_ios(struct mm usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0), SET_SD_POWER, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - 0x0000, 0x0000, NULL, 0, HZ); + 0x0000, 0x0000, NULL, 0, 1000); /* must wait for the VUB300 u-proc to boot up */ msleep(600); } else if ((ios->power_mode == MMC_POWER_UP) && !vub300->card_powered) { usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0), SET_SD_POWER, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - 0x0001, 0x0000, NULL, 0, HZ); + 0x0001, 0x0000, NULL, 0, 1000); msleep(600); vub300->card_powered = 1; } else if (ios->power_mode == MMC_POWER_ON) { @@ -2275,14 +2275,14 @@ static int vub300_probe(struct usb_inter GET_HC_INF0, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x0000, 0x0000, &vub300->hc_info, - sizeof(vub300->hc_info), HZ); + sizeof(vub300->hc_info), 1000); if (retval < 0) goto error5; retval = usb_control_msg(vub300->udev, usb_sndctrlpipe(vub300->udev, 0), SET_ROM_WAIT_STATES, USB_DIR_OUT | USB_TYPE_VENDOR | USB_RECIP_DEVICE, - firmware_rom_wait_states, 0x0000, NULL, 0, HZ); + firmware_rom_wait_states, 0x0000, NULL, 0, 1000); if (retval < 0) goto error5; dev_info(&vub300->udev->dev, @@ -2297,7 +2297,7 @@ static int vub300_probe(struct usb_inter GET_SYSTEM_PORT_STATUS, USB_DIR_IN | USB_TYPE_VENDOR | USB_RECIP_DEVICE, 0x0000, 0x0000, &vub300->system_port_status, - sizeof(vub300->system_port_status), HZ); + sizeof(vub300->system_port_status), 1000); if (retval < 0) { goto error4; } else if (sizeof(vub300->system_port_status) == retval) {