From: Sam Ravnborg <sam@ravnborg.org>
To: "Maciej W. Rozycki" <macro@orcam.me.uk>
Cc: Randy Dunlap <rdunlap@infradead.org>,
linux-kernel@vger.kernel.org,
Sudip Mukherjee <sudipm.mukherjee@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
sparclinux@vger.kernel.org, linux-parport@lists.infradead.org
Subject: Re: [PATCH] parport_pc: don't allow driver for SPARC32
Date: Fri, 7 Apr 2023 22:03:13 +0200 [thread overview]
Message-ID: <20230407200313.GA1655046@ravnborg.org> (raw)
In-Reply-To: <alpine.DEB.2.21.2304062144520.44308@angie.orcam.me.uk>
Hi Maciej,
On Thu, Apr 06, 2023 at 10:01:16PM +0100, Maciej W. Rozycki wrote:
> Hi Sam,
>
> > > This looks completely wrong to me, any ordinary PCI parallel port card
> > > ought just to work as long as you have PCI (S390 is special I'm told).
> > > What needs to be done is AFAICT just making `parport_pc_find_nonpci_ports'
> > > in arch/sparc/include/asm/parport.h SPARC64-specific, i.e.:
> > >
> > > static int parport_pc_find_nonpci_ports(int autoirq, int autodma)
> > > {
> > > return (IS_ENABLED(CONFIG_SPARC64) &&
> > > platform_driver_register(&ecpp_driver));
> > > }
> > >
> > > or suchlike and let the optimiser get rid of all the unwanted unsupported
> > > stuff.
> >
> > arch/sparc/include/asm/parport.h is sparc64 specific - and it will
> > result in the wrong result if it is pulled in for sparc32 builds.
> > This is what we see today.
> >
> > Randy's suggestion is fine, as we avoid building parport support
> > for sparc32. If someone shows up and need parport support
> > for sparc32 then we could look into how to enable it.
> > Until then, we are better helped avoiding building the driver.
>
> I disagree. Why artificially prevent perfectly good hardware from
> working with a perfectly good driver especially as the fix is just a
> trivial exercise? And I offered a solution.
There is no sparc32 with a PC style parallel port, so the parport_pc
have no value for a sparc32 machine.
Some sparc Ultra have PC style parallel ports - but this is sparc64
machines and they are covered.
The sparc32 machines have the parport_sunbpp driver for their parallel
port.
An alternative fix, and better I think, would be to audit all archs
and let the relevant ones select ARCH_MIGHT_HAVE_PC_PARPORT, so we
avoided the ugly "|| (PCI && !S390 && !SPARC32)" case for PARPORT_PC.
Sam
next prev parent reply other threads:[~2023-04-07 20:04 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-06 16:05 [PATCH] parport_pc: don't allow driver for SPARC32 Randy Dunlap
2023-04-06 19:28 ` Sam Ravnborg
2023-04-06 19:49 ` Maciej W. Rozycki
2023-04-06 19:51 ` Randy Dunlap
2023-04-06 20:32 ` Sam Ravnborg
2023-04-06 21:01 ` Maciej W. Rozycki
2023-04-06 21:31 ` Randy Dunlap
2023-04-07 20:03 ` Sam Ravnborg [this message]
2023-04-07 21:01 ` Maciej W. Rozycki
2023-04-07 21:10 ` Randy Dunlap
2023-06-18 23:42 ` Maciej W. Rozycki
2023-06-19 0:23 ` Randy Dunlap
2023-06-19 1:29 ` Maciej W. Rozycki
2023-06-19 2:35 ` Randy Dunlap
2023-06-23 15:33 ` David Miller
2023-06-23 17:22 ` Sam Ravnborg
2023-06-23 19:20 ` Randy Dunlap
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230407200313.GA1655046@ravnborg.org \
--to=sam@ravnborg.org \
--cc=davem@davemloft.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-parport@lists.infradead.org \
--cc=macro@orcam.me.uk \
--cc=rdunlap@infradead.org \
--cc=sparclinux@vger.kernel.org \
--cc=sudipm.mukherjee@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).