All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Fix rocket port driver
@ 2002-01-30 23:31 Andi Kleen
  2002-01-31  1:16 ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2002-01-30 23:31 UTC (permalink / raw)
  To: torvalds; +Cc: linux-kernel, davej


This patch fixes the rocketport serial driver to compile again
(after the kdev_t changes) and also adds support for a rocketport 
card I managed to buy second hand with a non standard pci ID. 

Patch for 2.5.3. Please apply.

-Andi


--- linux-2.5.3-work/drivers/char/rocket.c-o	Fri Sep 21 19:55:22 2001
+++ linux-2.5.3-work/drivers/char/rocket.c	Wed Jan 30 23:00:48 2002
@@ -227,7 +227,7 @@
 	if (!info)
 		return 1;
 	if (info->magic != RPORT_MAGIC) {
-		printk(badmagic, MAJOR(device), MINOR(device), routine);
+		printk(badmagic, major(device), minor(device), routine);
 		return 1;
 	}
 #endif
@@ -896,7 +896,7 @@
 	CHANNEL_t	*cp;
 	unsigned long page;
 	
-	line = MINOR(tty->device) - tty->driver.minor_start;
+	line = minor(tty->device) - tty->driver.minor_start;
 	if ((line < 0) || (line >= MAX_RP_PORTS))
 		return -ENODEV;
 	if (!tmp_buf) {
@@ -1467,7 +1467,7 @@
 {
 	if (tty)
 		sprintf(buf, "%s%d", tty->driver.name,
-			MINOR(tty->device) - tty->driver.minor_start +
+			minor(tty->device) - tty->driver.minor_start +
 			tty->driver.name_base);
 	else
 		strcpy(buf, "NULL tty");
@@ -1964,6 +1964,10 @@
 		str = "8-port Modem";
 		max_num_aiops = 1;
 		break;
+	case 0x8:
+		str = "mysterious 8 port"; 
+		max_num_aiops = 1; 
+		break;
 	default:
 		str = "(unknown/unsupported)";
 		max_num_aiops = 0;
@@ -2042,6 +2046,10 @@
 			PCI_DEVICE_ID_RP8M, i, &bus, &device_fn)) 
 			if(register_PCI(count+boards_found, bus, device_fn))
 				count++;
+		if(!pcibios_find_device(PCI_VENDOR_ID_RP,
+			0x8, i, &bus, &device_fn)) 
+			if(register_PCI(count+boards_found, bus, device_fn))
+				count++;	
 	}
 	return(count);
 }


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

* Re: [PATCH] Fix rocket port driver
  2002-01-30 23:31 [PATCH] Fix rocket port driver Andi Kleen
@ 2002-01-31  1:16 ` Jeff Garzik
  2002-01-31  1:24   ` Andi Kleen
  0 siblings, 1 reply; 4+ messages in thread
From: Jeff Garzik @ 2002-01-31  1:16 UTC (permalink / raw)
  To: Andi Kleen; +Cc: torvalds, linux-kernel, davej

On Thu, Jan 31, 2002 at 12:31:30AM +0100, Andi Kleen wrote:

Cool.


> @@ -2042,6 +2046,10 @@
>  			PCI_DEVICE_ID_RP8M, i, &bus, &device_fn)) 
>  			if(register_PCI(count+boards_found, bus, device_fn))
>  				count++;
> +		if(!pcibios_find_device(PCI_VENDOR_ID_RP,
> +			0x8, i, &bus, &device_fn)) 
> +			if(register_PCI(count+boards_found, bus, device_fn))
> +				count++;	

Would it be possible to beg and plead and convince you to convert this
driver to the new PCI API?

It hasn't been touched in ages AFAICS, and both 2.4 as well as 2.5 would
greatly benefit from such a [tested] change.

	Jeff




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

* Re: [PATCH] Fix rocket port driver
  2002-01-31  1:16 ` Jeff Garzik
@ 2002-01-31  1:24   ` Andi Kleen
  2002-01-31  1:25     ` Jeff Garzik
  0 siblings, 1 reply; 4+ messages in thread
From: Andi Kleen @ 2002-01-31  1:24 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: Andi Kleen, torvalds, linux-kernel, davej

On Thu, Jan 31, 2002 at 02:16:40AM +0100, Jeff Garzik wrote:
> > @@ -2042,6 +2046,10 @@
> >  			PCI_DEVICE_ID_RP8M, i, &bus, &device_fn)) 
> >  			if(register_PCI(count+boards_found, bus, device_fn))
> >  				count++;
> > +		if(!pcibios_find_device(PCI_VENDOR_ID_RP,
> > +			0x8, i, &bus, &device_fn)) 
> > +			if(register_PCI(count+boards_found, bus, device_fn))
> > +				count++;	
> 
> Would it be possible to beg and plead and convince you to convert this
> driver to the new PCI API?

I can do that, but not tonight. 

Linus, Dave, please does that not let stop you from merging my previous
patch anyways until I get to it..

> 
> It hasn't been touched in ages AFAICS, and both 2.4 as well as 2.5 would
> greatly benefit from such a [tested] change.

Comtrol has a newer "beta" driver on their ftp site, but it only adds support
for some new hardware features, but doesn't change much otherwise. 

-Andi


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

* Re: [PATCH] Fix rocket port driver
  2002-01-31  1:24   ` Andi Kleen
@ 2002-01-31  1:25     ` Jeff Garzik
  0 siblings, 0 replies; 4+ messages in thread
From: Jeff Garzik @ 2002-01-31  1:25 UTC (permalink / raw)
  To: Andi Kleen; +Cc: torvalds, linux-kernel, davej

On Thu, Jan 31, 2002 at 02:24:13AM +0100, Andi Kleen wrote:
> > Would it be possible to beg and plead and convince you to convert this
> > driver to the new PCI API?
> 
> I can do that, but not tonight. 
> 
> Linus, Dave, please does that not let stop you from merging my previous
> patch anyways until I get to it..

Agreed...

	Jeff




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

end of thread, other threads:[~2002-01-31  1:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-01-30 23:31 [PATCH] Fix rocket port driver Andi Kleen
2002-01-31  1:16 ` Jeff Garzik
2002-01-31  1:24   ` Andi Kleen
2002-01-31  1:25     ` Jeff Garzik

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.