Commit 5151bf4c authored by Olaf Hering's avatar Olaf Hering Committed by Greg Kroah-Hartman

[PATCH] USB: io_edgeport.o differences in 2.4 vs. 2.6

 On Fri, Aug 22, Greg KH wrote:
> On Sat, Aug 16, 2003 at 01:41:01PM +0200, Olaf Hering wrote:
> >
> > I sent you a patch for 2.4 once to make that FOO_MSR_RI, it seems that
> > was not applied to 2.6
> Care to send me a patch for 2.6 then?

How about that one:
parent 0d2cc6b7
...@@ -142,14 +142,14 @@ ...@@ -142,14 +142,14 @@
#define LSR_FIFO_ERR 0x80 // Rx Fifo contains at least 1 erred char #define LSR_FIFO_ERR 0x80 // Rx Fifo contains at least 1 erred char
#define MSR_DELTA_CTS 0x01 // CTS changed from last read #define EDGEPORT_MSR_DELTA_CTS 0x01 // CTS changed from last read
#define MSR_DELTA_DSR 0x02 // DSR changed from last read #define EDGEPORT_MSR_DELTA_DSR 0x02 // DSR changed from last read
#define MSR_DELTA_RI 0x04 // RI changed from 0 -> 1 #define EDGEPORT_MSR_DELTA_RI 0x04 // RI changed from 0 -> 1
#define MSR_DELTA_CD 0x08 // CD changed from last read #define EDGEPORT_MSR_DELTA_CD 0x08 // CD changed from last read
#define MSR_CTS 0x10 // Current state of CTS #define EDGEPORT_MSR_CTS 0x10 // Current state of CTS
#define MSR_DSR 0x20 // Current state of DSR #define EDGEPORT_MSR_DSR 0x20 // Current state of DSR
#define MSR_RI 0x40 // Current state of RI #define EDGEPORT_MSR_RI 0x40 // Current state of RI
#define MSR_CD 0x80 // Current state of CD #define EDGEPORT_MSR_CD 0x80 // Current state of CD
......
...@@ -1806,10 +1806,10 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file) ...@@ -1806,10 +1806,10 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
mcr = edge_port->shadowMCR; mcr = edge_port->shadowMCR;
result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */ result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */
| ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */ | ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */
| ((msr & MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */ | ((msr & EDGEPORT_MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */
| ((msr & MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */ | ((msr & EDGEPORT_MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */
| ((msr & MSR_RI) ? TIOCM_RI: 0) /* 0x080 */ | ((msr & EDGEPORT_MSR_RI) ? TIOCM_RI: 0) /* 0x080 */
| ((msr & MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
dbg("%s -- %x", __FUNCTION__, result); dbg("%s -- %x", __FUNCTION__, result);
...@@ -2221,20 +2221,20 @@ static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr) ...@@ -2221,20 +2221,20 @@ static void handle_new_msr(struct edgeport_port *edge_port, __u8 newMsr)
dbg("%s %02x", __FUNCTION__, newMsr); dbg("%s %02x", __FUNCTION__, newMsr);
if (newMsr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) { if (newMsr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
icount = &edge_port->icount; icount = &edge_port->icount;
/* update input line counters */ /* update input line counters */
if (newMsr & MSR_DELTA_CTS) { if (newMsr & EDGEPORT_MSR_DELTA_CTS) {
icount->cts++; icount->cts++;
} }
if (newMsr & MSR_DELTA_DSR) { if (newMsr & EDGEPORT_MSR_DELTA_DSR) {
icount->dsr++; icount->dsr++;
} }
if (newMsr & MSR_DELTA_CD) { if (newMsr & EDGEPORT_MSR_DELTA_CD) {
icount->dcd++; icount->dcd++;
} }
if (newMsr & MSR_DELTA_RI) { if (newMsr & EDGEPORT_MSR_DELTA_RI) {
icount->rng++; icount->rng++;
} }
wake_up_interruptible(&edge_port->delta_msr_wait); wake_up_interruptible(&edge_port->delta_msr_wait);
......
...@@ -1577,17 +1577,17 @@ static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr) ...@@ -1577,17 +1577,17 @@ static void handle_new_msr (struct edgeport_port *edge_port, __u8 msr)
dbg ("%s - %02x", __FUNCTION__, msr); dbg ("%s - %02x", __FUNCTION__, msr);
if (msr & (MSR_DELTA_CTS | MSR_DELTA_DSR | MSR_DELTA_RI | MSR_DELTA_CD)) { if (msr & (EDGEPORT_MSR_DELTA_CTS | EDGEPORT_MSR_DELTA_DSR | EDGEPORT_MSR_DELTA_RI | EDGEPORT_MSR_DELTA_CD)) {
icount = &edge_port->icount; icount = &edge_port->icount;
/* update input line counters */ /* update input line counters */
if (msr & MSR_DELTA_CTS) if (msr & EDGEPORT_MSR_DELTA_CTS)
icount->cts++; icount->cts++;
if (msr & MSR_DELTA_DSR) if (msr & EDGEPORT_MSR_DELTA_DSR)
icount->dsr++; icount->dsr++;
if (msr & MSR_DELTA_CD) if (msr & EDGEPORT_MSR_DELTA_CD)
icount->dcd++; icount->dcd++;
if (msr & MSR_DELTA_RI) if (msr & EDGEPORT_MSR_DELTA_RI)
icount->rng++; icount->rng++;
wake_up_interruptible (&edge_port->delta_msr_wait); wake_up_interruptible (&edge_port->delta_msr_wait);
} }
...@@ -2449,10 +2449,10 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file) ...@@ -2449,10 +2449,10 @@ static int edge_tiocmget(struct usb_serial_port *port, struct file *file)
mcr = edge_port->shadow_mcr; mcr = edge_port->shadow_mcr;
result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */ result = ((mcr & MCR_DTR) ? TIOCM_DTR: 0) /* 0x002 */
| ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */ | ((mcr & MCR_RTS) ? TIOCM_RTS: 0) /* 0x004 */
| ((msr & MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */ | ((msr & EDGEPORT_MSR_CTS) ? TIOCM_CTS: 0) /* 0x020 */
| ((msr & MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */ | ((msr & EDGEPORT_MSR_CD) ? TIOCM_CAR: 0) /* 0x040 */
| ((msr & MSR_RI) ? TIOCM_RI: 0) /* 0x080 */ | ((msr & EDGEPORT_MSR_RI) ? TIOCM_RI: 0) /* 0x080 */
| ((msr & MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */ | ((msr & EDGEPORT_MSR_DSR) ? TIOCM_DSR: 0); /* 0x100 */
dbg("%s -- %x", __FUNCTION__, result); dbg("%s -- %x", __FUNCTION__, result);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment