patch-2.4.19 linux-2.4.19/drivers/usb/serial/io_edgeport.c
Next file: linux-2.4.19/drivers/usb/serial/io_tables.h
Previous file: linux-2.4.19/drivers/usb/serial/ftdi_sio.h
Back to the patch index
Back to the overall index
- Lines: 64
- Date:
Fri Aug 2 17:39:45 2002
- Orig file:
linux-2.4.18/drivers/usb/serial/io_edgeport.c
- Orig date:
Fri Dec 21 09:41:55 2001
diff -urN linux-2.4.18/drivers/usb/serial/io_edgeport.c linux-2.4.19/drivers/usb/serial/io_edgeport.c
@@ -2,7 +2,7 @@
* Edgeport USB Serial Converter driver
*
* Copyright(c) 2000 Inside Out Networks, All rights reserved.
- * Copyright(c) 2001 Greg Kroah-Hartman <greg@kroah.com>
+ * Copyright(c) 2001-2002 Greg Kroah-Hartman <greg@kroah.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -25,6 +25,9 @@
*
* Version history:
*
+ * 2.3 2002_03_08 greg kroah-hartman
+ * - fixed bug when multiple devices were attached at the same time.
+ *
* 2.2 2001_11_14 greg kroah-hartman
* - fixed bug in edge_close that kept the port from being used more
* than once.
@@ -1449,8 +1452,8 @@
edge_port->write_in_progress = FALSE;
return;
}
- buffer[0] = IOSP_BUILD_DATA_HDR1 (edge_port->port->number, count);
- buffer[1] = IOSP_BUILD_DATA_HDR2 (edge_port->port->number, count);
+ buffer[0] = IOSP_BUILD_DATA_HDR1 (edge_port->port->number - edge_port->port->serial->minor, count);
+ buffer[1] = IOSP_BUILD_DATA_HDR2 (edge_port->port->number - edge_port->port->serial->minor, count);
/* now copy our data */
bytesleft = fifo->size - fifo->tail;
@@ -2447,7 +2450,9 @@
currentCommand = buffer;
- MAKE_CMD_EXT_CMD( ¤tCommand, &length, edge_port->port->number, command, param);
+ MAKE_CMD_EXT_CMD (¤tCommand, &length,
+ edge_port->port->number - edge_port->port->serial->minor,
+ command, param);
status = write_cmd_usb (edge_port, buffer, length);
if (status) {
@@ -2527,9 +2532,9 @@
int cmdLen = 0;
int divisor;
int status;
- unsigned char number = edge_port->port->number;
+ unsigned char number = edge_port->port->number - edge_port->port->serial->minor;
- dbg(__FUNCTION__" - port = %d, baud = %d", number, baudRate);
+ dbg(__FUNCTION__" - port = %d, baud = %d", edge_port->port->number, baudRate);
status = calc_baud_rate_divisor (baudRate, &divisor);
if (status) {
@@ -2632,7 +2637,9 @@
currCmd = cmdBuffer;
// Build a cmd in the buffer to write the given register
- MAKE_CMD_WRITE_REG(&currCmd, &cmdLen, edge_port->port->number, regNum, regValue);
+ MAKE_CMD_WRITE_REG (&currCmd, &cmdLen,
+ edge_port->port->number - edge_port->port->serial->minor,
+ regNum, regValue);
status = write_cmd_usb(edge_port, cmdBuffer, cmdLen);
if (status) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)