From patchwork Wed Dec 13 01:56:19 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121718 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4921976qgn; Tue, 12 Dec 2017 18:47:36 -0800 (PST) X-Google-Smtp-Source: ACJfBotMGdEwJmIFS9UEi7YDgW0KDaEMFOLlQZjg33faip4Qm4Bv7AeS2TEgU7hZJflkb4cHynTw X-Received: by 10.99.133.200 with SMTP id u191mr3939637pgd.327.1513133256023; Tue, 12 Dec 2017 18:47:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513133256; cv=none; d=google.com; s=arc-20160816; b=1DmGh6ODdFAw74W6EmjJ+KmKXcMEDt05i1ul3n7KYgA6YcWPhiL7RrjUlilx5SEF1q eW4jz3mbVenNVW8u7eSIW8kao+sw92ngyuyrtQUXeUnJOng5pX7iy4KNFbnJ1QQUCoVb cGmfVn1L97paeruxrf+wR+Y7qwXoeciffsTuHSSHKCtDQ3fIVY2YmNhVsjwtDAArzEEc KC8zIozFmrgJN8525mh7TnbAA6pO/66y1zBVwyGwNYdBy7besVpD+H6Ph6CFwZ049H7A Wy3FYPs+JKjOyUNvi4nPaj71NEd9PdGge4NG56DcNV7TxSw47bHkRNriX8TLmu2WEqbA 1iww== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=smGfVVaRN5yqe3wQgISFv1wd9lo36MwAmWyBQjYXAes=; b=mY8yiX6QftsNXsXPlXQIbUvYixbu2YA1CPJtuDbg5gPDumx2iF615BL/bP0/VgP+CG E2PvfPxmiddlj4CIX5/ndjIZvn47twL8m5Oy8y68gZOUqZS/kNMNSjbyzZN8QCekR3rF xwRXAHi4+8ALQD+NKhGpxAU7CJzKuKkItIGjPut1FOudrtmGQ+CfgxdTgSafi/h2Gbjt R587sb/Bvzvq/R/NjMnbj1fkNuNzS4CrmQyfQ+b6rezbJjaOjnZPqCW4cOfBLNqUbncd ANzngIHlfTwbJ8pO50jcwKxEkLyKA7ED9KQE7pmpTSe0HXa+Se6GSnphfiHFwnwzzFQj ez4g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=u5pJemwN; dkim=fail header.i=@verizon.com header.s=corp header.b=auqrfzV2; dkim=fail header.i=@verizon.com header.s=corp header.b=N8gCyRgy; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a68si494278pli.345.2017.12.12.18.47.35; Tue, 12 Dec 2017 18:47:36 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=u5pJemwN; dkim=fail header.i=@verizon.com header.s=corp header.b=auqrfzV2; dkim=fail header.i=@verizon.com header.s=corp header.b=N8gCyRgy; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752295AbdLMCra (ORCPT + 10 others); Tue, 12 Dec 2017 21:47:30 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:57985 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752883AbdLMB5N (ORCPT ); Tue, 12 Dec 2017 20:57:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130233; x=1544666233; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BpMT5s1xg91Ju7KkYtSIeZaeeodl64HJm4Vn6V6LbBg=; b=u5pJemwNGiQp8al7mIlyh6xf8ku55ErwVSnhjTNmraPkngAZh1U12DG8 FZmNoIbPD3/tSrEDUgVcL9wYznlud5PEHtP6XJ/opv5hZi0qr80xiRh1v SVrQNt4LMpG7dvrroQ+twUYoWOfnTVRSATOddH8H9+HxpBEUTVDsuCcKW s=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by fldsmtpe03.verizon.com with ESMTP; 13 Dec 2017 01:57:03 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 01:57:03 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130223; x=1544666223; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=BpMT5s1xg91Ju7KkYtSIeZaeeodl64HJm4Vn6V6LbBg=; b=auqrfzV2tvc4JlTIc4LdtGuViu4Tb3kM9fvXOI9aM46tJA6MSkmf+IYc O3bnWG0RjXri91fH6nloBZBWyIgdeIc/W2olllQ+EIrW2zxYG55jsAH4d 2FzGPlFf0kqFDdhfR3+k85nBUEmRsXBftQzFij2cpFUt4VsYAjCCno/pj g=; Received: from mariner.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.84]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 20:57:03 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130223; x=1544666223; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=BpMT5s1xg91Ju7KkYtSIeZaeeodl64HJm4Vn6V6LbBg=; b=N8gCyRgy2+SAt/hWt8wrE0WHheFhOk56r14siV0b/xwOl1BYZd4HrxYY fMIO/FtUx2lT9+CBk2GKNC7ugwA+7xOYeqyG8knY7LLgBOqxVQrigsNVf b/t3TMVNfoJGL6YmC2jx3qzE84XJ06s1U+cj9ci20QzucEzuczcLEWvHx Y=; From: alexander.levin@verizon.com Cc: Roger Quadros , Felipe Balbi , alexander.levin@verizon.com X-Host: mariner.tdc.vzwcorp.com Received: from ohtwi1exh001.uswin.ad.vzwcorp.com ([10.144.218.43]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 01:57:03 +0000 Received: from tbwexch20apd.uswin.ad.vzwcorp.com (153.114.162.44) by OHTWI1EXH001.uswin.ad.vzwcorp.com (10.144.218.43) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 20:57:03 -0500 Received: from OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) by tbwexch20apd.uswin.ad.vzwcorp.com (153.114.162.44) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:57:02 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA12.uswin.ad.vzwcorp.com (144.8.22.187) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 19:57:01 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 19:57:01 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 021/100] usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed Thread-Topic: [PATCH AUTOSEL for 4.9 021/100] usb: gadget: f_uvc: Sanity check wMaxPacketSize for SuperSpeed Thread-Index: AQHTc7WRg1tf4rsbf0eFXZZlc6EUuA== Date: Wed, 13 Dec 2017 01:56:19 +0000 Message-ID: <20171213015606.6568-21-alexander.levin@verizon.com> References: <20171213015606.6568-1-alexander.levin@verizon.com> In-Reply-To: <20171213015606.6568-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Roger Quadros [ Upstream commit 16bb05d98c904a4f6c5ce7e2d992299f794acbf2 ] As per USB3.0 Specification "Table 9-20. Standard Endpoint Descriptor", for interrupt and isochronous endpoints, wMaxPacketSize must be set to 1024 if the endpoint defines bMaxBurst to be greater than zero. Reviewed-by: Laurent Pinchart Signed-off-by: Roger Quadros Signed-off-by: Felipe Balbi Signed-off-by: Sasha Levin --- drivers/usb/gadget/function/f_uvc.c | 8 ++++++++ 1 file changed, 8 insertions(+) -- 2.11.0 diff --git a/drivers/usb/gadget/function/f_uvc.c b/drivers/usb/gadget/function/f_uvc.c index c7689d05356c..f8a1881609a2 100644 --- a/drivers/usb/gadget/function/f_uvc.c +++ b/drivers/usb/gadget/function/f_uvc.c @@ -594,6 +594,14 @@ uvc_function_bind(struct usb_configuration *c, struct usb_function *f) opts->streaming_maxpacket = clamp(opts->streaming_maxpacket, 1U, 3072U); opts->streaming_maxburst = min(opts->streaming_maxburst, 15U); + /* For SS, wMaxPacketSize has to be 1024 if bMaxBurst is not 0 */ + if (opts->streaming_maxburst && + (opts->streaming_maxpacket % 1024) != 0) { + opts->streaming_maxpacket = roundup(opts->streaming_maxpacket, 1024); + INFO(cdev, "overriding streaming_maxpacket to %d\n", + opts->streaming_maxpacket); + } + /* Fill in the FS/HS/SS Video Streaming specific descriptors from the * module parameters. * From patchwork Wed Dec 13 01:57:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121698 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4883482qgn; Tue, 12 Dec 2017 17:59:29 -0800 (PST) X-Google-Smtp-Source: ACJfBosQwVPAud3AueT6qipn5NYv20sw9l6t5qQnOaZyHlLhpfsD141qm/pgAQIrV48hSAxY4unZ X-Received: by 10.99.121.74 with SMTP id u71mr3922430pgc.251.1513130369880; Tue, 12 Dec 2017 17:59:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513130369; cv=none; d=google.com; s=arc-20160816; b=XZMAoGpY99QI5Pw7pWnlgwpK2hQBjUGgiRGOdfOmhfO1kR0bWO226uY8S08jIJt7bF JA+FHl5XYxAROlyNGmfdnqKb5Dc/2ITswwPtNK81GxNNlV3AcjhSgYVT/D89pWGVpBp7 vKF/e/nW5fIIKbesUmlOi//0PShMCt/f8DWQQYSZspy3TaYmHh/QGGByeTsYmuwp9eyT lhSxNAKUYTWz6vZuRjuECKR1FCHitvncNKFWN3ZRkrZMoqSEKf3C5hRRTc0pI4PqVVVP 7NbmvOsV18lrEdA6xFr5YTAjfdm1Ei4c9hSnmtiK7BM4aXh9qZHvGrqpD9Hep+laiU79 4ROA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=BX5O1kCtgMUSinHmH6Wo09giKmsRd/3yspP1gxRubX4=; b=oreiZo5KcgZe7JND0vzXE8+QiqOatg3hsDRgs0IWFIvmgy8jyLTRyUl8ElxpNTeOTh YFwJRMTQ2WWHUYfHQN+k2ithW6ilpoyyIOZy4uJ6Ub5KKTEuxmnYHza20eicVk4wkvMv VgpvxlJtYLp/ly1n127+wxo7e4QNAxf1Papa8kYU151XxW8uFDUpUzMvlEZRiUg3GvRx W/yJTFf2eY5uqMbrhYKI/VUnlrS97SPjyODjp799il1/VG/mGctp3xhhR67HM7Hqjmvg pZljkOY8Ft+JfYdUUVpoIJIEH3mRNfj4cTOgUOyFFTXbk5PtrPZhj3ZfXZGNOgsdMcD9 RdLQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=IAMYo8Kb; dkim=fail header.i=@verizon.com header.s=corp header.b=aUdgLbh7; dkim=fail header.i=@verizon.com header.s=corp header.b=IHov2h9v; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g1si453300pfk.52.2017.12.12.17.59.29; Tue, 12 Dec 2017 17:59:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=IAMYo8Kb; dkim=fail header.i=@verizon.com header.s=corp header.b=aUdgLbh7; dkim=fail header.i=@verizon.com header.s=corp header.b=IHov2h9v; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753194AbdLMB7Y (ORCPT + 10 others); Tue, 12 Dec 2017 20:59:24 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:46399 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753281AbdLMB67 (ORCPT ); Tue, 12 Dec 2017 20:58:59 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130339; x=1544666339; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=IAMYo8KbuIJR28ES4G32fTCiVwhQh901BmB6lHpNW81bZ5ekZ0s0CCvj lCYX3iJmitQskniENX52GFnYD1mAW2MRShARrb7l50BNdfH4DyqzYlduR unfKbHKnEC+FRGXEFgZ6/cOh/0uHCRT8X9m6IhadcPMbTiZLMZPad/M6n 4=; Received: from unknown (HELO fldsmtpi01.verizon.com) ([166.68.71.143]) by fldsmtpe03.verizon.com with ESMTP; 13 Dec 2017 01:58:57 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO apollo.verizonwireless.com) ([10.255.192.101]) by fldsmtpi01.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 01:58:22 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130302; x=1544666302; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=aUdgLbh7xgOT2iXK5kOvFbY1SGXzuOBj+zGEt++8+vsCYj4yewW0ZbHd kqho/xBtw1o77GVUMzgBU8e2EtyOD49lLcru8yalVJqbuin5B+jGYE6zt ydP6+2u23vdMfoXhm1XZgesXHPbCAm6uJBUGy88xlnN6YBOpgzYrcaHat I=; Received: from surveyor.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.83]) by apollo.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 20:58:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130302; x=1544666302; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=nwmG9kVgruFlxYwCV0Xr+WtGCeSmsLlyn6IvT6yDQ3c=; b=IHov2h9vg4Sm3/6dfCaY/bUWNxjh/TrZDaGqyvcQhoKMhbTuFMIfi7nY qvF45fKNwL2cQi9pC1i57JYY34VAQgsvW0qTZtKATOWYB+2OImXB7e4PT nSJ+0NamRuisq8Z+FuPANAX38ccilOnxl//tPWzClcCQvxzaE4F8iDpWR 8=; From: alexander.levin@verizon.com Cc: Arnd Bergmann , "David S . Miller" , alexander.levin@verizon.com X-Host: surveyor.tdc.vzwcorp.com Received: from ohtwi1exh002.uswin.ad.vzwcorp.com ([10.144.218.44]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 01:58:22 +0000 Received: from tbwexch29apd.uswin.ad.vzwcorp.com (153.114.162.53) by OHTWI1EXH002.uswin.ad.vzwcorp.com (10.144.218.44) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 20:58:22 -0500 Received: from OMZP1LUMXCA16.uswin.ad.vzwcorp.com (144.8.22.194) by tbwexch29apd.uswin.ad.vzwcorp.com (153.114.162.53) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:58:21 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA16.uswin.ad.vzwcorp.com (144.8.22.194) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 19:58:21 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 19:58:21 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 061/100] isdn: kcapi: avoid uninitialized data Thread-Topic: [PATCH AUTOSEL for 4.9 061/100] isdn: kcapi: avoid uninitialized data Thread-Index: AQHTc7XAC1cRMjkPeEW7rMskb5SCSA== Date: Wed, 13 Dec 2017 01:57:37 +0000 Message-ID: <20171213015722.6722-36-alexander.levin@verizon.com> References: <20171213015722.6722-1-alexander.levin@verizon.com> In-Reply-To: <20171213015722.6722-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Arnd Bergmann [ Upstream commit af109a2cf6a9a6271fa420ae2d64d72d86c92b7d ] gcc-7 points out that the AVMB1_ADDCARD ioctl results in an unintialized value ending up in the cardnr parameter: drivers/isdn/capi/kcapi.c: In function 'old_capi_manufacturer': drivers/isdn/capi/kcapi.c:1042:24: error: 'cdef.cardnr' may be used uninitialized in this function [-Werror=maybe-uninitialized] cparams.cardnr = cdef.cardnr; This has been broken since before the start of the git history, so either the value is not used for anything important, or the ioctl command doesn't get called in practice. Setting the cardnr to zero avoids the warning and makes sure we have consistent behavior. Signed-off-by: Arnd Bergmann Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/isdn/capi/kcapi.c | 1 + 1 file changed, 1 insertion(+) -- 2.11.0 diff --git a/drivers/isdn/capi/kcapi.c b/drivers/isdn/capi/kcapi.c index 823f6985b260..dd7e38ac29bd 100644 --- a/drivers/isdn/capi/kcapi.c +++ b/drivers/isdn/capi/kcapi.c @@ -1032,6 +1032,7 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data) sizeof(avmb1_carddef)))) return -EFAULT; cdef.cardtype = AVM_CARDTYPE_B1; + cdef.cardnr = 0; } else { if ((retval = copy_from_user(&cdef, data, sizeof(avmb1_extcarddef)))) From patchwork Wed Dec 13 01:57:43 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Levin, Alexander \(Sasha Levin\)" X-Patchwork-Id: 121697 Delivered-To: patch@linaro.org Received: by 10.140.22.227 with SMTP id 90csp4883268qgn; Tue, 12 Dec 2017 17:59:15 -0800 (PST) X-Google-Smtp-Source: ACJfBoshhyWAeRwhQLBzphP98ADLfxtplcqvZoec6g1tDLTcY0dUGtk20Egks7ypxWPIqELUIXcz X-Received: by 10.99.160.26 with SMTP id r26mr3873049pge.408.1513130355046; Tue, 12 Dec 2017 17:59:15 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1513130355; cv=none; d=google.com; s=arc-20160816; b=KLulng7MxT+hW/3Z7ANrZy0dBawVxInH/Zp7/FNqOkHNhrzNW6WcgjxjOQc9u+/+mj DDjuhVmho9E0ony4j5b81QNcUiTKiK+tf636KApMZbwOQOgr8UUMebxXL3+/ILTm/VN4 APkud4KOsSPczoiQ5Rve6wx+3xYo+Uj1LLru8o66ilrX/mlO0TJpx4VzkR3O97VblyQq 0zu4e//EKhR3Xwa4BC3t5dnrOfyfUV+zOtxk2z88OFzvkC2xqJvT6p2Gz97CI6AkmOVR rk4XOtVNX2r7MlQXIRs8BjVoTCNJq2jfVFPJTYSMku0ZSUg8Uyt4SYK4WUMnRHsvJYXy tSGg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:cc:from:dkim-signature :dkim-signature:dkim-signature:arc-authentication-results; bh=cJTySjQWl9UajfcBi8MMfj/Yccq2KbssiP3ffs52LTg=; b=O3LWWWva6TrtmawihgMO9XBhh7c78+YDatGW+OhTq4/oQY6c6XTk16X1E/MCEOozm2 EgCPjDDSuZPMJtZI60vWZ4hoYguvDSSSmPdeQjXDMd43ig79peds76nNJwph2VwzjYD7 SioHTRIRow7t2RDpFZLr1S7hQ9qqV/LQnHpoUbveGeBc58WeEhpsTAOPi4/3q+cDlpXf kvlLZc6bgju+3KRGCJqcsyw1OWYvXYA/56vvRP5l90RkMyH1bWD8PK+DAAN4o1UtIoYc xmmxJLoiV320Ch4oQseuhahTUDBLHA7F4/uNu9sxXQAWGHJbLeHu46Zs0nFet66ifr7t JOIg== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=ayJ7xhjB; dkim=fail header.i=@verizon.com header.s=corp header.b=FpVwwlrF; dkim=fail header.i=@verizon.com header.s=corp header.b=TnxxwDM1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id f9si387749pgt.544.2017.12.12.17.59.14; Tue, 12 Dec 2017 17:59:15 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@verizon.com header.s=corp header.b=ayJ7xhjB; dkim=fail header.i=@verizon.com header.s=corp header.b=FpVwwlrF; dkim=fail header.i=@verizon.com header.s=corp header.b=TnxxwDM1; spf=pass (google.com: best guess record for domain of stable-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=stable-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=NONE dis=NONE) header.from=verizon.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbdLMB7M (ORCPT + 10 others); Tue, 12 Dec 2017 20:59:12 -0500 Received: from fldsmtpe03.verizon.com ([140.108.26.142]:46399 "EHLO fldsmtpe03.verizon.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752365AbdLMB6y (ORCPT ); Tue, 12 Dec 2017 20:58:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130334; x=1544666334; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WH1GSDT9CJ5J4RlqZ+rwJ6ANG4gdDptsRdkip1GhB90=; b=ayJ7xhjBHWsBkgXtcQhLjwUvYP3ZTQ0TF0ccctXzUBnyexFAJmNF4MZ3 FDJbua7oV9spfBjIZr59R+iqhk5+rXyDCIAeJ0zv+OyjqKz/Unk01BGX+ yjmMPg1uw3B0nPDr0SOgOa6sMuUX8c61OaQNSUQyvkSfqVH5by3mte6Vq k=; Received: from unknown (HELO fldsmtpi02.verizon.com) ([166.68.71.144]) by fldsmtpe03.verizon.com with ESMTP; 13 Dec 2017 01:58:45 +0000 Received: from rogue-10-255-192-101.rogue.vzwcorp.com (HELO atlantis.verizonwireless.com) ([10.255.192.101]) by fldsmtpi02.verizon.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 13 Dec 2017 01:58:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130318; x=1544666318; h=from:cc:to:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=WH1GSDT9CJ5J4RlqZ+rwJ6ANG4gdDptsRdkip1GhB90=; b=FpVwwlrFVSZuBXe8C0bCHR4qh5RzcWivV6GklKFYJKZxfVHtDjLvR0uI Uaf5tPSEKfF+0iaSQxtDlriQG1aPPDQCErMZqujo4fan3OkIESIUGOfyR gRDNNtODdTzo2xsk7CrGpL9u437KuyvX5O+tGC0xi8VuKCnY3NgSxIn9b s=; Received: from pioneer.tdc.vzwcorp.com (HELO eris.verizonwireless.com) ([10.254.88.34]) by atlantis.verizonwireless.com with ESMTP/TLS/DHE-RSA-AES256-SHA; 12 Dec 2017 20:58:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=verizon.com; i=@verizon.com; q=dns/txt; s=corp; t=1513130318; x=1544666318; h=to:subject:date:message-id:references:in-reply-to: content-transfer-encoding:mime-version:from:cc; bh=WH1GSDT9CJ5J4RlqZ+rwJ6ANG4gdDptsRdkip1GhB90=; b=TnxxwDM1vFWUAMo4ZIyhMHrKq2SYsdkBJgPSqrVlAa8HnKrUM02fMXZW m//43Rm9oaK0ybh8gitpdlDGCiVofq6o9TLMRE0QGigISpD51hPoWXnR3 VoW8yiv4oUPnO2RzygwHPVkXIZX4qtVn2rK/k4snvHggzUWfE6UEXFwRd 0=; From: alexander.levin@verizon.com Cc: Gabriele Paoloni , Dongdong Liu , Bjorn Helgaas , alexander.levin@verizon.com X-Host: pioneer.tdc.vzwcorp.com Received: from ohtwi1exh002.uswin.ad.vzwcorp.com ([10.144.218.44]) by eris.verizonwireless.com with ESMTP/TLS/AES128-SHA256; 13 Dec 2017 01:58:37 +0000 Received: from tbwexch11apd.uswin.ad.vzwcorp.com (153.114.162.35) by OHTWI1EXH002.uswin.ad.vzwcorp.com (10.144.218.44) with Microsoft SMTP Server (TLS) id 14.3.248.2; Tue, 12 Dec 2017 20:58:37 -0500 Received: from OMZP1LUMXCA20.uswin.ad.vzwcorp.com (144.8.22.198) by tbwexch11apd.uswin.ad.vzwcorp.com (153.114.162.35) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 20:58:37 -0500 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com (144.8.22.195) by OMZP1LUMXCA20.uswin.ad.vzwcorp.com (144.8.22.198) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Tue, 12 Dec 2017 19:58:36 -0600 Received: from OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) by OMZP1LUMXCA17.uswin.ad.vzwcorp.com ([144.8.22.195]) with mapi id 15.00.1263.000; Tue, 12 Dec 2017 19:58:36 -0600 To: "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: [PATCH AUTOSEL for 4.9 085/100] PCI/AER: Report non-fatal errors only to the affected endpoint Thread-Topic: [PATCH AUTOSEL for 4.9 085/100] PCI/AER: Report non-fatal errors only to the affected endpoint Thread-Index: AQHTc7XD0qTNPCuJ7E+B2JxSyrMIFA== Date: Wed, 13 Dec 2017 01:57:43 +0000 Message-ID: <20171213015722.6722-60-alexander.levin@verizon.com> References: <20171213015722.6722-1-alexander.levin@verizon.com> In-Reply-To: <20171213015722.6722-1-alexander.levin@verizon.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-messagesentrepresentingtype: 1 x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.144.60.250] MIME-Version: 1.0 Sender: stable-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: stable@vger.kernel.org From: Gabriele Paoloni [ Upstream commit 86acc790717fb60fb51ea3095084e331d8711c74 ] Previously, if an non-fatal error was reported by an endpoint, we called report_error_detected() for the endpoint, every sibling on the bus, and their descendents. If any of them did not implement the .error_detected() method, do_recovery() failed, leaving all these devices unrecovered. For example, the system described in the bugzilla below has two devices: 0000:74:02.0 [19e5:a230] SAS controller, driver has .error_detected() 0000:74:03.0 [19e5:a235] SATA controller, driver lacks .error_detected() When a device such as 74:02.0 reported a non-fatal error, do_recovery() failed because 74:03.0 lacked an .error_detected() method. But per PCIe r3.1, sec 6.2.2.2.2, such an error does not compromise the Link and does not affect 74:03.0: Non-fatal errors are uncorrectable errors which cause a particular transaction to be unreliable but the Link is otherwise fully functional. Isolating Non-fatal from Fatal errors provides Requester/Receiver logic in a device or system management software the opportunity to recover from the error without resetting the components on the Link and disturbing other transactions in progress. Devices not associated with the transaction in error are not impacted by the error. Report non-fatal errors only to the endpoint that reported them. We really want to check for AER_NONFATAL here, but the current code structure doesn't allow that. Looking for pci_channel_io_normal is the best we can do now. Link: https://bugzilla.kernel.org/show_bug.cgi?id=197055 Fixes: 6c2b374d7485 ("PCI-Express AER implemetation: AER core and aerdriver") Signed-off-by: Gabriele Paoloni Signed-off-by: Dongdong Liu [bhelgaas: changelog] Signed-off-by: Bjorn Helgaas Signed-off-by: Sasha Levin --- drivers/pci/pcie/aer/aerdrv_core.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) -- 2.11.0 diff --git a/drivers/pci/pcie/aer/aerdrv_core.c b/drivers/pci/pcie/aer/aerdrv_core.c index b1303b32053f..057465adf0b6 100644 --- a/drivers/pci/pcie/aer/aerdrv_core.c +++ b/drivers/pci/pcie/aer/aerdrv_core.c @@ -390,7 +390,14 @@ static pci_ers_result_t broadcast_error_message(struct pci_dev *dev, * If the error is reported by an end point, we think this * error is related to the upstream link of the end point. */ - pci_walk_bus(dev->bus, cb, &result_data); + if (state == pci_channel_io_normal) + /* + * the error is non fatal so the bus is ok, just invoke + * the callback for the function that logged the error. + */ + cb(dev, &result_data); + else + pci_walk_bus(dev->bus, cb, &result_data); } return result_data.result;