Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3803235ybi; Tue, 18 Jun 2019 06:48:45 -0700 (PDT) X-Google-Smtp-Source: APXvYqy0Zyyf3EcgWuiagi6GGp/3kPm9M8d6Obumi6hkFaczA/uoUoZCm+ZX6HC72c8AFt8pK8SH X-Received: by 2002:aa7:8711:: with SMTP id b17mr63331769pfo.234.1560865725443; Tue, 18 Jun 2019 06:48:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560865725; cv=none; d=google.com; s=arc-20160816; b=LqAMukxemISV8aNMT6CmT+kSXRuk7/wfd61QXdg8I1r9YSkd154PsDjxAZsSZBWHSQ J6AgiBZNuM8y5v+4WjzF96QrP5BULk1PxmRFcE+mFkk7vc9N9k1HuKH0HMJDC+ugoKf9 lxLIx39AakLohezpLTGZUnS+eyKrrol50p63YBhYS6JCOUmBVPkabXc2Rnq38vH0HMt8 DhTzUvIIGT0JYnQTkgnUH1KaS79oEXwLSNqQASe3PMgEBi9YF5vbNae5fKli2cUTGuLy c3NbQ4mTEqfJNWpI4k1GankSy98HdCMqA5XI5bHzEmXb1rnhj1qFIo5wcWiUTExo5IuG VuLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:message-id:in-reply-to :subject:cc:to:from:date; bh=K/sf3lGhjZvFoeh9YFAZT5RkuXxbEb0DlyJTouuSGxQ=; b=W/emhbLP+MukTRoxnIF5Qhphz65z/NTDqoOrsHdsh23575F8rMdDl5Hpp7qa+gybWH nnwe4GsntGNgDt0IW6O6OX8w9o0sZ7NmQNBmt3xARZa/8BZro5XjhKvCAfPf4xqyxb02 BUAt8W1dz63NthGt0L47MkmyIai+ATvn2Q75vHN2JAbNcgrSu8fvZllPpu3z47ihJ+wd T5J3RHjLt6kEM7bZyZGlvuQ7Nk7qkXzF4hm0IwasC8FN9xmMknaDLoDA3iSvS3s6COU0 uLHg3Gh04pdIpA+YukscuryyWZYxl9HA/tBiJnURdfj+kNMgq2G0WgvhiuXSm7ey783g 5ZVA== 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 s36si126623pld.164.2019.06.18.06.48.30; Tue, 18 Jun 2019 06:48:45 -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 S1729468AbfFRNsD (ORCPT + 99 others); Tue, 18 Jun 2019 09:48:03 -0400 Received: from iolanthe.rowland.org ([192.131.102.54]:39862 "HELO iolanthe.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726248AbfFRNsC (ORCPT ); Tue, 18 Jun 2019 09:48:02 -0400 Received: (qmail 2328 invoked by uid 2102); 18 Jun 2019 09:48:01 -0400 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 18 Jun 2019 09:48:01 -0400 Date: Tue, 18 Jun 2019 09:48:01 -0400 (EDT) From: Alan Stern X-X-Sender: stern@iolanthe.rowland.org To: Marcos Paulo de Souza cc: Kernel development list , SCSI development list , Greg Kroah-Hartman , "open list:USB MASS STORAGE DRIVER" , "open list:USB MASS STORAGE DRIVER" Subject: Re: [PATCH 2/2] usb: storage: scsiglue: Do not skip VPD if try_vpd_pages is set In-Reply-To: <20190618013146.21961-3-marcos.souza.org@gmail.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Jun 2019, Marcos Paulo de Souza wrote: > If BLIST_TRY_VPD_PAGES is set for a device, even for an USB, it should > be honored, so only set skip_vpd_pages is try_vpd_pages is not set. > > Signed-off-by: Marcos Paulo de Souza > --- > drivers/usb/storage/scsiglue.c | 7 +++++-- > 1 file changed, 5 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/storage/scsiglue.c b/drivers/usb/storage/scsiglue.c > index 59190d88fa9f..0a9520780771 100644 > --- a/drivers/usb/storage/scsiglue.c > +++ b/drivers/usb/storage/scsiglue.c > @@ -195,8 +195,11 @@ static int slave_configure(struct scsi_device *sdev) > */ > sdev->skip_ms_page_8 = 1; > > - /* Some devices don't handle VPD pages correctly */ > - sdev->skip_vpd_pages = 1; > + /* > + * Some devices don't handle VPD pages correctly, so skip vpd > + * pages if not forced by SCSI layer. > + */ > + sdev->skip_vpd_pages = sdev->try_vpd_pages == 0; > > /* Do not attempt to use REPORT SUPPORTED OPERATION CODES */ > sdev->no_report_opcodes = 1; Acked-by: Alan Stern Although I think it would be clearer to write: sdev->skip_vpd_pages = !sdev->try_vpd_pages; But that's just personal preference. This is okay as it is. Alan Stern