From patchwork Sat Sep 26 09:13:26 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petko Manolov X-Patchwork-Id: 258401 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=-12.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 6953EC4727F for ; Sat, 26 Sep 2020 09:13:40 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id F0BCF2389E for ; Sat, 26 Sep 2020 09:13:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (1024-bit key) header.d=nucleusys.com header.i=@nucleusys.com header.b="WwQG3ni+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728983AbgIZJNj (ORCPT ); Sat, 26 Sep 2020 05:13:39 -0400 Received: from lan.nucleusys.com ([92.247.61.126]:33718 "EHLO zztop.nucleusys.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727482AbgIZJNj (ORCPT ); Sat, 26 Sep 2020 05:13:39 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=nucleusys.com; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=F99uBSeZfJ18aGP9H3CuDPWDT5RIjPU/dNc/4l7btvE=; b=WwQG3ni+Bo0JoeWO6+ye4ljMwm pfLFBOQanELRGEmhHfqcoZLvUMInshpQPJM3xPd5hWg4Ov3vtE3MCz0Jeh29XxK2JYLAu1rznjETT C/ne2JEu7QqO2MmF1q8pOYA/SfRe6kDDalGBfRM95UzSlqLxFR/UdOKQLkElBZfW1LTg=; Received: from [94.26.108.4] (helo=karbon.lan) by zztop.nucleusys.com with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kM6Gt-0003As-Pv; Sat, 26 Sep 2020 12:13:36 +0300 From: Petko Manolov To: oneukum@suse.com Cc: gregKH@linuxfoundation.org, linux-usb@vger.kernel.org, Petko Manolov Subject: [PATCH v3 1/2] net: pegasus: Use the new usb control message API. Date: Sat, 26 Sep 2020 12:13:26 +0300 Message-Id: <20200926091327.8021-2-petkan@nucleusys.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200926091327.8021-1-petkan@nucleusys.com> References: <20200923134348.23862-9-oneukum@suse.com> <20200926091327.8021-1-petkan@nucleusys.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org From: Petko Manolov The old usb_control_msg() let the caller handle the error and also did not account for partial reads. Since these are now considered harmful, move the driver over to usb_control_msg_recv/send() calls. Added small note about why set_registers() can't be used to substitute set_register(). Signed-off-by: Petko Manolov --- drivers/net/usb/pegasus.c | 61 ++++++++++----------------------------- 1 file changed, 15 insertions(+), 46 deletions(-) diff --git a/drivers/net/usb/pegasus.c b/drivers/net/usb/pegasus.c index e92cb51a2c77..3d1bcb320ca1 100644 --- a/drivers/net/usb/pegasus.c +++ b/drivers/net/usb/pegasus.c @@ -124,62 +124,31 @@ static void async_ctrl_callback(struct urb *urb) static int get_registers(pegasus_t *pegasus, __u16 indx, __u16 size, void *data) { - u8 *buf; - int ret; - - buf = kmalloc(size, GFP_NOIO); - if (!buf) - return -ENOMEM; - - ret = usb_control_msg(pegasus->usb, usb_rcvctrlpipe(pegasus->usb, 0), - PEGASUS_REQ_GET_REGS, PEGASUS_REQT_READ, 0, - indx, buf, size, 1000); - if (ret < 0) - netif_dbg(pegasus, drv, pegasus->net, - "%s returned %d\n", __func__, ret); - else if (ret <= size) - memcpy(data, buf, ret); - kfree(buf); - return ret; + return usb_control_msg_recv(pegasus->usb, 0, PEGASUS_REQ_GET_REGS, + PEGASUS_REQT_READ, 0, indx, data, size, + 1000, GFP_NOIO); } static int set_registers(pegasus_t *pegasus, __u16 indx, __u16 size, const void *data) { - u8 *buf; - int ret; - - buf = kmemdup(data, size, GFP_NOIO); - if (!buf) - return -ENOMEM; - - ret = usb_control_msg(pegasus->usb, usb_sndctrlpipe(pegasus->usb, 0), - PEGASUS_REQ_SET_REGS, PEGASUS_REQT_WRITE, 0, - indx, buf, size, 100); - if (ret < 0) - netif_dbg(pegasus, drv, pegasus->net, - "%s returned %d\n", __func__, ret); - kfree(buf); - return ret; + return usb_control_msg_send(pegasus->usb, 0, PEGASUS_REQ_SET_REGS, + PEGASUS_REQT_WRITE, 0, indx, data, size, + 1000, GFP_NOIO); } +/* + * There is only one way to write to a single ADM8511 register and this is via + * specific control request. 'data' is ignored by the device, but it is here to + * not break the API. + */ static int set_register(pegasus_t *pegasus, __u16 indx, __u8 data) { - u8 *buf; - int ret; - - buf = kmemdup(&data, 1, GFP_NOIO); - if (!buf) - return -ENOMEM; + void *buf = &data; - ret = usb_control_msg(pegasus->usb, usb_sndctrlpipe(pegasus->usb, 0), - PEGASUS_REQ_SET_REG, PEGASUS_REQT_WRITE, data, - indx, buf, 1, 1000); - if (ret < 0) - netif_dbg(pegasus, drv, pegasus->net, - "%s returned %d\n", __func__, ret); - kfree(buf); - return ret; + return usb_control_msg_send(pegasus->usb, 0, PEGASUS_REQ_SET_REG, + PEGASUS_REQT_WRITE, data, indx, buf, 1, + 1000, GFP_NOIO); } static int update_eth_regs_async(pegasus_t *pegasus) From patchwork Sun Sep 27 12:49:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petko Manolov X-Patchwork-Id: 258397 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=-13.0 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=unavailable 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 2B346C4727E for ; Sun, 27 Sep 2020 12:49:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E9F072389F for ; Sun, 27 Sep 2020 12:49:25 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="YSpL+toI" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726617AbgI0MtW (ORCPT ); Sun, 27 Sep 2020 08:49:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726604AbgI0MtU (ORCPT ); Sun, 27 Sep 2020 08:49:20 -0400 Received: from mail-ed1-x543.google.com (mail-ed1-x543.google.com [IPv6:2a00:1450:4864:20::543]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0C14CC0613D5 for ; Sun, 27 Sep 2020 05:49:20 -0700 (PDT) Received: by mail-ed1-x543.google.com with SMTP id b12so7075035edz.11 for ; Sun, 27 Sep 2020 05:49:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=2lSGROVpoGDqKpQV7Vk31ZIPu0grmXKx5AXVK7t2aWA=; b=YSpL+toI4XwAP28Dttrl4q1k50ljTdnyLNBAwqDbE+imYCHhfDXj4o6jp33Yb8CxVU QSNRPOrNf3Wnk3CmXc3NmT187UW0E0fRQTRkc30lWPz6ZHTEbZx+aUeZByJcig66B9NE Uk28IerZkYoqLZBOt/tFpPJNTI48oSxgfP60U= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=2lSGROVpoGDqKpQV7Vk31ZIPu0grmXKx5AXVK7t2aWA=; b=iLQxAcBkR0CQG7FhqKI/mVfTP2qbJbj8i5tItikbgqvdb6nbGaQxh6aqPGbduU4tBH tUf9pBj0d8a0ynA51KZCfm6ufoljlIC+EhcH9IIeRh0ujXfN13KMLEk+yKmuSmDguzA2 hixTdz1gZ66lcEJQUZFrbmudh4kdTcXF5X1vfST13+uUtHKgQnsjNtJVlkGtZ/br65u9 YiRj04FDc9ChC/b+72rhClfe7vpJEoaQLV9Mj5rysc+QUTQdAUyld2JirsLemXKkv/MV J5azMndaXzjhhmm1u8fcgjhBhlMPQ7oOF2irXVXqR7zCrsjl3N0IN3aDlfv7dz628b7t q27A== X-Gm-Message-State: AOAM5332MgSQVWxLoTmbu9RvZ4VqZ+2HEJwsvPr3ICALgFVPJw//dUA/ WmWZkkxZcdGcsQnxktqZbOTodQ== X-Google-Smtp-Source: ABdhPJyxSaPGOBqQxH+Y/pTxrZfw1o2rmXjFy/PmXOqAuZT/2U3pYMsQlhZMvCMaW6Wxka5ynvPZ8Q== X-Received: by 2002:a05:6402:50f:: with SMTP id m15mr11280382edv.41.1601210958742; Sun, 27 Sep 2020 05:49:18 -0700 (PDT) Received: from taos.konsulko.bg (lan.nucleusys.com. [92.247.61.126]) by smtp.gmail.com with ESMTPSA id r16sm7234275edc.57.2020.09.27.05.49.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 05:49:18 -0700 (PDT) From: Petko Manolov To: gregKH@linuxfoundation.org Cc: linux-usb@vger.kernel.org, davem@davemloft.net, netdev@vger.kernel.org, Petko Manolov Subject: [PATCH RESEND v3 2/2] net: rtl8150: Use the new usb control message API. Date: Sun, 27 Sep 2020 15:49:09 +0300 Message-Id: <20200927124909.16380-3-petko.manolov@konsulko.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200927124909.16380-1-petko.manolov@konsulko.com> References: <20200923134348.23862-9-oneukum@suse.com> <20200927124909.16380-1-petko.manolov@konsulko.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The old usb_control_msg() let the caller handle the error and also did not account for partial reads. Since these are now considered harmful, move the driver over to usb_control_msg_recv/send() calls. Signed-off-by: Petko Manolov --- drivers/net/usb/rtl8150.c | 32 ++++++-------------------------- 1 file changed, 6 insertions(+), 26 deletions(-) diff --git a/drivers/net/usb/rtl8150.c b/drivers/net/usb/rtl8150.c index 733f120c852b..b3a0b188b1a1 100644 --- a/drivers/net/usb/rtl8150.c +++ b/drivers/net/usb/rtl8150.c @@ -152,36 +152,16 @@ static const char driver_name [] = "rtl8150"; */ static int get_registers(rtl8150_t * dev, u16 indx, u16 size, void *data) { - void *buf; - int ret; - - buf = kmalloc(size, GFP_NOIO); - if (!buf) - return -ENOMEM; - - ret = usb_control_msg(dev->udev, usb_rcvctrlpipe(dev->udev, 0), - RTL8150_REQ_GET_REGS, RTL8150_REQT_READ, - indx, 0, buf, size, 500); - if (ret > 0 && ret <= size) - memcpy(data, buf, ret); - kfree(buf); - return ret; + return usb_control_msg_recv(dev->udev, 0, RTL8150_REQ_GET_REGS, + RTL8150_REQT_READ, indx, 0, data, size, + 1000, GFP_NOIO); } static int set_registers(rtl8150_t * dev, u16 indx, u16 size, const void *data) { - void *buf; - int ret; - - buf = kmemdup(data, size, GFP_NOIO); - if (!buf) - return -ENOMEM; - - ret = usb_control_msg(dev->udev, usb_sndctrlpipe(dev->udev, 0), - RTL8150_REQ_SET_REGS, RTL8150_REQT_WRITE, - indx, 0, buf, size, 500); - kfree(buf); - return ret; + return usb_control_msg_send(dev->udev, 0, RTL8150_REQ_SET_REGS, + RTL8150_REQT_WRITE, indx, 0, data, size, + 1000, GFP_NOIO); } static void async_set_reg_cb(struct urb *urb) From patchwork Wed Sep 23 13:43:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 297532 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=-12.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT 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 2A965C2D0E2 for ; Wed, 23 Sep 2020 13:44:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E24D621D92 for ; Wed, 23 Sep 2020 13:44:22 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="eJ81hEHg" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726672AbgIWNoV (ORCPT ); Wed, 23 Sep 2020 09:44:21 -0400 Received: from mx2.suse.de ([195.135.220.15]:33444 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726632AbgIWNoT (ORCPT ); Wed, 23 Sep 2020 09:44:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1600868657; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:in-reply-to:in-reply-to:references:references; bh=4phvKJ0SZ2JhYuDOrybT7FClnROMhg12sNuEuEf1yK0=; b=eJ81hEHgbXpojNbe3Kx9GDvdPxG2RSK71WpUiM5FjDJph6G9t/FJBwSlN5+mwdW6uUaRDZ OpBvQ1b/AcIEBvZkVXjohFjIA9afChi4xmtOSau7PYcMayYa3g5U4PjlYQIuBUT+Al5hNO Bubabj5UKpOEhcEk3J6X4hNxB1rBKUo= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 7EDACADEE; Wed, 23 Sep 2020 13:44:54 +0000 (UTC) From: Oliver Neukum To: himadrispandya@gmail.com, gregKH@linuxfoundation.org, stern@rowland.harvard.edu, linux-usb@vger.kernel.org Cc: Oliver Neukum Subject: [RFC 08/14] USB: correct API of usb_control_msg_send/recv Date: Wed, 23 Sep 2020 15:43:42 +0200 Message-Id: <20200923134348.23862-9-oneukum@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20200923134348.23862-1-oneukum@suse.com> References: <20200923134348.23862-1-oneukum@suse.com> Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org They need to specify how memory is to be allocated, as control messages need to work in contexts that require GFP_NOIO. Signed-off-by: Oliver Neukum --- drivers/usb/core/message.c | 25 ++++++++++++++++--------- include/linux/usb.h | 6 ++++-- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c index 1580694e3b95..f4107b9e8c38 100644 --- a/drivers/usb/core/message.c +++ b/drivers/usb/core/message.c @@ -174,6 +174,7 @@ EXPORT_SYMBOL_GPL(usb_control_msg); * @size: length in bytes of the data to send * @timeout: time in msecs to wait for the message to complete before timing * out (if 0 the wait is forever) + * @memflags: the flags for memory allocation for buffers * * Context: !in_interrupt () * @@ -196,7 +197,8 @@ EXPORT_SYMBOL_GPL(usb_control_msg); */ int usb_control_msg_send(struct usb_device *dev, __u8 endpoint, __u8 request, __u8 requesttype, __u16 value, __u16 index, - const void *driver_data, __u16 size, int timeout) + const void *driver_data, __u16 size, int timeout, + gfp_t memflags) { unsigned int pipe = usb_sndctrlpipe(dev, endpoint); int ret; @@ -206,7 +208,7 @@ int usb_control_msg_send(struct usb_device *dev, __u8 endpoint, __u8 request, return -EINVAL; if (size) { - data = kmemdup(driver_data, size, GFP_KERNEL); + data = kmemdup(driver_data, size, memflags); if (!data) return -ENOMEM; } @@ -235,6 +237,7 @@ EXPORT_SYMBOL_GPL(usb_control_msg_send); * @size: length in bytes of the data to be received * @timeout: time in msecs to wait for the message to complete before timing * out (if 0 the wait is forever) + * @memflags: the flags for memory allocation for buffers * * Context: !in_interrupt () * @@ -263,7 +266,8 @@ EXPORT_SYMBOL_GPL(usb_control_msg_send); */ int usb_control_msg_recv(struct usb_device *dev, __u8 endpoint, __u8 request, __u8 requesttype, __u16 value, __u16 index, - void *driver_data, __u16 size, int timeout) + void *driver_data, __u16 size, int timeout, + gfp_t memflags) { unsigned int pipe = usb_rcvctrlpipe(dev, endpoint); int ret; @@ -272,7 +276,7 @@ int usb_control_msg_recv(struct usb_device *dev, __u8 endpoint, __u8 request, if (!size || !driver_data || usb_pipe_type_check(dev, pipe)) return -EINVAL; - data = kmalloc(size, GFP_KERNEL); + data = kmalloc(size, memflags); if (!data) return -ENOMEM; @@ -1085,7 +1089,8 @@ int usb_set_isoch_delay(struct usb_device *dev) USB_REQ_SET_ISOCH_DELAY, USB_DIR_OUT | USB_TYPE_STANDARD | USB_RECIP_DEVICE, dev->hub_delay, 0, NULL, 0, - USB_CTRL_SET_TIMEOUT); + USB_CTRL_SET_TIMEOUT, + GFP_NOIO); } /** @@ -1206,7 +1211,7 @@ int usb_clear_halt(struct usb_device *dev, int pipe) result = usb_control_msg_send(dev, 0, USB_REQ_CLEAR_FEATURE, USB_RECIP_ENDPOINT, USB_ENDPOINT_HALT, endp, NULL, 0, - USB_CTRL_SET_TIMEOUT); + USB_CTRL_SET_TIMEOUT, GFP_NOIO); /* don't un-halt or force to DATA0 except on success */ if (result) @@ -1574,7 +1579,8 @@ int usb_set_interface(struct usb_device *dev, int interface, int alternate) ret = usb_control_msg_send(dev, 0, USB_REQ_SET_INTERFACE, USB_RECIP_INTERFACE, alternate, - interface, NULL, 0, 5000); + interface, NULL, 0, 5000, + GFP_NOIO); /* 9.4.10 says devices don't need this and are free to STALL the * request if the interface only has one alternate setting. @@ -1710,7 +1716,8 @@ int usb_reset_configuration(struct usb_device *dev) } retval = usb_control_msg_send(dev, 0, USB_REQ_SET_CONFIGURATION, 0, config->desc.bConfigurationValue, 0, - NULL, 0, USB_CTRL_SET_TIMEOUT); + NULL, 0, USB_CTRL_SET_TIMEOUT, + GFP_NOIO); if (retval) { usb_hcd_alloc_bandwidth(dev, NULL, NULL, NULL); usb_enable_lpm(dev); @@ -2098,7 +2105,7 @@ int usb_set_configuration(struct usb_device *dev, int configuration) ret = usb_control_msg_send(dev, 0, USB_REQ_SET_CONFIGURATION, 0, configuration, 0, NULL, 0, - USB_CTRL_SET_TIMEOUT); + USB_CTRL_SET_TIMEOUT, GFP_NOIO); if (ret && cp) { /* * All the old state is gone, so what else can we do? diff --git a/include/linux/usb.h b/include/linux/usb.h index a5460f08126e..7d72c4e0713c 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h @@ -1804,10 +1804,12 @@ extern int usb_bulk_msg(struct usb_device *usb_dev, unsigned int pipe, /* wrappers around usb_control_msg() for the most common standard requests */ int usb_control_msg_send(struct usb_device *dev, __u8 endpoint, __u8 request, __u8 requesttype, __u16 value, __u16 index, - const void *data, __u16 size, int timeout); + const void *data, __u16 size, int timeout, + gfp_t memflags); int usb_control_msg_recv(struct usb_device *dev, __u8 endpoint, __u8 request, __u8 requesttype, __u16 value, __u16 index, - void *data, __u16 size, int timeout); + void *data, __u16 size, int timeout, + gfp_t memflags); extern int usb_get_descriptor(struct usb_device *dev, unsigned char desctype, unsigned char descindex, void *buf, int size); extern int usb_get_status(struct usb_device *dev,