Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp2259715imm; Thu, 7 Jun 2018 07:51:26 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLM06fk2ltZATXfc1Wl81oxKt9dSDo6SXwyRMxTA5UOTjd9lkZLUXfjNhrlx+eYdWZ+f9T+ X-Received: by 2002:a17:902:82cc:: with SMTP id u12-v6mr2352724plz.83.1528383086282; Thu, 07 Jun 2018 07:51:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1528383086; cv=none; d=google.com; s=arc-20160816; b=TW5dakcUJuD7c7aAkTLsqGuBxKcNzazPSelqcMzpVesaaXtmVO+iLWntHpZ+VW++sI kF+tJ0WzL7wTB7o2TU1Vi7L2dxSkTUusZpjhtHw/Xs/c+AGnu5MC7s5TMzrxY0cDmrGd CkwHCCe6eak/cQscjsQdSkf4WGt6CdY1f68eMw+hGli4u2C68GKXSiO7ljbWCZztm4Vn e+VbYsVgCVY2J8FiIGdtucQap9/a8cHPZrIy2O5JwjzZc7O5yZqDNUiQiQyNeZkrla4/ hTOFVxfgazl8l2v18JYoR3vtBLi0lW9Iu2dYueNRQSNyCOG/WTYR3R59oaITjNFJ91ee 2chA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:subject:message-id:date:cc:to :from:mime-version:content-transfer-encoding:content-disposition :arc-authentication-results; bh=j2qEdBs1j9T76YZ1/32ooLdK3jeDQ+lRS6816K4rbw0=; b=OKROPXRL1uISHZWpxBhqlDFb4LKcUu+4WGl2vfsodBq0a8jFPNwP9bpubRIyuyka98 hOudxBwWDvLzw572Khi7KC4PiwxJme/zksimmJtLuThd2l675xp6DzgFmfIvWORi0YKo /HzTm706ef0Dh13p2bD2tUcvWnH+aC0e3nZcuAWa1sgPntUSf8ZkFFiT6SlLJ6U2QbIa SMSQ6JRCXmTct6EDN3hzfRh9rqneDtI4osjP7YDmL8rrstuoHgxYmeeZdFarP4Jn//MW vPSjms/P9JD1bMhtyQMsZYGcE5rbatUQbzo+5xi8Sp9N/WKo3BvFwDw7iw7Os0gj8seV 5Udg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y10-v6si2679843pgq.54.2018.06.07.07.51.12; Thu, 07 Jun 2018 07:51:26 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935078AbeFGOs2 (ORCPT + 99 others); Thu, 7 Jun 2018 10:48:28 -0400 Received: from shadbolt.e.decadent.org.uk ([88.96.1.126]:40837 "EHLO shadbolt.e.decadent.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934474AbeFGOsZ (ORCPT ); Thu, 7 Jun 2018 10:48:25 -0400 Received: from [148.252.241.226] (helo=deadeye) by shadbolt.decadent.org.uk with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1fQvbo-0005Zo-QM; Thu, 07 Jun 2018 15:09:48 +0100 Received: from ben by deadeye with local (Exim 4.91) (envelope-from ) id 1fQvb2-0002sB-Qd; Thu, 07 Jun 2018 15:09:00 +0100 Content-Type: text/plain; charset="UTF-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit MIME-Version: 1.0 From: Ben Hutchings To: linux-kernel@vger.kernel.org, stable@vger.kernel.org CC: akpm@linux-foundation.org, "Greg Kroah-Hartman" , "Hans de Goede" Date: Thu, 07 Jun 2018 15:05:21 +0100 Message-ID: X-Mailer: LinuxStableQueue (scripts by bwh) Subject: [PATCH 3.16 135/410] uas: Log error codes when logging errors In-Reply-To: X-SA-Exim-Connect-IP: 148.252.241.226 X-SA-Exim-Mail-From: ben@decadent.org.uk X-SA-Exim-Scanned: No (on shadbolt.decadent.org.uk); SAEximRunCond expanded to false Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 3.16.57-rc1 review patch. If anyone has any objections, please let me know. ------------------ From: Hans de Goede commit ce39fe6fa115d9fea0112c907773a400b98d2463 upstream. Signed-off-by: Hans de Goede Signed-off-by: Greg Kroah-Hartman Signed-off-by: Ben Hutchings --- drivers/usb/storage/uas.c | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -928,7 +928,8 @@ static int uas_eh_bus_reset_handler(stru usb_unlock_device(udev); if (err) { - shost_printk(KERN_INFO, sdev->host, "%s FAILED\n", __func__); + shost_printk(KERN_INFO, sdev->host, "%s FAILED err %d\n", + __func__, err); return FAILED; } @@ -1188,13 +1189,16 @@ static int uas_post_reset(struct usb_int struct Scsi_Host *shost = usb_get_intfdata(intf); struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; unsigned long flags; + int err; if (devinfo->shutdown) return 0; - if (uas_configure_endpoints(devinfo) != 0) { + err = uas_configure_endpoints(devinfo); + if (err) { shost_printk(KERN_ERR, shost, - "%s: alloc streams error after reset", __func__); + "%s: alloc streams error %d after reset", + __func__, err); return 1; } @@ -1232,10 +1236,13 @@ static int uas_reset_resume(struct usb_i struct Scsi_Host *shost = usb_get_intfdata(intf); struct uas_dev_info *devinfo = (struct uas_dev_info *)shost->hostdata; unsigned long flags; + int err; - if (uas_configure_endpoints(devinfo) != 0) { + err = uas_configure_endpoints(devinfo); + if (err) { shost_printk(KERN_ERR, shost, - "%s: alloc streams error after reset", __func__); + "%s: alloc streams error %d after reset", + __func__, err); return -EIO; }