diff options
Diffstat (limited to 'include')
31 files changed, 610 insertions, 178 deletions
diff --git a/include/asm-alpha/compiler.h b/include/asm-alpha/compiler.h index 399c33b7be51..0a4a8b40dfcd 100644 --- a/include/asm-alpha/compiler.h +++ b/include/asm-alpha/compiler.h | |||
| @@ -98,6 +98,9 @@ | |||
| 98 | #undef inline | 98 | #undef inline |
| 99 | #undef __inline__ | 99 | #undef __inline__ |
| 100 | #undef __inline | 100 | #undef __inline |
| 101 | 101 | #if __GNUC__ == 3 && __GNUC_MINOR__ >= 1 || __GNUC__ > 3 | |
| 102 | #undef __always_inline | ||
| 103 | #define __always_inline inline __attribute__((always_inline)) | ||
| 104 | #endif | ||
| 102 | 105 | ||
| 103 | #endif /* __ALPHA_COMPILER_H */ | 106 | #endif /* __ALPHA_COMPILER_H */ |
diff --git a/include/asm-arm/arch-s3c2410/anubis-map.h b/include/asm-arm/arch-s3c2410/anubis-map.h index 97741d6e506a..d529ffda8599 100644 --- a/include/asm-arm/arch-s3c2410/anubis-map.h +++ b/include/asm-arm/arch-s3c2410/anubis-map.h | |||
| @@ -20,22 +20,22 @@ | |||
| 20 | 20 | ||
| 21 | /* start peripherals off after the S3C2410 */ | 21 | /* start peripherals off after the S3C2410 */ |
| 22 | 22 | ||
| 23 | #define ANUBIS_IOADDR(x) (S3C2410_ADDR((x) + 0x02000000)) | 23 | #define ANUBIS_IOADDR(x) (S3C2410_ADDR((x) + 0x01800000)) |
| 24 | 24 | ||
| 25 | #define ANUBIS_PA_CPLD (S3C2410_CS1 | (1<<26)) | 25 | #define ANUBIS_PA_CPLD (S3C2410_CS1 | (1<<26)) |
| 26 | 26 | ||
| 27 | /* we put the CPLD registers next, to get them out of the way */ | 27 | /* we put the CPLD registers next, to get them out of the way */ |
| 28 | 28 | ||
| 29 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01300000 */ | 29 | #define ANUBIS_VA_CTRL1 ANUBIS_IOADDR(0x00000000) /* 0x01800000 */ |
| 30 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) | 30 | #define ANUBIS_PA_CTRL1 (ANUBIS_PA_CPLD) |
| 31 | 31 | ||
| 32 | #define ANUBIS_VA_CTRL2 ANUBIS_IOADDR(0x00100000) /* 0x01400000 */ | 32 | #define ANUBIS_VA_CTRL2 ANUBIS_IOADDR(0x00100000) /* 0x01900000 */ |
| 33 | #define ANUBIS_PA_CTRL2 (ANUBIS_PA_CPLD) | 33 | #define ANUBIS_PA_CTRL2 (ANUBIS_PA_CPLD) |
| 34 | 34 | ||
| 35 | #define ANUBIS_VA_CTRL3 ANUBIS_IOADDR(0x00200000) /* 0x01500000 */ | 35 | #define ANUBIS_VA_CTRL3 ANUBIS_IOADDR(0x00200000) /* 0x01A00000 */ |
| 36 | #define ANUBIS_PA_CTRL3 (ANUBIS_PA_CPLD) | 36 | #define ANUBIS_PA_CTRL3 (ANUBIS_PA_CPLD) |
| 37 | 37 | ||
| 38 | #define ANUBIS_VA_CTRL4 ANUBIS_IOADDR(0x00300000) /* 0x01600000 */ | 38 | #define ANUBIS_VA_CTRL4 ANUBIS_IOADDR(0x00300000) /* 0x01B00000 */ |
| 39 | #define ANUBIS_PA_CTRL4 (ANUBIS_PA_CPLD) | 39 | #define ANUBIS_PA_CTRL4 (ANUBIS_PA_CPLD) |
| 40 | 40 | ||
| 41 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) | 41 | #define ANUBIS_IDEPRI ANUBIS_IOADDR(0x01000000) |
diff --git a/include/asm-arm/io.h b/include/asm-arm/io.h index cfa71a0dffb6..5c4ae8f5dbb0 100644 --- a/include/asm-arm/io.h +++ b/include/asm-arm/io.h | |||
| @@ -136,9 +136,9 @@ extern void __readwrite_bug(const char *fn); | |||
| 136 | /* | 136 | /* |
| 137 | * String version of IO memory access ops: | 137 | * String version of IO memory access ops: |
| 138 | */ | 138 | */ |
| 139 | extern void _memcpy_fromio(void *, void __iomem *, size_t); | 139 | extern void _memcpy_fromio(void *, const volatile void __iomem *, size_t); |
| 140 | extern void _memcpy_toio(void __iomem *, const void *, size_t); | 140 | extern void _memcpy_toio(volatile void __iomem *, const void *, size_t); |
| 141 | extern void _memset_io(void __iomem *, int, size_t); | 141 | extern void _memset_io(volatile void __iomem *, int, size_t); |
| 142 | 142 | ||
| 143 | #define mmiowb() | 143 | #define mmiowb() |
| 144 | 144 | ||
diff --git a/include/asm-arm/signal.h b/include/asm-arm/signal.h index 760f6e65af05..ced69161917b 100644 --- a/include/asm-arm/signal.h +++ b/include/asm-arm/signal.h | |||
| @@ -115,7 +115,6 @@ typedef unsigned long sigset_t; | |||
| 115 | 115 | ||
| 116 | #ifdef __KERNEL__ | 116 | #ifdef __KERNEL__ |
| 117 | #define SA_TIMER 0x40000000 | 117 | #define SA_TIMER 0x40000000 |
| 118 | #define SA_IRQNOMASK 0x08000000 | ||
| 119 | #endif | 118 | #endif |
| 120 | 119 | ||
| 121 | #include <asm-generic/signal.h> | 120 | #include <asm-generic/signal.h> |
diff --git a/include/asm-ia64/mca.h b/include/asm-ia64/mca.h index 97a28b8b2ddd..c7d9c9ed38ba 100644 --- a/include/asm-ia64/mca.h +++ b/include/asm-ia64/mca.h | |||
| @@ -80,7 +80,12 @@ struct ia64_sal_os_state { | |||
| 80 | u64 sal_ra; /* Return address in SAL, physical */ | 80 | u64 sal_ra; /* Return address in SAL, physical */ |
| 81 | u64 sal_gp; /* GP of the SAL - physical */ | 81 | u64 sal_gp; /* GP of the SAL - physical */ |
| 82 | pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ | 82 | pal_min_state_area_t *pal_min_state; /* from R17. physical in asm, virtual in C */ |
| 83 | /* Previous values of IA64_KR(CURRENT) and IA64_KR(CURRENT_STACK). | ||
| 84 | * Note: if the MCA/INIT recovery code wants to resume to a new context | ||
| 85 | * then it must change these values to reflect the new kernel stack. | ||
| 86 | */ | ||
| 83 | u64 prev_IA64_KR_CURRENT; /* previous value of IA64_KR(CURRENT) */ | 87 | u64 prev_IA64_KR_CURRENT; /* previous value of IA64_KR(CURRENT) */ |
| 88 | u64 prev_IA64_KR_CURRENT_STACK; | ||
| 84 | struct task_struct *prev_task; /* previous task, NULL if it is not useful */ | 89 | struct task_struct *prev_task; /* previous task, NULL if it is not useful */ |
| 85 | /* Some interrupt registers are not saved in minstate, pt_regs or | 90 | /* Some interrupt registers are not saved in minstate, pt_regs or |
| 86 | * switch_stack. Because MCA/INIT can occur when interrupts are | 91 | * switch_stack. Because MCA/INIT can occur when interrupts are |
diff --git a/include/asm-m32r/io.h b/include/asm-m32r/io.h index 8e9e481e6996..70ad1c949c2b 100644 --- a/include/asm-m32r/io.h +++ b/include/asm-m32r/io.h | |||
| @@ -60,7 +60,7 @@ __ioremap(unsigned long offset, unsigned long size, unsigned long flags); | |||
| 60 | * address. | 60 | * address. |
| 61 | */ | 61 | */ |
| 62 | 62 | ||
| 63 | static inline void * ioremap(unsigned long offset, unsigned long size) | 63 | static inline void __iomem *ioremap(unsigned long offset, unsigned long size) |
| 64 | { | 64 | { |
| 65 | return __ioremap(offset, size, 0); | 65 | return __ioremap(offset, size, 0); |
| 66 | } | 66 | } |
diff --git a/include/asm-m32r/uaccess.h b/include/asm-m32r/uaccess.h index 93d863c455a1..0da7c47d2f01 100644 --- a/include/asm-m32r/uaccess.h +++ b/include/asm-m32r/uaccess.h | |||
| @@ -208,7 +208,8 @@ extern void __get_user_4(void); | |||
| 208 | * On error, the variable @x is set to zero. | 208 | * On error, the variable @x is set to zero. |
| 209 | */ | 209 | */ |
| 210 | #define get_user(x,ptr) \ | 210 | #define get_user(x,ptr) \ |
| 211 | ({ int __ret_gu,__val_gu; \ | 211 | ({ int __ret_gu; \ |
| 212 | unsigned long __val_gu; \ | ||
| 212 | __chk_user_ptr(ptr); \ | 213 | __chk_user_ptr(ptr); \ |
| 213 | switch(sizeof (*(ptr))) { \ | 214 | switch(sizeof (*(ptr))) { \ |
| 214 | case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \ | 215 | case 1: __get_user_x(1,__ret_gu,__val_gu,ptr); break; \ |
| @@ -403,7 +404,8 @@ struct __large_struct { unsigned long buf[100]; }; | |||
| 403 | 404 | ||
| 404 | #define __get_user_nocheck(x,ptr,size) \ | 405 | #define __get_user_nocheck(x,ptr,size) \ |
| 405 | ({ \ | 406 | ({ \ |
| 406 | long __gu_err, __gu_val; \ | 407 | long __gu_err; \ |
| 408 | unsigned long __gu_val; \ | ||
| 407 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ | 409 | __get_user_size(__gu_val,(ptr),(size),__gu_err); \ |
| 408 | (x) = (__typeof__(*(ptr)))__gu_val; \ | 410 | (x) = (__typeof__(*(ptr)))__gu_val; \ |
| 409 | __gu_err; \ | 411 | __gu_err; \ |
| @@ -594,8 +596,8 @@ static inline unsigned long __generic_copy_to_user_nocheck(void __user *to, | |||
| 594 | return n; | 596 | return n; |
| 595 | } | 597 | } |
| 596 | 598 | ||
| 597 | unsigned long __generic_copy_to_user(void *, const void *, unsigned long); | 599 | unsigned long __generic_copy_to_user(void __user *, const void *, unsigned long); |
| 598 | unsigned long __generic_copy_from_user(void *, const void *, unsigned long); | 600 | unsigned long __generic_copy_from_user(void *, const void __user *, unsigned long); |
| 599 | 601 | ||
| 600 | /** | 602 | /** |
| 601 | * __copy_to_user: - Copy a block of data into user space, with less checking. | 603 | * __copy_to_user: - Copy a block of data into user space, with less checking. |
diff --git a/include/asm-ppc/macio.h b/include/asm-ppc/macio.h index a481b772d154..b553dd4b139e 100644 --- a/include/asm-ppc/macio.h +++ b/include/asm-ppc/macio.h | |||
| @@ -1,7 +1,6 @@ | |||
| 1 | #ifndef __MACIO_ASIC_H__ | 1 | #ifndef __MACIO_ASIC_H__ |
| 2 | #define __MACIO_ASIC_H__ | 2 | #define __MACIO_ASIC_H__ |
| 3 | 3 | ||
| 4 | #include <linux/mod_devicetable.h> | ||
| 5 | #include <asm/of_device.h> | 4 | #include <asm/of_device.h> |
| 6 | 5 | ||
| 7 | extern struct bus_type macio_bus_type; | 6 | extern struct bus_type macio_bus_type; |
diff --git a/include/asm-ppc/of_device.h b/include/asm-ppc/of_device.h index 4b264cfd3998..575bce418f80 100644 --- a/include/asm-ppc/of_device.h +++ b/include/asm-ppc/of_device.h | |||
| @@ -2,6 +2,7 @@ | |||
| 2 | #define __OF_DEVICE_H__ | 2 | #define __OF_DEVICE_H__ |
| 3 | 3 | ||
| 4 | #include <linux/device.h> | 4 | #include <linux/device.h> |
| 5 | #include <linux/mod_devicetable.h> | ||
| 5 | #include <asm/prom.h> | 6 | #include <asm/prom.h> |
| 6 | 7 | ||
| 7 | /* | 8 | /* |
| @@ -55,7 +56,9 @@ extern int of_register_driver(struct of_platform_driver *drv); | |||
| 55 | extern void of_unregister_driver(struct of_platform_driver *drv); | 56 | extern void of_unregister_driver(struct of_platform_driver *drv); |
| 56 | extern int of_device_register(struct of_device *ofdev); | 57 | extern int of_device_register(struct of_device *ofdev); |
| 57 | extern void of_device_unregister(struct of_device *ofdev); | 58 | extern void of_device_unregister(struct of_device *ofdev); |
| 58 | extern struct of_device *of_platform_device_create(struct device_node *np, const char *bus_id); | 59 | extern struct of_device *of_platform_device_create(struct device_node *np, |
| 60 | const char *bus_id, | ||
| 61 | struct device *parent); | ||
| 59 | extern void of_release_dev(struct device *dev); | 62 | extern void of_release_dev(struct device *dev); |
| 60 | 63 | ||
| 61 | #endif /* __OF_DEVICE_H__ */ | 64 | #endif /* __OF_DEVICE_H__ */ |
diff --git a/include/asm-ppc64/smu.h b/include/asm-ppc64/smu.h index 10b4397af9aa..dee8eefe47bc 100644 --- a/include/asm-ppc64/smu.h +++ b/include/asm-ppc64/smu.h | |||
| @@ -1,22 +1,379 @@ | |||
| 1 | #ifndef _SMU_H | ||
| 2 | #define _SMU_H | ||
| 3 | |||
| 1 | /* | 4 | /* |
| 2 | * Definitions for talking to the SMU chip in newer G5 PowerMacs | 5 | * Definitions for talking to the SMU chip in newer G5 PowerMacs |
| 3 | */ | 6 | */ |
| 4 | 7 | ||
| 5 | #include <linux/config.h> | 8 | #include <linux/config.h> |
| 9 | #include <linux/list.h> | ||
| 10 | |||
| 11 | /* | ||
| 12 | * Known SMU commands | ||
| 13 | * | ||
| 14 | * Most of what is below comes from looking at the Open Firmware driver, | ||
| 15 | * though this is still incomplete and could use better documentation here | ||
| 16 | * or there... | ||
| 17 | */ | ||
| 18 | |||
| 19 | |||
| 20 | /* | ||
| 21 | * Partition info commands | ||
| 22 | * | ||
| 23 | * I do not know what those are for at this point | ||
| 24 | */ | ||
| 25 | #define SMU_CMD_PARTITION_COMMAND 0x3e | ||
| 26 | |||
| 27 | |||
| 28 | /* | ||
| 29 | * Fan control | ||
| 30 | * | ||
| 31 | * This is a "mux" for fan control commands, first byte is the | ||
| 32 | * "sub" command. | ||
| 33 | */ | ||
| 34 | #define SMU_CMD_FAN_COMMAND 0x4a | ||
| 35 | |||
| 36 | |||
| 37 | /* | ||
| 38 | * Battery access | ||
| 39 | * | ||
| 40 | * Same command number as the PMU, could it be same syntax ? | ||
| 41 | */ | ||
| 42 | #define SMU_CMD_BATTERY_COMMAND 0x6f | ||
| 43 | #define SMU_CMD_GET_BATTERY_INFO 0x00 | ||
| 44 | |||
| 45 | /* | ||
| 46 | * Real time clock control | ||
| 47 | * | ||
| 48 | * This is a "mux", first data byte contains the "sub" command. | ||
| 49 | * The "RTC" part of the SMU controls the date, time, powerup | ||
| 50 | * timer, but also a PRAM | ||
| 51 | * | ||
| 52 | * Dates are in BCD format on 7 bytes: | ||
| 53 | * [sec] [min] [hour] [weekday] [month day] [month] [year] | ||
| 54 | * with month being 1 based and year minus 100 | ||
| 55 | */ | ||
| 56 | #define SMU_CMD_RTC_COMMAND 0x8e | ||
| 57 | #define SMU_CMD_RTC_SET_PWRUP_TIMER 0x00 /* i: 7 bytes date */ | ||
| 58 | #define SMU_CMD_RTC_GET_PWRUP_TIMER 0x01 /* o: 7 bytes date */ | ||
| 59 | #define SMU_CMD_RTC_STOP_PWRUP_TIMER 0x02 | ||
| 60 | #define SMU_CMD_RTC_SET_PRAM_BYTE_ACC 0x20 /* i: 1 byte (address?) */ | ||
| 61 | #define SMU_CMD_RTC_SET_PRAM_AUTOINC 0x21 /* i: 1 byte (data?) */ | ||
| 62 | #define SMU_CMD_RTC_SET_PRAM_LO_BYTES 0x22 /* i: 10 bytes */ | ||
| 63 | #define SMU_CMD_RTC_SET_PRAM_HI_BYTES 0x23 /* i: 10 bytes */ | ||
| 64 | #define SMU_CMD_RTC_GET_PRAM_BYTE 0x28 /* i: 1 bytes (address?) */ | ||
| 65 | #define SMU_CMD_RTC_GET_PRAM_LO_BYTES 0x29 /* o: 10 bytes */ | ||
| 66 | #define SMU_CMD_RTC_GET_PRAM_HI_BYTES 0x2a /* o: 10 bytes */ | ||
| 67 | #define SMU_CMD_RTC_SET_DATETIME 0x80 /* i: 7 bytes date */ | ||
| 68 | #define SMU_CMD_RTC_GET_DATETIME 0x81 /* o: 7 bytes date */ | ||
| 69 | |||
| 70 | /* | ||
| 71 | * i2c commands | ||
| 72 | * | ||
| 73 | * To issue an i2c command, first is to send a parameter block to the | ||
| 74 | * the SMU. This is a command of type 0x9a with 9 bytes of header | ||
| 75 | * eventually followed by data for a write: | ||
| 76 | * | ||
| 77 | * 0: bus number (from device-tree usually, SMU has lots of busses !) | ||
| 78 | * 1: transfer type/format (see below) | ||
| 79 | * 2: device address. For combined and combined4 type transfers, this | ||
| 80 | * is the "write" version of the address (bit 0x01 cleared) | ||
| 81 | * 3: subaddress length (0..3) | ||
| 82 | * 4: subaddress byte 0 (or only byte for subaddress length 1) | ||
| 83 | * 5: subaddress byte 1 | ||
| 84 | * 6: subaddress byte 2 | ||
| 85 | * 7: combined address (device address for combined mode data phase) | ||
| 86 | * 8: data length | ||
| 87 | * | ||
| 88 | * The transfer types are the same good old Apple ones it seems, | ||
| 89 | * that is: | ||
| 90 | * - 0x00: Simple transfer | ||
| 91 | * - 0x01: Subaddress transfer (addr write + data tx, no restart) | ||
| 92 | * - 0x02: Combined transfer (addr write + restart + data tx) | ||
| 93 | * | ||
| 94 | * This is then followed by actual data for a write. | ||
| 95 | * | ||
| 96 | * At this point, the OF driver seems to have a limitation on transfer | ||
| 97 | * sizes of 0xd bytes on reads and 0x5 bytes on writes. I do not know | ||
| 98 | * wether this is just an OF limit due to some temporary buffer size | ||
| 99 | * or if this is an SMU imposed limit. This driver has the same limitation | ||
| 100 | * for now as I use a 0x10 bytes temporary buffer as well | ||
| 101 | * | ||
| 102 | * Once that is completed, a response is expected from the SMU. This is | ||
| 103 | * obtained via a command of type 0x9a with a length of 1 byte containing | ||
| 104 | * 0 as the data byte. OF also fills the rest of the data buffer with 0xff's | ||
| 105 | * though I can't tell yet if this is actually necessary. Once this command | ||
| 106 | * is complete, at this point, all I can tell is what OF does. OF tests | ||
| 107 | * byte 0 of the reply: | ||
| 108 | * - on read, 0xfe or 0xfc : bus is busy, wait (see below) or nak ? | ||
| 109 | * - on read, 0x00 or 0x01 : reply is in buffer (after the byte 0) | ||
| 110 | * - on write, < 0 -> failure (immediate exit) | ||
| 111 | * - else, OF just exists (without error, weird) | ||
| 112 | * | ||
| 113 | * So on read, there is this wait-for-busy thing when getting a 0xfc or | ||
| 114 | * 0xfe result. OF does a loop of up to 64 retries, waiting 20ms and | ||
| 115 | * doing the above again until either the retries expire or the result | ||
| 116 | * is no longer 0xfe or 0xfc | ||
| 117 | * | ||
| 118 | * The Darwin I2C driver is less subtle though. On any non-success status | ||
| 119 | * from the response command, it waits 5ms and tries again up to 20 times, | ||
| 120 | * it doesn't differenciate between fatal errors or "busy" status. | ||
| 121 | * | ||
| 122 | * This driver provides an asynchronous paramblock based i2c command | ||
| 123 | * interface to be used either directly by low level code or by a higher | ||
| 124 | * level driver interfacing to the linux i2c layer. The current | ||
| 125 | * implementation of this relies on working timers & timer interrupts | ||
| 126 | * though, so be careful of calling context for now. This may be "fixed" | ||
| 127 | * in the future by adding a polling facility. | ||
| 128 | */ | ||
| 129 | #define SMU_CMD_I2C_COMMAND 0x9a | ||
| 130 | /* transfer types */ | ||
| 131 | #define SMU_I2C_TRANSFER_SIMPLE 0x00 | ||
| 132 | #define SMU_I2C_TRANSFER_STDSUB 0x01 | ||
| 133 | #define SMU_I2C_TRANSFER_COMBINED 0x02 | ||
| 134 | |||
| 135 | /* | ||
| 136 | * Power supply control | ||
| 137 | * | ||
| 138 | * The "sub" command is an ASCII string in the data, the | ||
| 139 | * data lenght is that of the string. | ||
| 140 | * | ||
| 141 | * The VSLEW command can be used to get or set the voltage slewing. | ||
| 142 | * - lenght 5 (only "VSLEW") : it returns "DONE" and 3 bytes of | ||
| 143 | * reply at data offset 6, 7 and 8. | ||
| 144 | * - lenght 8 ("VSLEWxyz") has 3 additional bytes appended, and is | ||
| 145 | * used to set the voltage slewing point. The SMU replies with "DONE" | ||
| 146 | * I yet have to figure out their exact meaning of those 3 bytes in | ||
| 147 | * both cases. | ||
| 148 | * | ||
| 149 | */ | ||
| 150 | #define SMU_CMD_POWER_COMMAND 0xaa | ||
| 151 | #define SMU_CMD_POWER_RESTART "RESTART" | ||
| 152 | #define SMU_CMD_POWER_SHUTDOWN "SHUTDOWN" | ||
| 153 | #define SMU_CMD_POWER_VOLTAGE_SLEW "VSLEW" | ||
| 154 | |||
| 155 | /* Misc commands | ||
| 156 | * | ||
| 157 | * This command seem to be a grab bag of various things | ||
| 158 | */ | ||
| 159 | #define SMU_CMD_MISC_df_COMMAND 0xdf | ||
| 160 | #define SMU_CMD_MISC_df_SET_DISPLAY_LIT 0x02 /* i: 1 byte */ | ||
| 161 | #define SMU_CMD_MISC_df_NMI_OPTION 0x04 | ||
| 162 | |||
| 163 | /* | ||
| 164 | * Version info commands | ||
| 165 | * | ||
| 166 | * I haven't quite tried to figure out how these work | ||
| 167 | */ | ||
| 168 | #define SMU_CMD_VERSION_COMMAND 0xea | ||
| 169 | |||
| 170 | |||
| 171 | /* | ||
| 172 | * Misc commands | ||
| 173 | * | ||
| 174 | * This command seem to be a grab bag of various things | ||
| 175 | */ | ||
| 176 | #define SMU_CMD_MISC_ee_COMMAND 0xee | ||
| 177 | #define SMU_CMD_MISC_ee_GET_DATABLOCK_REC 0x02 | ||
| 178 | #define SMU_CMD_MISC_ee_LEDS_CTRL 0x04 /* i: 00 (00,01) [00] */ | ||
| 179 | #define SMU_CMD_MISC_ee_GET_DATA 0x05 /* i: 00 , o: ?? */ | ||
| 180 | |||
| 181 | |||
| 182 | |||
| 183 | /* | ||
| 184 | * - Kernel side interface - | ||
| 185 | */ | ||
| 186 | |||
| 187 | #ifdef __KERNEL__ | ||
| 188 | |||
| 189 | /* | ||
| 190 | * Asynchronous SMU commands | ||
| 191 | * | ||
| 192 | * Fill up this structure and submit it via smu_queue_command(), | ||
| 193 | * and get notified by the optional done() callback, or because | ||
| 194 | * status becomes != 1 | ||
| 195 | */ | ||
| 196 | |||
| 197 | struct smu_cmd; | ||
| 198 | |||
| 199 | struct smu_cmd | ||
| 200 | { | ||
| 201 | /* public */ | ||
| 202 | u8 cmd; /* command */ | ||
| 203 | int data_len; /* data len */ | ||
| 204 | int reply_len; /* reply len */ | ||
| 205 | void *data_buf; /* data buffer */ | ||
| 206 | void *reply_buf; /* reply buffer */ | ||
| 207 | int status; /* command status */ | ||
| 208 | void (*done)(struct smu_cmd *cmd, void *misc); | ||
| 209 | void *misc; | ||
| 210 | |||
| 211 | /* private */ | ||
| 212 | struct list_head link; | ||
| 213 | }; | ||
| 214 | |||
| 215 | /* | ||
| 216 | * Queues an SMU command, all fields have to be initialized | ||
| 217 | */ | ||
| 218 | extern int smu_queue_cmd(struct smu_cmd *cmd); | ||
| 219 | |||
| 220 | /* | ||
| 221 | * Simple command wrapper. This structure embeds a small buffer | ||
| 222 | * to ease sending simple SMU commands from the stack | ||
| 223 | */ | ||
| 224 | struct smu_simple_cmd | ||
| 225 | { | ||
| 226 | struct smu_cmd cmd; | ||
| 227 | u8 buffer[16]; | ||
| 228 | }; | ||
| 229 | |||
| 230 | /* | ||
| 231 | * Queues a simple command. All fields will be initialized by that | ||
| 232 | * function | ||
| 233 | */ | ||
| 234 | extern int smu_queue_simple(struct smu_simple_cmd *scmd, u8 command, | ||
| 235 | unsigned int data_len, | ||
| 236 | void (*done)(struct smu_cmd *cmd, void *misc), | ||
| 237 | void *misc, | ||
| 238 | ...); | ||
| 239 | |||
| 240 | /* | ||
| 241 | * Completion helper. Pass it to smu_queue_simple or as 'done' | ||
| 242 | * member to smu_queue_cmd, it will call complete() on the struct | ||
| 243 | * completion passed in the "misc" argument | ||
| 244 | */ | ||
| 245 | extern void smu_done_complete(struct smu_cmd *cmd, void *misc); | ||
| 6 | 246 | ||
| 7 | /* | 247 | /* |
| 8 | * Basic routines for use by architecture. To be extended as | 248 | * Synchronous helpers. Will spin-wait for completion of a command |
| 9 | * we understand more of the chip | 249 | */ |
| 250 | extern void smu_spinwait_cmd(struct smu_cmd *cmd); | ||
| 251 | |||
| 252 | static inline void smu_spinwait_simple(struct smu_simple_cmd *scmd) | ||
| 253 | { | ||
| 254 | smu_spinwait_cmd(&scmd->cmd); | ||
| 255 | } | ||
| 256 | |||
| 257 | /* | ||
| 258 | * Poll routine to call if blocked with irqs off | ||
| 259 | */ | ||
| 260 | extern void smu_poll(void); | ||
| 261 | |||
| 262 | |||
| 263 | /* | ||
| 264 | * Init routine, presence check.... | ||
| 10 | */ | 265 | */ |
| 11 | extern int smu_init(void); | 266 | extern int smu_init(void); |
| 12 | extern int smu_present(void); | 267 | extern int smu_present(void); |
| 268 | struct of_device; | ||
| 269 | extern struct of_device *smu_get_ofdev(void); | ||
| 270 | |||
| 271 | |||
| 272 | /* | ||
| 273 | * Common command wrappers | ||
| 274 | */ | ||
| 13 | extern void smu_shutdown(void); | 275 | extern void smu_shutdown(void); |
| 14 | extern void smu_restart(void); | 276 | extern void smu_restart(void); |
| 15 | extern int smu_get_rtc_time(struct rtc_time *time); | 277 | struct rtc_time; |
| 16 | extern int smu_set_rtc_time(struct rtc_time *time); | 278 | extern int smu_get_rtc_time(struct rtc_time *time, int spinwait); |
| 279 | extern int smu_set_rtc_time(struct rtc_time *time, int spinwait); | ||
| 17 | 280 | ||
| 18 | /* | 281 | /* |
| 19 | * SMU command buffer absolute address, exported by pmac_setup, | 282 | * SMU command buffer absolute address, exported by pmac_setup, |
| 20 | * this is allocated very early during boot. | 283 | * this is allocated very early during boot. |
| 21 | */ | 284 | */ |
| 22 | extern unsigned long smu_cmdbuf_abs; | 285 | extern unsigned long smu_cmdbuf_abs; |
| 286 | |||
| 287 | |||
| 288 | /* | ||
| 289 | * Kenrel asynchronous i2c interface | ||
| 290 | */ | ||
| 291 | |||
| 292 | /* SMU i2c header, exactly matches i2c header on wire */ | ||
| 293 | struct smu_i2c_param | ||
| 294 | { | ||
| 295 | u8 bus; /* SMU bus ID (from device tree) */ | ||
| 296 | u8 type; /* i2c transfer type */ | ||
| 297 | u8 devaddr; /* device address (includes direction) */ | ||
| 298 | u8 sublen; /* subaddress length */ | ||
| 299 | u8 subaddr[3]; /* subaddress */ | ||
| 300 | u8 caddr; /* combined address, filled by SMU driver */ | ||
| 301 | u8 datalen; /* length of transfer */ | ||
| 302 | u8 data[7]; /* data */ | ||
| 303 | }; | ||
| 304 | |||
| 305 | #define SMU_I2C_READ_MAX 0x0d | ||
| 306 | #define SMU_I2C_WRITE_MAX 0x05 | ||
| 307 | |||
| 308 | struct smu_i2c_cmd | ||
| 309 | { | ||
| 310 | /* public */ | ||
| 311 | struct smu_i2c_param info; | ||
| 312 | void (*done)(struct smu_i2c_cmd *cmd, void *misc); | ||
| 313 | void *misc; | ||
| 314 | int status; /* 1 = pending, 0 = ok, <0 = fail */ | ||
| 315 | |||
| 316 | /* private */ | ||
| 317 | struct smu_cmd scmd; | ||
| 318 | int read; | ||
| 319 | int stage; | ||
| 320 | int retries; | ||
| 321 | u8 pdata[0x10]; | ||
| 322 | struct list_head link; | ||
| 323 | }; | ||
| 324 | |||
| 325 | /* | ||
| 326 | * Call this to queue an i2c command to the SMU. You must fill info, | ||
| 327 | * including info.data for a write, done and misc. | ||
| 328 | * For now, no polling interface is provided so you have to use completion | ||
| 329 | * callback. | ||
| 330 | */ | ||
| 331 | extern int smu_queue_i2c(struct smu_i2c_cmd *cmd); | ||
| 332 | |||
| 333 | |||
| 334 | #endif /* __KERNEL__ */ | ||
| 335 | |||
| 336 | /* | ||
| 337 | * - Userland interface - | ||
| 338 | */ | ||
| 339 | |||
| 340 | /* | ||
| 341 | * A given instance of the device can be configured for 2 different | ||
| 342 | * things at the moment: | ||
| 343 | * | ||
| 344 | * - sending SMU commands (default at open() time) | ||
| 345 | * - receiving SMU events (not yet implemented) | ||
| 346 | * | ||
| 347 | * Commands are written with write() of a command block. They can be | ||
| 348 | * "driver" commands (for example to switch to event reception mode) | ||
| 349 | * or real SMU commands. They are made of a header followed by command | ||
| 350 | * data if any. | ||
| 351 | * | ||
| 352 | * For SMU commands (not for driver commands), you can then read() back | ||
| 353 | * a reply. The reader will be blocked or not depending on how the device | ||
| 354 | * file is opened. poll() isn't implemented yet. The reply will consist | ||
| 355 | * of a header as well, followed by the reply data if any. You should | ||
| 356 | * always provide a buffer large enough for the maximum reply data, I | ||
| 357 | * recommand one page. | ||
| 358 | * | ||
| 359 | * It is illegal to send SMU commands through a file descriptor configured | ||
| 360 | * for events reception | ||
| 361 | * | ||
| 362 | */ | ||
| 363 | struct smu_user_cmd_hdr | ||
| 364 | { | ||
| 365 | __u32 cmdtype; | ||
| 366 | #define SMU_CMDTYPE_SMU 0 /* SMU command */ | ||
| 367 | #define SMU_CMDTYPE_WANTS_EVENTS 1 /* switch fd to events mode */ | ||
| 368 | |||
| 369 | __u8 cmd; /* SMU command byte */ | ||
| 370 | __u32 data_len; /* Lenght of data following */ | ||
| 371 | }; | ||
| 372 | |||
| 373 | struct smu_user_reply_hdr | ||
| 374 | { | ||
| 375 | __u32 status; /* Command status */ | ||
| 376 | __u32 reply_len; /* Lenght of data follwing */ | ||
| 377 | }; | ||
| 378 | |||
| 379 | #endif /* _SMU_H */ | ||
diff --git a/include/asm-um/pgtable.h b/include/asm-um/pgtable.h index ed06170e0edd..616d02b57ea9 100644 --- a/include/asm-um/pgtable.h +++ b/include/asm-um/pgtable.h | |||
| @@ -346,7 +346,6 @@ static inline void set_pte(pte_t *pteptr, pte_t pteval) | |||
| 346 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) | 346 | static inline pte_t pte_modify(pte_t pte, pgprot_t newprot) |
| 347 | { | 347 | { |
| 348 | pte_set_val(pte, (pte_val(pte) & _PAGE_CHG_MASK), newprot); | 348 | pte_set_val(pte, (pte_val(pte) & _PAGE_CHG_MASK), newprot); |
| 349 | if(pte_present(pte)) pte = pte_mknewpage(pte_mknewprot(pte)); | ||
| 350 | return pte; | 349 | return pte; |
| 351 | } | 350 | } |
| 352 | 351 | ||
diff --git a/include/asm-xtensa/atomic.h b/include/asm-xtensa/atomic.h index 24f86f0e43cf..12b5732dc6e5 100644 --- a/include/asm-xtensa/atomic.h +++ b/include/asm-xtensa/atomic.h | |||
| @@ -22,7 +22,7 @@ typedef struct { volatile int counter; } atomic_t; | |||
| 22 | #include <asm/processor.h> | 22 | #include <asm/processor.h> |
| 23 | #include <asm/system.h> | 23 | #include <asm/system.h> |
| 24 | 24 | ||
| 25 | #define ATOMIC_INIT(i) ( (atomic_t) { (i) } ) | 25 | #define ATOMIC_INIT(i) { (i) } |
| 26 | 26 | ||
| 27 | /* | 27 | /* |
| 28 | * This Xtensa implementation assumes that the right mechanism | 28 | * This Xtensa implementation assumes that the right mechanism |
diff --git a/include/asm-xtensa/bitops.h b/include/asm-xtensa/bitops.h index d395ef226c32..e76ee889e21d 100644 --- a/include/asm-xtensa/bitops.h +++ b/include/asm-xtensa/bitops.h | |||
| @@ -174,7 +174,7 @@ static __inline__ int test_bit(int nr, const volatile void *addr) | |||
| 174 | return 1UL & (((const volatile unsigned int *)addr)[nr>>5] >> (nr&31)); | 174 | return 1UL & (((const volatile unsigned int *)addr)[nr>>5] >> (nr&31)); |
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | #if XCHAL_HAVE_NSAU | 177 | #if XCHAL_HAVE_NSA |
| 178 | 178 | ||
| 179 | static __inline__ int __cntlz (unsigned long x) | 179 | static __inline__ int __cntlz (unsigned long x) |
| 180 | { | 180 | { |
diff --git a/include/asm-xtensa/hardirq.h b/include/asm-xtensa/hardirq.h index e07c76c36b95..aa9c1adf68d7 100644 --- a/include/asm-xtensa/hardirq.h +++ b/include/asm-xtensa/hardirq.h | |||
| @@ -23,6 +23,7 @@ typedef struct { | |||
| 23 | unsigned int __nmi_count; /* arch dependent */ | 23 | unsigned int __nmi_count; /* arch dependent */ |
| 24 | } ____cacheline_aligned irq_cpustat_t; | 24 | } ____cacheline_aligned irq_cpustat_t; |
| 25 | 25 | ||
| 26 | void ack_bad_irq(unsigned int irq); | ||
| 26 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ | 27 | #include <linux/irq_cpustat.h> /* Standard mappings for irq_cpustat_t above */ |
| 27 | 28 | ||
| 28 | #endif /* _XTENSA_HARDIRQ_H */ | 29 | #endif /* _XTENSA_HARDIRQ_H */ |
diff --git a/include/asm-xtensa/semaphore.h b/include/asm-xtensa/semaphore.h index db740b8bc6f0..09e89ab3eb61 100644 --- a/include/asm-xtensa/semaphore.h +++ b/include/asm-xtensa/semaphore.h | |||
| @@ -20,28 +20,19 @@ struct semaphore { | |||
| 20 | atomic_t count; | 20 | atomic_t count; |
| 21 | int sleepers; | 21 | int sleepers; |
| 22 | wait_queue_head_t wait; | 22 | wait_queue_head_t wait; |
| 23 | #if WAITQUEUE_DEBUG | ||
| 24 | long __magic; | ||
| 25 | #endif | ||
| 26 | }; | 23 | }; |
| 27 | 24 | ||
| 28 | #if WAITQUEUE_DEBUG | 25 | #define __SEMAPHORE_INITIALIZER(name,n) \ |
| 29 | # define __SEM_DEBUG_INIT(name) \ | 26 | { \ |
| 30 | , (int)&(name).__magic | 27 | .count = ATOMIC_INIT(n), \ |
| 31 | #else | 28 | .sleepers = 0, \ |
| 32 | # define __SEM_DEBUG_INIT(name) | 29 | .wait = __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ |
| 33 | #endif | 30 | } |
| 34 | |||
| 35 | #define __SEMAPHORE_INITIALIZER(name,count) \ | ||
| 36 | { ATOMIC_INIT(count), \ | ||
| 37 | 0, \ | ||
| 38 | __WAIT_QUEUE_HEAD_INITIALIZER((name).wait) \ | ||
| 39 | __SEM_DEBUG_INIT(name) } | ||
| 40 | 31 | ||
| 41 | #define __MUTEX_INITIALIZER(name) \ | 32 | #define __MUTEX_INITIALIZER(name) \ |
| 42 | __SEMAPHORE_INITIALIZER(name, 1) | 33 | __SEMAPHORE_INITIALIZER(name, 1) |
| 43 | 34 | ||
| 44 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ | 35 | #define __DECLARE_SEMAPHORE_GENERIC(name,count) \ |
| 45 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) | 36 | struct semaphore name = __SEMAPHORE_INITIALIZER(name,count) |
| 46 | 37 | ||
| 47 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) | 38 | #define DECLARE_MUTEX(name) __DECLARE_SEMAPHORE_GENERIC(name,1) |
| @@ -49,17 +40,8 @@ struct semaphore { | |||
| 49 | 40 | ||
| 50 | static inline void sema_init (struct semaphore *sem, int val) | 41 | static inline void sema_init (struct semaphore *sem, int val) |
| 51 | { | 42 | { |
| 52 | /* | ||
| 53 | * *sem = (struct semaphore)__SEMAPHORE_INITIALIZER((*sem),val); | ||
| 54 | * | ||
| 55 | * i'd rather use the more flexible initialization above, but sadly | ||
| 56 | * GCC 2.7.2.3 emits a bogus warning. EGCS doesnt. Oh well. | ||
| 57 | */ | ||
| 58 | atomic_set(&sem->count, val); | 43 | atomic_set(&sem->count, val); |
| 59 | init_waitqueue_head(&sem->wait); | 44 | init_waitqueue_head(&sem->wait); |
| 60 | #if WAITQUEUE_DEBUG | ||
| 61 | sem->__magic = (int)&sem->__magic; | ||
| 62 | #endif | ||
| 63 | } | 45 | } |
| 64 | 46 | ||
| 65 | static inline void init_MUTEX (struct semaphore *sem) | 47 | static inline void init_MUTEX (struct semaphore *sem) |
| @@ -81,9 +63,7 @@ extern spinlock_t semaphore_wake_lock; | |||
| 81 | 63 | ||
| 82 | static inline void down(struct semaphore * sem) | 64 | static inline void down(struct semaphore * sem) |
| 83 | { | 65 | { |
| 84 | #if WAITQUEUE_DEBUG | 66 | might_sleep(); |
| 85 | CHECK_MAGIC(sem->__magic); | ||
| 86 | #endif | ||
| 87 | 67 | ||
| 88 | if (atomic_sub_return(1, &sem->count) < 0) | 68 | if (atomic_sub_return(1, &sem->count) < 0) |
| 89 | __down(sem); | 69 | __down(sem); |
| @@ -92,9 +72,8 @@ static inline void down(struct semaphore * sem) | |||
| 92 | static inline int down_interruptible(struct semaphore * sem) | 72 | static inline int down_interruptible(struct semaphore * sem) |
| 93 | { | 73 | { |
| 94 | int ret = 0; | 74 | int ret = 0; |
| 95 | #if WAITQUEUE_DEBUG | 75 | |
| 96 | CHECK_MAGIC(sem->__magic); | 76 | might_sleep(); |
| 97 | #endif | ||
| 98 | 77 | ||
| 99 | if (atomic_sub_return(1, &sem->count) < 0) | 78 | if (atomic_sub_return(1, &sem->count) < 0) |
| 100 | ret = __down_interruptible(sem); | 79 | ret = __down_interruptible(sem); |
| @@ -104,9 +83,6 @@ static inline int down_interruptible(struct semaphore * sem) | |||
| 104 | static inline int down_trylock(struct semaphore * sem) | 83 | static inline int down_trylock(struct semaphore * sem) |
| 105 | { | 84 | { |
| 106 | int ret = 0; | 85 | int ret = 0; |
| 107 | #if WAITQUEUE_DEBUG | ||
| 108 | CHECK_MAGIC(sem->__magic); | ||
| 109 | #endif | ||
| 110 | 86 | ||
| 111 | if (atomic_sub_return(1, &sem->count) < 0) | 87 | if (atomic_sub_return(1, &sem->count) < 0) |
| 112 | ret = __down_trylock(sem); | 88 | ret = __down_trylock(sem); |
| @@ -119,9 +95,6 @@ static inline int down_trylock(struct semaphore * sem) | |||
| 119 | */ | 95 | */ |
| 120 | static inline void up(struct semaphore * sem) | 96 | static inline void up(struct semaphore * sem) |
| 121 | { | 97 | { |
| 122 | #if WAITQUEUE_DEBUG | ||
| 123 | CHECK_MAGIC(sem->__magic); | ||
| 124 | #endif | ||
| 125 | if (atomic_add_return(1, &sem->count) <= 0) | 98 | if (atomic_add_return(1, &sem->count) <= 0) |
| 126 | __up(sem); | 99 | __up(sem); |
| 127 | } | 100 | } |
diff --git a/include/asm-xtensa/system.h b/include/asm-xtensa/system.h index f09393232e5e..9284867f1cb9 100644 --- a/include/asm-xtensa/system.h +++ b/include/asm-xtensa/system.h | |||
| @@ -189,20 +189,6 @@ static inline unsigned long xchg_u32(volatile int * m, unsigned long val) | |||
| 189 | 189 | ||
| 190 | #define tas(ptr) (xchg((ptr),1)) | 190 | #define tas(ptr) (xchg((ptr),1)) |
| 191 | 191 | ||
| 192 | #if ( __XCC__ == 1 ) | ||
| 193 | |||
| 194 | /* xt-xcc processes __inline__ differently than xt-gcc and decides to | ||
| 195 | * insert an out-of-line copy of function __xchg. This presents the | ||
| 196 | * unresolved symbol at link time of __xchg_called_with_bad_pointer, | ||
| 197 | * even though such a function would never be called at run-time. | ||
| 198 | * xt-gcc always inlines __xchg, and optimizes away the undefined | ||
| 199 | * bad_pointer function. | ||
| 200 | */ | ||
| 201 | |||
| 202 | #define xchg(ptr,x) xchg_u32(ptr,x) | ||
| 203 | |||
| 204 | #else /* assume xt-gcc */ | ||
| 205 | |||
| 206 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) | 192 | #define xchg(ptr,x) ((__typeof__(*(ptr)))__xchg((unsigned long)(x),(ptr),sizeof(*(ptr)))) |
| 207 | 193 | ||
| 208 | /* | 194 | /* |
| @@ -224,8 +210,6 @@ __xchg(unsigned long x, volatile void * ptr, int size) | |||
| 224 | return x; | 210 | return x; |
| 225 | } | 211 | } |
| 226 | 212 | ||
| 227 | #endif | ||
| 228 | |||
| 229 | extern void set_except_vector(int n, void *addr); | 213 | extern void set_except_vector(int n, void *addr); |
| 230 | 214 | ||
| 231 | static inline void spill_registers(void) | 215 | static inline void spill_registers(void) |
diff --git a/include/linux/connector.h b/include/linux/connector.h index 96de26301f84..86d4b0a81713 100644 --- a/include/linux/connector.h +++ b/include/linux/connector.h | |||
| @@ -104,12 +104,19 @@ struct cn_queue_dev { | |||
| 104 | struct sock *nls; | 104 | struct sock *nls; |
| 105 | }; | 105 | }; |
| 106 | 106 | ||
| 107 | struct cn_callback { | 107 | struct cn_callback_id { |
| 108 | unsigned char name[CN_CBQ_NAMELEN]; | 108 | unsigned char name[CN_CBQ_NAMELEN]; |
| 109 | |||
| 110 | struct cb_id id; | 109 | struct cb_id id; |
| 110 | }; | ||
| 111 | |||
| 112 | struct cn_callback_data { | ||
| 113 | void (*destruct_data) (void *); | ||
| 114 | void *ddata; | ||
| 115 | |||
| 116 | void *callback_priv; | ||
| 111 | void (*callback) (void *); | 117 | void (*callback) (void *); |
| 112 | void *priv; | 118 | |
| 119 | void *free; | ||
| 113 | }; | 120 | }; |
| 114 | 121 | ||
| 115 | struct cn_callback_entry { | 122 | struct cn_callback_entry { |
| @@ -118,8 +125,8 @@ struct cn_callback_entry { | |||
| 118 | struct work_struct work; | 125 | struct work_struct work; |
| 119 | struct cn_queue_dev *pdev; | 126 | struct cn_queue_dev *pdev; |
| 120 | 127 | ||
| 121 | void (*destruct_data) (void *); | 128 | struct cn_callback_id id; |
| 122 | void *ddata; | 129 | struct cn_callback_data data; |
| 123 | 130 | ||
| 124 | int seq, group; | 131 | int seq, group; |
| 125 | struct sock *nls; | 132 | struct sock *nls; |
| @@ -144,7 +151,7 @@ int cn_add_callback(struct cb_id *, char *, void (*callback) (void *)); | |||
| 144 | void cn_del_callback(struct cb_id *); | 151 | void cn_del_callback(struct cb_id *); |
| 145 | int cn_netlink_send(struct cn_msg *, u32, int); | 152 | int cn_netlink_send(struct cn_msg *, u32, int); |
| 146 | 153 | ||
| 147 | int cn_queue_add_callback(struct cn_queue_dev *dev, struct cn_callback *cb); | 154 | int cn_queue_add_callback(struct cn_queue_dev *dev, char *name, struct cb_id *id, void (*callback)(void *)); |
| 148 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); | 155 | void cn_queue_del_callback(struct cn_queue_dev *dev, struct cb_id *id); |
| 149 | 156 | ||
| 150 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); | 157 | struct cn_queue_dev *cn_queue_alloc_dev(char *name, struct sock *); |
| @@ -152,6 +159,8 @@ void cn_queue_free_dev(struct cn_queue_dev *dev); | |||
| 152 | 159 | ||
| 153 | int cn_cb_equal(struct cb_id *, struct cb_id *); | 160 | int cn_cb_equal(struct cb_id *, struct cb_id *); |
| 154 | 161 | ||
| 162 | void cn_queue_wrapper(void *data); | ||
| 163 | |||
| 155 | extern int cn_already_initialized; | 164 | extern int cn_already_initialized; |
| 156 | 165 | ||
| 157 | #endif /* __KERNEL__ */ | 166 | #endif /* __KERNEL__ */ |
diff --git a/include/linux/device.h b/include/linux/device.h index 06e5d42f2c7b..95d607a48f06 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
| @@ -317,6 +317,11 @@ dev_set_drvdata (struct device *dev, void *data) | |||
| 317 | dev->driver_data = data; | 317 | dev->driver_data = data; |
| 318 | } | 318 | } |
| 319 | 319 | ||
| 320 | static inline int device_is_registered(struct device *dev) | ||
| 321 | { | ||
| 322 | return klist_node_attached(&dev->knode_bus); | ||
| 323 | } | ||
| 324 | |||
| 320 | /* | 325 | /* |
| 321 | * High level routines for use by the bus drivers | 326 | * High level routines for use by the bus drivers |
| 322 | */ | 327 | */ |
diff --git a/include/linux/libata.h b/include/linux/libata.h index 022105c745fc..ceee1fc42c60 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h | |||
| @@ -393,6 +393,7 @@ extern int ata_pci_init_one (struct pci_dev *pdev, struct ata_port_info **port_i | |||
| 393 | extern void ata_pci_remove_one (struct pci_dev *pdev); | 393 | extern void ata_pci_remove_one (struct pci_dev *pdev); |
| 394 | #endif /* CONFIG_PCI */ | 394 | #endif /* CONFIG_PCI */ |
| 395 | extern int ata_device_add(struct ata_probe_ent *ent); | 395 | extern int ata_device_add(struct ata_probe_ent *ent); |
| 396 | extern void ata_host_set_remove(struct ata_host_set *host_set); | ||
| 396 | extern int ata_scsi_detect(Scsi_Host_Template *sht); | 397 | extern int ata_scsi_detect(Scsi_Host_Template *sht); |
| 397 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); | 398 | extern int ata_scsi_ioctl(struct scsi_device *dev, int cmd, void __user *arg); |
| 398 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); | 399 | extern int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)); |
diff --git a/include/linux/mod_devicetable.h b/include/linux/mod_devicetable.h index 47da39ba3f03..4ed2107bc020 100644 --- a/include/linux/mod_devicetable.h +++ b/include/linux/mod_devicetable.h | |||
| @@ -209,10 +209,11 @@ struct pcmcia_device_id { | |||
| 209 | /* for real multi-function devices */ | 209 | /* for real multi-function devices */ |
| 210 | __u8 function; | 210 | __u8 function; |
| 211 | 211 | ||
| 212 | /* for pseude multi-function devices */ | 212 | /* for pseudo multi-function devices */ |
| 213 | __u8 device_no; | 213 | __u8 device_no; |
| 214 | 214 | ||
| 215 | __u32 prod_id_hash[4]; | 215 | __u32 prod_id_hash[4] |
| 216 | __attribute__((aligned(sizeof(__u32)))); | ||
| 216 | 217 | ||
| 217 | /* not matched against in kernelspace*/ | 218 | /* not matched against in kernelspace*/ |
| 218 | #ifdef __KERNEL__ | 219 | #ifdef __KERNEL__ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack.h b/include/linux/netfilter_ipv4/ip_conntrack.h index bace72a76cc4..4ced38736813 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack.h +++ b/include/linux/netfilter_ipv4/ip_conntrack.h | |||
| @@ -332,11 +332,28 @@ extern void need_ip_conntrack(void); | |||
| 332 | extern int invert_tuplepr(struct ip_conntrack_tuple *inverse, | 332 | extern int invert_tuplepr(struct ip_conntrack_tuple *inverse, |
| 333 | const struct ip_conntrack_tuple *orig); | 333 | const struct ip_conntrack_tuple *orig); |
| 334 | 334 | ||
| 335 | extern void __ip_ct_refresh_acct(struct ip_conntrack *ct, | ||
| 336 | enum ip_conntrack_info ctinfo, | ||
| 337 | const struct sk_buff *skb, | ||
| 338 | unsigned long extra_jiffies, | ||
| 339 | int do_acct); | ||
| 340 | |||
| 341 | /* Refresh conntrack for this many jiffies and do accounting */ | ||
| 342 | static inline void ip_ct_refresh_acct(struct ip_conntrack *ct, | ||
| 343 | enum ip_conntrack_info ctinfo, | ||
| 344 | const struct sk_buff *skb, | ||
| 345 | unsigned long extra_jiffies) | ||
| 346 | { | ||
| 347 | __ip_ct_refresh_acct(ct, ctinfo, skb, extra_jiffies, 1); | ||
| 348 | } | ||
| 349 | |||
| 335 | /* Refresh conntrack for this many jiffies */ | 350 | /* Refresh conntrack for this many jiffies */ |
| 336 | extern void ip_ct_refresh_acct(struct ip_conntrack *ct, | 351 | static inline void ip_ct_refresh(struct ip_conntrack *ct, |
| 337 | enum ip_conntrack_info ctinfo, | 352 | const struct sk_buff *skb, |
| 338 | const struct sk_buff *skb, | 353 | unsigned long extra_jiffies) |
| 339 | unsigned long extra_jiffies); | 354 | { |
| 355 | __ip_ct_refresh_acct(ct, 0, skb, extra_jiffies, 0); | ||
| 356 | } | ||
| 340 | 357 | ||
| 341 | /* These are for NAT. Icky. */ | 358 | /* These are for NAT. Icky. */ |
| 342 | /* Update TCP window tracking data when NAT mangles the packet */ | 359 | /* Update TCP window tracking data when NAT mangles the packet */ |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_pptp.h b/include/linux/netfilter_ipv4/ip_conntrack_pptp.h index 389e3851d52f..816144c75de0 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_pptp.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_pptp.h | |||
| @@ -60,8 +60,8 @@ struct ip_ct_pptp_expect { | |||
| 60 | 60 | ||
| 61 | struct pptp_pkt_hdr { | 61 | struct pptp_pkt_hdr { |
| 62 | __u16 packetLength; | 62 | __u16 packetLength; |
| 63 | __u16 packetType; | 63 | __be16 packetType; |
| 64 | __u32 magicCookie; | 64 | __be32 magicCookie; |
| 65 | }; | 65 | }; |
| 66 | 66 | ||
| 67 | /* PptpControlMessageType values */ | 67 | /* PptpControlMessageType values */ |
| @@ -93,7 +93,7 @@ struct pptp_pkt_hdr { | |||
| 93 | #define PPTP_REMOVE_DEVICE_ERROR 6 | 93 | #define PPTP_REMOVE_DEVICE_ERROR 6 |
| 94 | 94 | ||
| 95 | struct PptpControlHeader { | 95 | struct PptpControlHeader { |
| 96 | __u16 messageType; | 96 | __be16 messageType; |
| 97 | __u16 reserved; | 97 | __u16 reserved; |
| 98 | }; | 98 | }; |
| 99 | 99 | ||
| @@ -106,13 +106,13 @@ struct PptpControlHeader { | |||
| 106 | #define PPTP_BEARER_CAP_DIGITAL 0x2 | 106 | #define PPTP_BEARER_CAP_DIGITAL 0x2 |
| 107 | 107 | ||
| 108 | struct PptpStartSessionRequest { | 108 | struct PptpStartSessionRequest { |
| 109 | __u16 protocolVersion; | 109 | __be16 protocolVersion; |
| 110 | __u8 reserved1; | 110 | __u8 reserved1; |
| 111 | __u8 reserved2; | 111 | __u8 reserved2; |
| 112 | __u32 framingCapability; | 112 | __be32 framingCapability; |
| 113 | __u32 bearerCapability; | 113 | __be32 bearerCapability; |
| 114 | __u16 maxChannels; | 114 | __be16 maxChannels; |
| 115 | __u16 firmwareRevision; | 115 | __be16 firmwareRevision; |
| 116 | __u8 hostName[64]; | 116 | __u8 hostName[64]; |
| 117 | __u8 vendorString[64]; | 117 | __u8 vendorString[64]; |
| 118 | }; | 118 | }; |
| @@ -125,13 +125,13 @@ struct PptpStartSessionRequest { | |||
| 125 | #define PPTP_START_UNKNOWN_PROTOCOL 5 | 125 | #define PPTP_START_UNKNOWN_PROTOCOL 5 |
| 126 | 126 | ||
| 127 | struct PptpStartSessionReply { | 127 | struct PptpStartSessionReply { |
| 128 | __u16 protocolVersion; | 128 | __be16 protocolVersion; |
| 129 | __u8 resultCode; | 129 | __u8 resultCode; |
| 130 | __u8 generalErrorCode; | 130 | __u8 generalErrorCode; |
| 131 | __u32 framingCapability; | 131 | __be32 framingCapability; |
| 132 | __u32 bearerCapability; | 132 | __be32 bearerCapability; |
| 133 | __u16 maxChannels; | 133 | __be16 maxChannels; |
| 134 | __u16 firmwareRevision; | 134 | __be16 firmwareRevision; |
| 135 | __u8 hostName[64]; | 135 | __u8 hostName[64]; |
| 136 | __u8 vendorString[64]; | 136 | __u8 vendorString[64]; |
| 137 | }; | 137 | }; |
| @@ -155,7 +155,7 @@ struct PptpStopSessionReply { | |||
| 155 | }; | 155 | }; |
| 156 | 156 | ||
| 157 | struct PptpEchoRequest { | 157 | struct PptpEchoRequest { |
| 158 | __u32 identNumber; | 158 | __be32 identNumber; |
| 159 | }; | 159 | }; |
| 160 | 160 | ||
| 161 | /* PptpEchoReplyResultCode */ | 161 | /* PptpEchoReplyResultCode */ |
| @@ -163,7 +163,7 @@ struct PptpEchoRequest { | |||
| 163 | #define PPTP_ECHO_GENERAL_ERROR 2 | 163 | #define PPTP_ECHO_GENERAL_ERROR 2 |
| 164 | 164 | ||
| 165 | struct PptpEchoReply { | 165 | struct PptpEchoReply { |
| 166 | __u32 identNumber; | 166 | __be32 identNumber; |
| 167 | __u8 resultCode; | 167 | __u8 resultCode; |
| 168 | __u8 generalErrorCode; | 168 | __u8 generalErrorCode; |
| 169 | __u16 reserved; | 169 | __u16 reserved; |
| @@ -180,16 +180,16 @@ struct PptpEchoReply { | |||
| 180 | #define PPTP_DONT_CARE_BEARER_TYPE 3 | 180 | #define PPTP_DONT_CARE_BEARER_TYPE 3 |
| 181 | 181 | ||
| 182 | struct PptpOutCallRequest { | 182 | struct PptpOutCallRequest { |
| 183 | __u16 callID; | 183 | __be16 callID; |
| 184 | __u16 callSerialNumber; | 184 | __be16 callSerialNumber; |
| 185 | __u32 minBPS; | 185 | __be32 minBPS; |
| 186 | __u32 maxBPS; | 186 | __be32 maxBPS; |
| 187 | __u32 bearerType; | 187 | __be32 bearerType; |
| 188 | __u32 framingType; | 188 | __be32 framingType; |
| 189 | __u16 packetWindow; | 189 | __be16 packetWindow; |
| 190 | __u16 packetProcDelay; | 190 | __be16 packetProcDelay; |
| 191 | __u16 reserved1; | 191 | __u16 reserved1; |
| 192 | __u16 phoneNumberLength; | 192 | __be16 phoneNumberLength; |
| 193 | __u16 reserved2; | 193 | __u16 reserved2; |
| 194 | __u8 phoneNumber[64]; | 194 | __u8 phoneNumber[64]; |
| 195 | __u8 subAddress[64]; | 195 | __u8 subAddress[64]; |
| @@ -205,24 +205,24 @@ struct PptpOutCallRequest { | |||
| 205 | #define PPTP_OUTCALL_DONT_ACCEPT 7 | 205 | #define PPTP_OUTCALL_DONT_ACCEPT 7 |
| 206 | 206 | ||
| 207 | struct PptpOutCallReply { | 207 | struct PptpOutCallReply { |
| 208 | __u16 callID; | 208 | __be16 callID; |
| 209 | __u16 peersCallID; | 209 | __be16 peersCallID; |
| 210 | __u8 resultCode; | 210 | __u8 resultCode; |
| 211 | __u8 generalErrorCode; | 211 | __u8 generalErrorCode; |
| 212 | __u16 causeCode; | 212 | __be16 causeCode; |
| 213 | __u32 connectSpeed; | 213 | __be32 connectSpeed; |
| 214 | __u16 packetWindow; | 214 | __be16 packetWindow; |
| 215 | __u16 packetProcDelay; | 215 | __be16 packetProcDelay; |
| 216 | __u32 physChannelID; | 216 | __be32 physChannelID; |
| 217 | }; | 217 | }; |
| 218 | 218 | ||
| 219 | struct PptpInCallRequest { | 219 | struct PptpInCallRequest { |
| 220 | __u16 callID; | 220 | __be16 callID; |
| 221 | __u16 callSerialNumber; | 221 | __be16 callSerialNumber; |
| 222 | __u32 callBearerType; | 222 | __be32 callBearerType; |
| 223 | __u32 physChannelID; | 223 | __be32 physChannelID; |
| 224 | __u16 dialedNumberLength; | 224 | __be16 dialedNumberLength; |
| 225 | __u16 dialingNumberLength; | 225 | __be16 dialingNumberLength; |
| 226 | __u8 dialedNumber[64]; | 226 | __u8 dialedNumber[64]; |
| 227 | __u8 dialingNumber[64]; | 227 | __u8 dialingNumber[64]; |
| 228 | __u8 subAddress[64]; | 228 | __u8 subAddress[64]; |
| @@ -234,61 +234,54 @@ struct PptpInCallRequest { | |||
| 234 | #define PPTP_INCALL_DONT_ACCEPT 3 | 234 | #define PPTP_INCALL_DONT_ACCEPT 3 |
| 235 | 235 | ||
| 236 | struct PptpInCallReply { | 236 | struct PptpInCallReply { |
| 237 | __u16 callID; | 237 | __be16 callID; |
| 238 | __u16 peersCallID; | 238 | __be16 peersCallID; |
| 239 | __u8 resultCode; | 239 | __u8 resultCode; |
| 240 | __u8 generalErrorCode; | 240 | __u8 generalErrorCode; |
| 241 | __u16 packetWindow; | 241 | __be16 packetWindow; |
| 242 | __u16 packetProcDelay; | 242 | __be16 packetProcDelay; |
| 243 | __u16 reserved; | 243 | __u16 reserved; |
| 244 | }; | 244 | }; |
| 245 | 245 | ||
| 246 | struct PptpInCallConnected { | 246 | struct PptpInCallConnected { |
| 247 | __u16 peersCallID; | 247 | __be16 peersCallID; |
| 248 | __u16 reserved; | 248 | __u16 reserved; |
| 249 | __u32 connectSpeed; | 249 | __be32 connectSpeed; |
| 250 | __u16 packetWindow; | 250 | __be16 packetWindow; |
| 251 | __u16 packetProcDelay; | 251 | __be16 packetProcDelay; |
| 252 | __u32 callFramingType; | 252 | __be32 callFramingType; |
| 253 | }; | 253 | }; |
| 254 | 254 | ||
| 255 | struct PptpClearCallRequest { | 255 | struct PptpClearCallRequest { |
| 256 | __u16 callID; | 256 | __be16 callID; |
| 257 | __u16 reserved; | 257 | __u16 reserved; |
| 258 | }; | 258 | }; |
| 259 | 259 | ||
| 260 | struct PptpCallDisconnectNotify { | 260 | struct PptpCallDisconnectNotify { |
| 261 | __u16 callID; | 261 | __be16 callID; |
| 262 | __u8 resultCode; | 262 | __u8 resultCode; |
| 263 | __u8 generalErrorCode; | 263 | __u8 generalErrorCode; |
| 264 | __u16 causeCode; | 264 | __be16 causeCode; |
| 265 | __u16 reserved; | 265 | __u16 reserved; |
| 266 | __u8 callStatistics[128]; | 266 | __u8 callStatistics[128]; |
| 267 | }; | 267 | }; |
| 268 | 268 | ||
| 269 | struct PptpWanErrorNotify { | 269 | struct PptpWanErrorNotify { |
| 270 | __u16 peersCallID; | 270 | __be16 peersCallID; |
| 271 | __u16 reserved; | 271 | __u16 reserved; |
| 272 | __u32 crcErrors; | 272 | __be32 crcErrors; |
| 273 | __u32 framingErrors; | 273 | __be32 framingErrors; |
| 274 | __u32 hardwareOverRuns; | 274 | __be32 hardwareOverRuns; |
| 275 | __u32 bufferOverRuns; | 275 | __be32 bufferOverRuns; |
| 276 | __u32 timeoutErrors; | 276 | __be32 timeoutErrors; |
| 277 | __u32 alignmentErrors; | 277 | __be32 alignmentErrors; |
| 278 | }; | 278 | }; |
| 279 | 279 | ||
| 280 | struct PptpSetLinkInfo { | 280 | struct PptpSetLinkInfo { |
| 281 | __u16 peersCallID; | 281 | __be16 peersCallID; |
| 282 | __u16 reserved; | 282 | __u16 reserved; |
| 283 | __u32 sendAccm; | 283 | __be32 sendAccm; |
| 284 | __u32 recvAccm; | 284 | __be32 recvAccm; |
| 285 | }; | ||
| 286 | |||
| 287 | |||
| 288 | struct pptp_priv_data { | ||
| 289 | __u16 call_id; | ||
| 290 | __u16 mcall_id; | ||
| 291 | __u16 pcall_id; | ||
| 292 | }; | 285 | }; |
| 293 | 286 | ||
| 294 | union pptp_ctrl_union { | 287 | union pptp_ctrl_union { |
diff --git a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h index 14dc0f7b6556..20e43f018b7c 100644 --- a/include/linux/netfilter_ipv4/ip_conntrack_tuple.h +++ b/include/linux/netfilter_ipv4/ip_conntrack_tuple.h | |||
| @@ -17,7 +17,7 @@ union ip_conntrack_manip_proto | |||
| 17 | u_int16_t all; | 17 | u_int16_t all; |
| 18 | 18 | ||
| 19 | struct { | 19 | struct { |
| 20 | u_int16_t port; | 20 | __be16 port; |
| 21 | } tcp; | 21 | } tcp; |
| 22 | struct { | 22 | struct { |
| 23 | u_int16_t port; | 23 | u_int16_t port; |
| @@ -29,7 +29,7 @@ union ip_conntrack_manip_proto | |||
| 29 | u_int16_t port; | 29 | u_int16_t port; |
| 30 | } sctp; | 30 | } sctp; |
| 31 | struct { | 31 | struct { |
| 32 | u_int16_t key; /* key is 32bit, pptp only uses 16 */ | 32 | __be16 key; /* key is 32bit, pptp only uses 16 */ |
| 33 | } gre; | 33 | } gre; |
| 34 | }; | 34 | }; |
| 35 | 35 | ||
| @@ -65,7 +65,7 @@ struct ip_conntrack_tuple | |||
| 65 | u_int16_t port; | 65 | u_int16_t port; |
| 66 | } sctp; | 66 | } sctp; |
| 67 | struct { | 67 | struct { |
| 68 | u_int16_t key; /* key is 32bit, | 68 | __be16 key; /* key is 32bit, |
| 69 | * pptp only uses 16 */ | 69 | * pptp only uses 16 */ |
| 70 | } gre; | 70 | } gre; |
| 71 | } u; | 71 | } u; |
diff --git a/include/linux/netfilter_ipv4/ip_nat_core.h b/include/linux/netfilter_ipv4/ip_nat_core.h index 3b50eb91f007..30db23f06b03 100644 --- a/include/linux/netfilter_ipv4/ip_nat_core.h +++ b/include/linux/netfilter_ipv4/ip_nat_core.h | |||
| @@ -5,16 +5,14 @@ | |||
| 5 | 5 | ||
| 6 | /* This header used to share core functionality between the standalone | 6 | /* This header used to share core functionality between the standalone |
| 7 | NAT module, and the compatibility layer's use of NAT for masquerading. */ | 7 | NAT module, and the compatibility layer's use of NAT for masquerading. */ |
| 8 | extern int ip_nat_init(void); | ||
| 9 | extern void ip_nat_cleanup(void); | ||
| 10 | 8 | ||
| 11 | extern unsigned int nat_packet(struct ip_conntrack *ct, | 9 | extern unsigned int ip_nat_packet(struct ip_conntrack *ct, |
| 12 | enum ip_conntrack_info conntrackinfo, | 10 | enum ip_conntrack_info conntrackinfo, |
| 13 | unsigned int hooknum, | 11 | unsigned int hooknum, |
| 14 | struct sk_buff **pskb); | 12 | struct sk_buff **pskb); |
| 15 | 13 | ||
| 16 | extern int icmp_reply_translation(struct sk_buff **pskb, | 14 | extern int ip_nat_icmp_reply_translation(struct sk_buff **pskb, |
| 17 | struct ip_conntrack *ct, | 15 | struct ip_conntrack *ct, |
| 18 | enum ip_nat_manip_type manip, | 16 | enum ip_nat_manip_type manip, |
| 19 | enum ip_conntrack_dir dir); | 17 | enum ip_conntrack_dir dir); |
| 20 | #endif /* _IP_NAT_CORE_H */ | 18 | #endif /* _IP_NAT_CORE_H */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index c49d28eca561..68f11ac1a314 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
| @@ -769,6 +769,8 @@ | |||
| 769 | #define PCI_DEVICE_ID_TI_TVP4010 0x3d04 | 769 | #define PCI_DEVICE_ID_TI_TVP4010 0x3d04 |
| 770 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 | 770 | #define PCI_DEVICE_ID_TI_TVP4020 0x3d07 |
| 771 | #define PCI_DEVICE_ID_TI_4450 0x8011 | 771 | #define PCI_DEVICE_ID_TI_4450 0x8011 |
| 772 | #define PCI_DEVICE_ID_TI_XX21_XX11 0x8031 | ||
| 773 | #define PCI_DEVICE_ID_TI_X515 0x8036 | ||
| 772 | #define PCI_DEVICE_ID_TI_1130 0xac12 | 774 | #define PCI_DEVICE_ID_TI_1130 0xac12 |
| 773 | #define PCI_DEVICE_ID_TI_1031 0xac13 | 775 | #define PCI_DEVICE_ID_TI_1031 0xac13 |
| 774 | #define PCI_DEVICE_ID_TI_1131 0xac15 | 776 | #define PCI_DEVICE_ID_TI_1131 0xac15 |
| @@ -785,12 +787,17 @@ | |||
| 785 | #define PCI_DEVICE_ID_TI_4451 0xac42 | 787 | #define PCI_DEVICE_ID_TI_4451 0xac42 |
| 786 | #define PCI_DEVICE_ID_TI_4510 0xac44 | 788 | #define PCI_DEVICE_ID_TI_4510 0xac44 |
| 787 | #define PCI_DEVICE_ID_TI_4520 0xac46 | 789 | #define PCI_DEVICE_ID_TI_4520 0xac46 |
| 790 | #define PCI_DEVICE_ID_TI_7510 0xac47 | ||
| 791 | #define PCI_DEVICE_ID_TI_7610 0xac48 | ||
| 792 | #define PCI_DEVICE_ID_TI_7410 0xac49 | ||
| 788 | #define PCI_DEVICE_ID_TI_1410 0xac50 | 793 | #define PCI_DEVICE_ID_TI_1410 0xac50 |
| 789 | #define PCI_DEVICE_ID_TI_1420 0xac51 | 794 | #define PCI_DEVICE_ID_TI_1420 0xac51 |
| 790 | #define PCI_DEVICE_ID_TI_1451A 0xac52 | 795 | #define PCI_DEVICE_ID_TI_1451A 0xac52 |
| 791 | #define PCI_DEVICE_ID_TI_1620 0xac54 | 796 | #define PCI_DEVICE_ID_TI_1620 0xac54 |
| 792 | #define PCI_DEVICE_ID_TI_1520 0xac55 | 797 | #define PCI_DEVICE_ID_TI_1520 0xac55 |
| 793 | #define PCI_DEVICE_ID_TI_1510 0xac56 | 798 | #define PCI_DEVICE_ID_TI_1510 0xac56 |
| 799 | #define PCI_DEVICE_ID_TI_X620 0xac8d | ||
| 800 | #define PCI_DEVICE_ID_TI_X420 0xac8e | ||
| 794 | 801 | ||
| 795 | #define PCI_VENDOR_ID_SONY 0x104d | 802 | #define PCI_VENDOR_ID_SONY 0x104d |
| 796 | #define PCI_DEVICE_ID_SONY_CXD3222 0x8039 | 803 | #define PCI_DEVICE_ID_SONY_CXD3222 0x8039 |
| @@ -1268,7 +1275,8 @@ | |||
| 1268 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 | 1275 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA 0x0266 |
| 1269 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 | 1276 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP51_SATA2 0x0267 |
| 1270 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E | 1277 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_IDE 0x036E |
| 1271 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x036F | 1278 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA 0x037E |
| 1279 | #define PCI_DEVICE_ID_NVIDIA_NFORCE_MCP55_SATA2 0x037F | ||
| 1272 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 | 1280 | #define PCI_DEVICE_ID_NVIDIA_NVENET_12 0x0268 |
| 1273 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 | 1281 | #define PCI_DEVICE_ID_NVIDIA_NVENET_13 0x0269 |
| 1274 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B | 1282 | #define PCI_DEVICE_ID_NVIDIA_MCP51_AUDIO 0x026B |
| @@ -2186,7 +2194,12 @@ | |||
| 2186 | #define PCI_DEVICE_ID_ENE_1211 0x1211 | 2194 | #define PCI_DEVICE_ID_ENE_1211 0x1211 |
| 2187 | #define PCI_DEVICE_ID_ENE_1225 0x1225 | 2195 | #define PCI_DEVICE_ID_ENE_1225 0x1225 |
| 2188 | #define PCI_DEVICE_ID_ENE_1410 0x1410 | 2196 | #define PCI_DEVICE_ID_ENE_1410 0x1410 |
| 2197 | #define PCI_DEVICE_ID_ENE_710 0x1411 | ||
| 2198 | #define PCI_DEVICE_ID_ENE_712 0x1412 | ||
| 2189 | #define PCI_DEVICE_ID_ENE_1420 0x1420 | 2199 | #define PCI_DEVICE_ID_ENE_1420 0x1420 |
| 2200 | #define PCI_DEVICE_ID_ENE_720 0x1421 | ||
| 2201 | #define PCI_DEVICE_ID_ENE_722 0x1422 | ||
| 2202 | |||
| 2190 | #define PCI_VENDOR_ID_CHELSIO 0x1425 | 2203 | #define PCI_VENDOR_ID_CHELSIO 0x1425 |
| 2191 | 2204 | ||
| 2192 | #define PCI_VENDOR_ID_MIPS 0x153f | 2205 | #define PCI_VENDOR_ID_MIPS 0x153f |
diff --git a/include/linux/reboot.h b/include/linux/reboot.h index 3b3266ff1a95..7ab2cdb83ef0 100644 --- a/include/linux/reboot.h +++ b/include/linux/reboot.h | |||
| @@ -59,6 +59,10 @@ extern void machine_crash_shutdown(struct pt_regs *); | |||
| 59 | * Architecture independent implemenations of sys_reboot commands. | 59 | * Architecture independent implemenations of sys_reboot commands. |
| 60 | */ | 60 | */ |
| 61 | 61 | ||
| 62 | extern void kernel_restart_prepare(char *cmd); | ||
| 63 | extern void kernel_halt_prepare(void); | ||
| 64 | extern void kernel_power_off_prepare(void); | ||
| 65 | |||
| 62 | extern void kernel_restart(char *cmd); | 66 | extern void kernel_restart(char *cmd); |
| 63 | extern void kernel_halt(void); | 67 | extern void kernel_halt(void); |
| 64 | extern void kernel_power_off(void); | 68 | extern void kernel_power_off(void); |
diff --git a/include/linux/sysctl.h b/include/linux/sysctl.h index 3a29a9f9b451..fc8e367f671e 100644 --- a/include/linux/sysctl.h +++ b/include/linux/sysctl.h | |||
| @@ -202,7 +202,8 @@ enum | |||
| 202 | NET_TR=14, | 202 | NET_TR=14, |
| 203 | NET_DECNET=15, | 203 | NET_DECNET=15, |
| 204 | NET_ECONET=16, | 204 | NET_ECONET=16, |
| 205 | NET_SCTP=17, | 205 | NET_SCTP=17, |
| 206 | NET_LLC=18, | ||
| 206 | }; | 207 | }; |
| 207 | 208 | ||
| 208 | /* /proc/sys/kernel/random */ | 209 | /* /proc/sys/kernel/random */ |
| @@ -522,6 +523,29 @@ enum { | |||
| 522 | NET_IPX_FORWARDING=2 | 523 | NET_IPX_FORWARDING=2 |
| 523 | }; | 524 | }; |
| 524 | 525 | ||
| 526 | /* /proc/sys/net/llc */ | ||
| 527 | enum { | ||
| 528 | NET_LLC2=1, | ||
| 529 | NET_LLC_STATION=2, | ||
| 530 | }; | ||
| 531 | |||
| 532 | /* /proc/sys/net/llc/llc2 */ | ||
| 533 | enum { | ||
| 534 | NET_LLC2_TIMEOUT=1, | ||
| 535 | }; | ||
| 536 | |||
| 537 | /* /proc/sys/net/llc/station */ | ||
| 538 | enum { | ||
| 539 | NET_LLC_STATION_ACK_TIMEOUT=1, | ||
| 540 | }; | ||
| 541 | |||
| 542 | /* /proc/sys/net/llc/llc2/timeout */ | ||
| 543 | enum { | ||
| 544 | NET_LLC2_ACK_TIMEOUT=1, | ||
| 545 | NET_LLC2_P_TIMEOUT=2, | ||
| 546 | NET_LLC2_REJ_TIMEOUT=3, | ||
| 547 | NET_LLC2_BUSY_TIMEOUT=4, | ||
| 548 | }; | ||
| 525 | 549 | ||
| 526 | /* /proc/sys/net/appletalk */ | 550 | /* /proc/sys/net/appletalk */ |
| 527 | enum { | 551 | enum { |
diff --git a/include/net/llc.h b/include/net/llc.h index 71769a5aeef3..1adb2ef3f6f7 100644 --- a/include/net/llc.h +++ b/include/net/llc.h | |||
| @@ -17,6 +17,8 @@ | |||
| 17 | #include <linux/list.h> | 17 | #include <linux/list.h> |
| 18 | #include <linux/spinlock.h> | 18 | #include <linux/spinlock.h> |
| 19 | 19 | ||
| 20 | #include <asm/atomic.h> | ||
| 21 | |||
| 20 | struct net_device; | 22 | struct net_device; |
| 21 | struct packet_type; | 23 | struct packet_type; |
| 22 | struct sk_buff; | 24 | struct sk_buff; |
| @@ -44,6 +46,7 @@ struct llc_sap { | |||
| 44 | unsigned char state; | 46 | unsigned char state; |
| 45 | unsigned char p_bit; | 47 | unsigned char p_bit; |
| 46 | unsigned char f_bit; | 48 | unsigned char f_bit; |
| 49 | atomic_t refcnt; | ||
| 47 | int (*rcv_func)(struct sk_buff *skb, | 50 | int (*rcv_func)(struct sk_buff *skb, |
| 48 | struct net_device *dev, | 51 | struct net_device *dev, |
| 49 | struct packet_type *pt, | 52 | struct packet_type *pt, |
| @@ -81,13 +84,27 @@ extern struct llc_sap *llc_sap_open(unsigned char lsap, | |||
| 81 | struct net_device *dev, | 84 | struct net_device *dev, |
| 82 | struct packet_type *pt, | 85 | struct packet_type *pt, |
| 83 | struct net_device *orig_dev)); | 86 | struct net_device *orig_dev)); |
| 87 | static inline void llc_sap_hold(struct llc_sap *sap) | ||
| 88 | { | ||
| 89 | atomic_inc(&sap->refcnt); | ||
| 90 | } | ||
| 91 | |||
| 84 | extern void llc_sap_close(struct llc_sap *sap); | 92 | extern void llc_sap_close(struct llc_sap *sap); |
| 85 | 93 | ||
| 94 | static inline void llc_sap_put(struct llc_sap *sap) | ||
| 95 | { | ||
| 96 | if (atomic_dec_and_test(&sap->refcnt)) | ||
| 97 | llc_sap_close(sap); | ||
| 98 | } | ||
| 99 | |||
| 86 | extern struct llc_sap *llc_sap_find(unsigned char sap_value); | 100 | extern struct llc_sap *llc_sap_find(unsigned char sap_value); |
| 87 | 101 | ||
| 88 | extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, | 102 | extern int llc_build_and_send_ui_pkt(struct llc_sap *sap, struct sk_buff *skb, |
| 89 | unsigned char *dmac, unsigned char dsap); | 103 | unsigned char *dmac, unsigned char dsap); |
| 90 | 104 | ||
| 105 | extern void llc_sap_handler(struct llc_sap *sap, struct sk_buff *skb); | ||
| 106 | extern void llc_conn_handler(struct llc_sap *sap, struct sk_buff *skb); | ||
| 107 | |||
| 91 | extern int llc_station_init(void); | 108 | extern int llc_station_init(void); |
| 92 | extern void llc_station_exit(void); | 109 | extern void llc_station_exit(void); |
| 93 | 110 | ||
| @@ -98,4 +115,17 @@ extern void llc_proc_exit(void); | |||
| 98 | #define llc_proc_init() (0) | 115 | #define llc_proc_init() (0) |
| 99 | #define llc_proc_exit() do { } while(0) | 116 | #define llc_proc_exit() do { } while(0) |
| 100 | #endif /* CONFIG_PROC_FS */ | 117 | #endif /* CONFIG_PROC_FS */ |
| 118 | #ifdef CONFIG_SYSCTL | ||
| 119 | extern int llc_sysctl_init(void); | ||
| 120 | extern void llc_sysctl_exit(void); | ||
| 121 | |||
| 122 | extern int sysctl_llc2_ack_timeout; | ||
| 123 | extern int sysctl_llc2_busy_timeout; | ||
| 124 | extern int sysctl_llc2_p_timeout; | ||
| 125 | extern int sysctl_llc2_rej_timeout; | ||
| 126 | extern int sysctl_llc_station_ack_timeout; | ||
| 127 | #else | ||
| 128 | #define llc_sysctl_init() (0) | ||
| 129 | #define llc_sysctl_exit() do { } while(0) | ||
| 130 | #endif /* CONFIG_SYSCTL */ | ||
| 101 | #endif /* LLC_H */ | 131 | #endif /* LLC_H */ |
diff --git a/include/net/llc_conn.h b/include/net/llc_conn.h index 8ad3bc2c23d7..54852ff6033b 100644 --- a/include/net/llc_conn.h +++ b/include/net/llc_conn.h | |||
| @@ -19,14 +19,14 @@ | |||
| 19 | #define LLC_EVENT 1 | 19 | #define LLC_EVENT 1 |
| 20 | #define LLC_PACKET 2 | 20 | #define LLC_PACKET 2 |
| 21 | 21 | ||
| 22 | #define LLC_P_TIME 2 | 22 | #define LLC2_P_TIME 2 |
| 23 | #define LLC_ACK_TIME 1 | 23 | #define LLC2_ACK_TIME 1 |
| 24 | #define LLC_REJ_TIME 3 | 24 | #define LLC2_REJ_TIME 3 |
| 25 | #define LLC_BUSY_TIME 3 | 25 | #define LLC2_BUSY_TIME 3 |
| 26 | 26 | ||
| 27 | struct llc_timer { | 27 | struct llc_timer { |
| 28 | struct timer_list timer; | 28 | struct timer_list timer; |
| 29 | u16 expire; /* timer expire time */ | 29 | unsigned long expire; /* timer expire time */ |
| 30 | }; | 30 | }; |
| 31 | 31 | ||
| 32 | struct llc_sock { | 32 | struct llc_sock { |
| @@ -38,6 +38,7 @@ struct llc_sock { | |||
| 38 | struct llc_addr laddr; /* lsap/mac pair */ | 38 | struct llc_addr laddr; /* lsap/mac pair */ |
| 39 | struct llc_addr daddr; /* dsap/mac pair */ | 39 | struct llc_addr daddr; /* dsap/mac pair */ |
| 40 | struct net_device *dev; /* device to send to remote */ | 40 | struct net_device *dev; /* device to send to remote */ |
| 41 | u32 copied_seq; /* head of yet unread data */ | ||
| 41 | u8 retry_count; /* number of retries */ | 42 | u8 retry_count; /* number of retries */ |
| 42 | u8 ack_must_be_send; | 43 | u8 ack_must_be_send; |
| 43 | u8 first_pdu_Ns; | 44 | u8 first_pdu_Ns; |
| @@ -92,7 +93,8 @@ static __inline__ char llc_backlog_type(struct sk_buff *skb) | |||
| 92 | return skb->cb[sizeof(skb->cb) - 1]; | 93 | return skb->cb[sizeof(skb->cb) - 1]; |
| 93 | } | 94 | } |
| 94 | 95 | ||
| 95 | extern struct sock *llc_sk_alloc(int family, int priority, struct proto *prot); | 96 | extern struct sock *llc_sk_alloc(int family, unsigned int __nocast priority, |
| 97 | struct proto *prot); | ||
| 96 | extern void llc_sk_free(struct sock *sk); | 98 | extern void llc_sk_free(struct sock *sk); |
| 97 | 99 | ||
| 98 | extern void llc_sk_reset(struct sock *sk); | 100 | extern void llc_sk_reset(struct sock *sk); |
| @@ -115,5 +117,4 @@ extern void llc_sap_remove_socket(struct llc_sap *sap, struct sock *sk); | |||
| 115 | 117 | ||
| 116 | extern u8 llc_data_accept_state(u8 state); | 118 | extern u8 llc_data_accept_state(u8 state); |
| 117 | extern void llc_build_offset_table(void); | 119 | extern void llc_build_offset_table(void); |
| 118 | extern int llc_release_sockets(struct llc_sap *sap); | ||
| 119 | #endif /* LLC_CONN_H */ | 120 | #endif /* LLC_CONN_H */ |
diff --git a/include/net/llc_sap.h b/include/net/llc_sap.h index 353baaa627f3..2c56dbece729 100644 --- a/include/net/llc_sap.h +++ b/include/net/llc_sap.h | |||
| @@ -12,11 +12,15 @@ | |||
| 12 | * See the GNU General Public License for more details. | 12 | * See the GNU General Public License for more details. |
| 13 | */ | 13 | */ |
| 14 | struct llc_sap; | 14 | struct llc_sap; |
| 15 | struct net_device; | ||
| 15 | struct sk_buff; | 16 | struct sk_buff; |
| 17 | struct sock; | ||
| 16 | 18 | ||
| 17 | extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb); | 19 | extern void llc_sap_rtn_pdu(struct llc_sap *sap, struct sk_buff *skb); |
| 18 | extern void llc_save_primitive(struct sk_buff* skb, unsigned char prim); | 20 | extern void llc_save_primitive(struct sock *sk, struct sk_buff* skb, |
| 19 | extern struct sk_buff *llc_alloc_frame(void); | 21 | unsigned char prim); |
| 22 | extern struct sk_buff *llc_alloc_frame(struct sock *sk, | ||
| 23 | struct net_device *dev); | ||
| 20 | 24 | ||
| 21 | extern void llc_build_and_send_test_pkt(struct llc_sap *sap, | 25 | extern void llc_build_and_send_test_pkt(struct llc_sap *sap, |
| 22 | struct sk_buff *skb, | 26 | struct sk_buff *skb, |
diff --git a/include/pcmcia/ss.h b/include/pcmcia/ss.h index 0f7aacc33fe9..c8592c7e8eaa 100644 --- a/include/pcmcia/ss.h +++ b/include/pcmcia/ss.h | |||
| @@ -21,6 +21,9 @@ | |||
| 21 | #include <pcmcia/cs_types.h> | 21 | #include <pcmcia/cs_types.h> |
| 22 | #include <pcmcia/cs.h> | 22 | #include <pcmcia/cs.h> |
| 23 | #include <pcmcia/bulkmem.h> | 23 | #include <pcmcia/bulkmem.h> |
| 24 | #ifdef CONFIG_CARDBUS | ||
| 25 | #include <linux/pci.h> | ||
| 26 | #endif | ||
| 24 | 27 | ||
| 25 | /* Definitions for card status flags for GetStatus */ | 28 | /* Definitions for card status flags for GetStatus */ |
| 26 | #define SS_WRPROT 0x0001 | 29 | #define SS_WRPROT 0x0001 |
| @@ -233,7 +236,11 @@ struct pcmcia_socket { | |||
| 233 | 236 | ||
| 234 | /* so is power hook */ | 237 | /* so is power hook */ |
| 235 | int (*power_hook)(struct pcmcia_socket *sock, int operation); | 238 | int (*power_hook)(struct pcmcia_socket *sock, int operation); |
| 236 | 239 | #ifdef CONFIG_CARDBUS | |
| 240 | /* allows tuning the CB bridge before loading driver for the CB card */ | ||
| 241 | void (*tune_bridge)(struct pcmcia_socket *sock, struct pci_bus *bus); | ||
| 242 | #endif | ||
| 243 | |||
| 237 | /* state thread */ | 244 | /* state thread */ |
| 238 | struct semaphore skt_sem; /* protects socket h/w state */ | 245 | struct semaphore skt_sem; /* protects socket h/w state */ |
| 239 | 246 | ||
