From patchwork Thu Nov 14 11:27:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 11243575 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 1EE1513B2 for ; Thu, 14 Nov 2019 11:28:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 076E2206E1 for ; Thu, 14 Nov 2019 11:28:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726632AbfKNL2K (ORCPT ); Thu, 14 Nov 2019 06:28:10 -0500 Received: from mx2.suse.de ([195.135.220.15]:52696 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726599AbfKNL2K (ORCPT ); Thu, 14 Nov 2019 06:28:10 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 93B56AE78; Thu, 14 Nov 2019 11:28:08 +0000 (UTC) From: Oliver Neukum To: gregKH@linuxfoundation.org, linux-usb@vger.kernel.org Cc: Oliver Neukum Subject: [PATCH 1/3] uas: honor flag to avoid CAPACITY16 Date: Thu, 14 Nov 2019 12:27:56 +0100 Message-Id: <20191114112758.32747-2-oneukum@suse.com> X-Mailer: git-send-email 2.16.4 In-Reply-To: <20191114112758.32747-1-oneukum@suse.com> References: <20191114112758.32747-1-oneukum@suse.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org Copy the support over from usb-storage to get feature parity Signed-off-by: Oliver Neukum --- drivers/usb/storage/uas.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/drivers/usb/storage/uas.c b/drivers/usb/storage/uas.c index e78397dca72f..6adc8f9a9ab0 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -834,6 +834,10 @@ static int uas_slave_configure(struct scsi_device *sdev) sdev->wce_default_on = 1; } + /* Some disks cannot handle READ_CAPACITY_16 */ + if (devinfo->flags & US_FL_NO_READ_CAPACITY_16) + sdev->no_read_capacity_16 = 1; + /* * Some disks return the total number of blocks in response * to READ CAPACITY rather than the highest block number.