Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp4215848imu; Mon, 12 Nov 2018 07:33:54 -0800 (PST) X-Google-Smtp-Source: AJdET5dS9Kvj34a0q7pSey9BbQHfdY9J+zjySd3nuU8b2K6wwl/trhPX+jaLeze8zwqUoITiv6Pm X-Received: by 2002:a63:200e:: with SMTP id g14mr1205676pgg.235.1542036834272; Mon, 12 Nov 2018 07:33:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542036834; cv=none; d=google.com; s=arc-20160816; b=rsJmP8/wwbKRzt99yfWgMSAjSQ4akXDVSRkSLeiR8c5HauJebUTg/zj9TipyPokcWN eGfytN/nTMmzverwAjttqSVyKVbukiJQwteL6GIGEvaNd27oYE/0KrmxoDHY8g9d7dHs aPFbVpJnyfZrYo603H6mdIuVofT2xewhp+q8e032YzFmpIJW+4cAYETV42qSfCwVUiNj jjqfvNIATfizn6QAfnx1KosUX0EhN9DinO3jRyHnxOdj74H+Tpr9EKXri/TPORUDpKiL yQj0E1xphSiqatkZle2dRd8z3g11mFvR89PJb2THbJSvMZ5ZwrjUV9los6TZdxaPgy43 WLJg== 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=WaB/JEYCY4dgafNqPIG8S9xADJN8F1zt9x7tUorLfpY=; b=FSlFFmjkEz2FzDuDNOcZ/O4YJwZ9RiT4g/fUTouS8imbeblrJuHGNZ50Z0bhd3gRZC /xnBNxsDvnokuFakbzM63cIe33Lu4U0Tlm37HLrFvVwXoI+Co7tzonbPyKRo0xOoOPeD GRXnfpALIuyEJ9Xh3BNDDFa0Mf4/l+7cxvIZKfjeiriZ1uHKoLLA5/imtLHSg6mq7gUH PImlq3xcIUBkI2iVjkUq8giz0NsR380svXyyt6Ak/c9srM6JadQ9cd9dgM0IQMXSwt3P d/A2JfoPGVWZhfPuAF7EmS8fcLkejyKokh7aR3Th183ocHsnAfZ+pwp2bXsaZez2K/1n BzYg== 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 83si14402120pgf.572.2018.11.12.07.33.37; Mon, 12 Nov 2018 07:33:54 -0800 (PST) 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 S1729530AbeKMB0t (ORCPT + 99 others); Mon, 12 Nov 2018 20:26:49 -0500 Received: from netrider.rowland.org ([192.131.102.5]:33771 "HELO netrider.rowland.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with SMTP id S1726385AbeKMB0t (ORCPT ); Mon, 12 Nov 2018 20:26:49 -0500 Received: (qmail 8135 invoked by uid 500); 12 Nov 2018 10:33:04 -0500 Received: from localhost (sendmail-bs@127.0.0.1) by localhost with SMTP; 12 Nov 2018 10:33:04 -0500 Date: Mon, 12 Nov 2018 10:33:04 -0500 (EST) From: Alan Stern X-X-Sender: stern@netrider.rowland.org To: "Zengtao (B)" cc: "jejb@linux.vnet.ibm.com" , "martin.petersen@oracle.com" , "gregkh@linuxfoundation.org" , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "linux-usb@vger.kernel.org" , "usb-storage@lists.one-eyed-alien.net" Subject: RE: scsi_set_medium_removal timeout issue In-Reply-To: <678F3D1BB717D949B966B68EAEB446ED1F1B7CD4@dggemm526-mbx.china.huawei.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, 12 Nov 2018, Zengtao (B) wrote: > >> >Something is wrong here. Before sending PREVENT-ALLOW MEDIUM > >> >REMOVAL, the host should issue SYNCHRONIZE CACHE. This will force > >> >fsg_lun_fsync_sub to run, and the host should allow a long timeout > >> >for this command. Then when PREVENT-ALLOW MEDIUM REMOVAL > >is sent, > >> >nothing will need to be flushed. > >> > > >> > >> Definitely, I haven't seen the SYNCHRONIZE CACHE from the host, it > >> directly issued the PREVENT-ALLOW MEDIUM REMOVAL, so maybe > >something > >> wrong with the scsi layer or something wrong with the mass storage > >class driver? > > > >Or it could be something else. Can you please post the dmesg log from > >the host, showing what happens when the device is first plugged in? > > > > I have enabled the SCSI log for the host, please refer to the attachment. The log you attached was incomplete -- it was missing some commands from the beginning. In any case, it wasn't what I wanted. I asked you to post the dmesg log, not the SCSI log. Alan Stern