Received: by 2002:a05:7412:518d:b0:e2:908c:2ebd with SMTP id fn13csp524503rdb; Thu, 5 Oct 2023 12:54:05 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEzgumTN0uw7/m4MQgN5BwPz/hDXZHY3PbYnKsxCzK3Ha55bynom8oXVTX+gta7TJ/QJ55o X-Received: by 2002:a05:6358:71c:b0:150:8ba9:4d with SMTP id e28-20020a056358071c00b001508ba9004dmr5910813rwj.3.1696535644837; Thu, 05 Oct 2023 12:54:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696535644; cv=none; d=google.com; s=arc-20160816; b=eye5pI86acPRimZd0MayUlnoJzpkoebR5nTyTfpnpIBX3ocubFAJkSbhiO0uNymelU P/NmDk/FuHfkNsMeWEwmRGnjaRxq41zXxaoDosk9UxT1Y422/Z6KOSrpFu5NoaP9wJgK DFUEtJ3KUzJl+x/Fjk20IjUwxwmV86pZxtW/qRi6OR4qjTLrojz3s/KROy8rZyFcyS/O 6xwDj4RyiAoUYBoTi4qn2Zr9FsyKFoIKrjfmikjIpPHhqQs4/3vnAGX9fcaAppkN7C6R ccjXW0CxuxgfBu+ZE/QGGjCy2Et+9FMrfs02NDwHi6CH3pL9ovemUnxfWnRq6uusOEXp atPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-language :in-reply-to:mime-version:user-agent:date:message-id:organization :from:references:cc:to:subject; bh=+sn40cn5Wyero4lt+9kb7L583hRQQoS/8OYS+ndkrj0=; fh=lroGpLZ6sIC49ZzO3c5/PsUr3t9mB1+4zrQKqMkKID4=; b=IJvzVi3Mfjj6geJxatsTyK7eWWZ9V5O9aNSp2SFo07myaPO3PET1Pgms7LvLtTsqNN cPg4ESaOfMjNW41ywsAG9gyCXfECUEGwf9LNWSEnOjp+Slueq0fH2sxG5SGZhiuMGoR+ FAmamiecE+1vwscpToq9w4MbYeGgNdAjCFMBuAJi9u09C1vR1E5rmdMpF2Edy373MsFG Oxzg6ewQOiy4+ikIMfS/nPiCpebuITXiNDehRcVitkiSuAMBOpSBgdUYHvEGOqSOmSj+ sskip+u33bRs57LsDjApVdVCHh4YP/WLzI8jeVkCjFIcwaKO4qKVH17kPtatM7WPJ1gQ HWzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u15-20020a056a00124f00b0069023c19351si2030024pfi.154.2023.10.05.12.54.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 05 Oct 2023 12:54:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 2ED608451EEB; Thu, 5 Oct 2023 12:54:02 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231791AbjJETxu (ORCPT + 99 others); Thu, 5 Oct 2023 15:53:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjJETxu (ORCPT ); Thu, 5 Oct 2023 15:53:50 -0400 Received: from mx01.omp.ru (mx01.omp.ru [90.154.21.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A41EBCE; Thu, 5 Oct 2023 12:53:48 -0700 (PDT) Received: from [192.168.1.103] (178.176.73.3) by msexch01.omp.ru (10.188.4.12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.2.986.14; Thu, 5 Oct 2023 22:53:44 +0300 Subject: Re: [PATCH 4/4] ata: pata_parport: fit3: implement IDE command set registers To: Ondrej Zary , Damien Le Moal , Sudip Mukherjee CC: Christoph Hellwig , Tim Waugh , , , References: <20231005192440.4047-1-linux@zary.sk> <20231005192440.4047-5-linux@zary.sk> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: Date: Thu, 5 Oct 2023 22:53:44 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20231005192440.4047-5-linux@zary.sk> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [178.176.73.3] X-ClientProxiedBy: msexch01.omp.ru (10.188.4.12) To msexch01.omp.ru (10.188.4.12) X-KSE-ServerInfo: msexch01.omp.ru, 9 X-KSE-AntiSpam-Interceptor-Info: scan successful X-KSE-AntiSpam-Version: 6.0.0, Database issued on: 10/05/2023 19:37:08 X-KSE-AntiSpam-Status: KAS_STATUS_NOT_DETECTED X-KSE-AntiSpam-Method: none X-KSE-AntiSpam-Rate: 59 X-KSE-AntiSpam-Info: Lua profiles 180400 [Oct 05 2023] X-KSE-AntiSpam-Info: Version: 6.0.0.2 X-KSE-AntiSpam-Info: Envelope from: s.shtylyov@omp.ru X-KSE-AntiSpam-Info: LuaCore: 535 535 da804c0ea8918f802fc60e7a20ba49783d957ba2 X-KSE-AntiSpam-Info: {rep_avail} X-KSE-AntiSpam-Info: {Tracking_from_domain_doesnt_match_to} X-KSE-AntiSpam-Info: {relay has no DNS name} X-KSE-AntiSpam-Info: {SMTP from is not routable} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.73.3 in (user) b.barracudacentral.org} X-KSE-AntiSpam-Info: {Found in DNSBL: 178.176.73.3 in (user) dbl.spamhaus.org} X-KSE-AntiSpam-Info: omp.ru:7.1.1;d41d8cd98f00b204e9800998ecf8427e.com:7.1.1;127.0.0.199:7.1.2 X-KSE-AntiSpam-Info: FromAlignment: s X-KSE-AntiSpam-Info: {rdns complete} X-KSE-AntiSpam-Info: {fromrtbl complete} X-KSE-AntiSpam-Info: ApMailHostAddress: 178.176.73.3 X-KSE-AntiSpam-Info: Rate: 59 X-KSE-AntiSpam-Info: Status: not_detected X-KSE-AntiSpam-Info: Method: none X-KSE-AntiSpam-Info: Auth:dmarc=none header.from=omp.ru;spf=none smtp.mailfrom=omp.ru;dkim=none X-KSE-Antiphishing-Info: Clean X-KSE-Antiphishing-ScanningType: Heuristic X-KSE-Antiphishing-Method: None X-KSE-Antiphishing-Bases: 10/05/2023 19:40:00 X-KSE-Antivirus-Interceptor-Info: scan successful X-KSE-Antivirus-Info: Clean, bases: 10/5/2023 2:50:00 PM X-KSE-Attachment-Filter-Triggered-Rules: Clean X-KSE-Attachment-Filter-Triggered-Filters: Clean X-KSE-BulkMessagesFiltering-Scan-Result: InTheLimit X-Spam-Status: No, score=-5.0 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Thu, 05 Oct 2023 12:54:02 -0700 (PDT) On 10/5/23 10:24 PM, Ondrej Zary wrote: > fit3 protocol driver does not support accessing IDE control registers > (device control/altstatus). The DOS driver does not use these registers > either (as observed from DOSEMU trace). But the HW seems to be capable > of accessing these registers - I simply tried bit 3 and it works! > > The control register is required to properly reset ATAPI devices or > they will be detected only once (after a power cycle). > > Tested with EXP Computer CD-865 with MC-1285B EPP cable and > TransDisk 3000. > > Signed-off-by: Ondrej Zary Reviewed-by: Sergey Shtylyov > --- > drivers/ata/pata_parport/fit3.c | 14 ++------------ > 1 file changed, 2 insertions(+), 12 deletions(-) > > diff --git a/drivers/ata/pata_parport/fit3.c b/drivers/ata/pata_parport/fit3.c > index bad7aa920cdc..d2b81cf2e16d 100644 > --- a/drivers/ata/pata_parport/fit3.c > +++ b/drivers/ata/pata_parport/fit3.c [...] > @@ -59,11 +53,7 @@ static int fit3_read_regr(struct pi_adapter *pi, int cont, int regr) > { > int a, b; > > - if (cont) { > - if (regr != 6) > - return 0xff; > - regr = 7; > - } > + regr += cont << 3; So, is regr == 7 instead of 8 intentional? [...] MBR, Sergey