Re: [PATCH] parport_pc: don't allow driver for SPARC32

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux