Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp855122rwe; Fri, 26 Aug 2022 16:31:35 -0700 (PDT) X-Google-Smtp-Source: AA6agR6Rd1aec6i0/QRzeJt04HIcmeIdn4ew5Uk03eaOGfFO4kl5qapKSgJOPeGcWLf+JfClaNgx X-Received: by 2002:a63:6903:0:b0:42a:aae0:ad13 with SMTP id e3-20020a636903000000b0042aaae0ad13mr5050151pgc.327.1661556695563; Fri, 26 Aug 2022 16:31:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661556695; cv=none; d=google.com; s=arc-20160816; b=yjU1FVRXpynvwf8yBWPu2Lx43PeKp6YLZID2/mAkMQeId9IjY95wRtS0PluUS//QLt 7CSps7Q4yG7kFyQ9770uYxjLC321uTt9ZeL0UXvASnsx10WazEyTfGg04MS4gKgVZQHI 9Ux2dCL+N5dQM0vY2dFO/1J6cgrX0kxVly8SjVZFWTwy3Y+mll7720usdWnHH6WdR0Ly HoOjzmIl6m9zQa/Y5EjN0iXdeU4MzQ8EMkyDXf2OQT/RdF5/xYJjV8UchmW9crGmnOFT AXTLVN5zjrahHGo7W2JbJSGPPy3tZdEZohi60H2kC40jrdRT1giJGqzqa5ts6VzXpCje F4uw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id; bh=OVWnAlc8YN9XEQA0vd7Y2vromwbsVTjPra3Mrwq+1eU=; b=0PPN+YZsMGV22kpCCZ4sxZA3I2dsKwJOfj3zfke7WfIcTMsmUwm2PtItfJvu2YSGfG e8P9qK9jwsoo2tcNGJEkMB1Zor6fFcQnGEtNU+a9Zw6rJSqYokwtKno7s/EVvRgsLuZM r/wVATdSecVlD6Fej9Hi3743pf7OZ49Q+ve4NGpUOQN3rBZaSHP11bAAlVBxkEtcswV5 JF8N+dJ7pvHoYT0nu1EZ4IY0V8ZuP/RJR2KA6s9KePeeIQjrbQFcHrqU4aDQGr5Qx7UC Mv9JYaChUdH47EOawh+s9GL0Ekc4EB406id7Vy4KOPKf/he5H6dAFko4WCitbog9EqW+ oTaA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s13-20020a63450d000000b00425e1bb4582si2892068pga.113.2022.08.26.16.31.24; Fri, 26 Aug 2022 16:31:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=acm.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239871AbiHZWF6 (ORCPT + 99 others); Fri, 26 Aug 2022 18:05:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53584 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230436AbiHZWF4 (ORCPT ); Fri, 26 Aug 2022 18:05:56 -0400 Received: from mail-pj1-f51.google.com (mail-pj1-f51.google.com [209.85.216.51]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7CD4BC88B8; Fri, 26 Aug 2022 15:05:55 -0700 (PDT) Received: by mail-pj1-f51.google.com with SMTP id w88-20020a17090a6be100b001fbb0f0b013so3139951pjj.5; Fri, 26 Aug 2022 15:05:55 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc; bh=OVWnAlc8YN9XEQA0vd7Y2vromwbsVTjPra3Mrwq+1eU=; b=kZLSfSZqFOHt069kiIDcD0SsK60W63vlEm0L6ZUZ9fk5HfMe3zvkevQG8pq8iumCdI iBkWcbCUZ7zvqmJc8ARXR+UGFEvvPVtxh7XWTDHw+kE/fp684EF/iPgj033/ALB38QZu 5VWsoiERAZFsht4XPOMYsk+NZ1xXCD1TMulA2tnWg7fWV7eBvbv98irBM1ealfYNe02h LY9lXCWXRmVmwI6KJIhX7/CQ06kvnA5wAIQgwRgZVYbrAfxj4GKbHrSz96X7BVqL+GOk RRiQrK48HodtZbZ4qNgxWaBGIo2CsNAtq3G/sTFEFOApyx1EDRaktIqhzCfrtsg0Qitp Nw0A== X-Gm-Message-State: ACgBeo0Mr9fpqXiFT9FhDh4s+y/yIpEIbiu4IFMFw+CZsE++WAKmISYs v1cwPcJ+n3cZ+q4U8TpkMxM= X-Received: by 2002:a17:902:f64d:b0:172:d004:8b2d with SMTP id m13-20020a170902f64d00b00172d0048b2dmr5656685plg.14.1661551554938; Fri, 26 Aug 2022 15:05:54 -0700 (PDT) Received: from ?IPV6:2620:15c:211:201:a12:b4b9:f1b3:ec63? ([2620:15c:211:201:a12:b4b9:f1b3:ec63]) by smtp.gmail.com with ESMTPSA id e6-20020a170902784600b00168dadc7354sm2103935pln.78.2022.08.26.15.05.53 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 26 Aug 2022 15:05:54 -0700 (PDT) Message-ID: <5ba28a61-0aa2-14d7-61f0-0e9316844f70@acm.org> Date: Fri, 26 Aug 2022 15:05:51 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] scsi: core: Fix block I/O error of USB card reader during resume Content-Language: en-US To: Michael Wu , jejb@linux.ibm.com, martin.petersen@oracle.com Cc: linux-scsi@vger.kernel.org, linux-kernel@vger.kernel.org References: <20220817083438.118293-1-michael@allwinnertech.com> <6412c518-426a-69a4-e419-83dc97bebe27@allwinnertech.com> From: Bart Van Assche In-Reply-To: <6412c518-426a-69a4-e419-83dc97bebe27@allwinnertech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, NICE_REPLY_A,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 8/23/22 03:16, Michael Wu wrote: > Yes... My patch did seem suspicious. Here's the scene about the block > I/O error: Some card reader does not respond the command 'MEDIUM REMOVAL > PREVENT' correctly, as a result, the host does not send subsequent cmd > 'MEDIUM REMOVAL ALLOW'/'MEDIUM REMOVAL PREVENT' before/after sleep, > which leads to a enumeration failure after system resume. > I wonder, without changing the behavior of the device, is there's a > better way to solve this? -- Modifying the scsi core should not be a > good idea though :( The above is not clear to me. My understanding is that "MEDIUM REMOVAL PREVENT" is a sense code instead of a SCSI command? > Thanks for your kindly notice. I looked around in the latest linux > mainline repo, but could not find this code. Where can I get this 2002 > version of scsi_lib.c? Thank you. Please take a look at https://stackoverflow.com/questions/3264283/linux-kernel-historical-git-repository-with-full-history. That web page has instructions for how to configure a git repository such that history goes back before the time when Linus started using git. Bart.