Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp3618238imm; Thu, 17 May 2018 11:39:15 -0700 (PDT) X-Google-Smtp-Source: AB8JxZrPK9QElzZmk1Bl8s9YcrVgOI+eJYtXRTeQNDSmg0XcFlf7NMAGIfa513y5b1d7JbLbyuWv X-Received: by 2002:a17:902:848b:: with SMTP id c11-v6mr6267693plo.132.1526582355749; Thu, 17 May 2018 11:39:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526582355; cv=none; d=google.com; s=arc-20160816; b=jQlnx2W7Xrib+TaYO71yxVS5p5YQYjiQa1VKkTXQkrlk9zSubAyHJbweoIcZBk4Iw5 6JxqHY/kNjsSEiqyFYmEGtWjrDfHE9DgAfGW7Ymn3XCzy2tvHcUJYf8i8A0UHxaZeFz9 +HUJ0QjbCG2Am/ZA5XSqhjxQ9Tux+3twyiSEmu53Q41zBFRr0ABX4EiLE8KV8s7ybUvF dzK4+SG7BynW8Hf/M8+YpSPCUaILuc2t6ix15cK3oqZBwnVWJXV8E7AzT1rFZHvaACaC dmliLYbm4e4x4nZFcdCflblxGXxWIU6uyqw9f4J49Dth+rzk4XYJ6CQ27s8Z3MdocBnq gl0w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=jAoo2kTJTC+rk/jlpzZ1995/sS5rh/+muTCndrKwaas=; b=DpYiJ+Zh/obIgNnSGUPhLDY/BZ3O7Jx/eKBtkuYwPkRl8K4q5bPU/Ud8HI5CfaptoQ +DS7p30s7zqd4O0J2X/NTJ3GYJSBJ5pMyYNzL04SoJqHpjLnGJ7J//i9qYfLQ9qjiNoO 17VOOulL0+/erNNcbamAqjNiHjEwxsUtldYMVQyUCvv87Ce0seE3SFVO2OfdmQwM3eEr fZoFzT0a5/nfPwa4QJKDMtCf6JmLYxtAqJHO9gFfnsEaw3nTQ01LCH6PQsuS7XN046DG wAhEx9YZlM3R/lzkpYnXVYuY+TwHmIgzjproThacSUlXLZXlrxZUOqXfhqT6F7NhIYlJ zcRw== 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 i72-v6si4439995pgd.211.2018.05.17.11.39.00; Thu, 17 May 2018 11:39:15 -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 S1752014AbeEQSio (ORCPT + 99 others); Thu, 17 May 2018 14:38:44 -0400 Received: from s18231873.onlinehome-server.info ([217.160.179.168]:35726 "EHLO godking.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750924AbeEQSim (ORCPT ); Thu, 17 May 2018 14:38:42 -0400 Received: from [192.168.3.100] (localhost [127.0.0.1]) by godking.net (Postfix) with ESMTPA id A3B771D2AE90C; Thu, 17 May 2018 13:38:36 -0500 (CDT) Subject: Re: [PATCH] usb-storage: Add quirks to make G-Technology "G-Drive" work To: Oliver Neukum , Alan Stern Cc: gregkh@linuxfoundation.org, usb-storage@lists.one-eyed-alien.net, linux-kernel@vger.kernel.org, linux-usb@vger.kernel.org References: <9c638d96-d2b4-cf19-d7e8-4ef93549bd79@godking.net> <1526561908.15506.5.camel@suse.com> From: Alexander Kappner Message-ID: <7dc7ea60-81b5-3546-5a12-9b0ff0b734cb@godking.net> Date: Thu, 17 May 2018 11:38:34 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <1526561908.15506.5.camel@suse.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Oliver and Alan, thank for investigating. > 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? US_FL_NO_WP_DETECT without US_FL_IGNORE_UAS does not make a difference, even with the patch you included applied: [ 44.108417] JBD2: Clearing recovery information on journal [ 44.119593] sd 2:0:0:0: [sda] tag#1 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 44.121605] sd 2:0:0:0: [sda] tag#1 Sense Key : Illegal Request [current] [ 44.123254] sd 2:0:0:0: [sda] tag#1 Add. Sense: Invalid field in cdb [ 44.124798] sd 2:0:0:0: [sda] tag#1 CDB: Write(16) 8a 08 00 00 00 00 e8 c4 00 00 00 00 00 08 00 00 [ 44.126847] print_req_error: critical target error, dev sda, sector 3905159168 [ 44.128450] Buffer I/O error on dev sda, logical block 488144896, lost sync page write [ 44.130776] JBD2: Error -5 detected when updating journal superblock for sda-8. [ 44.141059] sd 2:0:0:0: [sda] tag#0 FAILED Result: hostbyte=DID_OK driverbyte=DRIVER_SENSE [ 44.141376] sd 2:0:0:0: [sda] tag#0 Sense Key : Illegal Request [current] [ 44.141376] sd 2:0:0:0: [sda] tag#0 Add. Sense: Invalid field in cdb [ 44.141376] sd 2:0:0:0: [sda] tag#0 CDB: Write(16) 8a 08 00 00 00 00 00 00 00 00 00 00 00 08 00 00 [ 44.141376] print_req_error: critical target error, dev sda, sector 0 [ 44.141376] Buffer I/O error on dev sda, logical block 0, lost sync page write > That's bizarre too. Even though the only difference is a MODE SENSE > command, the command that actually faliled was WRITE(16). It looks to me like the MODE SENSE simply hangs the drive, so anything issued after that will fail. Of course the drive says it's the "current command" that caused the failure, but I wouldn't give too much credence to that. FYI -- this device is a consumer grade rotational drive that you can get for less than $200, so I wouldn't be surprised if the implementations have issues. Also, I noticed that copying onto the drive with dd works fine, whereas trying to mount a filesystem immediately crashes it. I suspect this is because check_disk_change is called on mount (which eventually calls down to sd_read_write_protect_flag, which is where the US_FL_NO_WP_DETECT flag comes into play). On 05/17/2018 05:58 AM, Oliver Neukum wrote: > 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 >