rocket port patch for 2.4

From: Steven Critchfield (critch@dtsam.com)
Date: Tue Sep 05 2000 - 19:58:48 EST


I have been playing with the rocket port driver in 2.4 trying to make
it work. It appears that the driver hasn't been modified in some time,
as it did not work at all on the debian potato inbstall of 2.2.17, nor
did it work under a fresh 2.4.0-test6 compile.

The problem was it registered all the ports at /dev/ttyR, and did not
try to use the minor number. I am appending a patch made mostly from
copying code from serial.c to rocket.c and fixing the structure names.
This patch works on my 8 port board, but I know that it needs to have
the registering fixed to the correct number of ports detected. I am not
knowledgable enough yet to figure that out, but at least this gets my
card working.

here is the diff against a 2.4.0-test6 kernel

608c608
<

---
> 	
2133c2133
< 	int i, retval, pci_boards_found, isa_boards_found;
---
> 	int i, pci_boards_found, isa_boards_found;
2217a2218,2220
> #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
> 	rocket_driver.name = "ttr/%d";
> #else
2218a2222
> #endif
2221c2225
< 	rocket_driver.num = MAX_RP_PORTS;
---
> 	rocket_driver.num = MAX_RP_PORTS; 
2227c2231
< 	rocket_driver.flags = TTY_DRIVER_REAL_RAW;
---
> 	rocket_driver.flags = TTY_DRIVER_REAL_RAW | TTY_DRIVER_NO_DEVFS;
2259a2264,2266
> #if (LINUX_VERSION_CODE > 0x2032D && defined(CONFIG_DEVFS_FS))
> 	callout_driver.name = "cur/%d";
> #else
2260a2268
> #endif
2263a2272,2275
> #if (LINUX_VERSION_CODE >= 131343)
> 	callout_driver.read_proc = 0;
> 	callout_driver.proc_entry = 0;
> #endif
2265,2276c2277,2292
< 	retval = tty_register_driver(&callout_driver);
< 	if (retval < 0) {
< 		printk("Couldn't install Rocketport callout driver "
< 		       "(error %d)\n", -retval);
< 		return -1;
< 	}
< 
< 	retval = tty_register_driver(&rocket_driver);
< 	if (retval < 0) {
< 		printk("Couldn't install tty Rocketport driver "
< 		       "(error %d)\n", -retval);
< 		return -1;
---
> 	if (tty_register_driver(&rocket_driver))
> 		panic("Couldn't register Rocket Port serial driver\n");
> 	if (tty_register_driver(&callout_driver))
> 		panic("Couldn't register Rocket Port callout driver\n");
> 	/*
> 	 * STEVEN
> 	 * 
> 	 *  This needs to get fixed to only loop through active ports, but
> 	 *  for the meantime I only have 8 ports on my test machine so it is
> 	 *  hardcoded here.
> 	 */
> 	for(i = 0 ; i < 8 ; i++){
> 		tty_register_devfs(&rocket_driver, 0,
> 				   rocket_driver.minor_start + i );
> 		tty_register_devfs(&callout_driver, 0,
> 				   callout_driver.minor_start + i );
2277a2294
> 		
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Sep 07 2000 - 21:00:24 EST