Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp106343pxp; Thu, 10 Mar 2022 23:54:45 -0800 (PST) X-Google-Smtp-Source: ABdhPJw87Y/dvK09P4vqK66+YHhIfpo8dz0sip+6rx5sJjUCJyQk6tvnrUQkwMDk0YjPBOsjU109 X-Received: by 2002:a63:86c2:0:b0:37f:6741:4dbc with SMTP id x185-20020a6386c2000000b0037f67414dbcmr7578649pgd.296.1646985284842; Thu, 10 Mar 2022 23:54:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646985284; cv=none; d=google.com; s=arc-20160816; b=SuVPJCMSI3O/5mfY0tiACZAWIjMEceW76zsE65L9RKpvCBkAc7sAHVZz6d9EUCCJJD zv+XQAAK20yH7HVvghbOsS9lOG58vFO8tv9pb1KWfKvg/VPArug8o48VbDDcN0Bj/dah guG5CMRG1xcXcxuSIdD7ZvOqIPg6BGi6E99VMjr9ZkRd7qWfxsuXP3QopKw9VCjQNhwx QPUuB1ayNUYvQ79SFnMtcDMXZJMC18SQPMq3c2ly1UO//DA5/mkqn6g8mWqTo3frooD9 93M3WLhl1P3agLCAWtdZQB1HraPQUOjV6sim/bOb+MfswDwbwkiLbAIEZ8o+R1W36YEs 4TKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=u43el1T3DNxCBFAMFLHMRuHBfdZG7HFPzk3L9C/oUJo=; b=iaJyp7dDepUpzj643SvyVK3Xltkw31lH1cjMz8DFBa+TFy5MzhkOCj4IW+Vo9+KfrD fyJuh+5xgxaCkSu0V0ol15NfRlGco8SnxyFTJWdWVSKLRDi1TVdDrojwsUDlww/DpYR1 wQtYPQRZ2DMVT2V/k88DvNVNCwgUO5eXswsz09TDRsKu64cLCVfMRJUMlLk4Yq62jVxQ sdiP/rBBLLqNvMug2Cg6FVn4k+pBgyalzCNedYNJNMSa3JwXk3OLh5vln9D0tPdTXgjv 0UYoLk6LuuORAh4TCFZPF2tEpVpPf3d+54bH0DbnIUFiT52DtWoqGYT0cwbFUHTvaAeI Vwew== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s140-20020a632c92000000b0038081451114si7198100pgs.47.2022.03.10.23.54.32; Thu, 10 Mar 2022 23:54:44 -0800 (PST) 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346501AbiCKFrE (ORCPT + 99 others); Fri, 11 Mar 2022 00:47:04 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345203AbiCKFrD (ORCPT ); Fri, 11 Mar 2022 00:47:03 -0500 Received: from verein.lst.de (verein.lst.de [213.95.11.211]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6E79B1AD391; Thu, 10 Mar 2022 21:45:59 -0800 (PST) Received: by verein.lst.de (Postfix, from userid 2407) id C6E7E68AFE; Fri, 11 Mar 2022 06:45:55 +0100 (CET) Date: Fri, 11 Mar 2022 06:45:55 +0100 From: Christoph Hellwig To: Ondrej Zary Cc: Damien Le Moal , Christoph Hellwig , Jens Axboe , Tim Waugh , linux-block@vger.kernel.org, linux-parport@lists.infradead.org, linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v0] pata_parport: add driver (PARIDE replacement) Message-ID: <20220311054555.GA16362@lst.de> References: <20220310212812.13944-1-linux@zary.sk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220310212812.13944-1-linux@zary.sk> User-Agent: Mutt/1.5.17 (2007-11-01) X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Thu, Mar 10, 2022 at 10:28:12PM +0100, Ondrej Zary wrote: > Add pata_parport (PARIDE replacement) core libata driver. > > The original paride protocol modules are used for now so allow them to > be compiled without old PARIDE core. I agree with Damien that this needs a bit more text here. Explaining what kind of hardware this drives, that this will allow to eventually drop paride, how it reuesed the low-level drivers, etc. > + If your parallel port support is in a loadable module, you must build > + PATA_PARPORT as a module. If you built PATA_PARPORT support into your > + kernel, you may still build the individual protocol modules > + as loadable modules. I'd drop the above. The dependencies are already enforced by Kconfig and we don't really tend to mention this elsewhere. > + Unlike the old PARIDE, there are no high-level drivers needed. > + The IDE devices behind parallel port adapters are handled by the > + ATA layer. I also don't think this is needed. > index 000000000000..3ea8d824091e > --- /dev/null > +++ b/drivers/ata/parport/pata_parport.c > @@ -0,0 +1,805 @@ > +// SPDX-License-Identifier: GPL-2.0-only Please add your copyright statement here. > +static void pata_parport_tf_load(struct ata_port *ap, const struct ata_taskfile *tf) Overly long line. > + pi->proto->write_regr(pi, 0, ATA_REG_NSECT, tf->hob_nsect); > + pi->proto->write_regr(pi, 0, ATA_REG_LBAL, tf->hob_lbal); > + pi->proto->write_regr(pi, 0, ATA_REG_LBAM, tf->hob_lbam); > + pi->proto->write_regr(pi, 0, ATA_REG_LBAH, tf->hob_lbah); Same here. > +static void pata_parport_exec_command(struct ata_port *ap, const struct ata_taskfile *tf) .. and here. And a bunch more. > +static void pata_parport_bus_release(struct device *dev) > +{ > + /* nothing to do here but required to avoid warning on device removal */ > +} > + > +static struct bus_type pata_parport_bus_type = { > + .name = DRV_NAME, > +}; > + > +static struct device pata_parport_bus = { > + .init_name = DRV_NAME, > + .release = pata_parport_bus_release, > +}; > + > +/* temporary for old paride protocol modules */ > +static struct scsi_host_template pata_parport_sht = { > + PATA_PARPORT_SHT("pata_parport") > +}; Did you look into my suggestion to use struct pardevice.dev instead? > index ddb9e589da7f..f3bd01a9c9ec 100644 > --- a/drivers/block/paride/paride.h > +++ b/drivers/block/paride/paride.h > @@ -1,3 +1,7 @@ > +#if IS_ENABLED(CONFIG_PATA_PARPORT) > +#include "../../ata/parport/pata_parport.h" > + > +#else Maybe add a comment here? Also this is a pretty clear indication that pata_parport.h should be in include/linux/ at least for now.