From patchwork Thu May 17 12:58:28 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oliver Neukum X-Patchwork-Id: 10406773 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id B631960155 for ; Thu, 17 May 2018 13:05:28 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A337E2818E for ; Thu, 17 May 2018 13:05:28 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 95F6328A7C; Thu, 17 May 2018 13:05:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI,T_TVD_MIME_EPI autolearn=unavailable version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50D0B2818E for ; Thu, 17 May 2018 13:05:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752022AbeEQNFO (ORCPT ); Thu, 17 May 2018 09:05:14 -0400 Received: from mx2.suse.de ([195.135.220.15]:34228 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751061AbeEQNFN (ORCPT ); Thu, 17 May 2018 09:05:13 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 7A386ABCF; Thu, 17 May 2018 13:05:12 +0000 (UTC) Message-ID: <1526561908.15506.5.camel@suse.com> Subject: Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work From: Oliver Neukum To: Alexander Kappner , Alan Stern Cc: gregkh@linuxfoundation.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org Date: Thu, 17 May 2018 14:58:28 +0200 In-Reply-To: <9c638d96-d2b4-cf19-d7e8-4ef93549bd79@godking.net> References: <9c638d96-d2b4-cf19-d7e8-4ef93549bd79@godking.net> X-Mailer: Evolution 3.22.6 Mime-Version: 1.0 Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Am Donnerstag, den 17.05.2018, 01:15 -0700 schrieb Alexander Kappner: > Yes. Without this flag, the device keeps throwing similar errors on > usb-storage. That's the same result I get on a host that doesn't have UAS > compiled in. Here's a dmesg: Hi, this is suspicious. You do not actually whether US_FL_NO_WP_DETECT by itself would make the device work. Can you please test that? You will need the attached patch for the quirk to be supported. Regards Oliver Acked-by: Alan Stern From 1ff6c9c9cc66ddb4cf7ca95bea589d6a30c63623 Mon Sep 17 00:00:00 2001 From: Oliver Neukum Date: Thu, 17 May 2018 14:46:47 +0200 Subject: [PATCH] UAS: add support for the quirk US_FL_NO_WP_DETECT The assumption that this quirk can be limited to old storage devices was too optimistic. 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 6034c39b67d1..7ee67e8c1f1e 100644 --- a/drivers/usb/storage/uas.c +++ b/drivers/usb/storage/uas.c @@ -836,6 +836,10 @@ static int uas_slave_configure(struct scsi_device *sdev) if (devinfo->flags & US_FL_BROKEN_FUA) sdev->broken_fua = 1; + /* UAS also needs to support FL_NO_WP_DETECT */ + if (devinfo->flags & US_FL_NO_WP_DETECT) + sdev->skip_ms_page_3f = 1; + scsi_change_queue_depth(sdev, devinfo->qdepth - 2); return 0; } -- 2.13.6