From patchwork Sun Sep 27 12:49:07 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Petko Manolov X-Patchwork-Id: 258398 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=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI, SPF_HELO_NONE, SPF_PASS, USER_AGENT_GIT autolearn=no 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 5EBD5C4346E for ; Sun, 27 Sep 2020 12:49:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 1700F23976 for ; Sun, 27 Sep 2020 12:49:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=konsulko.com header.i=@konsulko.com header.b="AVFqeCvf" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726420AbgI0MtS (ORCPT ); Sun, 27 Sep 2020 08:49:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726239AbgI0MtS (ORCPT ); Sun, 27 Sep 2020 08:49:18 -0400 Received: from mail-ej1-x641.google.com (mail-ej1-x641.google.com [IPv6:2a00:1450:4864:20::641]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B92A4C0613CE for ; Sun, 27 Sep 2020 05:49:17 -0700 (PDT) Received: by mail-ej1-x641.google.com with SMTP id e23so4648865eja.3 for ; Sun, 27 Sep 2020 05:49:17 -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=asWmuNPbv7O14B/CqJ1Q3xDQ3n30hKEpCeMHeYXCIHE=; b=AVFqeCvfsCAGsGp+CPkJIKaDP04FRBmne3+1Ji3H8JBJLqHTP57nXl39kk3Iq9G8OW k6Ig+zwFnCUW6LQy3LN1aQIUctzLFH58cJ4+jDRIkG8fRcDaJW+KHFTtnDVofuOZ1f6c uU4+DXcrojFBRC4upmYN8lsFfiRXnp18vc2qs= 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=asWmuNPbv7O14B/CqJ1Q3xDQ3n30hKEpCeMHeYXCIHE=; b=Q0ONJhlOycnFXJ21G7FIMITodfvr+yrO16NzN9fzMOa8pM/QdK9vlD66Gn2NX4+4+Q VnYk3XaqxRWjiKXpHQR6esNd0YqDNDDgqLQ+zAqXuQeFBLumqXtOES4kZWyoF3S6D9OQ /iTwndnMaYVLscAuLfnXs7cfzjqFEYitxreybB10hewK7R9hn3yfyVgq31nEKTNRaC1Z HbeD2DtW3dDIyighY6fjLn6P9OYKSHMPRFNCUjm87C5AkBSuG7TTs7ePgeS8RnYS1iJW po4AAiK1ceTXe2alT56ddxW0nJmlz6OfWGERYekCfbwnF53MCD6PK+cvTI/oYDJAi4mI Pyuw== X-Gm-Message-State: AOAM532dVEgIA8+jzc3GeW0rFLxKhAbvCzKvF9Y4zHTTfG57Rr/Uyrbs 7tp8ZjByC3f1qGE3wsyZCx3vdg== X-Google-Smtp-Source: ABdhPJw2vRQtNip6I3qzR/LkuWDKso34YvFFPDIKj0R45xCixJL+4qpfdkzWEKaS/RcOj0GwqSyAZQ== X-Received: by 2002:a17:906:4a19:: with SMTP id w25mr10746155eju.199.1601210956480; Sun, 27 Sep 2020 05:49:16 -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.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 27 Sep 2020 05:49:15 -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 0/2] Use the new usb control message API. Date: Sun, 27 Sep 2020 15:49:07 +0300 Message-Id: <20200927124909.16380-1-petko.manolov@konsulko.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200923134348.23862-9-oneukum@suse.com> References: <20200923134348.23862-9-oneukum@suse.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Re-sending these, now CC-ing the folks at linux-netdev. Open coding, occasional improper error handling by the caller of usb_control_msg() and not flagging partial read as an error requires a new API that takes care of these issues. It took the form of usb_control_msg_send/recv() and this patch series is converting Pegasus and RTL8150 drivers to using the proper calls. Petko Manolov (2): net: pegasus: Use the new usb control message API. net: rtl8150: Use the new usb control message API. drivers/net/usb/pegasus.c | 61 ++++++++++----------------------------- drivers/net/usb/rtl8150.c | 32 ++++---------------- 2 files changed, 21 insertions(+), 72 deletions(-) Acked-by: David S. Miller