From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 200F3E7AD78 for ; Tue, 3 Oct 2023 17:07:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230422AbjJCRHy (ORCPT ); Tue, 3 Oct 2023 13:07:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229639AbjJCRHy (ORCPT ); Tue, 3 Oct 2023 13:07:54 -0400 Received: from hosting.gsystem.sk (hosting.gsystem.sk [212.5.213.30]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6E023A7; Tue, 3 Oct 2023 10:07:50 -0700 (PDT) Received: from [192.168.0.2] (chello085216244195.chello.sk [85.216.244.195]) (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 83FF57A0090; Tue, 3 Oct 2023 19:07:48 +0200 (CEST) From: Ondrej Zary To: Sergey Shtylyov Subject: Re: [PATCH 1/4] pata_parport: fix pata_parport_devchk Date: Tue, 3 Oct 2023 19:07:45 +0200 User-Agent: KMail/1.9.10 Cc: Damien Le Moal , Sudip Mukherjee , Christoph Hellwig , Tim Waugh , linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org References: <20230930191511.24994-1-linux@zary.sk> <20230930191511.24994-2-linux@zary.sk> In-Reply-To: X-KMail-QuotePrefix: > MIME-Version: 1.0 Content-Type: Text/Plain; charset="utf-8" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <202310031907.45632.linux@zary.sk> Precedence: bulk List-ID: X-Mailing-List: linux-ide@vger.kernel.org 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 > > 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. -- Ondrej Zary