linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RFC: drop ISA support in the synlink tty driver?
@ 2019-02-11 13:25 Christoph Hellwig
  2019-02-11 13:25 ` [PATCH] tty/synclink: remove ISA support Christoph Hellwig
  2019-02-12  7:51 ` RFC: drop ISA support in the synlink tty driver? Greg Kroah-Hartman
  0 siblings, 2 replies; 6+ messages in thread
From: Christoph Hellwig @ 2019-02-11 13:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linux-serial, linux-kernel

Hi Greg and Jiri,

I've been working hard to get rid of the remaining callers the pass a
NULL struct device to the DMA mapping functions and am almost done.

The only non-trivial driver is the synclink driver, which has legacy
early 90s style ISA support that doesn't use the device model at all.

In theory we could convert it to an isa_driver, but without testing
that seems rather dangerous.  So for now I would suggest that we
remove the ISA support in this driver - if anyone cares enough we
can resurrect it from the git history and convert it to use the driver
model.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH] tty/synclink: remove ISA support
  2019-02-11 13:25 RFC: drop ISA support in the synlink tty driver? Christoph Hellwig
@ 2019-02-11 13:25 ` Christoph Hellwig
  2019-02-12  7:51 ` RFC: drop ISA support in the synlink tty driver? Greg Kroah-Hartman
  1 sibling, 0 replies; 6+ messages in thread
From: Christoph Hellwig @ 2019-02-11 13:25 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Jiri Slaby; +Cc: linux-serial, linux-kernel

The ISA support in this driver is horribly outdated and the last
driver that passes a NULL dev argument to the DMA mapping routines.

Drop the support, if someone wants to go through the work of converting
it to a proper isa_driver we can resurrect it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
---
 drivers/tty/synclink.c | 54 ------------------------------------------
 1 file changed, 54 deletions(-)

diff --git a/drivers/tty/synclink.c b/drivers/tty/synclink.c
index d55c858d6058..84f26e43b229 100644
--- a/drivers/tty/synclink.c
+++ b/drivers/tty/synclink.c
@@ -4325,41 +4325,6 @@ static int mgsl_init_tty(void)
 	return 0;
 }
 
-/* enumerate user specified ISA adapters
- */
-static void mgsl_enum_isa_devices(void)
-{
-	struct mgsl_struct *info;
-	int i;
-		
-	/* Check for user specified ISA devices */
-	
-	for (i=0 ;(i < MAX_ISA_DEVICES) && io[i] && irq[i]; i++){
-		if ( debug_level >= DEBUG_LEVEL_INFO )
-			printk("ISA device specified io=%04X,irq=%d,dma=%d\n",
-				io[i], irq[i], dma[i] );
-		
-		info = mgsl_allocate_device();
-		if ( !info ) {
-			/* error allocating device instance data */
-			if ( debug_level >= DEBUG_LEVEL_ERROR )
-				printk( "can't allocate device instance data.\n");
-			continue;
-		}
-		
-		/* Copy user configuration info to device instance data */
-		info->io_base = (unsigned int)io[i];
-		info->irq_level = (unsigned int)irq[i];
-		info->irq_level = irq_canonicalize(info->irq_level);
-		info->dma_level = (unsigned int)dma[i];
-		info->bus_type = MGSL_BUS_TYPE_ISA;
-		info->io_addr_size = 16;
-		info->irq_flags = 0;
-		
-		mgsl_add_device( info );
-	}
-}
-
 static void synclink_cleanup(void)
 {
 	int rc;
@@ -4403,7 +4368,6 @@ static int __init synclink_init(void)
 
  	printk("%s %s\n", driver_name, driver_version);
 
-	mgsl_enum_isa_devices();
 	if ((rc = pci_register_driver(&synclink_pci_driver)) < 0)
 		printk("%s:failed to register PCI driver, error=%d\n",__FILE__,rc);
 	else
@@ -5025,12 +4989,6 @@ static void usc_set_sdlc_mode( struct mgsl_struct *info )
 	info->mbre_bit = BIT8;
 	outw( BIT8, info->io_base );			/* set Master Bus Enable (DCAR) */
 
-	if (info->bus_type == MGSL_BUS_TYPE_ISA) {
-		/* Enable DMAEN (Port 7, Bit 14) */
-		/* This connects the DMA request signal to the ISA bus */
-		usc_OutReg(info, PCR, (u16)((usc_InReg(info, PCR) | BIT15) & ~BIT14));
-	}
-
 	/* DMA Control Register (DCR)
 	 *
 	 * <15..14>	10	Priority mode = Alternating Tx/Rx
@@ -6007,12 +5965,6 @@ static void usc_set_async_mode( struct mgsl_struct *info )
 
 	usc_EnableMasterIrqBit( info );
 
-	if (info->bus_type == MGSL_BUS_TYPE_ISA) {
-		/* Enable INTEN (Port 6, Bit12) */
-		/* This connects the IRQ request signal to the ISA bus */
-		usc_OutReg(info, PCR, (u16)((usc_InReg(info, PCR) | BIT13) & ~BIT12));
-	}
-
 	if (info->params.loopback) {
 		info->loopback_bits = 0x300;
 		outw(0x0300, info->io_base + CCAR);
@@ -6107,12 +6059,6 @@ static void usc_set_sync_mode( struct mgsl_struct *info )
 	usc_loopback_frame( info );
 	usc_set_sdlc_mode( info );
 
-	if (info->bus_type == MGSL_BUS_TYPE_ISA) {
-		/* Enable INTEN (Port 6, Bit12) */
-		/* This connects the IRQ request signal to the ISA bus */
-		usc_OutReg(info, PCR, (u16)((usc_InReg(info, PCR) | BIT13) & ~BIT12));
-	}
-
 	usc_enable_aux_clock(info, info->params.clock_speed);
 
 	if (info->params.loopback)
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: RFC: drop ISA support in the synlink tty driver?
  2019-02-11 13:25 RFC: drop ISA support in the synlink tty driver? Christoph Hellwig
  2019-02-11 13:25 ` [PATCH] tty/synclink: remove ISA support Christoph Hellwig
@ 2019-02-12  7:51 ` Greg Kroah-Hartman
  2019-02-12  8:08   ` Jiri Slaby
  1 sibling, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-02-12  7:51 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: Jiri Slaby, linux-serial, linux-kernel

On Mon, Feb 11, 2019 at 02:25:33PM +0100, Christoph Hellwig wrote:
> Hi Greg and Jiri,
> 
> I've been working hard to get rid of the remaining callers the pass a
> NULL struct device to the DMA mapping functions and am almost done.
> 
> The only non-trivial driver is the synclink driver, which has legacy
> early 90s style ISA support that doesn't use the device model at all.
> 
> In theory we could convert it to an isa_driver, but without testing
> that seems rather dangerous.  So for now I would suggest that we
> remove the ISA support in this driver - if anyone cares enough we
> can resurrect it from the git history and convert it to use the driver
> model.

No objection from me at all, I'll go queue this up now, thanks.

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: drop ISA support in the synlink tty driver?
  2019-02-12  7:51 ` RFC: drop ISA support in the synlink tty driver? Greg Kroah-Hartman
@ 2019-02-12  8:08   ` Jiri Slaby
  2019-02-12  8:25     ` Greg Kroah-Hartman
  0 siblings, 1 reply; 6+ messages in thread
From: Jiri Slaby @ 2019-02-12  8:08 UTC (permalink / raw)
  To: Greg Kroah-Hartman, Christoph Hellwig; +Cc: linux-kernel, linux-serial

On 12. 02. 19, 8:51, Greg Kroah-Hartman wrote:
> On Mon, Feb 11, 2019 at 02:25:33PM +0100, Christoph Hellwig wrote:
>> Hi Greg and Jiri,
>>
>> I've been working hard to get rid of the remaining callers the pass a
>> NULL struct device to the DMA mapping functions and am almost done.
>>
>> The only non-trivial driver is the synclink driver, which has legacy
>> early 90s style ISA support that doesn't use the device model at all.
>>
>> In theory we could convert it to an isa_driver, but without testing
>> that seems rather dangerous.  So for now I would suggest that we
>> remove the ISA support in this driver - if anyone cares enough we
>> can resurrect it from the git history and convert it to use the driver
>> model.
> 
> No objection from me at all, I'll go queue this up now, thanks.

Agreed, but I would kill also the MGSL_BUS_TYPE_ISA macro proper.

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: drop ISA support in the synlink tty driver?
  2019-02-12  8:08   ` Jiri Slaby
@ 2019-02-12  8:25     ` Greg Kroah-Hartman
  2019-02-12  8:40       ` Jiri Slaby
  0 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2019-02-12  8:25 UTC (permalink / raw)
  To: Jiri Slaby; +Cc: Christoph Hellwig, linux-kernel, linux-serial

On Tue, Feb 12, 2019 at 09:08:41AM +0100, Jiri Slaby wrote:
> On 12. 02. 19, 8:51, Greg Kroah-Hartman wrote:
> > On Mon, Feb 11, 2019 at 02:25:33PM +0100, Christoph Hellwig wrote:
> >> Hi Greg and Jiri,
> >>
> >> I've been working hard to get rid of the remaining callers the pass a
> >> NULL struct device to the DMA mapping functions and am almost done.
> >>
> >> The only non-trivial driver is the synclink driver, which has legacy
> >> early 90s style ISA support that doesn't use the device model at all.
> >>
> >> In theory we could convert it to an isa_driver, but without testing
> >> that seems rather dangerous.  So for now I would suggest that we
> >> remove the ISA support in this driver - if anyone cares enough we
> >> can resurrect it from the git history and convert it to use the driver
> >> model.
> > 
> > No objection from me at all, I'll go queue this up now, thanks.
> 
> Agreed, but I would kill also the MGSL_BUS_TYPE_ISA macro proper.

It's just a #define, in a uapi file, so we should probably leave it as
userspace programs _might_ depend on it.  I have no idea why, but oh
well...

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: RFC: drop ISA support in the synlink tty driver?
  2019-02-12  8:25     ` Greg Kroah-Hartman
@ 2019-02-12  8:40       ` Jiri Slaby
  0 siblings, 0 replies; 6+ messages in thread
From: Jiri Slaby @ 2019-02-12  8:40 UTC (permalink / raw)
  To: Greg Kroah-Hartman; +Cc: Christoph Hellwig, linux-kernel, linux-serial

On 12. 02. 19, 9:25, Greg Kroah-Hartman wrote:
> It's just a #define, in a uapi file, so we should probably leave it as
> userspace programs _might_ depend on it.  I have no idea why, but oh
> well...

Uh, I didn't even think this could be in a uapi header. Ok, it makes
sense then.

thanks,
-- 
js
suse labs

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-02-12  8:41 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-11 13:25 RFC: drop ISA support in the synlink tty driver? Christoph Hellwig
2019-02-11 13:25 ` [PATCH] tty/synclink: remove ISA support Christoph Hellwig
2019-02-12  7:51 ` RFC: drop ISA support in the synlink tty driver? Greg Kroah-Hartman
2019-02-12  8:08   ` Jiri Slaby
2019-02-12  8:25     ` Greg Kroah-Hartman
2019-02-12  8:40       ` Jiri Slaby

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).