Message ID | 20230930191511.24994-2-linux@zary.sk |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp543644vqb; Sat, 30 Sep 2023 12:16:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE6Ibec8PeaEQiccjFz3x+ztUc4BphLtotnBIFDWKKTBa+QEodZii9e5m41X9pSkyC2eR+D X-Received: by 2002:a05:6a21:66c5:b0:154:e7e6:85c8 with SMTP id ze5-20020a056a2166c500b00154e7e685c8mr7504708pzb.31.1696101405068; Sat, 30 Sep 2023 12:16:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696101405; cv=none; d=google.com; s=arc-20160816; b=jBTJAk5f4dLUFk/KHOaS4+gZDJRzYXW3vGrC8IyXEsgdwq2WLQ8iitKlqLQx6+ns+b K/VRoKT7Ss2fGgBHGJch5vcoXIEuyTPDHk6TFdU2dBguJO/cBpzDDeauq7BquRTAAUHE XNgQzj5er98ZhuuD6HJhDdWTzU+Zzu6plYIvtAvDGs3uyWMCEd1UpmgG+1C4SVWXaF5J 0jdYBwUupry0ygjzNVRakGX4Nv6bwvVJW3zeQJ8V/ZcCRTPypO55ZvMAJEl9Cskhkz/I QTkfeO6B2DbzyKW2b9T0MAluFppS6rAeRW/TlOIcHbsrY13MdfqbMau3B2Y6gIIR3qxO 6Fyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=uEGwm1gu9BypWNEYQ5UW+A6PBfFm0x9wxQyKLCc/IdM=; fh=HCzElfjdAw79VJwTPuLT/8QZsv7MtPddOgpBiXtV6sA=; b=y61fG9piAWm9W2fwvYo8ez1RHYzMV+MRfGTypVCkG7PG28Cv1goBIja3PTSJufU6BO LhkC3GFbE7/3XXeyCgy6E4Jysr/kTl9l4PQJ2XKpCFhP8DNpxI9tkwHsEVxSbAHLGGWC cdAF4Sqr3nz9x8lltICmu9iqVX2pUiKKOsUd9trNN2nic3GW9qHdkvqaRV+EFNr/2tbs 4iCh9krW8mgVSaXAoz/VkNrfBBM9KFYdIt4Q5exuCYaU5Gw+n9twifW3qtqiFds/A7hh b1EWyVhsedFjkDmgqUmeh2r1j9yBJV8VqMWGC9g7c/NvBb9/oyR19pSgahP2ZIpn3s7z qe7g== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id f11-20020a170902ce8b00b001c604fdbb14si19664702plg.81.2023.09.30.12.16.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 30 Sep 2023 12:16:45 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (Postfix) with ESMTP id 3D6E880CCD28; Sat, 30 Sep 2023 12:16:14 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234756AbjI3TPg (ORCPT <rfc822;chrisfriedt@gmail.com> + 20 others); Sat, 30 Sep 2023 15:15:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40480 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234695AbjI3TPd (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 30 Sep 2023 15:15:33 -0400 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 81732E3 for <linux-kernel@vger.kernel.org>; Sat, 30 Sep 2023 12:15:30 -0700 (PDT) Received: from gsql.ggedos.sk (off-20.infotel.telecom.sk [212.5.213.20]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by hosting.gsystem.sk (Postfix) with ESMTPSA id CC42D7A00BF; Sat, 30 Sep 2023 21:15:27 +0200 (CEST) From: Ondrej Zary <linux@zary.sk> To: Damien Le Moal <damien.lemoal@opensource.wdc.com>, Sudip Mukherjee <sudipm.mukherjee@gmail.com> Cc: Christoph Hellwig <hch@lst.de>, Sergey Shtylyov <s.shtylyov@omp.ru>, Jens Axboe <axboe@kernel.dk>, Tim Waugh <tim@cyberelk.net>, linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] pata_parport: fix pata_parport_devchk Date: Sat, 30 Sep 2023 21:15:08 +0200 Message-Id: <20230930191511.24994-2-linux@zary.sk> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20230930191511.24994-1-linux@zary.sk> References: <20230930191511.24994-1-linux@zary.sk> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,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 agentk.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Sat, 30 Sep 2023 12:16:14 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778491226966461613 X-GMAIL-MSGID: 1778491226966461613 |
Series | pata_parport: fix EXP Computer CD-865 with MC-1285B EPP cable | |
Commit Message
Ondrej Zary
Sept. 30, 2023, 7:15 p.m. UTC
There's a 'x' missing in 0x55 in pata_parport_devchk(), causing the
detection to always fail. Fix it.
Signed-off-by: Ondrej Zary <linux@zary.sk>
---
drivers/ata/pata_parport/pata_parport.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
Hello! On 9/30/23 10:15 PM, Ondrej Zary wrote: > There's a 'x' missing in 0x55 in pata_parport_devchk(), causing the > detection to always fail. Fix it. > > Signed-off-by: Ondrej Zary <linux@zary.sk> I think we need a Fixes: tag here... > --- > drivers/ata/pata_parport/pata_parport.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c > index 1af64d435d3c..258d189f42e5 100644 > --- a/drivers/ata/pata_parport/pata_parport.c > +++ b/drivers/ata/pata_parport/pata_parport.c > @@ -64,7 +64,7 @@ static bool pata_parport_devchk(struct ata_port *ap, unsigned int device) > pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0xaa); > pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0x55); > > - pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 055); > + pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0x55); Oh, Gawd! How did this ever work?! :-/ This bug seems to predate the Big PARIDE move... > pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0xaa); > > nsect = pi->proto->read_regr(pi, 0, ATA_REG_NSECT); > MBR, Sergey
On 10/2/23 9:43 PM, Sergey Shtylyov wrote: [...] >> There's a 'x' missing in 0x55 in pata_parport_devchk(), causing the >> detection to always fail. Fix it. >> >> Signed-off-by: Ondrej Zary <linux@zary.sk> > > I think we need a Fixes: tag here... Fixes: 246a1c4c6b7f ("ata: pata_parport: add driver (PARIDE replacement)") [...] MBR, Sergey
On Monday 02 October 2023 20:43:09 Sergey Shtylyov wrote: > Hello! > > On 9/30/23 10:15 PM, Ondrej Zary wrote: > > > There's a 'x' missing in 0x55 in pata_parport_devchk(), causing the > > detection to always fail. Fix it. > > > > Signed-off-by: Ondrej Zary <linux@zary.sk> > > I think we need a Fixes: tag here... > > > --- > > drivers/ata/pata_parport/pata_parport.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c > > index 1af64d435d3c..258d189f42e5 100644 > > --- a/drivers/ata/pata_parport/pata_parport.c > > +++ b/drivers/ata/pata_parport/pata_parport.c > > @@ -64,7 +64,7 @@ static bool pata_parport_devchk(struct ata_port *ap, unsigned int device) > > pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0xaa); > > pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0x55); > > > > - pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 055); > > + pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0x55); > > Oh, Gawd! How did this ever work?! :-/ > This bug seems to predate the Big PARIDE move... This code was not present in PARIDE - it's my bug. The function is a clone of ata_devchk() without direct port access. It's called only from softreset so nobody notices the breakage until something goes wrong. The CD-865 drive needs a reset to start working.
On 10/3/23 8:07 PM, Ondrej Zary wrote: [...] >>> There's a 'x' missing in 0x55 in pata_parport_devchk(), causing the >>> detection to always fail. Fix it. >>> >>> Signed-off-by: Ondrej Zary <linux@zary.sk> >> >> I think we need a Fixes: tag here... >> >>> --- >>> drivers/ata/pata_parport/pata_parport.c | 2 +- >>> 1 file changed, 1 insertion(+), 1 deletion(-) >>> >>> diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c >>> index 1af64d435d3c..258d189f42e5 100644 >>> --- a/drivers/ata/pata_parport/pata_parport.c >>> +++ b/drivers/ata/pata_parport/pata_parport.c >>> @@ -64,7 +64,7 @@ static bool pata_parport_devchk(struct ata_port *ap, unsigned int device) >>> pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0xaa); >>> pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0x55); >>> >>> - pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 055); >>> + pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0x55); >> >> Oh, Gawd! How did this ever work?! :-/ >> This bug seems to predate the Big PARIDE move... > > This code was not present in PARIDE - it's my bug. Yes, I finally figured -- hence the Fixes: tag I suggested later.... > The function is a clone of ata_devchk() without direct port access. The libata's taskfile methods suck big time -- I even used to have the plans to clean this stuff up at some point... > It's called only from softreset so nobody notices the breakage until something goes wrong. The CD-865 drive needs a reset to start working. I thought the SRST reset is used at the initial detection phase as well... MBR, Sergey
diff --git a/drivers/ata/pata_parport/pata_parport.c b/drivers/ata/pata_parport/pata_parport.c index 1af64d435d3c..258d189f42e5 100644 --- a/drivers/ata/pata_parport/pata_parport.c +++ b/drivers/ata/pata_parport/pata_parport.c @@ -64,7 +64,7 @@ static bool pata_parport_devchk(struct ata_port *ap, unsigned int device) pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0xaa); pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0x55); - pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 055); + pi->proto->write_regr(pi, 0, ATA_REG_NSECT, 0x55); pi->proto->write_regr(pi, 0, ATA_REG_LBAL, 0xaa); nsect = pi->proto->read_regr(pi, 0, ATA_REG_NSECT);