update the 2.4 kernel to 2.4.32. it seems pl2303 has the fixes from 2.6, so we now only add the new ids. gcc4 fixes will come later
SVN-Revision: 2515master
parent
818937b28f
commit
b26165bc5e
File diff suppressed because it is too large
Load Diff
@ -1,198 +0,0 @@ |
||||
diff -urN linux-2.4.30.old/drivers/i2c/i2c-core.c linux-2.4.30.dev/drivers/i2c/i2c-core.c
|
||||
--- linux-2.4.30.old/drivers/i2c/i2c-core.c 2005-04-29 17:59:04.000000000 +0200
|
||||
+++ linux-2.4.30.dev/drivers/i2c/i2c-core.c 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -750,7 +750,7 @@
|
||||
msg.addr = client->addr;
|
||||
msg.flags = client->flags & I2C_M_TEN;
|
||||
msg.len = count;
|
||||
- (const char *)msg.buf = buf;
|
||||
+ msg.buf = (__u8 *)buf;
|
||||
|
||||
DEB2(printk(KERN_DEBUG "i2c-core.o: master_send: writing %d bytes on %s.\n",
|
||||
count,client->adapter->name));
|
||||
@@ -780,7 +780,7 @@
|
||||
msg.flags = client->flags & I2C_M_TEN;
|
||||
msg.flags |= I2C_M_RD;
|
||||
msg.len = count;
|
||||
- msg.buf = buf;
|
||||
+ msg.buf = (__u8 *)buf;
|
||||
|
||||
DEB2(printk(KERN_DEBUG "i2c-core.o: master_recv: reading %d bytes on %s.\n",
|
||||
count,client->adapter->name));
|
||||
diff -urN linux-2.4.30.old/drivers/usb/inode.c linux-2.4.30.dev/drivers/usb/inode.c
|
||||
--- linux-2.4.30.old/drivers/usb/inode.c 2004-02-18 14:36:31.000000000 +0100
|
||||
+++ linux-2.4.30.dev/drivers/usb/inode.c 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -42,6 +42,8 @@
|
||||
#include <asm/uaccess.h>
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
+static struct file_operations usbdevfs_bus_file_operations;
|
||||
+static struct inode_operations usbdevfs_bus_inode_operations;
|
||||
|
||||
/*
|
||||
* This list of superblocks is still used,
|
||||
diff -urN linux-2.4.30.old/include/asm-mips/uaccess.h linux-2.4.30.dev/include/asm-mips/uaccess.h
|
||||
--- linux-2.4.30.old/include/asm-mips/uaccess.h 2005-01-19 15:10:12.000000000 +0100
|
||||
+++ linux-2.4.30.dev/include/asm-mips/uaccess.h 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -149,7 +149,7 @@
|
||||
* Returns zero on success, or -EFAULT on error.
|
||||
*/
|
||||
#define put_user(x,ptr) \
|
||||
- __put_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
||||
+ __put_user_check((x),(ptr),sizeof(*(ptr)))
|
||||
|
||||
/*
|
||||
* get_user: - Get a simple variable from user space.
|
||||
@@ -169,7 +169,7 @@
|
||||
* On error, the variable @x is set to zero.
|
||||
*/
|
||||
#define get_user(x,ptr) \
|
||||
- __get_user_check((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
||||
+ __get_user_check((x),(ptr),sizeof(*(ptr)))
|
||||
|
||||
/*
|
||||
* __put_user: - Write a simple value into user space, with less checking.
|
||||
@@ -191,7 +191,7 @@
|
||||
* Returns zero on success, or -EFAULT on error.
|
||||
*/
|
||||
#define __put_user(x,ptr) \
|
||||
- __put_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
||||
+ __put_user_nocheck((x),(ptr),sizeof(*(ptr)))
|
||||
|
||||
/*
|
||||
* __get_user: - Get a simple variable from user space, with less checking.
|
||||
@@ -214,7 +214,7 @@
|
||||
* On error, the variable @x is set to zero.
|
||||
*/
|
||||
#define __get_user(x,ptr) \
|
||||
- __get_user_nocheck((__typeof__(*(ptr)))(x),(ptr),sizeof(*(ptr)))
|
||||
+ __get_user_nocheck((x),(ptr),sizeof(*(ptr)))
|
||||
|
||||
struct __large_struct { unsigned long buf[100]; };
|
||||
#define __m(x) (*(struct __large_struct *)(x))
|
||||
@@ -232,7 +232,7 @@
|
||||
#define __get_user_nocheck(x,ptr,size) \
|
||||
({ \
|
||||
long __gu_err = 0; \
|
||||
- __typeof(*(ptr)) __gu_val = 0; \
|
||||
+ __typeof(*(ptr)) __gu_val = (__typeof(*(ptr))) 0; \
|
||||
long __gu_addr; \
|
||||
__gu_addr = (long) (ptr); \
|
||||
switch (size) { \
|
||||
diff -urN linux-2.4.30.old/include/linux/byteorder/swab.h linux-2.4.30.dev/include/linux/byteorder/swab.h
|
||||
--- linux-2.4.30.old/include/linux/byteorder/swab.h 2002-11-29 00:53:15.000000000 +0100
|
||||
+++ linux-2.4.30.dev/include/linux/byteorder/swab.h 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -156,7 +156,7 @@
|
||||
#endif /* OPTIMIZE */
|
||||
|
||||
|
||||
-static __inline__ __const__ __u16 __fswab16(__u16 x)
|
||||
+static __inline__ __u16 __fswab16(__u16 x)
|
||||
{
|
||||
return __arch__swab16(x);
|
||||
}
|
||||
@@ -169,7 +169,7 @@
|
||||
__arch__swab16s(addr);
|
||||
}
|
||||
|
||||
-static __inline__ __const__ __u32 __fswab24(__u32 x)
|
||||
+static __inline__ __u32 __fswab24(__u32 x)
|
||||
{
|
||||
return __arch__swab24(x);
|
||||
}
|
||||
@@ -182,7 +182,7 @@
|
||||
__arch__swab24s(addr);
|
||||
}
|
||||
|
||||
-static __inline__ __const__ __u32 __fswab32(__u32 x)
|
||||
+static __inline__ __u32 __fswab32(__u32 x)
|
||||
{
|
||||
return __arch__swab32(x);
|
||||
}
|
||||
@@ -196,7 +196,7 @@
|
||||
}
|
||||
|
||||
#ifdef __BYTEORDER_HAS_U64__
|
||||
-static __inline__ __const__ __u64 __fswab64(__u64 x)
|
||||
+static __inline__ __u64 __fswab64(__u64 x)
|
||||
{
|
||||
# ifdef __SWAB_64_THRU_32__
|
||||
__u32 h = x >> 32;
|
||||
diff -urN linux-2.4.30.old/include/linux/fs.h linux-2.4.30.dev/include/linux/fs.h
|
||||
--- linux-2.4.30.old/include/linux/fs.h 2005-04-29 17:59:08.000000000 +0200
|
||||
+++ linux-2.4.30.dev/include/linux/fs.h 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -1563,7 +1563,6 @@
|
||||
unsigned long generate_cluster(kdev_t, int b[], int);
|
||||
unsigned long generate_cluster_swab32(kdev_t, int b[], int);
|
||||
extern kdev_t ROOT_DEV;
|
||||
-extern char root_device_name[];
|
||||
|
||||
|
||||
extern void show_buffers(void);
|
||||
diff -urN linux-2.4.30.old/include/linux/i2c.h linux-2.4.30.dev/include/linux/i2c.h
|
||||
--- linux-2.4.30.old/include/linux/i2c.h 2005-01-19 15:10:12.000000000 +0100
|
||||
+++ linux-2.4.30.dev/include/linux/i2c.h 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -70,7 +70,7 @@
|
||||
|
||||
/* Transfer num messages.
|
||||
*/
|
||||
-extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg msg[],int num);
|
||||
+extern int i2c_transfer(struct i2c_adapter *adap, struct i2c_msg *msg, int num);
|
||||
|
||||
/*
|
||||
* Some adapter types (i.e. PCF 8584 based ones) may support slave behaviuor.
|
||||
@@ -197,7 +197,7 @@
|
||||
to NULL. If an adapter algorithm can do SMBus access, set
|
||||
smbus_xfer. If set to NULL, the SMBus protocol is simulated
|
||||
using common I2C messages */
|
||||
- int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg msgs[],
|
||||
+ int (*master_xfer)(struct i2c_adapter *adap,struct i2c_msg *msgs,
|
||||
int num);
|
||||
int (*smbus_xfer) (struct i2c_adapter *adap, u16 addr,
|
||||
unsigned short flags, char read_write,
|
||||
diff -urN linux-2.4.30.old/include/linux/usbdevice_fs.h linux-2.4.30.dev/include/linux/usbdevice_fs.h
|
||||
--- linux-2.4.30.old/include/linux/usbdevice_fs.h 2003-11-28 19:26:21.000000000 +0100
|
||||
+++ linux-2.4.30.dev/include/linux/usbdevice_fs.h 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -185,8 +185,6 @@
|
||||
extern struct file_operations usbdevfs_devices_fops;
|
||||
extern struct file_operations usbdevfs_device_file_operations;
|
||||
extern struct inode_operations usbdevfs_device_inode_operations;
|
||||
-extern struct inode_operations usbdevfs_bus_inode_operations;
|
||||
-extern struct file_operations usbdevfs_bus_file_operations;
|
||||
extern void usbdevfs_conn_disc_event(void);
|
||||
|
||||
#endif /* __KERNEL__ */
|
||||
diff -urN linux-2.4.30.old/include/net/icmp.h linux-2.4.30.dev/include/net/icmp.h
|
||||
--- linux-2.4.30.old/include/net/icmp.h 2001-11-22 20:47:15.000000000 +0100
|
||||
+++ linux-2.4.30.dev/include/net/icmp.h 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
#include <net/sock.h>
|
||||
#include <net/protocol.h>
|
||||
+#include <net/snmp.h>
|
||||
|
||||
struct icmp_err {
|
||||
int errno;
|
||||
diff -urN linux-2.4.30.old/include/net/ipv6.h linux-2.4.30.dev/include/net/ipv6.h
|
||||
--- linux-2.4.30.old/include/net/ipv6.h 2004-11-17 12:54:22.000000000 +0100
|
||||
+++ linux-2.4.30.dev/include/net/ipv6.h 2005-04-29 18:42:37.000000000 +0200
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <asm/hardirq.h>
|
||||
#include <net/ndisc.h>
|
||||
#include <net/flow.h>
|
||||
+#include <net/snmp.h>
|
||||
|
||||
#define SIN6_LEN_RFC2133 24
|
||||
|
||||
diff -urN linux-2.4.30.old/include/linux/netfilter_ipv4/ip_tables.h linux-2.4.30.dev/include/linux/netfilter_ipv4/ip_tables.h
|
||||
--- linux-2.4.30.old/include/linux/netfilter_ipv4/ip_tables.h 2005-04-29 17:59:08.000000000 +0200
|
||||
+++ linux-2.4.30.dev/include/linux/netfilter_ipv4/ip_tables.h 2005-04-29 19:06:36.000000000 +0200
|
||||
@@ -283,7 +283,7 @@
|
||||
struct ipt_entry entrytable[0];
|
||||
};
|
||||
|
||||
-extern struct semaphore ipt_mutex;
|
||||
+// extern struct semaphore ipt_mutex;
|
||||
|
||||
/* Standard return verdict, or do jump. */
|
||||
#define IPT_STANDARD_TARGET ""
|
@ -1,146 +0,0 @@ |
||||
--- linux/drivers/usb/serial/pl2303.c.orig 2005-10-17 12:09:48.000000000 +0200
|
||||
+++ linux/drivers/usb/serial/pl2303.c 2005-10-19 04:10:46.000000000 +0200
|
||||
@@ -14,6 +14,13 @@
|
||||
* See Documentation/usb/usb-serial.txt for more information on using this driver
|
||||
*
|
||||
*
|
||||
+ * 2005_Oct_19 grsch
|
||||
+ * added some missing ioctl commands
|
||||
+ * it seems that there's still an issue with the 2.6.8 version when
|
||||
+ * using the device with echo "whatever" >/dev/usb/tts/0 .
|
||||
+ * Apparently, a timeout is needed upon pl2303_close (implemented in
|
||||
+ * 2.6.13.4)
|
||||
+ *
|
||||
* 2005_Mar_05 grsch
|
||||
* ported 2.6.8 pl2303.c to 2.4.20 format
|
||||
* (HX model works fine now, ID table should be brought up to date)
|
||||
@@ -142,9 +149,8 @@
|
||||
static int pl2303_write (struct usb_serial_port *port, int from_user,
|
||||
const unsigned char *buf, int count);
|
||||
static void pl2303_break_ctl(struct usb_serial_port *port,int break_state);
|
||||
-static int pl2303_tiocmget (struct usb_serial_port *port, struct file *file);
|
||||
-static int pl2303_tiocmset (struct usb_serial_port *port, struct file *file,
|
||||
- unsigned int set, unsigned int clear);
|
||||
+static int pl2303_tiocmget (struct usb_serial_port *port, unsigned int* value);
|
||||
+static int pl2303_tiocmset (struct usb_serial_port *port, unsigned int cmd, unsigned int *value);
|
||||
static int pl2303_startup (struct usb_serial *serial);
|
||||
static void pl2303_shutdown (struct usb_serial *serial);
|
||||
|
||||
@@ -642,11 +648,108 @@
|
||||
return 0;
|
||||
}
|
||||
|
||||
+
|
||||
+
|
||||
+static int pl2303_tiocmget (struct usb_serial_port *port, unsigned int *value)
|
||||
+{
|
||||
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
|
||||
+ unsigned long flags;
|
||||
+ unsigned int mcr;
|
||||
+ unsigned int status;
|
||||
+ unsigned int result;
|
||||
+
|
||||
+ dbg("%s (%d)", __FUNCTION__, port->number);
|
||||
+
|
||||
+ spin_lock_irqsave (&priv->lock, flags);
|
||||
+ mcr = priv->line_control;
|
||||
+ status = priv->line_status;
|
||||
+ spin_unlock_irqrestore (&priv->lock, flags);
|
||||
+
|
||||
+ result = ((mcr & CONTROL_DTR) ? TIOCM_DTR : 0)
|
||||
+ | ((mcr & CONTROL_RTS) ? TIOCM_RTS : 0)
|
||||
+ | ((status & UART_CTS) ? TIOCM_CTS : 0)
|
||||
+ | ((status & UART_DSR) ? TIOCM_DSR : 0)
|
||||
+ | ((status & UART_RING) ? TIOCM_RI : 0)
|
||||
+ | ((status & UART_DCD) ? TIOCM_CD : 0);
|
||||
+
|
||||
+ dbg("%s - result = %x", __FUNCTION__, result);
|
||||
+
|
||||
+ if (copy_to_user(value, &result, sizeof(int)))
|
||||
+ return -EFAULT;
|
||||
+ return 0;
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
+static int pl2303_tiocmset (struct usb_serial_port *port, unsigned int cmd, unsigned int *value)
|
||||
+{
|
||||
+ /*
|
||||
+ struct pl2303_private *priv = usb_get_serial_port_data(port);
|
||||
+ unsigned long flags;
|
||||
+ u8 control;
|
||||
+
|
||||
+ spin_lock_irqsave (&priv->lock, flags);
|
||||
+ if (set & TIOCM_RTS)
|
||||
+ priv->line_control |= CONTROL_RTS;
|
||||
+ if (set & TIOCM_DTR)
|
||||
+ priv->line_control |= CONTROL_DTR;
|
||||
+ if (clear & TIOCM_RTS)
|
||||
+ priv->line_control &= ~CONTROL_RTS;
|
||||
+ if (clear & TIOCM_DTR)
|
||||
+ priv->line_control &= ~CONTROL_DTR;
|
||||
+ control = priv->line_control;
|
||||
+ spin_unlock_irqrestore (&priv->lock, flags);
|
||||
+
|
||||
+ return set_control_lines (port->serial->dev, control);
|
||||
+ */
|
||||
+ struct pl2303_private *priv = port->private;
|
||||
+ unsigned int arg;
|
||||
+
|
||||
+ if (copy_from_user(&arg, value, sizeof(int)))
|
||||
+ return -EFAULT;
|
||||
+
|
||||
+ switch (cmd) {
|
||||
+ case TIOCMBIS:
|
||||
+ if (arg & TIOCM_RTS)
|
||||
+ priv->line_control |= CONTROL_RTS;
|
||||
+ if (arg & TIOCM_DTR)
|
||||
+ priv->line_control |= CONTROL_DTR;
|
||||
+ break;
|
||||
+
|
||||
+ case TIOCMBIC:
|
||||
+ if (arg & TIOCM_RTS)
|
||||
+ priv->line_control &= ~CONTROL_RTS;
|
||||
+ if (arg & TIOCM_DTR)
|
||||
+ priv->line_control &= ~CONTROL_DTR;
|
||||
+ break;
|
||||
+
|
||||
+ case TIOCMSET:
|
||||
+ /* turn off RTS and DTR and then only turn
|
||||
+ on what was asked to */
|
||||
+ priv->line_control &= ~(CONTROL_RTS | CONTROL_DTR);
|
||||
+ priv->line_control |= ((arg & TIOCM_RTS) ? CONTROL_RTS : 0);
|
||||
+ priv->line_control |= ((arg & TIOCM_DTR) ? CONTROL_DTR : 0);
|
||||
+ break;
|
||||
+ }
|
||||
+
|
||||
+ return set_control_lines (port->serial->dev, priv->line_control);
|
||||
+}
|
||||
+
|
||||
+
|
||||
+
|
||||
static int pl2303_ioctl (struct usb_serial_port *port, struct file *file, unsigned int cmd, unsigned long arg)
|
||||
{
|
||||
dbg("%s (%d) cmd = 0x%04x", __FUNCTION__, port->number, cmd);
|
||||
|
||||
switch (cmd) {
|
||||
+ case TIOCMGET:
|
||||
+ dbg("%s (%d) TIOCMGET", __FUNCTION__, port->number);
|
||||
+ return pl2303_tiocmget(port,(unsigned int *)arg);
|
||||
+ case TIOCMBIS:
|
||||
+ case TIOCMBIC:
|
||||
+ case TIOCMSET:
|
||||
+ dbg("%s (%d) TIOCMSET/TIOCMBIC/TIOCMSET", __FUNCTION__, port->number);
|
||||
+ return pl2303_tiocmset(port,cmd,(unsigned int*)arg);
|
||||
case TIOCMIWAIT:
|
||||
dbg("%s (%d) TIOCMIWAIT", __FUNCTION__, port->number);
|
||||
return wait_modem_info(port, arg);
|
||||
@@ -705,6 +808,8 @@
|
||||
|
||||
dbg("%s (%d)", __FUNCTION__, port->number);
|
||||
|
||||
+ dbg("%s - urb status %d...", __FUNCTION__, urb->status);
|
||||
+
|
||||
switch (urb->status) {
|
||||
case 0:
|
||||
/* success */
|
Loading…
Reference in new issue