diff options
Diffstat (limited to 'include/linux')
46 files changed, 435 insertions, 1572 deletions
diff --git a/include/linux/alarmtimer.h b/include/linux/alarmtimer.h index 96c5c249b086..9069694e70eb 100644 --- a/include/linux/alarmtimer.h +++ b/include/linux/alarmtimer.h | |||
@@ -21,7 +21,6 @@ enum alarmtimer_restart { | |||
21 | 21 | ||
22 | #define ALARMTIMER_STATE_INACTIVE 0x00 | 22 | #define ALARMTIMER_STATE_INACTIVE 0x00 |
23 | #define ALARMTIMER_STATE_ENQUEUED 0x01 | 23 | #define ALARMTIMER_STATE_ENQUEUED 0x01 |
24 | #define ALARMTIMER_STATE_CALLBACK 0x02 | ||
25 | 24 | ||
26 | /** | 25 | /** |
27 | * struct alarm - Alarm timer structure | 26 | * struct alarm - Alarm timer structure |
@@ -35,6 +34,7 @@ enum alarmtimer_restart { | |||
35 | */ | 34 | */ |
36 | struct alarm { | 35 | struct alarm { |
37 | struct timerqueue_node node; | 36 | struct timerqueue_node node; |
37 | struct hrtimer timer; | ||
38 | enum alarmtimer_restart (*function)(struct alarm *, ktime_t now); | 38 | enum alarmtimer_restart (*function)(struct alarm *, ktime_t now); |
39 | enum alarmtimer_type type; | 39 | enum alarmtimer_type type; |
40 | int state; | 40 | int state; |
@@ -43,39 +43,12 @@ struct alarm { | |||
43 | 43 | ||
44 | void alarm_init(struct alarm *alarm, enum alarmtimer_type type, | 44 | void alarm_init(struct alarm *alarm, enum alarmtimer_type type, |
45 | enum alarmtimer_restart (*function)(struct alarm *, ktime_t)); | 45 | enum alarmtimer_restart (*function)(struct alarm *, ktime_t)); |
46 | void alarm_start(struct alarm *alarm, ktime_t start); | 46 | int alarm_start(struct alarm *alarm, ktime_t start); |
47 | int alarm_try_to_cancel(struct alarm *alarm); | 47 | int alarm_try_to_cancel(struct alarm *alarm); |
48 | int alarm_cancel(struct alarm *alarm); | 48 | int alarm_cancel(struct alarm *alarm); |
49 | 49 | ||
50 | u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); | 50 | u64 alarm_forward(struct alarm *alarm, ktime_t now, ktime_t interval); |
51 | 51 | ||
52 | /* | ||
53 | * A alarmtimer is active, when it is enqueued into timerqueue or the | ||
54 | * callback function is running. | ||
55 | */ | ||
56 | static inline int alarmtimer_active(const struct alarm *timer) | ||
57 | { | ||
58 | return timer->state != ALARMTIMER_STATE_INACTIVE; | ||
59 | } | ||
60 | |||
61 | /* | ||
62 | * Helper function to check, whether the timer is on one of the queues | ||
63 | */ | ||
64 | static inline int alarmtimer_is_queued(struct alarm *timer) | ||
65 | { | ||
66 | return timer->state & ALARMTIMER_STATE_ENQUEUED; | ||
67 | } | ||
68 | |||
69 | /* | ||
70 | * Helper function to check, whether the timer is running the callback | ||
71 | * function | ||
72 | */ | ||
73 | static inline int alarmtimer_callback_running(struct alarm *timer) | ||
74 | { | ||
75 | return timer->state & ALARMTIMER_STATE_CALLBACK; | ||
76 | } | ||
77 | |||
78 | |||
79 | /* Provide way to access the rtc device being used by alarmtimers */ | 52 | /* Provide way to access the rtc device being used by alarmtimers */ |
80 | struct rtc_device *alarmtimer_get_rtcdev(void); | 53 | struct rtc_device *alarmtimer_get_rtcdev(void); |
81 | 54 | ||
diff --git a/include/linux/audit.h b/include/linux/audit.h index 2c83e5f7edb1..b889fa64b0e0 100644 --- a/include/linux/audit.h +++ b/include/linux/audit.h | |||
@@ -337,6 +337,7 @@ enum { | |||
337 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) | 337 | #define AUDIT_ARCH_MIPSEL (EM_MIPS|__AUDIT_ARCH_LE) |
338 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) | 338 | #define AUDIT_ARCH_MIPS64 (EM_MIPS|__AUDIT_ARCH_64BIT) |
339 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) | 339 | #define AUDIT_ARCH_MIPSEL64 (EM_MIPS|__AUDIT_ARCH_64BIT|__AUDIT_ARCH_LE) |
340 | #define AUDIT_ARCH_OPENRISC (EM_OPENRISC) | ||
340 | #define AUDIT_ARCH_PARISC (EM_PARISC) | 341 | #define AUDIT_ARCH_PARISC (EM_PARISC) |
341 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) | 342 | #define AUDIT_ARCH_PARISC64 (EM_PARISC|__AUDIT_ARCH_64BIT) |
342 | #define AUDIT_ARCH_PPC (EM_PPC) | 343 | #define AUDIT_ARCH_PPC (EM_PPC) |
@@ -452,6 +453,16 @@ struct audit_field { | |||
452 | extern int __init audit_register_class(int class, unsigned *list); | 453 | extern int __init audit_register_class(int class, unsigned *list); |
453 | extern int audit_classify_syscall(int abi, unsigned syscall); | 454 | extern int audit_classify_syscall(int abi, unsigned syscall); |
454 | extern int audit_classify_arch(int arch); | 455 | extern int audit_classify_arch(int arch); |
456 | |||
457 | /* audit_names->type values */ | ||
458 | #define AUDIT_TYPE_UNKNOWN 0 /* we don't know yet */ | ||
459 | #define AUDIT_TYPE_NORMAL 1 /* a "normal" audit record */ | ||
460 | #define AUDIT_TYPE_PARENT 2 /* a parent audit record */ | ||
461 | #define AUDIT_TYPE_CHILD_DELETE 3 /* a child being deleted */ | ||
462 | #define AUDIT_TYPE_CHILD_CREATE 4 /* a child being created */ | ||
463 | |||
464 | struct filename; | ||
465 | |||
455 | #ifdef CONFIG_AUDITSYSCALL | 466 | #ifdef CONFIG_AUDITSYSCALL |
456 | /* These are defined in auditsc.c */ | 467 | /* These are defined in auditsc.c */ |
457 | /* Public API */ | 468 | /* Public API */ |
@@ -461,11 +472,14 @@ extern void __audit_syscall_entry(int arch, | |||
461 | int major, unsigned long a0, unsigned long a1, | 472 | int major, unsigned long a0, unsigned long a1, |
462 | unsigned long a2, unsigned long a3); | 473 | unsigned long a2, unsigned long a3); |
463 | extern void __audit_syscall_exit(int ret_success, long ret_value); | 474 | extern void __audit_syscall_exit(int ret_success, long ret_value); |
464 | extern void __audit_getname(const char *name); | 475 | extern struct filename *__audit_reusename(const __user char *uptr); |
465 | extern void audit_putname(const char *name); | 476 | extern void __audit_getname(struct filename *name); |
466 | extern void __audit_inode(const char *name, const struct dentry *dentry); | 477 | extern void audit_putname(struct filename *name); |
467 | extern void __audit_inode_child(const struct dentry *dentry, | 478 | extern void __audit_inode(struct filename *name, const struct dentry *dentry, |
468 | const struct inode *parent); | 479 | unsigned int parent); |
480 | extern void __audit_inode_child(const struct inode *parent, | ||
481 | const struct dentry *dentry, | ||
482 | const unsigned char type); | ||
469 | extern void __audit_seccomp(unsigned long syscall, long signr, int code); | 483 | extern void __audit_seccomp(unsigned long syscall, long signr, int code); |
470 | extern void __audit_ptrace(struct task_struct *t); | 484 | extern void __audit_ptrace(struct task_struct *t); |
471 | 485 | ||
@@ -495,19 +509,27 @@ static inline void audit_syscall_exit(void *pt_regs) | |||
495 | __audit_syscall_exit(success, return_code); | 509 | __audit_syscall_exit(success, return_code); |
496 | } | 510 | } |
497 | } | 511 | } |
498 | static inline void audit_getname(const char *name) | 512 | static inline struct filename *audit_reusename(const __user char *name) |
513 | { | ||
514 | if (unlikely(!audit_dummy_context())) | ||
515 | return __audit_reusename(name); | ||
516 | return NULL; | ||
517 | } | ||
518 | static inline void audit_getname(struct filename *name) | ||
499 | { | 519 | { |
500 | if (unlikely(!audit_dummy_context())) | 520 | if (unlikely(!audit_dummy_context())) |
501 | __audit_getname(name); | 521 | __audit_getname(name); |
502 | } | 522 | } |
503 | static inline void audit_inode(const char *name, const struct dentry *dentry) { | 523 | static inline void audit_inode(struct filename *name, const struct dentry *dentry, |
524 | unsigned int parent) { | ||
504 | if (unlikely(!audit_dummy_context())) | 525 | if (unlikely(!audit_dummy_context())) |
505 | __audit_inode(name, dentry); | 526 | __audit_inode(name, dentry, parent); |
506 | } | 527 | } |
507 | static inline void audit_inode_child(const struct dentry *dentry, | 528 | static inline void audit_inode_child(const struct inode *parent, |
508 | const struct inode *parent) { | 529 | const struct dentry *dentry, |
530 | const unsigned char type) { | ||
509 | if (unlikely(!audit_dummy_context())) | 531 | if (unlikely(!audit_dummy_context())) |
510 | __audit_inode_child(dentry, parent); | 532 | __audit_inode_child(parent, dentry, type); |
511 | } | 533 | } |
512 | void audit_core_dumps(long signr); | 534 | void audit_core_dumps(long signr); |
513 | 535 | ||
@@ -651,19 +673,29 @@ static inline int audit_dummy_context(void) | |||
651 | { | 673 | { |
652 | return 1; | 674 | return 1; |
653 | } | 675 | } |
654 | static inline void audit_getname(const char *name) | 676 | static inline struct filename *audit_reusename(const __user char *name) |
677 | { | ||
678 | return NULL; | ||
679 | } | ||
680 | static inline void audit_getname(struct filename *name) | ||
655 | { } | 681 | { } |
656 | static inline void audit_putname(const char *name) | 682 | static inline void audit_putname(struct filename *name) |
657 | { } | 683 | { } |
658 | static inline void __audit_inode(const char *name, const struct dentry *dentry) | 684 | static inline void __audit_inode(struct filename *name, |
685 | const struct dentry *dentry, | ||
686 | unsigned int parent) | ||
659 | { } | 687 | { } |
660 | static inline void __audit_inode_child(const struct dentry *dentry, | 688 | static inline void __audit_inode_child(const struct inode *parent, |
661 | const struct inode *parent) | 689 | const struct dentry *dentry, |
690 | const unsigned char type) | ||
662 | { } | 691 | { } |
663 | static inline void audit_inode(const char *name, const struct dentry *dentry) | 692 | static inline void audit_inode(struct filename *name, |
693 | const struct dentry *dentry, | ||
694 | unsigned int parent) | ||
664 | { } | 695 | { } |
665 | static inline void audit_inode_child(const struct dentry *dentry, | 696 | static inline void audit_inode_child(const struct inode *parent, |
666 | const struct inode *parent) | 697 | const struct dentry *dentry, |
698 | const unsigned char type) | ||
667 | { } | 699 | { } |
668 | static inline void audit_core_dumps(long signr) | 700 | static inline void audit_core_dumps(long signr) |
669 | { } | 701 | { } |
diff --git a/include/linux/can/Kbuild b/include/linux/can/Kbuild index c62b7f1728f9..e69de29bb2d1 100644 --- a/include/linux/can/Kbuild +++ b/include/linux/can/Kbuild | |||
@@ -1,5 +0,0 @@ | |||
1 | header-y += raw.h | ||
2 | header-y += bcm.h | ||
3 | header-y += gw.h | ||
4 | header-y += error.h | ||
5 | header-y += netlink.h | ||
diff --git a/include/linux/can/bcm.h b/include/linux/can/bcm.h deleted file mode 100644 index 3ebe387fea4d..000000000000 --- a/include/linux/can/bcm.h +++ /dev/null | |||
@@ -1,66 +0,0 @@ | |||
1 | /* | ||
2 | * linux/can/bcm.h | ||
3 | * | ||
4 | * Definitions for CAN Broadcast Manager (BCM) | ||
5 | * | ||
6 | * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> | ||
7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | ||
8 | * All rights reserved. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef CAN_BCM_H | ||
13 | #define CAN_BCM_H | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/can.h> | ||
17 | |||
18 | /** | ||
19 | * struct bcm_msg_head - head of messages to/from the broadcast manager | ||
20 | * @opcode: opcode, see enum below. | ||
21 | * @flags: special flags, see below. | ||
22 | * @count: number of frames to send before changing interval. | ||
23 | * @ival1: interval for the first @count frames. | ||
24 | * @ival2: interval for the following frames. | ||
25 | * @can_id: CAN ID of frames to be sent or received. | ||
26 | * @nframes: number of frames appended to the message head. | ||
27 | * @frames: array of CAN frames. | ||
28 | */ | ||
29 | struct bcm_msg_head { | ||
30 | __u32 opcode; | ||
31 | __u32 flags; | ||
32 | __u32 count; | ||
33 | struct timeval ival1, ival2; | ||
34 | canid_t can_id; | ||
35 | __u32 nframes; | ||
36 | struct can_frame frames[0]; | ||
37 | }; | ||
38 | |||
39 | enum { | ||
40 | TX_SETUP = 1, /* create (cyclic) transmission task */ | ||
41 | TX_DELETE, /* remove (cyclic) transmission task */ | ||
42 | TX_READ, /* read properties of (cyclic) transmission task */ | ||
43 | TX_SEND, /* send one CAN frame */ | ||
44 | RX_SETUP, /* create RX content filter subscription */ | ||
45 | RX_DELETE, /* remove RX content filter subscription */ | ||
46 | RX_READ, /* read properties of RX content filter subscription */ | ||
47 | TX_STATUS, /* reply to TX_READ request */ | ||
48 | TX_EXPIRED, /* notification on performed transmissions (count=0) */ | ||
49 | RX_STATUS, /* reply to RX_READ request */ | ||
50 | RX_TIMEOUT, /* cyclic message is absent */ | ||
51 | RX_CHANGED /* updated CAN frame (detected content change) */ | ||
52 | }; | ||
53 | |||
54 | #define SETTIMER 0x0001 | ||
55 | #define STARTTIMER 0x0002 | ||
56 | #define TX_COUNTEVT 0x0004 | ||
57 | #define TX_ANNOUNCE 0x0008 | ||
58 | #define TX_CP_CAN_ID 0x0010 | ||
59 | #define RX_FILTER_ID 0x0020 | ||
60 | #define RX_CHECK_DLC 0x0040 | ||
61 | #define RX_NO_AUTOTIMER 0x0080 | ||
62 | #define RX_ANNOUNCE_RESUME 0x0100 | ||
63 | #define TX_RESET_MULTI_IDX 0x0200 | ||
64 | #define RX_RTR_FRAME 0x0400 | ||
65 | |||
66 | #endif /* CAN_BCM_H */ | ||
diff --git a/include/linux/can/error.h b/include/linux/can/error.h deleted file mode 100644 index 7b7148bded71..000000000000 --- a/include/linux/can/error.h +++ /dev/null | |||
@@ -1,91 +0,0 @@ | |||
1 | /* | ||
2 | * linux/can/error.h | ||
3 | * | ||
4 | * Definitions of the CAN error messages to be filtered and passed to the user. | ||
5 | * | ||
6 | * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> | ||
7 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | ||
8 | * All rights reserved. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef CAN_ERROR_H | ||
13 | #define CAN_ERROR_H | ||
14 | |||
15 | #define CAN_ERR_DLC 8 /* dlc for error message frames */ | ||
16 | |||
17 | /* error class (mask) in can_id */ | ||
18 | #define CAN_ERR_TX_TIMEOUT 0x00000001U /* TX timeout (by netdevice driver) */ | ||
19 | #define CAN_ERR_LOSTARB 0x00000002U /* lost arbitration / data[0] */ | ||
20 | #define CAN_ERR_CRTL 0x00000004U /* controller problems / data[1] */ | ||
21 | #define CAN_ERR_PROT 0x00000008U /* protocol violations / data[2..3] */ | ||
22 | #define CAN_ERR_TRX 0x00000010U /* transceiver status / data[4] */ | ||
23 | #define CAN_ERR_ACK 0x00000020U /* received no ACK on transmission */ | ||
24 | #define CAN_ERR_BUSOFF 0x00000040U /* bus off */ | ||
25 | #define CAN_ERR_BUSERROR 0x00000080U /* bus error (may flood!) */ | ||
26 | #define CAN_ERR_RESTARTED 0x00000100U /* controller restarted */ | ||
27 | |||
28 | /* arbitration lost in bit ... / data[0] */ | ||
29 | #define CAN_ERR_LOSTARB_UNSPEC 0x00 /* unspecified */ | ||
30 | /* else bit number in bitstream */ | ||
31 | |||
32 | /* error status of CAN-controller / data[1] */ | ||
33 | #define CAN_ERR_CRTL_UNSPEC 0x00 /* unspecified */ | ||
34 | #define CAN_ERR_CRTL_RX_OVERFLOW 0x01 /* RX buffer overflow */ | ||
35 | #define CAN_ERR_CRTL_TX_OVERFLOW 0x02 /* TX buffer overflow */ | ||
36 | #define CAN_ERR_CRTL_RX_WARNING 0x04 /* reached warning level for RX errors */ | ||
37 | #define CAN_ERR_CRTL_TX_WARNING 0x08 /* reached warning level for TX errors */ | ||
38 | #define CAN_ERR_CRTL_RX_PASSIVE 0x10 /* reached error passive status RX */ | ||
39 | #define CAN_ERR_CRTL_TX_PASSIVE 0x20 /* reached error passive status TX */ | ||
40 | /* (at least one error counter exceeds */ | ||
41 | /* the protocol-defined level of 127) */ | ||
42 | |||
43 | /* error in CAN protocol (type) / data[2] */ | ||
44 | #define CAN_ERR_PROT_UNSPEC 0x00 /* unspecified */ | ||
45 | #define CAN_ERR_PROT_BIT 0x01 /* single bit error */ | ||
46 | #define CAN_ERR_PROT_FORM 0x02 /* frame format error */ | ||
47 | #define CAN_ERR_PROT_STUFF 0x04 /* bit stuffing error */ | ||
48 | #define CAN_ERR_PROT_BIT0 0x08 /* unable to send dominant bit */ | ||
49 | #define CAN_ERR_PROT_BIT1 0x10 /* unable to send recessive bit */ | ||
50 | #define CAN_ERR_PROT_OVERLOAD 0x20 /* bus overload */ | ||
51 | #define CAN_ERR_PROT_ACTIVE 0x40 /* active error announcement */ | ||
52 | #define CAN_ERR_PROT_TX 0x80 /* error occurred on transmission */ | ||
53 | |||
54 | /* error in CAN protocol (location) / data[3] */ | ||
55 | #define CAN_ERR_PROT_LOC_UNSPEC 0x00 /* unspecified */ | ||
56 | #define CAN_ERR_PROT_LOC_SOF 0x03 /* start of frame */ | ||
57 | #define CAN_ERR_PROT_LOC_ID28_21 0x02 /* ID bits 28 - 21 (SFF: 10 - 3) */ | ||
58 | #define CAN_ERR_PROT_LOC_ID20_18 0x06 /* ID bits 20 - 18 (SFF: 2 - 0 )*/ | ||
59 | #define CAN_ERR_PROT_LOC_SRTR 0x04 /* substitute RTR (SFF: RTR) */ | ||
60 | #define CAN_ERR_PROT_LOC_IDE 0x05 /* identifier extension */ | ||
61 | #define CAN_ERR_PROT_LOC_ID17_13 0x07 /* ID bits 17-13 */ | ||
62 | #define CAN_ERR_PROT_LOC_ID12_05 0x0F /* ID bits 12-5 */ | ||
63 | #define CAN_ERR_PROT_LOC_ID04_00 0x0E /* ID bits 4-0 */ | ||
64 | #define CAN_ERR_PROT_LOC_RTR 0x0C /* RTR */ | ||
65 | #define CAN_ERR_PROT_LOC_RES1 0x0D /* reserved bit 1 */ | ||
66 | #define CAN_ERR_PROT_LOC_RES0 0x09 /* reserved bit 0 */ | ||
67 | #define CAN_ERR_PROT_LOC_DLC 0x0B /* data length code */ | ||
68 | #define CAN_ERR_PROT_LOC_DATA 0x0A /* data section */ | ||
69 | #define CAN_ERR_PROT_LOC_CRC_SEQ 0x08 /* CRC sequence */ | ||
70 | #define CAN_ERR_PROT_LOC_CRC_DEL 0x18 /* CRC delimiter */ | ||
71 | #define CAN_ERR_PROT_LOC_ACK 0x19 /* ACK slot */ | ||
72 | #define CAN_ERR_PROT_LOC_ACK_DEL 0x1B /* ACK delimiter */ | ||
73 | #define CAN_ERR_PROT_LOC_EOF 0x1A /* end of frame */ | ||
74 | #define CAN_ERR_PROT_LOC_INTERM 0x12 /* intermission */ | ||
75 | |||
76 | /* error status of CAN-transceiver / data[4] */ | ||
77 | /* CANH CANL */ | ||
78 | #define CAN_ERR_TRX_UNSPEC 0x00 /* 0000 0000 */ | ||
79 | #define CAN_ERR_TRX_CANH_NO_WIRE 0x04 /* 0000 0100 */ | ||
80 | #define CAN_ERR_TRX_CANH_SHORT_TO_BAT 0x05 /* 0000 0101 */ | ||
81 | #define CAN_ERR_TRX_CANH_SHORT_TO_VCC 0x06 /* 0000 0110 */ | ||
82 | #define CAN_ERR_TRX_CANH_SHORT_TO_GND 0x07 /* 0000 0111 */ | ||
83 | #define CAN_ERR_TRX_CANL_NO_WIRE 0x40 /* 0100 0000 */ | ||
84 | #define CAN_ERR_TRX_CANL_SHORT_TO_BAT 0x50 /* 0101 0000 */ | ||
85 | #define CAN_ERR_TRX_CANL_SHORT_TO_VCC 0x60 /* 0110 0000 */ | ||
86 | #define CAN_ERR_TRX_CANL_SHORT_TO_GND 0x70 /* 0111 0000 */ | ||
87 | #define CAN_ERR_TRX_CANL_SHORT_TO_CANH 0x80 /* 1000 0000 */ | ||
88 | |||
89 | /* controller specific additional information / data[5..7] */ | ||
90 | |||
91 | #endif /* CAN_ERROR_H */ | ||
diff --git a/include/linux/can/gw.h b/include/linux/can/gw.h deleted file mode 100644 index 8e1db18c3cb6..000000000000 --- a/include/linux/can/gw.h +++ /dev/null | |||
@@ -1,162 +0,0 @@ | |||
1 | /* | ||
2 | * linux/can/gw.h | ||
3 | * | ||
4 | * Definitions for CAN frame Gateway/Router/Bridge | ||
5 | * | ||
6 | * Author: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> | ||
7 | * Copyright (c) 2011 Volkswagen Group Electronic Research | ||
8 | * All rights reserved. | ||
9 | * | ||
10 | */ | ||
11 | |||
12 | #ifndef CAN_GW_H | ||
13 | #define CAN_GW_H | ||
14 | |||
15 | #include <linux/types.h> | ||
16 | #include <linux/can.h> | ||
17 | |||
18 | struct rtcanmsg { | ||
19 | __u8 can_family; | ||
20 | __u8 gwtype; | ||
21 | __u16 flags; | ||
22 | }; | ||
23 | |||
24 | /* CAN gateway types */ | ||
25 | enum { | ||
26 | CGW_TYPE_UNSPEC, | ||
27 | CGW_TYPE_CAN_CAN, /* CAN->CAN routing */ | ||
28 | __CGW_TYPE_MAX | ||
29 | }; | ||
30 | |||
31 | #define CGW_TYPE_MAX (__CGW_TYPE_MAX - 1) | ||
32 | |||
33 | /* CAN rtnetlink attribute definitions */ | ||
34 | enum { | ||
35 | CGW_UNSPEC, | ||
36 | CGW_MOD_AND, /* CAN frame modification binary AND */ | ||
37 | CGW_MOD_OR, /* CAN frame modification binary OR */ | ||
38 | CGW_MOD_XOR, /* CAN frame modification binary XOR */ | ||
39 | CGW_MOD_SET, /* CAN frame modification set alternate values */ | ||
40 | CGW_CS_XOR, /* set data[] XOR checksum into data[index] */ | ||
41 | CGW_CS_CRC8, /* set data[] CRC8 checksum into data[index] */ | ||
42 | CGW_HANDLED, /* number of handled CAN frames */ | ||
43 | CGW_DROPPED, /* number of dropped CAN frames */ | ||
44 | CGW_SRC_IF, /* ifindex of source network interface */ | ||
45 | CGW_DST_IF, /* ifindex of destination network interface */ | ||
46 | CGW_FILTER, /* specify struct can_filter on source CAN device */ | ||
47 | __CGW_MAX | ||
48 | }; | ||
49 | |||
50 | #define CGW_MAX (__CGW_MAX - 1) | ||
51 | |||
52 | #define CGW_FLAGS_CAN_ECHO 0x01 | ||
53 | #define CGW_FLAGS_CAN_SRC_TSTAMP 0x02 | ||
54 | |||
55 | #define CGW_MOD_FUNCS 4 /* AND OR XOR SET */ | ||
56 | |||
57 | /* CAN frame elements that are affected by curr. 3 CAN frame modifications */ | ||
58 | #define CGW_MOD_ID 0x01 | ||
59 | #define CGW_MOD_DLC 0x02 | ||
60 | #define CGW_MOD_DATA 0x04 | ||
61 | |||
62 | #define CGW_FRAME_MODS 3 /* ID DLC DATA */ | ||
63 | |||
64 | #define MAX_MODFUNCTIONS (CGW_MOD_FUNCS * CGW_FRAME_MODS) | ||
65 | |||
66 | struct cgw_frame_mod { | ||
67 | struct can_frame cf; | ||
68 | __u8 modtype; | ||
69 | } __attribute__((packed)); | ||
70 | |||
71 | #define CGW_MODATTR_LEN sizeof(struct cgw_frame_mod) | ||
72 | |||
73 | struct cgw_csum_xor { | ||
74 | __s8 from_idx; | ||
75 | __s8 to_idx; | ||
76 | __s8 result_idx; | ||
77 | __u8 init_xor_val; | ||
78 | } __attribute__((packed)); | ||
79 | |||
80 | struct cgw_csum_crc8 { | ||
81 | __s8 from_idx; | ||
82 | __s8 to_idx; | ||
83 | __s8 result_idx; | ||
84 | __u8 init_crc_val; | ||
85 | __u8 final_xor_val; | ||
86 | __u8 crctab[256]; | ||
87 | __u8 profile; | ||
88 | __u8 profile_data[20]; | ||
89 | } __attribute__((packed)); | ||
90 | |||
91 | /* length of checksum operation parameters. idx = index in CAN frame data[] */ | ||
92 | #define CGW_CS_XOR_LEN sizeof(struct cgw_csum_xor) | ||
93 | #define CGW_CS_CRC8_LEN sizeof(struct cgw_csum_crc8) | ||
94 | |||
95 | /* CRC8 profiles (compute CRC for additional data elements - see below) */ | ||
96 | enum { | ||
97 | CGW_CRC8PRF_UNSPEC, | ||
98 | CGW_CRC8PRF_1U8, /* compute one additional u8 value */ | ||
99 | CGW_CRC8PRF_16U8, /* u8 value table indexed by data[1] & 0xF */ | ||
100 | CGW_CRC8PRF_SFFID_XOR, /* (can_id & 0xFF) ^ (can_id >> 8 & 0xFF) */ | ||
101 | __CGW_CRC8PRF_MAX | ||
102 | }; | ||
103 | |||
104 | #define CGW_CRC8PRF_MAX (__CGW_CRC8PRF_MAX - 1) | ||
105 | |||
106 | /* | ||
107 | * CAN rtnetlink attribute contents in detail | ||
108 | * | ||
109 | * CGW_XXX_IF (length 4 bytes): | ||
110 | * Sets an interface index for source/destination network interfaces. | ||
111 | * For the CAN->CAN gwtype the indices of _two_ CAN interfaces are mandatory. | ||
112 | * | ||
113 | * CGW_FILTER (length 8 bytes): | ||
114 | * Sets a CAN receive filter for the gateway job specified by the | ||
115 | * struct can_filter described in include/linux/can.h | ||
116 | * | ||
117 | * CGW_MOD_XXX (length 17 bytes): | ||
118 | * Specifies a modification that's done to a received CAN frame before it is | ||
119 | * send out to the destination interface. | ||
120 | * | ||
121 | * <struct can_frame> data used as operator | ||
122 | * <u8> affected CAN frame elements | ||
123 | * | ||
124 | * CGW_CS_XOR (length 4 bytes): | ||
125 | * Set a simple XOR checksum starting with an initial value into | ||
126 | * data[result-idx] using data[start-idx] .. data[end-idx] | ||
127 | * | ||
128 | * The XOR checksum is calculated like this: | ||
129 | * | ||
130 | * xor = init_xor_val | ||
131 | * | ||
132 | * for (i = from_idx .. to_idx) | ||
133 | * xor ^= can_frame.data[i] | ||
134 | * | ||
135 | * can_frame.data[ result_idx ] = xor | ||
136 | * | ||
137 | * CGW_CS_CRC8 (length 282 bytes): | ||
138 | * Set a CRC8 value into data[result-idx] using a given 256 byte CRC8 table, | ||
139 | * a given initial value and a defined input data[start-idx] .. data[end-idx]. | ||
140 | * Finally the result value is XOR'ed with the final_xor_val. | ||
141 | * | ||
142 | * The CRC8 checksum is calculated like this: | ||
143 | * | ||
144 | * crc = init_crc_val | ||
145 | * | ||
146 | * for (i = from_idx .. to_idx) | ||
147 | * crc = crctab[ crc ^ can_frame.data[i] ] | ||
148 | * | ||
149 | * can_frame.data[ result_idx ] = crc ^ final_xor_val | ||
150 | * | ||
151 | * The calculated CRC may contain additional source data elements that can be | ||
152 | * defined in the handling of 'checksum profiles' e.g. shown in AUTOSAR specs | ||
153 | * like http://www.autosar.org/download/R4.0/AUTOSAR_SWS_E2ELibrary.pdf | ||
154 | * E.g. the profile_data[] may contain additional u8 values (called DATA_IDs) | ||
155 | * that are used depending on counter values inside the CAN frame data[]. | ||
156 | * So far only three profiles have been implemented for illustration. | ||
157 | * | ||
158 | * Remark: In general the attribute data is a linear buffer. | ||
159 | * Beware of sending unpacked or aligned structs! | ||
160 | */ | ||
161 | |||
162 | #endif | ||
diff --git a/include/linux/can/netlink.h b/include/linux/can/netlink.h deleted file mode 100644 index 14966ddb7df1..000000000000 --- a/include/linux/can/netlink.h +++ /dev/null | |||
@@ -1,122 +0,0 @@ | |||
1 | /* | ||
2 | * linux/can/netlink.h | ||
3 | * | ||
4 | * Definitions for the CAN netlink interface | ||
5 | * | ||
6 | * Copyright (c) 2009 Wolfgang Grandegger <wg@grandegger.com> | ||
7 | * | ||
8 | */ | ||
9 | |||
10 | #ifndef CAN_NETLINK_H | ||
11 | #define CAN_NETLINK_H | ||
12 | |||
13 | #include <linux/types.h> | ||
14 | |||
15 | /* | ||
16 | * CAN bit-timing parameters | ||
17 | * | ||
18 | * For further information, please read chapter "8 BIT TIMING | ||
19 | * REQUIREMENTS" of the "Bosch CAN Specification version 2.0" | ||
20 | * at http://www.semiconductors.bosch.de/pdf/can2spec.pdf. | ||
21 | */ | ||
22 | struct can_bittiming { | ||
23 | __u32 bitrate; /* Bit-rate in bits/second */ | ||
24 | __u32 sample_point; /* Sample point in one-tenth of a percent */ | ||
25 | __u32 tq; /* Time quanta (TQ) in nanoseconds */ | ||
26 | __u32 prop_seg; /* Propagation segment in TQs */ | ||
27 | __u32 phase_seg1; /* Phase buffer segment 1 in TQs */ | ||
28 | __u32 phase_seg2; /* Phase buffer segment 2 in TQs */ | ||
29 | __u32 sjw; /* Synchronisation jump width in TQs */ | ||
30 | __u32 brp; /* Bit-rate prescaler */ | ||
31 | }; | ||
32 | |||
33 | /* | ||
34 | * CAN harware-dependent bit-timing constant | ||
35 | * | ||
36 | * Used for calculating and checking bit-timing parameters | ||
37 | */ | ||
38 | struct can_bittiming_const { | ||
39 | char name[16]; /* Name of the CAN controller hardware */ | ||
40 | __u32 tseg1_min; /* Time segement 1 = prop_seg + phase_seg1 */ | ||
41 | __u32 tseg1_max; | ||
42 | __u32 tseg2_min; /* Time segement 2 = phase_seg2 */ | ||
43 | __u32 tseg2_max; | ||
44 | __u32 sjw_max; /* Synchronisation jump width */ | ||
45 | __u32 brp_min; /* Bit-rate prescaler */ | ||
46 | __u32 brp_max; | ||
47 | __u32 brp_inc; | ||
48 | }; | ||
49 | |||
50 | /* | ||
51 | * CAN clock parameters | ||
52 | */ | ||
53 | struct can_clock { | ||
54 | __u32 freq; /* CAN system clock frequency in Hz */ | ||
55 | }; | ||
56 | |||
57 | /* | ||
58 | * CAN operational and error states | ||
59 | */ | ||
60 | enum can_state { | ||
61 | CAN_STATE_ERROR_ACTIVE = 0, /* RX/TX error count < 96 */ | ||
62 | CAN_STATE_ERROR_WARNING, /* RX/TX error count < 128 */ | ||
63 | CAN_STATE_ERROR_PASSIVE, /* RX/TX error count < 256 */ | ||
64 | CAN_STATE_BUS_OFF, /* RX/TX error count >= 256 */ | ||
65 | CAN_STATE_STOPPED, /* Device is stopped */ | ||
66 | CAN_STATE_SLEEPING, /* Device is sleeping */ | ||
67 | CAN_STATE_MAX | ||
68 | }; | ||
69 | |||
70 | /* | ||
71 | * CAN bus error counters | ||
72 | */ | ||
73 | struct can_berr_counter { | ||
74 | __u16 txerr; | ||
75 | __u16 rxerr; | ||
76 | }; | ||
77 | |||
78 | /* | ||
79 | * CAN controller mode | ||
80 | */ | ||
81 | struct can_ctrlmode { | ||
82 | __u32 mask; | ||
83 | __u32 flags; | ||
84 | }; | ||
85 | |||
86 | #define CAN_CTRLMODE_LOOPBACK 0x01 /* Loopback mode */ | ||
87 | #define CAN_CTRLMODE_LISTENONLY 0x02 /* Listen-only mode */ | ||
88 | #define CAN_CTRLMODE_3_SAMPLES 0x04 /* Triple sampling mode */ | ||
89 | #define CAN_CTRLMODE_ONE_SHOT 0x08 /* One-Shot mode */ | ||
90 | #define CAN_CTRLMODE_BERR_REPORTING 0x10 /* Bus-error reporting */ | ||
91 | |||
92 | /* | ||
93 | * CAN device statistics | ||
94 | */ | ||
95 | struct can_device_stats { | ||
96 | __u32 bus_error; /* Bus errors */ | ||
97 | __u32 error_warning; /* Changes to error warning state */ | ||
98 | __u32 error_passive; /* Changes to error passive state */ | ||
99 | __u32 bus_off; /* Changes to bus off state */ | ||
100 | __u32 arbitration_lost; /* Arbitration lost errors */ | ||
101 | __u32 restarts; /* CAN controller re-starts */ | ||
102 | }; | ||
103 | |||
104 | /* | ||
105 | * CAN netlink interface | ||
106 | */ | ||
107 | enum { | ||
108 | IFLA_CAN_UNSPEC, | ||
109 | IFLA_CAN_BITTIMING, | ||
110 | IFLA_CAN_BITTIMING_CONST, | ||
111 | IFLA_CAN_CLOCK, | ||
112 | IFLA_CAN_STATE, | ||
113 | IFLA_CAN_CTRLMODE, | ||
114 | IFLA_CAN_RESTART_MS, | ||
115 | IFLA_CAN_RESTART, | ||
116 | IFLA_CAN_BERR_COUNTER, | ||
117 | __IFLA_CAN_MAX | ||
118 | }; | ||
119 | |||
120 | #define IFLA_CAN_MAX (__IFLA_CAN_MAX - 1) | ||
121 | |||
122 | #endif /* CAN_NETLINK_H */ | ||
diff --git a/include/linux/can/raw.h b/include/linux/can/raw.h deleted file mode 100644 index a814062b0719..000000000000 --- a/include/linux/can/raw.h +++ /dev/null | |||
@@ -1,30 +0,0 @@ | |||
1 | /* | ||
2 | * linux/can/raw.h | ||
3 | * | ||
4 | * Definitions for raw CAN sockets | ||
5 | * | ||
6 | * Authors: Oliver Hartkopp <oliver.hartkopp@volkswagen.de> | ||
7 | * Urs Thuermann <urs.thuermann@volkswagen.de> | ||
8 | * Copyright (c) 2002-2007 Volkswagen Group Electronic Research | ||
9 | * All rights reserved. | ||
10 | * | ||
11 | */ | ||
12 | |||
13 | #ifndef CAN_RAW_H | ||
14 | #define CAN_RAW_H | ||
15 | |||
16 | #include <linux/can.h> | ||
17 | |||
18 | #define SOL_CAN_RAW (SOL_CAN_BASE + CAN_RAW) | ||
19 | |||
20 | /* for socket options affecting the socket (not the global system) */ | ||
21 | |||
22 | enum { | ||
23 | CAN_RAW_FILTER = 1, /* set 0 .. n can_filter(s) */ | ||
24 | CAN_RAW_ERR_FILTER, /* set filter for error frames */ | ||
25 | CAN_RAW_LOOPBACK, /* local loopback (default:on) */ | ||
26 | CAN_RAW_RECV_OWN_MSGS, /* receive my own msgs (default:off) */ | ||
27 | CAN_RAW_FD_FRAMES, /* allow CAN FD frames (default:off) */ | ||
28 | }; | ||
29 | |||
30 | #endif | ||
diff --git a/include/linux/clocksource.h b/include/linux/clocksource.h index fbe89e17124e..4dceaf8ae152 100644 --- a/include/linux/clocksource.h +++ b/include/linux/clocksource.h | |||
@@ -319,22 +319,6 @@ static inline void __clocksource_updatefreq_khz(struct clocksource *cs, u32 khz) | |||
319 | __clocksource_updatefreq_scale(cs, 1000, khz); | 319 | __clocksource_updatefreq_scale(cs, 1000, khz); |
320 | } | 320 | } |
321 | 321 | ||
322 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | ||
323 | extern void | ||
324 | update_vsyscall(struct timespec *ts, struct timespec *wtm, | ||
325 | struct clocksource *c, u32 mult); | ||
326 | extern void update_vsyscall_tz(void); | ||
327 | #else | ||
328 | static inline void | ||
329 | update_vsyscall(struct timespec *ts, struct timespec *wtm, | ||
330 | struct clocksource *c, u32 mult) | ||
331 | { | ||
332 | } | ||
333 | |||
334 | static inline void update_vsyscall_tz(void) | ||
335 | { | ||
336 | } | ||
337 | #endif | ||
338 | 322 | ||
339 | extern void timekeeping_notify(struct clocksource *clock); | 323 | extern void timekeeping_notify(struct clocksource *clock); |
340 | 324 | ||
diff --git a/include/linux/compiler-gcc4.h b/include/linux/compiler-gcc4.h index 934bc34d5f99..412bc6c2b023 100644 --- a/include/linux/compiler-gcc4.h +++ b/include/linux/compiler-gcc4.h | |||
@@ -59,7 +59,7 @@ | |||
59 | #if __GNUC_MINOR__ > 0 | 59 | #if __GNUC_MINOR__ > 0 |
60 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) | 60 | #define __compiletime_object_size(obj) __builtin_object_size(obj, 0) |
61 | #endif | 61 | #endif |
62 | #if __GNUC_MINOR__ >= 4 && !defined(__CHECKER__) | 62 | #if __GNUC_MINOR__ >= 3 && !defined(__CHECKER__) |
63 | #define __compiletime_warning(message) __attribute__((warning(message))) | 63 | #define __compiletime_warning(message) __attribute__((warning(message))) |
64 | #define __compiletime_error(message) __attribute__((error(message))) | 64 | #define __compiletime_error(message) __attribute__((error(message))) |
65 | #endif | 65 | #endif |
diff --git a/include/linux/console.h b/include/linux/console.h index 7201ce4280ca..dedb082fe50f 100644 --- a/include/linux/console.h +++ b/include/linux/console.h | |||
@@ -83,8 +83,14 @@ void give_up_console(const struct consw *sw); | |||
83 | int con_debug_enter(struct vc_data *vc); | 83 | int con_debug_enter(struct vc_data *vc); |
84 | int con_debug_leave(void); | 84 | int con_debug_leave(void); |
85 | #else | 85 | #else |
86 | #define con_debug_enter(vc) (0) | 86 | static inline int con_debug_enter(struct vc_data *vc) |
87 | #define con_debug_leave() (0) | 87 | { |
88 | return 0; | ||
89 | } | ||
90 | static inline int con_debug_leave(void) | ||
91 | { | ||
92 | return 0; | ||
93 | } | ||
88 | #endif | 94 | #endif |
89 | 95 | ||
90 | /* scroll */ | 96 | /* scroll */ |
diff --git a/include/linux/cpu_cooling.h b/include/linux/cpu_cooling.h new file mode 100644 index 000000000000..851530128e65 --- /dev/null +++ b/include/linux/cpu_cooling.h | |||
@@ -0,0 +1,58 @@ | |||
1 | /* | ||
2 | * linux/include/linux/cpu_cooling.h | ||
3 | * | ||
4 | * Copyright (C) 2012 Samsung Electronics Co., Ltd(http://www.samsung.com) | ||
5 | * Copyright (C) 2012 Amit Daniel <amit.kachhap@linaro.org> | ||
6 | * | ||
7 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
8 | * This program is free software; you can redistribute it and/or modify | ||
9 | * it under the terms of the GNU General Public License as published by | ||
10 | * the Free Software Foundation; version 2 of the License. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, but | ||
13 | * WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
15 | * General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License along | ||
18 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
19 | * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. | ||
20 | * | ||
21 | * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | ||
22 | */ | ||
23 | |||
24 | #ifndef __CPU_COOLING_H__ | ||
25 | #define __CPU_COOLING_H__ | ||
26 | |||
27 | #include <linux/thermal.h> | ||
28 | |||
29 | #define CPUFREQ_COOLING_START 0 | ||
30 | #define CPUFREQ_COOLING_STOP 1 | ||
31 | |||
32 | #ifdef CONFIG_CPU_THERMAL | ||
33 | /** | ||
34 | * cpufreq_cooling_register - function to create cpufreq cooling device. | ||
35 | * @clip_cpus: cpumask of cpus where the frequency constraints will happen | ||
36 | */ | ||
37 | struct thermal_cooling_device *cpufreq_cooling_register( | ||
38 | struct cpumask *clip_cpus); | ||
39 | |||
40 | /** | ||
41 | * cpufreq_cooling_unregister - function to remove cpufreq cooling device. | ||
42 | * @cdev: thermal cooling device pointer. | ||
43 | */ | ||
44 | void cpufreq_cooling_unregister(struct thermal_cooling_device *cdev); | ||
45 | #else /* !CONFIG_CPU_THERMAL */ | ||
46 | static inline struct thermal_cooling_device *cpufreq_cooling_register( | ||
47 | struct cpumask *clip_cpus) | ||
48 | { | ||
49 | return NULL; | ||
50 | } | ||
51 | static inline void cpufreq_cooling_unregister( | ||
52 | struct thermal_cooling_device *cdev) | ||
53 | { | ||
54 | return; | ||
55 | } | ||
56 | #endif /* CONFIG_CPU_THERMAL */ | ||
57 | |||
58 | #endif /* __CPU_COOLING_H__ */ | ||
diff --git a/include/linux/dvb/version.h b/include/linux/dvb/version.h index 20e5eac2ffd3..827cce7e33e3 100644 --- a/include/linux/dvb/version.h +++ b/include/linux/dvb/version.h | |||
@@ -24,6 +24,6 @@ | |||
24 | #define _DVBVERSION_H_ | 24 | #define _DVBVERSION_H_ |
25 | 25 | ||
26 | #define DVB_API_VERSION 5 | 26 | #define DVB_API_VERSION 5 |
27 | #define DVB_API_VERSION_MINOR 8 | 27 | #define DVB_API_VERSION_MINOR 9 |
28 | 28 | ||
29 | #endif /*_DVBVERSION_H_*/ | 29 | #endif /*_DVBVERSION_H_*/ |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 39f3e12ca752..65fbf571023f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1136,7 +1136,7 @@ static inline int file_check_writeable(struct file *filp) | |||
1136 | #if BITS_PER_LONG==32 | 1136 | #if BITS_PER_LONG==32 |
1137 | #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) | 1137 | #define MAX_LFS_FILESIZE (((loff_t)PAGE_CACHE_SIZE << (BITS_PER_LONG-1))-1) |
1138 | #elif BITS_PER_LONG==64 | 1138 | #elif BITS_PER_LONG==64 |
1139 | #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffff) | 1139 | #define MAX_LFS_FILESIZE ((loff_t)0x7fffffffffffffffLL) |
1140 | #endif | 1140 | #endif |
1141 | 1141 | ||
1142 | #define FL_POSIX 1 | 1142 | #define FL_POSIX 1 |
@@ -1511,7 +1511,6 @@ struct super_block { | |||
1511 | unsigned long s_magic; | 1511 | unsigned long s_magic; |
1512 | struct dentry *s_root; | 1512 | struct dentry *s_root; |
1513 | struct rw_semaphore s_umount; | 1513 | struct rw_semaphore s_umount; |
1514 | struct mutex s_lock; | ||
1515 | int s_count; | 1514 | int s_count; |
1516 | atomic_t s_active; | 1515 | atomic_t s_active; |
1517 | #ifdef CONFIG_SECURITY | 1516 | #ifdef CONFIG_SECURITY |
@@ -2080,7 +2079,7 @@ extern struct vfsmount *kern_mount_data(struct file_system_type *, void *data); | |||
2080 | extern void kern_unmount(struct vfsmount *mnt); | 2079 | extern void kern_unmount(struct vfsmount *mnt); |
2081 | extern int may_umount_tree(struct vfsmount *); | 2080 | extern int may_umount_tree(struct vfsmount *); |
2082 | extern int may_umount(struct vfsmount *); | 2081 | extern int may_umount(struct vfsmount *); |
2083 | extern long do_mount(char *, char *, char *, unsigned long, void *); | 2082 | extern long do_mount(const char *, const char *, const char *, unsigned long, void *); |
2084 | extern struct vfsmount *collect_mounts(struct path *); | 2083 | extern struct vfsmount *collect_mounts(struct path *); |
2085 | extern void drop_collected_mounts(struct vfsmount *); | 2084 | extern void drop_collected_mounts(struct vfsmount *); |
2086 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, | 2085 | extern int iterate_mounts(int (*)(struct vfsmount *, void *), void *, |
@@ -2197,6 +2196,13 @@ static inline int break_lease(struct inode *inode, unsigned int mode) | |||
2197 | #endif /* CONFIG_FILE_LOCKING */ | 2196 | #endif /* CONFIG_FILE_LOCKING */ |
2198 | 2197 | ||
2199 | /* fs/open.c */ | 2198 | /* fs/open.c */ |
2199 | struct audit_names; | ||
2200 | struct filename { | ||
2201 | const char *name; /* pointer to actual string */ | ||
2202 | const __user char *uptr; /* original userland pointer */ | ||
2203 | struct audit_names *aname; | ||
2204 | bool separate; /* should "name" be freed? */ | ||
2205 | }; | ||
2200 | 2206 | ||
2201 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, | 2207 | extern int do_truncate(struct dentry *, loff_t start, unsigned int time_attrs, |
2202 | struct file *filp); | 2208 | struct file *filp); |
@@ -2204,12 +2210,15 @@ extern int do_fallocate(struct file *file, int mode, loff_t offset, | |||
2204 | loff_t len); | 2210 | loff_t len); |
2205 | extern long do_sys_open(int dfd, const char __user *filename, int flags, | 2211 | extern long do_sys_open(int dfd, const char __user *filename, int flags, |
2206 | umode_t mode); | 2212 | umode_t mode); |
2213 | extern struct file *file_open_name(struct filename *, int, umode_t); | ||
2207 | extern struct file *filp_open(const char *, int, umode_t); | 2214 | extern struct file *filp_open(const char *, int, umode_t); |
2208 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, | 2215 | extern struct file *file_open_root(struct dentry *, struct vfsmount *, |
2209 | const char *, int); | 2216 | const char *, int); |
2210 | extern struct file * dentry_open(const struct path *, int, const struct cred *); | 2217 | extern struct file * dentry_open(const struct path *, int, const struct cred *); |
2211 | extern int filp_close(struct file *, fl_owner_t id); | 2218 | extern int filp_close(struct file *, fl_owner_t id); |
2212 | extern char * getname(const char __user *); | 2219 | |
2220 | extern struct filename *getname(const char __user *); | ||
2221 | |||
2213 | enum { | 2222 | enum { |
2214 | FILE_CREATED = 1, | 2223 | FILE_CREATED = 1, |
2215 | FILE_OPENED = 2 | 2224 | FILE_OPENED = 2 |
@@ -2229,13 +2238,14 @@ extern void __init vfs_caches_init(unsigned long); | |||
2229 | 2238 | ||
2230 | extern struct kmem_cache *names_cachep; | 2239 | extern struct kmem_cache *names_cachep; |
2231 | 2240 | ||
2232 | #define __getname_gfp(gfp) kmem_cache_alloc(names_cachep, (gfp)) | 2241 | extern void final_putname(struct filename *name); |
2233 | #define __getname() __getname_gfp(GFP_KERNEL) | 2242 | |
2243 | #define __getname() kmem_cache_alloc(names_cachep, GFP_KERNEL) | ||
2234 | #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) | 2244 | #define __putname(name) kmem_cache_free(names_cachep, (void *)(name)) |
2235 | #ifndef CONFIG_AUDITSYSCALL | 2245 | #ifndef CONFIG_AUDITSYSCALL |
2236 | #define putname(name) __putname(name) | 2246 | #define putname(name) final_putname(name) |
2237 | #else | 2247 | #else |
2238 | extern void putname(const char *name); | 2248 | extern void putname(struct filename *name); |
2239 | #endif | 2249 | #endif |
2240 | 2250 | ||
2241 | #ifdef CONFIG_BLOCK | 2251 | #ifdef CONFIG_BLOCK |
diff --git a/include/linux/fsnotify.h b/include/linux/fsnotify.h index a6dfe6944564..0fbfb4646d1b 100644 --- a/include/linux/fsnotify.h +++ b/include/linux/fsnotify.h | |||
@@ -109,7 +109,7 @@ static inline void fsnotify_move(struct inode *old_dir, struct inode *new_dir, | |||
109 | 109 | ||
110 | if (source) | 110 | if (source) |
111 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); | 111 | fsnotify(source, FS_MOVE_SELF, moved->d_inode, FSNOTIFY_EVENT_INODE, NULL, 0); |
112 | audit_inode_child(moved, new_dir); | 112 | audit_inode_child(new_dir, moved, AUDIT_TYPE_CHILD_CREATE); |
113 | } | 113 | } |
114 | 114 | ||
115 | /* | 115 | /* |
@@ -155,7 +155,7 @@ static inline void fsnotify_inoderemove(struct inode *inode) | |||
155 | */ | 155 | */ |
156 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | 156 | static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) |
157 | { | 157 | { |
158 | audit_inode_child(dentry, inode); | 158 | audit_inode_child(inode, dentry, AUDIT_TYPE_CHILD_CREATE); |
159 | 159 | ||
160 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 160 | fsnotify(inode, FS_CREATE, dentry->d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
161 | } | 161 | } |
@@ -168,7 +168,7 @@ static inline void fsnotify_create(struct inode *inode, struct dentry *dentry) | |||
168 | static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry) | 168 | static inline void fsnotify_link(struct inode *dir, struct inode *inode, struct dentry *new_dentry) |
169 | { | 169 | { |
170 | fsnotify_link_count(inode); | 170 | fsnotify_link_count(inode); |
171 | audit_inode_child(new_dentry, dir); | 171 | audit_inode_child(dir, new_dentry, AUDIT_TYPE_CHILD_CREATE); |
172 | 172 | ||
173 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); | 173 | fsnotify(dir, FS_CREATE, inode, FSNOTIFY_EVENT_INODE, new_dentry->d_name.name, 0); |
174 | } | 174 | } |
@@ -181,7 +181,7 @@ static inline void fsnotify_mkdir(struct inode *inode, struct dentry *dentry) | |||
181 | __u32 mask = (FS_CREATE | FS_ISDIR); | 181 | __u32 mask = (FS_CREATE | FS_ISDIR); |
182 | struct inode *d_inode = dentry->d_inode; | 182 | struct inode *d_inode = dentry->d_inode; |
183 | 183 | ||
184 | audit_inode_child(dentry, inode); | 184 | audit_inode_child(inode, dentry, AUDIT_TYPE_CHILD_CREATE); |
185 | 185 | ||
186 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); | 186 | fsnotify(inode, mask, d_inode, FSNOTIFY_EVENT_INODE, dentry->d_name.name, 0); |
187 | } | 187 | } |
diff --git a/include/linux/if_link.h b/include/linux/if_link.h index e4dad4ddf085..3265f332998a 100644 --- a/include/linux/if_link.h +++ b/include/linux/if_link.h | |||
@@ -284,10 +284,16 @@ enum { | |||
284 | IFLA_VXLAN_LEARNING, | 284 | IFLA_VXLAN_LEARNING, |
285 | IFLA_VXLAN_AGEING, | 285 | IFLA_VXLAN_AGEING, |
286 | IFLA_VXLAN_LIMIT, | 286 | IFLA_VXLAN_LIMIT, |
287 | IFLA_VXLAN_PORT_RANGE, | ||
287 | __IFLA_VXLAN_MAX | 288 | __IFLA_VXLAN_MAX |
288 | }; | 289 | }; |
289 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) | 290 | #define IFLA_VXLAN_MAX (__IFLA_VXLAN_MAX - 1) |
290 | 291 | ||
292 | struct ifla_vxlan_port_range { | ||
293 | __be16 low; | ||
294 | __be16 high; | ||
295 | }; | ||
296 | |||
291 | /* SR-IOV virtual function management section */ | 297 | /* SR-IOV virtual function management section */ |
292 | 298 | ||
293 | enum { | 299 | enum { |
diff --git a/include/linux/input.h b/include/linux/input.h index ba4874302939..15464ba6bf53 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1396,8 +1396,8 @@ struct input_handle; | |||
1396 | * @start: starts handler for given handle. This function is called by | 1396 | * @start: starts handler for given handle. This function is called by |
1397 | * input core right after connect() method and also when a process | 1397 | * input core right after connect() method and also when a process |
1398 | * that "grabbed" a device releases it | 1398 | * that "grabbed" a device releases it |
1399 | * @fops: file operations this driver implements | 1399 | * @legacy_minors: set to %true by drivers using legacy minor ranges |
1400 | * @minor: beginning of range of 32 minors for devices this driver | 1400 | * @minor: beginning of range of 32 legacy minors for devices this driver |
1401 | * can provide | 1401 | * can provide |
1402 | * @name: name of the handler, to be shown in /proc/bus/input/handlers | 1402 | * @name: name of the handler, to be shown in /proc/bus/input/handlers |
1403 | * @id_table: pointer to a table of input_device_ids this driver can | 1403 | * @id_table: pointer to a table of input_device_ids this driver can |
@@ -1431,7 +1431,7 @@ struct input_handler { | |||
1431 | void (*disconnect)(struct input_handle *handle); | 1431 | void (*disconnect)(struct input_handle *handle); |
1432 | void (*start)(struct input_handle *handle); | 1432 | void (*start)(struct input_handle *handle); |
1433 | 1433 | ||
1434 | const struct file_operations *fops; | 1434 | bool legacy_minors; |
1435 | int minor; | 1435 | int minor; |
1436 | const char *name; | 1436 | const char *name; |
1437 | 1437 | ||
@@ -1499,6 +1499,10 @@ void input_reset_device(struct input_dev *); | |||
1499 | int __must_check input_register_handler(struct input_handler *); | 1499 | int __must_check input_register_handler(struct input_handler *); |
1500 | void input_unregister_handler(struct input_handler *); | 1500 | void input_unregister_handler(struct input_handler *); |
1501 | 1501 | ||
1502 | int __must_check input_get_new_minor(int legacy_base, unsigned int legacy_num, | ||
1503 | bool allow_dynamic); | ||
1504 | void input_free_minor(unsigned int minor); | ||
1505 | |||
1502 | int input_handler_for_each_handle(struct input_handler *, void *data, | 1506 | int input_handler_for_each_handle(struct input_handler *, void *data, |
1503 | int (*fn)(struct input_handle *, void *)); | 1507 | int (*fn)(struct input_handle *, void *)); |
1504 | 1508 | ||
diff --git a/include/linux/jiffies.h b/include/linux/jiffies.h index 05e3c2c7a8cf..6b87413da9d6 100644 --- a/include/linux/jiffies.h +++ b/include/linux/jiffies.h | |||
@@ -51,31 +51,17 @@ | |||
51 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ | 51 | #define SH_DIV(NOM,DEN,LSH) ( (((NOM) / (DEN)) << (LSH)) \ |
52 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) | 52 | + ((((NOM) % (DEN)) << (LSH)) + (DEN) / 2) / (DEN)) |
53 | 53 | ||
54 | #ifdef CLOCK_TICK_RATE | ||
55 | /* LATCH is used in the interval timer and ftape setup. */ | 54 | /* LATCH is used in the interval timer and ftape setup. */ |
56 | # define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ | 55 | #define LATCH ((CLOCK_TICK_RATE + HZ/2) / HZ) /* For divider */ |
57 | 56 | ||
58 | /* | 57 | extern int register_refined_jiffies(long clock_tick_rate); |
59 | * HZ is the requested value. However the CLOCK_TICK_RATE may not allow | ||
60 | * for exactly HZ. So SHIFTED_HZ is high res HZ ("<< 8" is for accuracy) | ||
61 | */ | ||
62 | # define SHIFTED_HZ (SH_DIV(CLOCK_TICK_RATE, LATCH, 8)) | ||
63 | #else | ||
64 | # define SHIFTED_HZ (HZ << 8) | ||
65 | #endif | ||
66 | 58 | ||
67 | /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ | 59 | /* TICK_NSEC is the time between ticks in nsec assuming SHIFTED_HZ */ |
68 | #define TICK_NSEC (SH_DIV(1000000UL * 1000, SHIFTED_HZ, 8)) | 60 | #define TICK_NSEC ((NSEC_PER_SEC+HZ/2)/HZ) |
69 | 61 | ||
70 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ | 62 | /* TICK_USEC is the time between ticks in usec assuming fake USER_HZ */ |
71 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) | 63 | #define TICK_USEC ((1000000UL + USER_HZ/2) / USER_HZ) |
72 | 64 | ||
73 | /* | ||
74 | * TICK_USEC_TO_NSEC is the time between ticks in nsec assuming SHIFTED_HZ and | ||
75 | * a value TUSEC for TICK_USEC (can be set bij adjtimex) | ||
76 | */ | ||
77 | #define TICK_USEC_TO_NSEC(TUSEC) (SH_DIV(TUSEC * USER_HZ * 1000, SHIFTED_HZ, 8)) | ||
78 | |||
79 | /* some arch's have a small-data section that can be accessed register-relative | 65 | /* some arch's have a small-data section that can be accessed register-relative |
80 | * but that can only take up to, say, 4-byte variables. jiffies being part of | 66 | * but that can only take up to, say, 4-byte variables. jiffies being part of |
81 | * an 8-byte variable may not be correctly accessed unless we force the issue | 67 | * an 8-byte variable may not be correctly accessed unless we force the issue |
diff --git a/include/linux/lglock.h b/include/linux/lglock.h index f01e5f6d1f07..0d24e932db0b 100644 --- a/include/linux/lglock.h +++ b/include/linux/lglock.h | |||
@@ -32,20 +32,13 @@ | |||
32 | #define br_write_lock(name) lg_global_lock(name) | 32 | #define br_write_lock(name) lg_global_lock(name) |
33 | #define br_write_unlock(name) lg_global_unlock(name) | 33 | #define br_write_unlock(name) lg_global_unlock(name) |
34 | 34 | ||
35 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) | 35 | #define DEFINE_BRLOCK(name) DEFINE_LGLOCK(name) |
36 | #define DEFINE_STATIC_BRLOCK(name) DEFINE_STATIC_LGLOCK(name) | ||
36 | 37 | ||
37 | #ifdef CONFIG_DEBUG_LOCK_ALLOC | 38 | #ifdef CONFIG_DEBUG_LOCK_ALLOC |
38 | #define LOCKDEP_INIT_MAP lockdep_init_map | 39 | #define LOCKDEP_INIT_MAP lockdep_init_map |
39 | |||
40 | #define DEFINE_LGLOCK_LOCKDEP(name) \ | ||
41 | struct lock_class_key name##_lock_key; \ | ||
42 | struct lockdep_map name##_lock_dep_map; \ | ||
43 | EXPORT_SYMBOL(name##_lock_dep_map) | ||
44 | |||
45 | #else | 40 | #else |
46 | #define LOCKDEP_INIT_MAP(a, b, c, d) | 41 | #define LOCKDEP_INIT_MAP(a, b, c, d) |
47 | |||
48 | #define DEFINE_LGLOCK_LOCKDEP(name) | ||
49 | #endif | 42 | #endif |
50 | 43 | ||
51 | struct lglock { | 44 | struct lglock { |
@@ -57,11 +50,15 @@ struct lglock { | |||
57 | }; | 50 | }; |
58 | 51 | ||
59 | #define DEFINE_LGLOCK(name) \ | 52 | #define DEFINE_LGLOCK(name) \ |
60 | DEFINE_LGLOCK_LOCKDEP(name); \ | 53 | static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \ |
61 | DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \ | ||
62 | = __ARCH_SPIN_LOCK_UNLOCKED; \ | 54 | = __ARCH_SPIN_LOCK_UNLOCKED; \ |
63 | struct lglock name = { .lock = &name ## _lock } | 55 | struct lglock name = { .lock = &name ## _lock } |
64 | 56 | ||
57 | #define DEFINE_STATIC_LGLOCK(name) \ | ||
58 | static DEFINE_PER_CPU(arch_spinlock_t, name ## _lock) \ | ||
59 | = __ARCH_SPIN_LOCK_UNLOCKED; \ | ||
60 | static struct lglock name = { .lock = &name ## _lock } | ||
61 | |||
65 | void lg_lock_init(struct lglock *lg, char *name); | 62 | void lg_lock_init(struct lglock *lg, char *name); |
66 | void lg_local_lock(struct lglock *lg); | 63 | void lg_local_lock(struct lglock *lg); |
67 | void lg_local_unlock(struct lglock *lg); | 64 | void lg_local_unlock(struct lglock *lg); |
diff --git a/include/linux/mmc/Kbuild b/include/linux/mmc/Kbuild index 1fb26448faa9..e69de29bb2d1 100644 --- a/include/linux/mmc/Kbuild +++ b/include/linux/mmc/Kbuild | |||
@@ -1 +0,0 @@ | |||
1 | header-y += ioctl.h | ||
diff --git a/include/linux/mmc/ioctl.h b/include/linux/mmc/ioctl.h deleted file mode 100644 index 1f5e68923929..000000000000 --- a/include/linux/mmc/ioctl.h +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | #ifndef LINUX_MMC_IOCTL_H | ||
2 | #define LINUX_MMC_IOCTL_H | ||
3 | |||
4 | #include <linux/types.h> | ||
5 | |||
6 | struct mmc_ioc_cmd { | ||
7 | /* Implies direction of data. true = write, false = read */ | ||
8 | int write_flag; | ||
9 | |||
10 | /* Application-specific command. true = precede with CMD55 */ | ||
11 | int is_acmd; | ||
12 | |||
13 | __u32 opcode; | ||
14 | __u32 arg; | ||
15 | __u32 response[4]; /* CMD response */ | ||
16 | unsigned int flags; | ||
17 | unsigned int blksz; | ||
18 | unsigned int blocks; | ||
19 | |||
20 | /* | ||
21 | * Sleep at least postsleep_min_us useconds, and at most | ||
22 | * postsleep_max_us useconds *after* issuing command. Needed for | ||
23 | * some read commands for which cards have no other way of indicating | ||
24 | * they're ready for the next command (i.e. there is no equivalent of | ||
25 | * a "busy" indicator for read operations). | ||
26 | */ | ||
27 | unsigned int postsleep_min_us; | ||
28 | unsigned int postsleep_max_us; | ||
29 | |||
30 | /* | ||
31 | * Override driver-computed timeouts. Note the difference in units! | ||
32 | */ | ||
33 | unsigned int data_timeout_ns; | ||
34 | unsigned int cmd_timeout_ms; | ||
35 | |||
36 | /* | ||
37 | * For 64-bit machines, the next member, ``__u64 data_ptr``, wants to | ||
38 | * be 8-byte aligned. Make sure this struct is the same size when | ||
39 | * built for 32-bit. | ||
40 | */ | ||
41 | __u32 __pad; | ||
42 | |||
43 | /* DAT buffer */ | ||
44 | __u64 data_ptr; | ||
45 | }; | ||
46 | #define mmc_ioc_cmd_set_data(ic, ptr) ic.data_ptr = (__u64)(unsigned long) ptr | ||
47 | |||
48 | #define MMC_IOC_CMD _IOWR(MMC_BLOCK_MAJOR, 0, struct mmc_ioc_cmd) | ||
49 | |||
50 | /* | ||
51 | * Since this ioctl is only meant to enhance (and not replace) normal access | ||
52 | * to the mmc bus device, an upper data transfer limit of MMC_IOC_MAX_BYTES | ||
53 | * is enforced per ioctl call. For larger data transfers, use the normal | ||
54 | * block device operations. | ||
55 | */ | ||
56 | #define MMC_IOC_MAX_BYTES (512L * 256) | ||
57 | #endif /* LINUX_MMC_IOCTL_H */ | ||
diff --git a/include/linux/nfsd/Kbuild b/include/linux/nfsd/Kbuild index 5b7d84ac954a..e69de29bb2d1 100644 --- a/include/linux/nfsd/Kbuild +++ b/include/linux/nfsd/Kbuild | |||
@@ -1,5 +0,0 @@ | |||
1 | header-y += cld.h | ||
2 | header-y += debug.h | ||
3 | header-y += export.h | ||
4 | header-y += nfsfh.h | ||
5 | header-y += stats.h | ||
diff --git a/include/linux/nfsd/cld.h b/include/linux/nfsd/cld.h deleted file mode 100644 index f14a9ab06f1f..000000000000 --- a/include/linux/nfsd/cld.h +++ /dev/null | |||
@@ -1,56 +0,0 @@ | |||
1 | /* | ||
2 | * Upcall description for nfsdcld communication | ||
3 | * | ||
4 | * Copyright (c) 2012 Red Hat, Inc. | ||
5 | * Author(s): Jeff Layton <jlayton@redhat.com> | ||
6 | * | ||
7 | * This program is free software; you can redistribute it and/or modify | ||
8 | * it under the terms of the GNU General Public License as published by | ||
9 | * the Free Software Foundation; either version 2 of the License, or | ||
10 | * (at your option) any later version. | ||
11 | * | ||
12 | * This program is distributed in the hope that it will be useful, | ||
13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
15 | * GNU General Public License for more details. | ||
16 | * | ||
17 | * You should have received a copy of the GNU General Public License | ||
18 | * along with this program; if not, write to the Free Software | ||
19 | * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. | ||
20 | */ | ||
21 | |||
22 | #ifndef _NFSD_CLD_H | ||
23 | #define _NFSD_CLD_H | ||
24 | |||
25 | /* latest upcall version available */ | ||
26 | #define CLD_UPCALL_VERSION 1 | ||
27 | |||
28 | /* defined by RFC3530 */ | ||
29 | #define NFS4_OPAQUE_LIMIT 1024 | ||
30 | |||
31 | enum cld_command { | ||
32 | Cld_Create, /* create a record for this cm_id */ | ||
33 | Cld_Remove, /* remove record of this cm_id */ | ||
34 | Cld_Check, /* is this cm_id allowed? */ | ||
35 | Cld_GraceDone, /* grace period is complete */ | ||
36 | }; | ||
37 | |||
38 | /* representation of long-form NFSv4 client ID */ | ||
39 | struct cld_name { | ||
40 | uint16_t cn_len; /* length of cm_id */ | ||
41 | unsigned char cn_id[NFS4_OPAQUE_LIMIT]; /* client-provided */ | ||
42 | } __attribute__((packed)); | ||
43 | |||
44 | /* message struct for communication with userspace */ | ||
45 | struct cld_msg { | ||
46 | uint8_t cm_vers; /* upcall version */ | ||
47 | uint8_t cm_cmd; /* upcall command */ | ||
48 | int16_t cm_status; /* return code */ | ||
49 | uint32_t cm_xid; /* transaction id */ | ||
50 | union { | ||
51 | int64_t cm_gracetime; /* grace period start time */ | ||
52 | struct cld_name cm_name; | ||
53 | } __attribute__((packed)) cm_u; | ||
54 | } __attribute__((packed)); | ||
55 | |||
56 | #endif /* !_NFSD_CLD_H */ | ||
diff --git a/include/linux/nfsd/debug.h b/include/linux/nfsd/debug.h index ee4aa91788e7..19ef8375b577 100644 --- a/include/linux/nfsd/debug.h +++ b/include/linux/nfsd/debug.h | |||
@@ -5,44 +5,15 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de> | 6 | * Copyright (C) 1995 Olaf Kirch <okir@monad.swb.de> |
7 | */ | 7 | */ |
8 | |||
9 | #ifndef LINUX_NFSD_DEBUG_H | 8 | #ifndef LINUX_NFSD_DEBUG_H |
10 | #define LINUX_NFSD_DEBUG_H | 9 | #define LINUX_NFSD_DEBUG_H |
11 | 10 | ||
12 | #include <linux/sunrpc/debug.h> | 11 | #include <uapi/linux/nfsd/debug.h> |
13 | 12 | ||
14 | /* | ||
15 | * Enable debugging for nfsd. | ||
16 | * Requires RPC_DEBUG. | ||
17 | */ | ||
18 | #ifdef RPC_DEBUG | ||
19 | # define NFSD_DEBUG 1 | ||
20 | #endif | ||
21 | |||
22 | /* | ||
23 | * knfsd debug flags | ||
24 | */ | ||
25 | #define NFSDDBG_SOCK 0x0001 | ||
26 | #define NFSDDBG_FH 0x0002 | ||
27 | #define NFSDDBG_EXPORT 0x0004 | ||
28 | #define NFSDDBG_SVC 0x0008 | ||
29 | #define NFSDDBG_PROC 0x0010 | ||
30 | #define NFSDDBG_FILEOP 0x0020 | ||
31 | #define NFSDDBG_AUTH 0x0040 | ||
32 | #define NFSDDBG_REPCACHE 0x0080 | ||
33 | #define NFSDDBG_XDR 0x0100 | ||
34 | #define NFSDDBG_LOCKD 0x0200 | ||
35 | #define NFSDDBG_ALL 0x7FFF | ||
36 | #define NFSDDBG_NOCHANGE 0xFFFF | ||
37 | |||
38 | |||
39 | #ifdef __KERNEL__ | ||
40 | # undef ifdebug | 13 | # undef ifdebug |
41 | # ifdef NFSD_DEBUG | 14 | # ifdef NFSD_DEBUG |
42 | # define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag) | 15 | # define ifdebug(flag) if (nfsd_debug & NFSDDBG_##flag) |
43 | # else | 16 | # else |
44 | # define ifdebug(flag) if (0) | 17 | # define ifdebug(flag) if (0) |
45 | # endif | 18 | # endif |
46 | #endif /* __KERNEL__ */ | ||
47 | |||
48 | #endif /* LINUX_NFSD_DEBUG_H */ | 19 | #endif /* LINUX_NFSD_DEBUG_H */ |
diff --git a/include/linux/nfsd/export.h b/include/linux/nfsd/export.h index e33f747b173c..24c139288db4 100644 --- a/include/linux/nfsd/export.h +++ b/include/linux/nfsd/export.h | |||
@@ -6,58 +6,11 @@ | |||
6 | * | 6 | * |
7 | * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de> | 7 | * Copyright (C) 1995-1997 Olaf Kirch <okir@monad.swb.de> |
8 | */ | 8 | */ |
9 | |||
10 | #ifndef NFSD_EXPORT_H | 9 | #ifndef NFSD_EXPORT_H |
11 | #define NFSD_EXPORT_H | 10 | #define NFSD_EXPORT_H |
12 | 11 | ||
13 | # include <linux/types.h> | ||
14 | #ifdef __KERNEL__ | ||
15 | # include <linux/nfsd/nfsfh.h> | 12 | # include <linux/nfsd/nfsfh.h> |
16 | #endif | 13 | #include <uapi/linux/nfsd/export.h> |
17 | |||
18 | /* | ||
19 | * Important limits for the exports stuff. | ||
20 | */ | ||
21 | #define NFSCLNT_IDMAX 1024 | ||
22 | #define NFSCLNT_ADDRMAX 16 | ||
23 | #define NFSCLNT_KEYMAX 32 | ||
24 | |||
25 | /* | ||
26 | * Export flags. | ||
27 | */ | ||
28 | #define NFSEXP_READONLY 0x0001 | ||
29 | #define NFSEXP_INSECURE_PORT 0x0002 | ||
30 | #define NFSEXP_ROOTSQUASH 0x0004 | ||
31 | #define NFSEXP_ALLSQUASH 0x0008 | ||
32 | #define NFSEXP_ASYNC 0x0010 | ||
33 | #define NFSEXP_GATHERED_WRITES 0x0020 | ||
34 | /* 40 80 100 currently unused */ | ||
35 | #define NFSEXP_NOHIDE 0x0200 | ||
36 | #define NFSEXP_NOSUBTREECHECK 0x0400 | ||
37 | #define NFSEXP_NOAUTHNLM 0x0800 /* Don't authenticate NLM requests - just trust */ | ||
38 | #define NFSEXP_MSNFS 0x1000 /* do silly things that MS clients expect; no longer supported */ | ||
39 | #define NFSEXP_FSID 0x2000 | ||
40 | #define NFSEXP_CROSSMOUNT 0x4000 | ||
41 | #define NFSEXP_NOACL 0x8000 /* reserved for possible ACL related use */ | ||
42 | /* | ||
43 | * The NFSEXP_V4ROOT flag causes the kernel to give access only to NFSv4 | ||
44 | * clients, and only to the single directory that is the root of the | ||
45 | * export; further lookup and readdir operations are treated as if every | ||
46 | * subdirectory was a mountpoint, and ignored if they are not themselves | ||
47 | * exported. This is used by nfsd and mountd to construct the NFSv4 | ||
48 | * pseudofilesystem, which provides access only to paths leading to each | ||
49 | * exported filesystem. | ||
50 | */ | ||
51 | #define NFSEXP_V4ROOT 0x10000 | ||
52 | /* All flags that we claim to support. (Note we don't support NOACL.) */ | ||
53 | #define NFSEXP_ALLFLAGS 0x17E3F | ||
54 | |||
55 | /* The flags that may vary depending on security flavor: */ | ||
56 | #define NFSEXP_SECINFO_FLAGS (NFSEXP_READONLY | NFSEXP_ROOTSQUASH \ | ||
57 | | NFSEXP_ALLSQUASH \ | ||
58 | | NFSEXP_INSECURE_PORT) | ||
59 | |||
60 | #ifdef __KERNEL__ | ||
61 | 14 | ||
62 | /* | 15 | /* |
63 | * FS Locations | 16 | * FS Locations |
@@ -154,7 +107,4 @@ static inline void exp_get(struct svc_export *exp) | |||
154 | } | 107 | } |
155 | struct svc_export * rqst_exp_find(struct svc_rqst *, int, u32 *); | 108 | struct svc_export * rqst_exp_find(struct svc_rqst *, int, u32 *); |
156 | 109 | ||
157 | #endif /* __KERNEL__ */ | ||
158 | |||
159 | #endif /* NFSD_EXPORT_H */ | 110 | #endif /* NFSD_EXPORT_H */ |
160 | |||
diff --git a/include/linux/nfsd/nfsfh.h b/include/linux/nfsd/nfsfh.h index fa63048fecff..a93593f1fa4e 100644 --- a/include/linux/nfsd/nfsfh.h +++ b/include/linux/nfsd/nfsfh.h | |||
@@ -10,117 +10,11 @@ | |||
10 | * | 10 | * |
11 | * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> | 11 | * Copyright (C) 1995, 1996, 1997 Olaf Kirch <okir@monad.swb.de> |
12 | */ | 12 | */ |
13 | |||
14 | #ifndef _LINUX_NFSD_FH_H | 13 | #ifndef _LINUX_NFSD_FH_H |
15 | #define _LINUX_NFSD_FH_H | 14 | #define _LINUX_NFSD_FH_H |
16 | 15 | ||
17 | #include <linux/types.h> | ||
18 | #include <linux/nfs.h> | ||
19 | #include <linux/nfs2.h> | ||
20 | #include <linux/nfs3.h> | ||
21 | #include <linux/nfs4.h> | ||
22 | #ifdef __KERNEL__ | ||
23 | # include <linux/sunrpc/svc.h> | 16 | # include <linux/sunrpc/svc.h> |
24 | #endif | 17 | #include <uapi/linux/nfsd/nfsfh.h> |
25 | |||
26 | /* | ||
27 | * This is the old "dentry style" Linux NFSv2 file handle. | ||
28 | * | ||
29 | * The xino and xdev fields are currently used to transport the | ||
30 | * ino/dev of the exported inode. | ||
31 | */ | ||
32 | struct nfs_fhbase_old { | ||
33 | __u32 fb_dcookie; /* dentry cookie - always 0xfeebbaca */ | ||
34 | __u32 fb_ino; /* our inode number */ | ||
35 | __u32 fb_dirino; /* dir inode number, 0 for directories */ | ||
36 | __u32 fb_dev; /* our device */ | ||
37 | __u32 fb_xdev; | ||
38 | __u32 fb_xino; | ||
39 | __u32 fb_generation; | ||
40 | }; | ||
41 | |||
42 | /* | ||
43 | * This is the new flexible, extensible style NFSv2/v3 file handle. | ||
44 | * by Neil Brown <neilb@cse.unsw.edu.au> - March 2000 | ||
45 | * | ||
46 | * The file handle starts with a sequence of four-byte words. | ||
47 | * The first word contains a version number (1) and three descriptor bytes | ||
48 | * that tell how the remaining 3 variable length fields should be handled. | ||
49 | * These three bytes are auth_type, fsid_type and fileid_type. | ||
50 | * | ||
51 | * All four-byte values are in host-byte-order. | ||
52 | * | ||
53 | * The auth_type field specifies how the filehandle can be authenticated | ||
54 | * This might allow a file to be confirmed to be in a writable part of a | ||
55 | * filetree without checking the path from it up to the root. | ||
56 | * Current values: | ||
57 | * 0 - No authentication. fb_auth is 0 bytes long | ||
58 | * Possible future values: | ||
59 | * 1 - 4 bytes taken from MD5 hash of the remainer of the file handle | ||
60 | * prefixed by a secret and with the important export flags. | ||
61 | * | ||
62 | * The fsid_type identifies how the filesystem (or export point) is | ||
63 | * encoded. | ||
64 | * Current values: | ||
65 | * 0 - 4 byte device id (ms-2-bytes major, ls-2-bytes minor), 4byte inode number | ||
66 | * NOTE: we cannot use the kdev_t device id value, because kdev_t.h | ||
67 | * says we mustn't. We must break it up and reassemble. | ||
68 | * 1 - 4 byte user specified identifier | ||
69 | * 2 - 4 byte major, 4 byte minor, 4 byte inode number - DEPRECATED | ||
70 | * 3 - 4 byte device id, encoded for user-space, 4 byte inode number | ||
71 | * 4 - 4 byte inode number and 4 byte uuid | ||
72 | * 5 - 8 byte uuid | ||
73 | * 6 - 16 byte uuid | ||
74 | * 7 - 8 byte inode number and 16 byte uuid | ||
75 | * | ||
76 | * The fileid_type identified how the file within the filesystem is encoded. | ||
77 | * This is (will be) passed to, and set by, the underlying filesystem if it supports | ||
78 | * filehandle operations. The filesystem must not use the value '0' or '0xff' and may | ||
79 | * only use the values 1 and 2 as defined below: | ||
80 | * Current values: | ||
81 | * 0 - The root, or export point, of the filesystem. fb_fileid is 0 bytes. | ||
82 | * 1 - 32bit inode number, 32 bit generation number. | ||
83 | * 2 - 32bit inode number, 32 bit generation number, 32 bit parent directory inode number. | ||
84 | * | ||
85 | */ | ||
86 | struct nfs_fhbase_new { | ||
87 | __u8 fb_version; /* == 1, even => nfs_fhbase_old */ | ||
88 | __u8 fb_auth_type; | ||
89 | __u8 fb_fsid_type; | ||
90 | __u8 fb_fileid_type; | ||
91 | __u32 fb_auth[1]; | ||
92 | /* __u32 fb_fsid[0]; floating */ | ||
93 | /* __u32 fb_fileid[0]; floating */ | ||
94 | }; | ||
95 | |||
96 | struct knfsd_fh { | ||
97 | unsigned int fh_size; /* significant for NFSv3. | ||
98 | * Points to the current size while building | ||
99 | * a new file handle | ||
100 | */ | ||
101 | union { | ||
102 | struct nfs_fhbase_old fh_old; | ||
103 | __u32 fh_pad[NFS4_FHSIZE/4]; | ||
104 | struct nfs_fhbase_new fh_new; | ||
105 | } fh_base; | ||
106 | }; | ||
107 | |||
108 | #define ofh_dcookie fh_base.fh_old.fb_dcookie | ||
109 | #define ofh_ino fh_base.fh_old.fb_ino | ||
110 | #define ofh_dirino fh_base.fh_old.fb_dirino | ||
111 | #define ofh_dev fh_base.fh_old.fb_dev | ||
112 | #define ofh_xdev fh_base.fh_old.fb_xdev | ||
113 | #define ofh_xino fh_base.fh_old.fb_xino | ||
114 | #define ofh_generation fh_base.fh_old.fb_generation | ||
115 | |||
116 | #define fh_version fh_base.fh_new.fb_version | ||
117 | #define fh_fsid_type fh_base.fh_new.fb_fsid_type | ||
118 | #define fh_auth_type fh_base.fh_new.fb_auth_type | ||
119 | #define fh_fileid_type fh_base.fh_new.fb_fileid_type | ||
120 | #define fh_auth fh_base.fh_new.fb_auth | ||
121 | #define fh_fsid fh_base.fh_new.fb_auth | ||
122 | |||
123 | #ifdef __KERNEL__ | ||
124 | 18 | ||
125 | static inline __u32 ino_t_to_u32(ino_t ino) | 19 | static inline __u32 ino_t_to_u32(ino_t ino) |
126 | { | 20 | { |
@@ -166,7 +60,4 @@ typedef struct svc_fh { | |||
166 | 60 | ||
167 | } svc_fh; | 61 | } svc_fh; |
168 | 62 | ||
169 | #endif /* __KERNEL__ */ | ||
170 | |||
171 | |||
172 | #endif /* _LINUX_NFSD_FH_H */ | 63 | #endif /* _LINUX_NFSD_FH_H */ |
diff --git a/include/linux/nfsd/stats.h b/include/linux/nfsd/stats.h index 2693ef647df6..e75b2544ff12 100644 --- a/include/linux/nfsd/stats.h +++ b/include/linux/nfsd/stats.h | |||
@@ -5,16 +5,11 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> | 6 | * Copyright (C) 1995, 1996 Olaf Kirch <okir@monad.swb.de> |
7 | */ | 7 | */ |
8 | |||
9 | #ifndef LINUX_NFSD_STATS_H | 8 | #ifndef LINUX_NFSD_STATS_H |
10 | #define LINUX_NFSD_STATS_H | 9 | #define LINUX_NFSD_STATS_H |
11 | 10 | ||
12 | #include <linux/nfs4.h> | 11 | #include <uapi/linux/nfsd/stats.h> |
13 | |||
14 | /* thread usage wraps very million seconds (approx one fortnight) */ | ||
15 | #define NFSD_USAGE_WRAP (HZ*1000000) | ||
16 | 12 | ||
17 | #ifdef __KERNEL__ | ||
18 | 13 | ||
19 | struct nfsd_stats { | 14 | struct nfsd_stats { |
20 | unsigned int rchits; /* repcache hits */ | 15 | unsigned int rchits; /* repcache hits */ |
@@ -47,5 +42,4 @@ extern struct svc_stat nfsd_svcstats; | |||
47 | void nfsd_stat_init(void); | 42 | void nfsd_stat_init(void); |
48 | void nfsd_stat_shutdown(void); | 43 | void nfsd_stat_shutdown(void); |
49 | 44 | ||
50 | #endif /* __KERNEL__ */ | ||
51 | #endif /* LINUX_NFSD_STATS_H */ | 45 | #endif /* LINUX_NFSD_STATS_H */ |
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h index 6ef49b803efb..8163107b94b4 100644 --- a/include/linux/of_mdio.h +++ b/include/linux/of_mdio.h | |||
@@ -26,32 +26,32 @@ extern struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, | |||
26 | extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); | 26 | extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np); |
27 | 27 | ||
28 | #else /* CONFIG_OF */ | 28 | #else /* CONFIG_OF */ |
29 | int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) | 29 | static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) |
30 | { | 30 | { |
31 | return -ENOSYS; | 31 | return -ENOSYS; |
32 | } | 32 | } |
33 | 33 | ||
34 | struct phy_device *of_phy_find_device(struct device_node *phy_np) | 34 | static inline struct phy_device *of_phy_find_device(struct device_node *phy_np) |
35 | { | 35 | { |
36 | return NULL; | 36 | return NULL; |
37 | } | 37 | } |
38 | 38 | ||
39 | struct phy_device *of_phy_connect(struct net_device *dev, | 39 | static inline struct phy_device *of_phy_connect(struct net_device *dev, |
40 | struct device_node *phy_np, | 40 | struct device_node *phy_np, |
41 | void (*hndlr)(struct net_device *), | 41 | void (*hndlr)(struct net_device *), |
42 | u32 flags, phy_interface_t iface) | 42 | u32 flags, phy_interface_t iface) |
43 | { | 43 | { |
44 | return NULL; | 44 | return NULL; |
45 | } | 45 | } |
46 | 46 | ||
47 | struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, | 47 | static inline struct phy_device *of_phy_connect_fixed_link(struct net_device *dev, |
48 | void (*hndlr)(struct net_device *), | 48 | void (*hndlr)(struct net_device *), |
49 | phy_interface_t iface) | 49 | phy_interface_t iface) |
50 | { | 50 | { |
51 | return NULL; | 51 | return NULL; |
52 | } | 52 | } |
53 | 53 | ||
54 | struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) | 54 | static inline struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np) |
55 | { | 55 | { |
56 | return NULL; | 56 | return NULL; |
57 | } | 57 | } |
diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h index 599afc4bb67e..b4166cdfa7a2 100644 --- a/include/linux/perf_event.h +++ b/include/linux/perf_event.h | |||
@@ -1110,7 +1110,7 @@ struct perf_cpu_context { | |||
1110 | int exclusive; | 1110 | int exclusive; |
1111 | struct list_head rotation_list; | 1111 | struct list_head rotation_list; |
1112 | int jiffies_interval; | 1112 | int jiffies_interval; |
1113 | struct pmu *active_pmu; | 1113 | struct pmu *unique_pmu; |
1114 | struct perf_cgroup *cgrp; | 1114 | struct perf_cgroup *cgrp; |
1115 | }; | 1115 | }; |
1116 | 1116 | ||
diff --git a/include/linux/platform_data/exynos4_tmu.h b/include/linux/platform_data/exynos_thermal.h index 39e038cca590..a7bdb2f63b73 100644 --- a/include/linux/platform_data/exynos4_tmu.h +++ b/include/linux/platform_data/exynos_thermal.h | |||
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | * exynos4_tmu.h - Samsung EXYNOS4 TMU (Thermal Management Unit) | 2 | * exynos_thermal.h - Samsung EXYNOS TMU (Thermal Management Unit) |
3 | * | 3 | * |
4 | * Copyright (C) 2011 Samsung Electronics | 4 | * Copyright (C) 2011 Samsung Electronics |
5 | * Donggeun Kim <dg77.kim@samsung.com> | 5 | * Donggeun Kim <dg77.kim@samsung.com> |
@@ -19,8 +19,9 @@ | |||
19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | 19 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
20 | */ | 20 | */ |
21 | 21 | ||
22 | #ifndef _LINUX_EXYNOS4_TMU_H | 22 | #ifndef _LINUX_EXYNOS_THERMAL_H |
23 | #define _LINUX_EXYNOS4_TMU_H | 23 | #define _LINUX_EXYNOS_THERMAL_H |
24 | #include <linux/cpu_cooling.h> | ||
24 | 25 | ||
25 | enum calibration_type { | 26 | enum calibration_type { |
26 | TYPE_ONE_POINT_TRIMMING, | 27 | TYPE_ONE_POINT_TRIMMING, |
@@ -28,8 +29,28 @@ enum calibration_type { | |||
28 | TYPE_NONE, | 29 | TYPE_NONE, |
29 | }; | 30 | }; |
30 | 31 | ||
32 | enum soc_type { | ||
33 | SOC_ARCH_EXYNOS4210 = 1, | ||
34 | SOC_ARCH_EXYNOS, | ||
35 | }; | ||
36 | /** | ||
37 | * struct freq_clip_table | ||
38 | * @freq_clip_max: maximum frequency allowed for this cooling state. | ||
39 | * @temp_level: Temperature level at which the temperature clipping will | ||
40 | * happen. | ||
41 | * @mask_val: cpumask of the allowed cpu's where the clipping will take place. | ||
42 | * | ||
43 | * This structure is required to be filled and passed to the | ||
44 | * cpufreq_cooling_unregister function. | ||
45 | */ | ||
46 | struct freq_clip_table { | ||
47 | unsigned int freq_clip_max; | ||
48 | unsigned int temp_level; | ||
49 | const struct cpumask *mask_val; | ||
50 | }; | ||
51 | |||
31 | /** | 52 | /** |
32 | * struct exynos4_tmu_platform_data | 53 | * struct exynos_tmu_platform_data |
33 | * @threshold: basic temperature for generating interrupt | 54 | * @threshold: basic temperature for generating interrupt |
34 | * 25 <= threshold <= 125 [unit: degree Celsius] | 55 | * 25 <= threshold <= 125 [unit: degree Celsius] |
35 | * @trigger_levels: array for each interrupt levels | 56 | * @trigger_levels: array for each interrupt levels |
@@ -63,11 +84,18 @@ enum calibration_type { | |||
63 | * @reference_voltage: reference voltage of amplifier | 84 | * @reference_voltage: reference voltage of amplifier |
64 | * in the positive-TC generator block | 85 | * in the positive-TC generator block |
65 | * 0 <= reference_voltage <= 31 | 86 | * 0 <= reference_voltage <= 31 |
87 | * @noise_cancel_mode: noise cancellation mode | ||
88 | * 000, 100, 101, 110 and 111 can be different modes | ||
89 | * @type: determines the type of SOC | ||
90 | * @efuse_value: platform defined fuse value | ||
66 | * @cal_type: calibration type for temperature | 91 | * @cal_type: calibration type for temperature |
92 | * @freq_clip_table: Table representing frequency reduction percentage. | ||
93 | * @freq_tab_count: Count of the above table as frequency reduction may | ||
94 | * applicable to only some of the trigger levels. | ||
67 | * | 95 | * |
68 | * This structure is required for configuration of exynos4_tmu driver. | 96 | * This structure is required for configuration of exynos_tmu driver. |
69 | */ | 97 | */ |
70 | struct exynos4_tmu_platform_data { | 98 | struct exynos_tmu_platform_data { |
71 | u8 threshold; | 99 | u8 threshold; |
72 | u8 trigger_levels[4]; | 100 | u8 trigger_levels[4]; |
73 | bool trigger_level0_en; | 101 | bool trigger_level0_en; |
@@ -77,7 +105,12 @@ struct exynos4_tmu_platform_data { | |||
77 | 105 | ||
78 | u8 gain; | 106 | u8 gain; |
79 | u8 reference_voltage; | 107 | u8 reference_voltage; |
108 | u8 noise_cancel_mode; | ||
109 | u32 efuse_value; | ||
80 | 110 | ||
81 | enum calibration_type cal_type; | 111 | enum calibration_type cal_type; |
112 | enum soc_type type; | ||
113 | struct freq_clip_table freq_tab[4]; | ||
114 | unsigned int freq_tab_count; | ||
82 | }; | 115 | }; |
83 | #endif /* _LINUX_EXYNOS4_TMU_H */ | 116 | #endif /* _LINUX_EXYNOS_THERMAL_H */ |
diff --git a/include/linux/platform_data/mipi-csis.h b/include/linux/platform_data/mipi-csis.h index c45b1e8d4c2e..bf34e17cee7f 100644 --- a/include/linux/platform_data/mipi-csis.h +++ b/include/linux/platform_data/mipi-csis.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2010-2011 Samsung Electronics Co., Ltd. | 2 | * Copyright (C) 2010 - 2012 Samsung Electronics Co., Ltd. |
3 | * | 3 | * |
4 | * S5P series MIPI CSI slave device support | 4 | * Samsung S5P/Exynos SoC series MIPI CSIS device support |
5 | * | 5 | * |
6 | * This program is free software; you can redistribute it and/or modify | 6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as | 7 | * it under the terms of the GNU General Public License version 2 as |
@@ -11,33 +11,27 @@ | |||
11 | #ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_ | 11 | #ifndef __PLAT_SAMSUNG_MIPI_CSIS_H_ |
12 | #define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__ | 12 | #define __PLAT_SAMSUNG_MIPI_CSIS_H_ __FILE__ |
13 | 13 | ||
14 | struct platform_device; | ||
15 | |||
16 | /** | 14 | /** |
17 | * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver | 15 | * struct s5p_platform_mipi_csis - platform data for S5P MIPI-CSIS driver |
18 | * @clk_rate: bus clock frequency | 16 | * @clk_rate: bus clock frequency |
19 | * @lanes: number of data lanes used | 17 | * @wclk_source: CSI wrapper clock selection: 0 - bus clock, 1 - ext. SCLK_CAM |
20 | * @alignment: data alignment in bits | 18 | * @lanes: number of data lanes used |
21 | * @hs_settle: HS-RX settle time | 19 | * @hs_settle: HS-RX settle time |
22 | * @fixed_phy_vdd: false to enable external D-PHY regulator management in the | ||
23 | * driver or true in case this regulator has no enable function | ||
24 | * @phy_enable: pointer to a callback controlling D-PHY enable/reset | ||
25 | */ | 20 | */ |
26 | struct s5p_platform_mipi_csis { | 21 | struct s5p_platform_mipi_csis { |
27 | unsigned long clk_rate; | 22 | unsigned long clk_rate; |
23 | u8 wclk_source; | ||
28 | u8 lanes; | 24 | u8 lanes; |
29 | u8 alignment; | ||
30 | u8 hs_settle; | 25 | u8 hs_settle; |
31 | bool fixed_phy_vdd; | ||
32 | int (*phy_enable)(struct platform_device *pdev, bool on); | ||
33 | }; | 26 | }; |
34 | 27 | ||
35 | /** | 28 | /** |
36 | * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control | 29 | * s5p_csis_phy_enable - global MIPI-CSI receiver D-PHY control |
37 | * @pdev: MIPI-CSIS platform device | 30 | * @id: MIPI-CSIS harware instance index (0...1) |
38 | * @on: true to enable D-PHY and deassert its reset | 31 | * @on: true to enable D-PHY and deassert its reset |
39 | * false to disable D-PHY | 32 | * false to disable D-PHY |
33 | * @return: 0 on success, or negative error code on failure | ||
40 | */ | 34 | */ |
41 | int s5p_csis_phy_enable(struct platform_device *pdev, bool on); | 35 | int s5p_csis_phy_enable(int id, bool on); |
42 | 36 | ||
43 | #endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */ | 37 | #endif /* __PLAT_SAMSUNG_MIPI_CSIS_H_ */ |
diff --git a/include/linux/security.h b/include/linux/security.h index 5b50c4e1a7c2..05e88bdcf7d9 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -1411,8 +1411,8 @@ struct security_operations { | |||
1411 | int (*sb_kern_mount) (struct super_block *sb, int flags, void *data); | 1411 | int (*sb_kern_mount) (struct super_block *sb, int flags, void *data); |
1412 | int (*sb_show_options) (struct seq_file *m, struct super_block *sb); | 1412 | int (*sb_show_options) (struct seq_file *m, struct super_block *sb); |
1413 | int (*sb_statfs) (struct dentry *dentry); | 1413 | int (*sb_statfs) (struct dentry *dentry); |
1414 | int (*sb_mount) (char *dev_name, struct path *path, | 1414 | int (*sb_mount) (const char *dev_name, struct path *path, |
1415 | char *type, unsigned long flags, void *data); | 1415 | const char *type, unsigned long flags, void *data); |
1416 | int (*sb_umount) (struct vfsmount *mnt, int flags); | 1416 | int (*sb_umount) (struct vfsmount *mnt, int flags); |
1417 | int (*sb_pivotroot) (struct path *old_path, | 1417 | int (*sb_pivotroot) (struct path *old_path, |
1418 | struct path *new_path); | 1418 | struct path *new_path); |
@@ -1694,8 +1694,8 @@ int security_sb_remount(struct super_block *sb, void *data); | |||
1694 | int security_sb_kern_mount(struct super_block *sb, int flags, void *data); | 1694 | int security_sb_kern_mount(struct super_block *sb, int flags, void *data); |
1695 | int security_sb_show_options(struct seq_file *m, struct super_block *sb); | 1695 | int security_sb_show_options(struct seq_file *m, struct super_block *sb); |
1696 | int security_sb_statfs(struct dentry *dentry); | 1696 | int security_sb_statfs(struct dentry *dentry); |
1697 | int security_sb_mount(char *dev_name, struct path *path, | 1697 | int security_sb_mount(const char *dev_name, struct path *path, |
1698 | char *type, unsigned long flags, void *data); | 1698 | const char *type, unsigned long flags, void *data); |
1699 | int security_sb_umount(struct vfsmount *mnt, int flags); | 1699 | int security_sb_umount(struct vfsmount *mnt, int flags); |
1700 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); | 1700 | int security_sb_pivotroot(struct path *old_path, struct path *new_path); |
1701 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); | 1701 | int security_sb_set_mnt_opts(struct super_block *sb, struct security_mnt_opts *opts); |
@@ -1964,8 +1964,8 @@ static inline int security_sb_statfs(struct dentry *dentry) | |||
1964 | return 0; | 1964 | return 0; |
1965 | } | 1965 | } |
1966 | 1966 | ||
1967 | static inline int security_sb_mount(char *dev_name, struct path *path, | 1967 | static inline int security_sb_mount(const char *dev_name, struct path *path, |
1968 | char *type, unsigned long flags, | 1968 | const char *type, unsigned long flags, |
1969 | void *data) | 1969 | void *data) |
1970 | { | 1970 | { |
1971 | return 0; | 1971 | return 0; |
diff --git a/include/linux/sunrpc/Kbuild b/include/linux/sunrpc/Kbuild index 98df21164a86..e69de29bb2d1 100644 --- a/include/linux/sunrpc/Kbuild +++ b/include/linux/sunrpc/Kbuild | |||
@@ -1 +0,0 @@ | |||
1 | header-y += debug.h | ||
diff --git a/include/linux/sunrpc/debug.h b/include/linux/sunrpc/debug.h index a76cc20d98ce..9385bd74c860 100644 --- a/include/linux/sunrpc/debug.h +++ b/include/linux/sunrpc/debug.h | |||
@@ -5,28 +5,11 @@ | |||
5 | * | 5 | * |
6 | * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> | 6 | * Copyright (C) 1996, Olaf Kirch <okir@monad.swb.de> |
7 | */ | 7 | */ |
8 | |||
9 | #ifndef _LINUX_SUNRPC_DEBUG_H_ | 8 | #ifndef _LINUX_SUNRPC_DEBUG_H_ |
10 | #define _LINUX_SUNRPC_DEBUG_H_ | 9 | #define _LINUX_SUNRPC_DEBUG_H_ |
11 | 10 | ||
12 | /* | 11 | #include <uapi/linux/sunrpc/debug.h> |
13 | * RPC debug facilities | ||
14 | */ | ||
15 | #define RPCDBG_XPRT 0x0001 | ||
16 | #define RPCDBG_CALL 0x0002 | ||
17 | #define RPCDBG_DEBUG 0x0004 | ||
18 | #define RPCDBG_NFS 0x0008 | ||
19 | #define RPCDBG_AUTH 0x0010 | ||
20 | #define RPCDBG_BIND 0x0020 | ||
21 | #define RPCDBG_SCHED 0x0040 | ||
22 | #define RPCDBG_TRANS 0x0080 | ||
23 | #define RPCDBG_SVCXPRT 0x0100 | ||
24 | #define RPCDBG_SVCDSP 0x0200 | ||
25 | #define RPCDBG_MISC 0x0400 | ||
26 | #define RPCDBG_CACHE 0x0800 | ||
27 | #define RPCDBG_ALL 0x7fff | ||
28 | 12 | ||
29 | #ifdef __KERNEL__ | ||
30 | 13 | ||
31 | /* | 14 | /* |
32 | * Enable RPC debugging/profiling. | 15 | * Enable RPC debugging/profiling. |
@@ -87,24 +70,4 @@ void rpc_register_sysctl(void); | |||
87 | void rpc_unregister_sysctl(void); | 70 | void rpc_unregister_sysctl(void); |
88 | #endif | 71 | #endif |
89 | 72 | ||
90 | #endif /* __KERNEL__ */ | ||
91 | |||
92 | /* | ||
93 | * Declarations for the sysctl debug interface, which allows to read or | ||
94 | * change the debug flags for rpc, nfs, nfsd, and lockd. Since the sunrpc | ||
95 | * module currently registers its sysctl table dynamically, the sysctl path | ||
96 | * for module FOO is <CTL_SUNRPC, CTL_FOODEBUG>. | ||
97 | */ | ||
98 | |||
99 | enum { | ||
100 | CTL_RPCDEBUG = 1, | ||
101 | CTL_NFSDEBUG, | ||
102 | CTL_NFSDDEBUG, | ||
103 | CTL_NLMDEBUG, | ||
104 | CTL_SLOTTABLE_UDP, | ||
105 | CTL_SLOTTABLE_TCP, | ||
106 | CTL_MIN_RESVPORT, | ||
107 | CTL_MAX_RESVPORT, | ||
108 | }; | ||
109 | |||
110 | #endif /* _LINUX_SUNRPC_DEBUG_H_ */ | 73 | #endif /* _LINUX_SUNRPC_DEBUG_H_ */ |
diff --git a/include/linux/sunrpc/svc_xprt.h b/include/linux/sunrpc/svc_xprt.h index b3f64b12f141..b05963f09ebf 100644 --- a/include/linux/sunrpc/svc_xprt.h +++ b/include/linux/sunrpc/svc_xprt.h | |||
@@ -114,7 +114,6 @@ void svc_xprt_init(struct net *, struct svc_xprt_class *, struct svc_xprt *, | |||
114 | int svc_create_xprt(struct svc_serv *, const char *, struct net *, | 114 | int svc_create_xprt(struct svc_serv *, const char *, struct net *, |
115 | const int, const unsigned short, int); | 115 | const int, const unsigned short, int); |
116 | void svc_xprt_enqueue(struct svc_xprt *xprt); | 116 | void svc_xprt_enqueue(struct svc_xprt *xprt); |
117 | void svc_xprt_received(struct svc_xprt *); | ||
118 | void svc_xprt_put(struct svc_xprt *xprt); | 117 | void svc_xprt_put(struct svc_xprt *xprt); |
119 | void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt); | 118 | void svc_xprt_copy_addrs(struct svc_rqst *rqstp, struct svc_xprt *xprt); |
120 | void svc_close_xprt(struct svc_xprt *xprt); | 119 | void svc_close_xprt(struct svc_xprt *xprt); |
@@ -124,6 +123,7 @@ struct svc_xprt *svc_find_xprt(struct svc_serv *serv, const char *xcl_name, | |||
124 | struct net *net, const sa_family_t af, | 123 | struct net *net, const sa_family_t af, |
125 | const unsigned short port); | 124 | const unsigned short port); |
126 | int svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen); | 125 | int svc_xprt_names(struct svc_serv *serv, char *buf, const int buflen); |
126 | void svc_add_new_perm_xprt(struct svc_serv *serv, struct svc_xprt *xprt); | ||
127 | 127 | ||
128 | static inline void svc_xprt_get(struct svc_xprt *xprt) | 128 | static inline void svc_xprt_get(struct svc_xprt *xprt) |
129 | { | 129 | { |
@@ -166,8 +166,7 @@ static inline size_t svc_addr_len(const struct sockaddr *sa) | |||
166 | case AF_INET6: | 166 | case AF_INET6: |
167 | return sizeof(struct sockaddr_in6); | 167 | return sizeof(struct sockaddr_in6); |
168 | } | 168 | } |
169 | 169 | BUG(); | |
170 | return 0; | ||
171 | } | 170 | } |
172 | 171 | ||
173 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) | 172 | static inline unsigned short svc_xprt_local_port(const struct svc_xprt *xprt) |
diff --git a/include/linux/sunrpc/svcsock.h b/include/linux/sunrpc/svcsock.h index cb4ac69e1f33..92ad02f0dcc0 100644 --- a/include/linux/sunrpc/svcsock.h +++ b/include/linux/sunrpc/svcsock.h | |||
@@ -39,9 +39,6 @@ int svc_recv(struct svc_rqst *, long); | |||
39 | int svc_send(struct svc_rqst *); | 39 | int svc_send(struct svc_rqst *); |
40 | void svc_drop(struct svc_rqst *); | 40 | void svc_drop(struct svc_rqst *); |
41 | void svc_sock_update_bufs(struct svc_serv *serv); | 41 | void svc_sock_update_bufs(struct svc_serv *serv); |
42 | int svc_sock_names(struct svc_serv *serv, char *buf, | ||
43 | const size_t buflen, | ||
44 | const char *toclose); | ||
45 | int svc_addsock(struct svc_serv *serv, const int fd, | 42 | int svc_addsock(struct svc_serv *serv, const int fd, |
46 | char *name_return, const size_t len); | 43 | char *name_return, const size_t len); |
47 | void svc_init_xprt_sock(void); | 44 | void svc_init_xprt_sock(void); |
diff --git a/include/linux/syscalls.h b/include/linux/syscalls.h index 19439c75c5b2..727f0cd73921 100644 --- a/include/linux/syscalls.h +++ b/include/linux/syscalls.h | |||
@@ -827,7 +827,15 @@ asmlinkage long sys_fanotify_mark(int fanotify_fd, unsigned int flags, | |||
827 | const char __user *pathname); | 827 | const char __user *pathname); |
828 | asmlinkage long sys_syncfs(int fd); | 828 | asmlinkage long sys_syncfs(int fd); |
829 | 829 | ||
830 | #ifndef CONFIG_GENERIC_KERNEL_EXECVE | ||
830 | int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]); | 831 | int kernel_execve(const char *filename, const char *const argv[], const char *const envp[]); |
832 | #else | ||
833 | #define kernel_execve(filename, argv, envp) \ | ||
834 | do_execve(filename, \ | ||
835 | (const char __user *const __user *)argv, \ | ||
836 | (const char __user *const __user *)envp, \ | ||
837 | current_pt_regs()) | ||
838 | #endif | ||
831 | 839 | ||
832 | 840 | ||
833 | asmlinkage long sys_perf_event_open( | 841 | asmlinkage long sys_perf_event_open( |
diff --git a/include/linux/thermal.h b/include/linux/thermal.h index 4b94a61955df..91b34812cd84 100644 --- a/include/linux/thermal.h +++ b/include/linux/thermal.h | |||
@@ -44,6 +44,12 @@ enum thermal_trip_type { | |||
44 | THERMAL_TRIP_CRITICAL, | 44 | THERMAL_TRIP_CRITICAL, |
45 | }; | 45 | }; |
46 | 46 | ||
47 | enum thermal_trend { | ||
48 | THERMAL_TREND_STABLE, /* temperature is stable */ | ||
49 | THERMAL_TREND_RAISING, /* temperature is raising */ | ||
50 | THERMAL_TREND_DROPPING, /* temperature is dropping */ | ||
51 | }; | ||
52 | |||
47 | struct thermal_zone_device_ops { | 53 | struct thermal_zone_device_ops { |
48 | int (*bind) (struct thermal_zone_device *, | 54 | int (*bind) (struct thermal_zone_device *, |
49 | struct thermal_cooling_device *); | 55 | struct thermal_cooling_device *); |
@@ -65,6 +71,8 @@ struct thermal_zone_device_ops { | |||
65 | int (*set_trip_hyst) (struct thermal_zone_device *, int, | 71 | int (*set_trip_hyst) (struct thermal_zone_device *, int, |
66 | unsigned long); | 72 | unsigned long); |
67 | int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); | 73 | int (*get_crit_temp) (struct thermal_zone_device *, unsigned long *); |
74 | int (*get_trend) (struct thermal_zone_device *, int, | ||
75 | enum thermal_trend *); | ||
68 | int (*notify) (struct thermal_zone_device *, int, | 76 | int (*notify) (struct thermal_zone_device *, int, |
69 | enum thermal_trip_type); | 77 | enum thermal_trip_type); |
70 | }; | 78 | }; |
@@ -75,6 +83,8 @@ struct thermal_cooling_device_ops { | |||
75 | int (*set_cur_state) (struct thermal_cooling_device *, unsigned long); | 83 | int (*set_cur_state) (struct thermal_cooling_device *, unsigned long); |
76 | }; | 84 | }; |
77 | 85 | ||
86 | #define THERMAL_NO_LIMIT -1UL /* no upper/lower limit requirement */ | ||
87 | |||
78 | #define THERMAL_TRIPS_NONE -1 | 88 | #define THERMAL_TRIPS_NONE -1 |
79 | #define THERMAL_MAX_TRIPS 12 | 89 | #define THERMAL_MAX_TRIPS 12 |
80 | #define THERMAL_NAME_LENGTH 20 | 90 | #define THERMAL_NAME_LENGTH 20 |
@@ -84,6 +94,9 @@ struct thermal_cooling_device { | |||
84 | struct device device; | 94 | struct device device; |
85 | void *devdata; | 95 | void *devdata; |
86 | const struct thermal_cooling_device_ops *ops; | 96 | const struct thermal_cooling_device_ops *ops; |
97 | bool updated; /* true if the cooling device does not need update */ | ||
98 | struct mutex lock; /* protect thermal_instances list */ | ||
99 | struct list_head thermal_instances; | ||
87 | struct list_head node; | 100 | struct list_head node; |
88 | }; | 101 | }; |
89 | 102 | ||
@@ -105,17 +118,16 @@ struct thermal_zone_device { | |||
105 | struct thermal_attr *trip_hyst_attrs; | 118 | struct thermal_attr *trip_hyst_attrs; |
106 | void *devdata; | 119 | void *devdata; |
107 | int trips; | 120 | int trips; |
108 | int tc1; | ||
109 | int tc2; | ||
110 | int passive_delay; | 121 | int passive_delay; |
111 | int polling_delay; | 122 | int polling_delay; |
123 | int temperature; | ||
112 | int last_temperature; | 124 | int last_temperature; |
113 | bool passive; | 125 | int passive; |
114 | unsigned int forced_passive; | 126 | unsigned int forced_passive; |
115 | const struct thermal_zone_device_ops *ops; | 127 | const struct thermal_zone_device_ops *ops; |
116 | struct list_head cooling_devices; | 128 | struct list_head thermal_instances; |
117 | struct idr idr; | 129 | struct idr idr; |
118 | struct mutex lock; /* protect cooling devices list */ | 130 | struct mutex lock; /* protect thermal_instances list */ |
119 | struct list_head node; | 131 | struct list_head node; |
120 | struct delayed_work poll_queue; | 132 | struct delayed_work poll_queue; |
121 | }; | 133 | }; |
@@ -152,12 +164,12 @@ enum { | |||
152 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) | 164 | #define THERMAL_GENL_CMD_MAX (__THERMAL_GENL_CMD_MAX - 1) |
153 | 165 | ||
154 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, | 166 | struct thermal_zone_device *thermal_zone_device_register(const char *, int, int, |
155 | void *, const struct thermal_zone_device_ops *, int tc1, | 167 | void *, const struct thermal_zone_device_ops *, int, int); |
156 | int tc2, int passive_freq, int polling_freq); | ||
157 | void thermal_zone_device_unregister(struct thermal_zone_device *); | 168 | void thermal_zone_device_unregister(struct thermal_zone_device *); |
158 | 169 | ||
159 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, | 170 | int thermal_zone_bind_cooling_device(struct thermal_zone_device *, int, |
160 | struct thermal_cooling_device *); | 171 | struct thermal_cooling_device *, |
172 | unsigned long, unsigned long); | ||
161 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, | 173 | int thermal_zone_unbind_cooling_device(struct thermal_zone_device *, int, |
162 | struct thermal_cooling_device *); | 174 | struct thermal_cooling_device *); |
163 | void thermal_zone_device_update(struct thermal_zone_device *); | 175 | void thermal_zone_device_update(struct thermal_zone_device *); |
diff --git a/include/linux/timekeeper_internal.h b/include/linux/timekeeper_internal.h new file mode 100644 index 000000000000..e1d558e237ec --- /dev/null +++ b/include/linux/timekeeper_internal.h | |||
@@ -0,0 +1,108 @@ | |||
1 | /* | ||
2 | * You SHOULD NOT be including this unless you're vsyscall | ||
3 | * handling code or timekeeping internal code! | ||
4 | */ | ||
5 | |||
6 | #ifndef _LINUX_TIMEKEEPER_INTERNAL_H | ||
7 | #define _LINUX_TIMEKEEPER_INTERNAL_H | ||
8 | |||
9 | #include <linux/clocksource.h> | ||
10 | #include <linux/jiffies.h> | ||
11 | #include <linux/time.h> | ||
12 | |||
13 | /* Structure holding internal timekeeping values. */ | ||
14 | struct timekeeper { | ||
15 | /* Current clocksource used for timekeeping. */ | ||
16 | struct clocksource *clock; | ||
17 | /* NTP adjusted clock multiplier */ | ||
18 | u32 mult; | ||
19 | /* The shift value of the current clocksource. */ | ||
20 | u32 shift; | ||
21 | /* Number of clock cycles in one NTP interval. */ | ||
22 | cycle_t cycle_interval; | ||
23 | /* Number of clock shifted nano seconds in one NTP interval. */ | ||
24 | u64 xtime_interval; | ||
25 | /* shifted nano seconds left over when rounding cycle_interval */ | ||
26 | s64 xtime_remainder; | ||
27 | /* Raw nano seconds accumulated per NTP interval. */ | ||
28 | u32 raw_interval; | ||
29 | |||
30 | /* Current CLOCK_REALTIME time in seconds */ | ||
31 | u64 xtime_sec; | ||
32 | /* Clock shifted nano seconds */ | ||
33 | u64 xtime_nsec; | ||
34 | |||
35 | /* Difference between accumulated time and NTP time in ntp | ||
36 | * shifted nano seconds. */ | ||
37 | s64 ntp_error; | ||
38 | /* Shift conversion between clock shifted nano seconds and | ||
39 | * ntp shifted nano seconds. */ | ||
40 | u32 ntp_error_shift; | ||
41 | |||
42 | /* | ||
43 | * wall_to_monotonic is what we need to add to xtime (or xtime corrected | ||
44 | * for sub jiffie times) to get to monotonic time. Monotonic is pegged | ||
45 | * at zero at system boot time, so wall_to_monotonic will be negative, | ||
46 | * however, we will ALWAYS keep the tv_nsec part positive so we can use | ||
47 | * the usual normalization. | ||
48 | * | ||
49 | * wall_to_monotonic is moved after resume from suspend for the | ||
50 | * monotonic time not to jump. We need to add total_sleep_time to | ||
51 | * wall_to_monotonic to get the real boot based time offset. | ||
52 | * | ||
53 | * - wall_to_monotonic is no longer the boot time, getboottime must be | ||
54 | * used instead. | ||
55 | */ | ||
56 | struct timespec wall_to_monotonic; | ||
57 | /* Offset clock monotonic -> clock realtime */ | ||
58 | ktime_t offs_real; | ||
59 | /* time spent in suspend */ | ||
60 | struct timespec total_sleep_time; | ||
61 | /* Offset clock monotonic -> clock boottime */ | ||
62 | ktime_t offs_boot; | ||
63 | /* The raw monotonic time for the CLOCK_MONOTONIC_RAW posix clock. */ | ||
64 | struct timespec raw_time; | ||
65 | /* Seqlock for all timekeeper values */ | ||
66 | seqlock_t lock; | ||
67 | }; | ||
68 | |||
69 | static inline struct timespec tk_xtime(struct timekeeper *tk) | ||
70 | { | ||
71 | struct timespec ts; | ||
72 | |||
73 | ts.tv_sec = tk->xtime_sec; | ||
74 | ts.tv_nsec = (long)(tk->xtime_nsec >> tk->shift); | ||
75 | return ts; | ||
76 | } | ||
77 | |||
78 | |||
79 | #ifdef CONFIG_GENERIC_TIME_VSYSCALL | ||
80 | |||
81 | extern void update_vsyscall(struct timekeeper *tk); | ||
82 | extern void update_vsyscall_tz(void); | ||
83 | |||
84 | #elif defined(CONFIG_GENERIC_TIME_VSYSCALL_OLD) | ||
85 | |||
86 | extern void update_vsyscall_old(struct timespec *ts, struct timespec *wtm, | ||
87 | struct clocksource *c, u32 mult); | ||
88 | extern void update_vsyscall_tz(void); | ||
89 | |||
90 | static inline void update_vsyscall(struct timekeeper *tk) | ||
91 | { | ||
92 | struct timespec xt; | ||
93 | |||
94 | xt = tk_xtime(tk); | ||
95 | update_vsyscall_old(&xt, &tk->wall_to_monotonic, tk->clock, tk->mult); | ||
96 | } | ||
97 | |||
98 | #else | ||
99 | |||
100 | static inline void update_vsyscall(struct timekeeper *tk) | ||
101 | { | ||
102 | } | ||
103 | static inline void update_vsyscall_tz(void) | ||
104 | { | ||
105 | } | ||
106 | #endif | ||
107 | |||
108 | #endif /* _LINUX_TIMEKEEPER_INTERNAL_H */ | ||
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index f87cf622317f..ddbbb7de894b 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -68,6 +68,7 @@ struct usbnet { | |||
68 | # define EVENT_RX_PAUSED 5 | 68 | # define EVENT_RX_PAUSED 5 |
69 | # define EVENT_DEV_ASLEEP 6 | 69 | # define EVENT_DEV_ASLEEP 6 |
70 | # define EVENT_DEV_OPEN 7 | 70 | # define EVENT_DEV_OPEN 7 |
71 | # define EVENT_DEVICE_REPORT_IDLE 8 | ||
71 | }; | 72 | }; |
72 | 73 | ||
73 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 74 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -160,6 +161,7 @@ extern int usbnet_probe(struct usb_interface *, const struct usb_device_id *); | |||
160 | extern int usbnet_suspend(struct usb_interface *, pm_message_t); | 161 | extern int usbnet_suspend(struct usb_interface *, pm_message_t); |
161 | extern int usbnet_resume(struct usb_interface *); | 162 | extern int usbnet_resume(struct usb_interface *); |
162 | extern void usbnet_disconnect(struct usb_interface *); | 163 | extern void usbnet_disconnect(struct usb_interface *); |
164 | extern void usbnet_device_suggests_idle(struct usbnet *dev); | ||
163 | 165 | ||
164 | 166 | ||
165 | /* Drivers that reuse some of the standard USB CDC infrastructure | 167 | /* Drivers that reuse some of the standard USB CDC infrastructure |
diff --git a/include/linux/v4l2-controls.h b/include/linux/v4l2-controls.h index 421d24c7f686..f56c945cecd4 100644 --- a/include/linux/v4l2-controls.h +++ b/include/linux/v4l2-controls.h | |||
@@ -349,6 +349,7 @@ enum v4l2_mpeg_video_multi_slice_mode { | |||
349 | #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) | 349 | #define V4L2_CID_MPEG_VIDEO_VBV_SIZE (V4L2_CID_MPEG_BASE+222) |
350 | #define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) | 350 | #define V4L2_CID_MPEG_VIDEO_DEC_PTS (V4L2_CID_MPEG_BASE+223) |
351 | #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) | 351 | #define V4L2_CID_MPEG_VIDEO_DEC_FRAME (V4L2_CID_MPEG_BASE+224) |
352 | #define V4L2_CID_MPEG_VIDEO_VBV_DELAY (V4L2_CID_MPEG_BASE+225) | ||
352 | 353 | ||
353 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) | 354 | #define V4L2_CID_MPEG_VIDEO_H263_I_FRAME_QP (V4L2_CID_MPEG_BASE+300) |
354 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) | 355 | #define V4L2_CID_MPEG_VIDEO_H263_P_FRAME_QP (V4L2_CID_MPEG_BASE+301) |
@@ -439,6 +440,46 @@ enum v4l2_mpeg_video_h264_vui_sar_idc { | |||
439 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16, | 440 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_2x1 = 16, |
440 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17, | 441 | V4L2_MPEG_VIDEO_H264_VUI_SAR_IDC_EXTENDED = 17, |
441 | }; | 442 | }; |
443 | #define V4L2_CID_MPEG_VIDEO_H264_SEI_FRAME_PACKING (V4L2_CID_MPEG_BASE+368) | ||
444 | #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_CURRENT_FRAME_0 (V4L2_CID_MPEG_BASE+369) | ||
445 | #define V4L2_CID_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE (V4L2_CID_MPEG_BASE+370) | ||
446 | enum v4l2_mpeg_video_h264_sei_fp_arrangement_type { | ||
447 | V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_CHECKERBOARD = 0, | ||
448 | V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_COLUMN = 1, | ||
449 | V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_ROW = 2, | ||
450 | V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_SIDE_BY_SIDE = 3, | ||
451 | V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TOP_BOTTOM = 4, | ||
452 | V4L2_MPEG_VIDEO_H264_SEI_FP_ARRANGEMENT_TYPE_TEMPORAL = 5, | ||
453 | }; | ||
454 | #define V4L2_CID_MPEG_VIDEO_H264_FMO (V4L2_CID_MPEG_BASE+371) | ||
455 | #define V4L2_CID_MPEG_VIDEO_H264_FMO_MAP_TYPE (V4L2_CID_MPEG_BASE+372) | ||
456 | enum v4l2_mpeg_video_h264_fmo_map_type { | ||
457 | V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_INTERLEAVED_SLICES = 0, | ||
458 | V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_SCATTERED_SLICES = 1, | ||
459 | V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_FOREGROUND_WITH_LEFT_OVER = 2, | ||
460 | V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_BOX_OUT = 3, | ||
461 | V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_RASTER_SCAN = 4, | ||
462 | V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_WIPE_SCAN = 5, | ||
463 | V4L2_MPEG_VIDEO_H264_FMO_MAP_TYPE_EXPLICIT = 6, | ||
464 | }; | ||
465 | #define V4L2_CID_MPEG_VIDEO_H264_FMO_SLICE_GROUP (V4L2_CID_MPEG_BASE+373) | ||
466 | #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_DIRECTION (V4L2_CID_MPEG_BASE+374) | ||
467 | enum v4l2_mpeg_video_h264_fmo_change_dir { | ||
468 | V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_RIGHT = 0, | ||
469 | V4L2_MPEG_VIDEO_H264_FMO_CHANGE_DIR_LEFT = 1, | ||
470 | }; | ||
471 | #define V4L2_CID_MPEG_VIDEO_H264_FMO_CHANGE_RATE (V4L2_CID_MPEG_BASE+375) | ||
472 | #define V4L2_CID_MPEG_VIDEO_H264_FMO_RUN_LENGTH (V4L2_CID_MPEG_BASE+376) | ||
473 | #define V4L2_CID_MPEG_VIDEO_H264_ASO (V4L2_CID_MPEG_BASE+377) | ||
474 | #define V4L2_CID_MPEG_VIDEO_H264_ASO_SLICE_ORDER (V4L2_CID_MPEG_BASE+378) | ||
475 | #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING (V4L2_CID_MPEG_BASE+379) | ||
476 | #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_TYPE (V4L2_CID_MPEG_BASE+380) | ||
477 | enum v4l2_mpeg_video_h264_hierarchical_coding_type { | ||
478 | V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_B = 0, | ||
479 | V4L2_MPEG_VIDEO_H264_HIERARCHICAL_CODING_P = 1, | ||
480 | }; | ||
481 | #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER (V4L2_CID_MPEG_BASE+381) | ||
482 | #define V4L2_CID_MPEG_VIDEO_H264_HIERARCHICAL_CODING_LAYER_QP (V4L2_CID_MPEG_BASE+382) | ||
442 | #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) | 483 | #define V4L2_CID_MPEG_VIDEO_MPEG4_I_FRAME_QP (V4L2_CID_MPEG_BASE+400) |
443 | #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) | 484 | #define V4L2_CID_MPEG_VIDEO_MPEG4_P_FRAME_QP (V4L2_CID_MPEG_BASE+401) |
444 | #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) | 485 | #define V4L2_CID_MPEG_VIDEO_MPEG4_B_FRAME_QP (V4L2_CID_MPEG_BASE+402) |
@@ -757,5 +798,6 @@ enum v4l2_jpeg_chroma_subsampling { | |||
757 | 798 | ||
758 | #define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) | 799 | #define V4L2_CID_LINK_FREQ (V4L2_CID_IMAGE_PROC_CLASS_BASE + 1) |
759 | #define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) | 800 | #define V4L2_CID_PIXEL_RATE (V4L2_CID_IMAGE_PROC_CLASS_BASE + 2) |
801 | #define V4L2_CID_TEST_PATTERN (V4L2_CID_IMAGE_PROC_CLASS_BASE + 3) | ||
760 | 802 | ||
761 | #endif | 803 | #endif |
diff --git a/include/linux/v4l2-mediabus.h b/include/linux/v4l2-mediabus.h index 5ea7f753a348..7d64e0e1a18b 100644 --- a/include/linux/v4l2-mediabus.h +++ b/include/linux/v4l2-mediabus.h | |||
@@ -92,6 +92,11 @@ enum v4l2_mbus_pixelcode { | |||
92 | 92 | ||
93 | /* JPEG compressed formats - next is 0x4002 */ | 93 | /* JPEG compressed formats - next is 0x4002 */ |
94 | V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, | 94 | V4L2_MBUS_FMT_JPEG_1X8 = 0x4001, |
95 | |||
96 | /* Vendor specific formats - next is 0x5002 */ | ||
97 | |||
98 | /* S5C73M3 sensor specific interleaved UYVY and JPEG */ | ||
99 | V4L2_MBUS_FMT_S5C_UYVY_JPEG_1X8 = 0x5001, | ||
95 | }; | 100 | }; |
96 | 101 | ||
97 | /** | 102 | /** |
diff --git a/include/linux/videodev2.h b/include/linux/videodev2.h index 61395ef85a00..873adbe82988 100644 --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h | |||
@@ -366,7 +366,9 @@ struct v4l2_pix_format { | |||
366 | 366 | ||
367 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ | 367 | /* two non contiguous planes - one Y, one Cr + Cb interleaved */ |
368 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ | 368 | #define V4L2_PIX_FMT_NV12M v4l2_fourcc('N', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 */ |
369 | #define V4L2_PIX_FMT_NV21M v4l2_fourcc('N', 'M', '2', '1') /* 21 Y/CrCb 4:2:0 */ | ||
369 | #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ | 370 | #define V4L2_PIX_FMT_NV12MT v4l2_fourcc('T', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 64x32 macroblocks */ |
371 | #define V4L2_PIX_FMT_NV12MT_16X16 v4l2_fourcc('V', 'M', '1', '2') /* 12 Y/CbCr 4:2:0 16x16 macroblocks */ | ||
370 | 372 | ||
371 | /* three non contiguous planes - Y, Cb, Cr */ | 373 | /* three non contiguous planes - Y, Cb, Cr */ |
372 | #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ | 374 | #define V4L2_PIX_FMT_YUV420M v4l2_fourcc('Y', 'M', '1', '2') /* 12 YUV420 planar */ |
@@ -403,6 +405,7 @@ struct v4l2_pix_format { | |||
403 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */ | 405 | #define V4L2_PIX_FMT_MPEG v4l2_fourcc('M', 'P', 'E', 'G') /* MPEG-1/2/4 Multiplexed */ |
404 | #define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ | 406 | #define V4L2_PIX_FMT_H264 v4l2_fourcc('H', '2', '6', '4') /* H264 with start codes */ |
405 | #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */ | 407 | #define V4L2_PIX_FMT_H264_NO_SC v4l2_fourcc('A', 'V', 'C', '1') /* H264 without start codes */ |
408 | #define V4L2_PIX_FMT_H264_MVC v4l2_fourcc('M', '2', '6', '4') /* H264 MVC */ | ||
406 | #define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ | 409 | #define V4L2_PIX_FMT_H263 v4l2_fourcc('H', '2', '6', '3') /* H263 */ |
407 | #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ | 410 | #define V4L2_PIX_FMT_MPEG1 v4l2_fourcc('M', 'P', 'G', '1') /* MPEG-1 ES */ |
408 | #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ | 411 | #define V4L2_PIX_FMT_MPEG2 v4l2_fourcc('M', 'P', 'G', '2') /* MPEG-2 ES */ |
@@ -410,6 +413,7 @@ struct v4l2_pix_format { | |||
410 | #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ | 413 | #define V4L2_PIX_FMT_XVID v4l2_fourcc('X', 'V', 'I', 'D') /* Xvid */ |
411 | #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ | 414 | #define V4L2_PIX_FMT_VC1_ANNEX_G v4l2_fourcc('V', 'C', '1', 'G') /* SMPTE 421M Annex G compliant stream */ |
412 | #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ | 415 | #define V4L2_PIX_FMT_VC1_ANNEX_L v4l2_fourcc('V', 'C', '1', 'L') /* SMPTE 421M Annex L compliant stream */ |
416 | #define V4L2_PIX_FMT_VP8 v4l2_fourcc('V', 'P', '8', '0') /* VP8 */ | ||
413 | 417 | ||
414 | /* Vendor-specific formats */ | 418 | /* Vendor-specific formats */ |
415 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ | 419 | #define V4L2_PIX_FMT_CPIA1 v4l2_fourcc('C', 'P', 'I', 'A') /* cpia1 YUV */ |
@@ -437,6 +441,7 @@ struct v4l2_pix_format { | |||
437 | #define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ | 441 | #define V4L2_PIX_FMT_KONICA420 v4l2_fourcc('K', 'O', 'N', 'I') /* YUV420 planar in blocks of 256 pixels */ |
438 | #define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ | 442 | #define V4L2_PIX_FMT_JPGL v4l2_fourcc('J', 'P', 'G', 'L') /* JPEG-Lite */ |
439 | #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ | 443 | #define V4L2_PIX_FMT_SE401 v4l2_fourcc('S', '4', '0', '1') /* se401 janggu compressed rgb */ |
444 | #define V4L2_PIX_FMT_S5C_UYVY_JPG v4l2_fourcc('S', '5', 'C', 'I') /* S5C73M3 interleaved UYVY/JPEG */ | ||
440 | 445 | ||
441 | /* | 446 | /* |
442 | * F O R M A T E N U M E R A T I O N | 447 | * F O R M A T E N U M E R A T I O N |
diff --git a/include/linux/virtio_scsi.h b/include/linux/virtio_scsi.h index dc8d305b0e05..d6b4440387b7 100644 --- a/include/linux/virtio_scsi.h +++ b/include/linux/virtio_scsi.h | |||
@@ -72,6 +72,7 @@ struct virtio_scsi_config { | |||
72 | /* Feature Bits */ | 72 | /* Feature Bits */ |
73 | #define VIRTIO_SCSI_F_INOUT 0 | 73 | #define VIRTIO_SCSI_F_INOUT 0 |
74 | #define VIRTIO_SCSI_F_HOTPLUG 1 | 74 | #define VIRTIO_SCSI_F_HOTPLUG 1 |
75 | #define VIRTIO_SCSI_F_CHANGE 2 | ||
75 | 76 | ||
76 | /* Response codes */ | 77 | /* Response codes */ |
77 | #define VIRTIO_SCSI_S_OK 0 | 78 | #define VIRTIO_SCSI_S_OK 0 |
@@ -108,6 +109,7 @@ struct virtio_scsi_config { | |||
108 | #define VIRTIO_SCSI_T_NO_EVENT 0 | 109 | #define VIRTIO_SCSI_T_NO_EVENT 0 |
109 | #define VIRTIO_SCSI_T_TRANSPORT_RESET 1 | 110 | #define VIRTIO_SCSI_T_TRANSPORT_RESET 1 |
110 | #define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 | 111 | #define VIRTIO_SCSI_T_ASYNC_NOTIFY 2 |
112 | #define VIRTIO_SCSI_T_PARAM_CHANGE 3 | ||
111 | 113 | ||
112 | /* Reasons of transport reset event */ | 114 | /* Reasons of transport reset event */ |
113 | #define VIRTIO_SCSI_EVT_RESET_HARD 0 | 115 | #define VIRTIO_SCSI_EVT_RESET_HARD 0 |
diff --git a/include/linux/wimax/Kbuild b/include/linux/wimax/Kbuild index 3cb4f269bb09..e69de29bb2d1 100644 --- a/include/linux/wimax/Kbuild +++ b/include/linux/wimax/Kbuild | |||
@@ -1 +0,0 @@ | |||
1 | header-y += i2400m.h | ||
diff --git a/include/linux/wimax/i2400m.h b/include/linux/wimax/i2400m.h deleted file mode 100644 index 62d356153565..000000000000 --- a/include/linux/wimax/i2400m.h +++ /dev/null | |||
@@ -1,572 +0,0 @@ | |||
1 | /* | ||
2 | * Intel Wireless WiMax Connection 2400m | ||
3 | * Host-Device protocol interface definitions | ||
4 | * | ||
5 | * | ||
6 | * Copyright (C) 2007-2008 Intel Corporation. All rights reserved. | ||
7 | * | ||
8 | * Redistribution and use in source and binary forms, with or without | ||
9 | * modification, are permitted provided that the following conditions | ||
10 | * are met: | ||
11 | * | ||
12 | * * Redistributions of source code must retain the above copyright | ||
13 | * notice, this list of conditions and the following disclaimer. | ||
14 | * * Redistributions in binary form must reproduce the above copyright | ||
15 | * notice, this list of conditions and the following disclaimer in | ||
16 | * the documentation and/or other materials provided with the | ||
17 | * distribution. | ||
18 | * * Neither the name of Intel Corporation nor the names of its | ||
19 | * contributors may be used to endorse or promote products derived | ||
20 | * from this software without specific prior written permission. | ||
21 | * | ||
22 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
23 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
24 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
25 | * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT | ||
26 | * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, | ||
27 | * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT | ||
28 | * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | ||
29 | * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY | ||
30 | * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
31 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
32 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | * | ||
34 | * | ||
35 | * Intel Corporation <linux-wimax@intel.com> | ||
36 | * Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com> | ||
37 | * - Initial implementation | ||
38 | * | ||
39 | * | ||
40 | * This header defines the data structures and constants used to | ||
41 | * communicate with the device. | ||
42 | * | ||
43 | * BOOTMODE/BOOTROM/FIRMWARE UPLOAD PROTOCOL | ||
44 | * | ||
45 | * The firmware upload protocol is quite simple and only requires a | ||
46 | * handful of commands. See drivers/net/wimax/i2400m/fw.c for more | ||
47 | * details. | ||
48 | * | ||
49 | * The BCF data structure is for the firmware file header. | ||
50 | * | ||
51 | * | ||
52 | * THE DATA / CONTROL PROTOCOL | ||
53 | * | ||
54 | * This is the normal protocol spoken with the device once the | ||
55 | * firmware is uploaded. It transports data payloads and control | ||
56 | * messages back and forth. | ||
57 | * | ||
58 | * It consists 'messages' that pack one or more payloads each. The | ||
59 | * format is described in detail in drivers/net/wimax/i2400m/rx.c and | ||
60 | * tx.c. | ||
61 | * | ||
62 | * | ||
63 | * THE L3L4 PROTOCOL | ||
64 | * | ||
65 | * The term L3L4 refers to Layer 3 (the device), Layer 4 (the | ||
66 | * driver/host software). | ||
67 | * | ||
68 | * This is the control protocol used by the host to control the i2400m | ||
69 | * device (scan, connect, disconnect...). This is sent to / received | ||
70 | * as control frames. These frames consist of a header and zero or | ||
71 | * more TLVs with information. We call each control frame a "message". | ||
72 | * | ||
73 | * Each message is composed of: | ||
74 | * | ||
75 | * HEADER | ||
76 | * [TLV0 + PAYLOAD0] | ||
77 | * [TLV1 + PAYLOAD1] | ||
78 | * [...] | ||
79 | * [TLVN + PAYLOADN] | ||
80 | * | ||
81 | * The HEADER is defined by 'struct i2400m_l3l4_hdr'. The payloads are | ||
82 | * defined by a TLV structure (Type Length Value) which is a 'header' | ||
83 | * (struct i2400m_tlv_hdr) and then the payload. | ||
84 | * | ||
85 | * All integers are represented as Little Endian. | ||
86 | * | ||
87 | * - REQUESTS AND EVENTS | ||
88 | * | ||
89 | * The requests can be clasified as follows: | ||
90 | * | ||
91 | * COMMAND: implies a request from the host to the device requesting | ||
92 | * an action being performed. The device will reply with a | ||
93 | * message (with the same type as the command), status and | ||
94 | * no (TLV) payload. Execution of a command might cause | ||
95 | * events (of different type) to be sent later on as | ||
96 | * device's state changes. | ||
97 | * | ||
98 | * GET/SET: similar to COMMAND, but will not cause other | ||
99 | * EVENTs. The reply, in the case of GET, will contain | ||
100 | * TLVs with the requested information. | ||
101 | * | ||
102 | * EVENT: asynchronous messages sent from the device, maybe as a | ||
103 | * consequence of previous COMMANDs but disassociated from | ||
104 | * them. | ||
105 | * | ||
106 | * Only one request might be pending at the same time (ie: don't | ||
107 | * parallelize nor post another GET request before the previous | ||
108 | * COMMAND has been acknowledged with it's corresponding reply by the | ||
109 | * device). | ||
110 | * | ||
111 | * The different requests and their formats are described below: | ||
112 | * | ||
113 | * I2400M_MT_* Message types | ||
114 | * I2400M_MS_* Message status (for replies, events) | ||
115 | * i2400m_tlv_* TLVs | ||
116 | * | ||
117 | * data types are named 'struct i2400m_msg_OPNAME', OPNAME matching the | ||
118 | * operation. | ||
119 | */ | ||
120 | |||
121 | #ifndef __LINUX__WIMAX__I2400M_H__ | ||
122 | #define __LINUX__WIMAX__I2400M_H__ | ||
123 | |||
124 | #include <linux/types.h> | ||
125 | |||
126 | |||
127 | /* | ||
128 | * Host Device Interface (HDI) common to all busses | ||
129 | */ | ||
130 | |||
131 | /* Boot-mode (firmware upload mode) commands */ | ||
132 | |||
133 | /* Header for the firmware file */ | ||
134 | struct i2400m_bcf_hdr { | ||
135 | __le32 module_type; | ||
136 | __le32 header_len; | ||
137 | __le32 header_version; | ||
138 | __le32 module_id; | ||
139 | __le32 module_vendor; | ||
140 | __le32 date; /* BCD YYYMMDD */ | ||
141 | __le32 size; /* in dwords */ | ||
142 | __le32 key_size; /* in dwords */ | ||
143 | __le32 modulus_size; /* in dwords */ | ||
144 | __le32 exponent_size; /* in dwords */ | ||
145 | __u8 reserved[88]; | ||
146 | } __attribute__ ((packed)); | ||
147 | |||
148 | /* Boot mode opcodes */ | ||
149 | enum i2400m_brh_opcode { | ||
150 | I2400M_BRH_READ = 1, | ||
151 | I2400M_BRH_WRITE = 2, | ||
152 | I2400M_BRH_JUMP = 3, | ||
153 | I2400M_BRH_SIGNED_JUMP = 8, | ||
154 | I2400M_BRH_HASH_PAYLOAD_ONLY = 9, | ||
155 | }; | ||
156 | |||
157 | /* Boot mode command masks and stuff */ | ||
158 | enum i2400m_brh { | ||
159 | I2400M_BRH_SIGNATURE = 0xcbbc0000, | ||
160 | I2400M_BRH_SIGNATURE_MASK = 0xffff0000, | ||
161 | I2400M_BRH_SIGNATURE_SHIFT = 16, | ||
162 | I2400M_BRH_OPCODE_MASK = 0x0000000f, | ||
163 | I2400M_BRH_RESPONSE_MASK = 0x000000f0, | ||
164 | I2400M_BRH_RESPONSE_SHIFT = 4, | ||
165 | I2400M_BRH_DIRECT_ACCESS = 0x00000400, | ||
166 | I2400M_BRH_RESPONSE_REQUIRED = 0x00000200, | ||
167 | I2400M_BRH_USE_CHECKSUM = 0x00000100, | ||
168 | }; | ||
169 | |||
170 | |||
171 | /** | ||
172 | * i2400m_bootrom_header - Header for a boot-mode command | ||
173 | * | ||
174 | * @cmd: the above command descriptor | ||
175 | * @target_addr: where on the device memory should the action be performed. | ||
176 | * @data_size: for read/write, amount of data to be read/written | ||
177 | * @block_checksum: checksum value (if applicable) | ||
178 | * @payload: the beginning of data attached to this header | ||
179 | */ | ||
180 | struct i2400m_bootrom_header { | ||
181 | __le32 command; /* Compose with enum i2400_brh */ | ||
182 | __le32 target_addr; | ||
183 | __le32 data_size; | ||
184 | __le32 block_checksum; | ||
185 | char payload[0]; | ||
186 | } __attribute__ ((packed)); | ||
187 | |||
188 | |||
189 | /* | ||
190 | * Data / control protocol | ||
191 | */ | ||
192 | |||
193 | /* Packet types for the host-device interface */ | ||
194 | enum i2400m_pt { | ||
195 | I2400M_PT_DATA = 0, | ||
196 | I2400M_PT_CTRL, | ||
197 | I2400M_PT_TRACE, /* For device debug */ | ||
198 | I2400M_PT_RESET_WARM, /* device reset */ | ||
199 | I2400M_PT_RESET_COLD, /* USB[transport] reset, like reconnect */ | ||
200 | I2400M_PT_EDATA, /* Extended RX data */ | ||
201 | I2400M_PT_ILLEGAL | ||
202 | }; | ||
203 | |||
204 | |||
205 | /* | ||
206 | * Payload for a data packet | ||
207 | * | ||
208 | * This is prefixed to each and every outgoing DATA type. | ||
209 | */ | ||
210 | struct i2400m_pl_data_hdr { | ||
211 | __le32 reserved; | ||
212 | } __attribute__((packed)); | ||
213 | |||
214 | |||
215 | /* | ||
216 | * Payload for an extended data packet | ||
217 | * | ||
218 | * New in fw v1.4 | ||
219 | * | ||
220 | * @reorder: if this payload has to be reorder or not (and how) | ||
221 | * @cs: the type of data in the packet, as defined per (802.16e | ||
222 | * T11.13.19.1). Currently only 2 (IPv4 packet) supported. | ||
223 | * | ||
224 | * This is prefixed to each and every INCOMING DATA packet. | ||
225 | */ | ||
226 | struct i2400m_pl_edata_hdr { | ||
227 | __le32 reorder; /* bits defined in i2400m_ro */ | ||
228 | __u8 cs; | ||
229 | __u8 reserved[11]; | ||
230 | } __attribute__((packed)); | ||
231 | |||
232 | enum i2400m_cs { | ||
233 | I2400M_CS_IPV4_0 = 0, | ||
234 | I2400M_CS_IPV4 = 2, | ||
235 | }; | ||
236 | |||
237 | enum i2400m_ro { | ||
238 | I2400M_RO_NEEDED = 0x01, | ||
239 | I2400M_RO_TYPE = 0x03, | ||
240 | I2400M_RO_TYPE_SHIFT = 1, | ||
241 | I2400M_RO_CIN = 0x0f, | ||
242 | I2400M_RO_CIN_SHIFT = 4, | ||
243 | I2400M_RO_FBN = 0x07ff, | ||
244 | I2400M_RO_FBN_SHIFT = 8, | ||
245 | I2400M_RO_SN = 0x07ff, | ||
246 | I2400M_RO_SN_SHIFT = 21, | ||
247 | }; | ||
248 | |||
249 | enum i2400m_ro_type { | ||
250 | I2400M_RO_TYPE_RESET = 0, | ||
251 | I2400M_RO_TYPE_PACKET, | ||
252 | I2400M_RO_TYPE_WS, | ||
253 | I2400M_RO_TYPE_PACKET_WS, | ||
254 | }; | ||
255 | |||
256 | |||
257 | /* Misc constants */ | ||
258 | enum { | ||
259 | I2400M_PL_ALIGN = 16, /* Payload data size alignment */ | ||
260 | I2400M_PL_SIZE_MAX = 0x3EFF, | ||
261 | I2400M_MAX_PLS_IN_MSG = 60, | ||
262 | /* protocol barkers: sync sequences; for notifications they | ||
263 | * are sent in groups of four. */ | ||
264 | I2400M_H2D_PREVIEW_BARKER = 0xcafe900d, | ||
265 | I2400M_COLD_RESET_BARKER = 0xc01dc01d, | ||
266 | I2400M_WARM_RESET_BARKER = 0x50f750f7, | ||
267 | I2400M_NBOOT_BARKER = 0xdeadbeef, | ||
268 | I2400M_SBOOT_BARKER = 0x0ff1c1a1, | ||
269 | I2400M_SBOOT_BARKER_6050 = 0x80000001, | ||
270 | I2400M_ACK_BARKER = 0xfeedbabe, | ||
271 | I2400M_D2H_MSG_BARKER = 0xbeefbabe, | ||
272 | }; | ||
273 | |||
274 | |||
275 | /* | ||
276 | * Hardware payload descriptor | ||
277 | * | ||
278 | * Bitfields encoded in a struct to enforce typing semantics. | ||
279 | * | ||
280 | * Look in rx.c and tx.c for a full description of the format. | ||
281 | */ | ||
282 | struct i2400m_pld { | ||
283 | __le32 val; | ||
284 | } __attribute__ ((packed)); | ||
285 | |||
286 | #define I2400M_PLD_SIZE_MASK 0x00003fff | ||
287 | #define I2400M_PLD_TYPE_SHIFT 16 | ||
288 | #define I2400M_PLD_TYPE_MASK 0x000f0000 | ||
289 | |||
290 | /* | ||
291 | * Header for a TX message or RX message | ||
292 | * | ||
293 | * @barker: preamble | ||
294 | * @size: used for management of the FIFO queue buffer; before | ||
295 | * sending, this is converted to be a real preamble. This | ||
296 | * indicates the real size of the TX message that starts at this | ||
297 | * point. If the highest bit is set, then this message is to be | ||
298 | * skipped. | ||
299 | * @sequence: sequence number of this message | ||
300 | * @offset: offset where the message itself starts -- see the comments | ||
301 | * in the file header about message header and payload descriptor | ||
302 | * alignment. | ||
303 | * @num_pls: number of payloads in this message | ||
304 | * @padding: amount of padding bytes at the end of the message to make | ||
305 | * it be of block-size aligned | ||
306 | * | ||
307 | * Look in rx.c and tx.c for a full description of the format. | ||
308 | */ | ||
309 | struct i2400m_msg_hdr { | ||
310 | union { | ||
311 | __le32 barker; | ||
312 | __u32 size; /* same size type as barker!! */ | ||
313 | }; | ||
314 | union { | ||
315 | __le32 sequence; | ||
316 | __u32 offset; /* same size type as barker!! */ | ||
317 | }; | ||
318 | __le16 num_pls; | ||
319 | __le16 rsv1; | ||
320 | __le16 padding; | ||
321 | __le16 rsv2; | ||
322 | struct i2400m_pld pld[0]; | ||
323 | } __attribute__ ((packed)); | ||
324 | |||
325 | |||
326 | |||
327 | /* | ||
328 | * L3/L4 control protocol | ||
329 | */ | ||
330 | |||
331 | enum { | ||
332 | /* Interface version */ | ||
333 | I2400M_L3L4_VERSION = 0x0100, | ||
334 | }; | ||
335 | |||
336 | /* Message types */ | ||
337 | enum i2400m_mt { | ||
338 | I2400M_MT_RESERVED = 0x0000, | ||
339 | I2400M_MT_INVALID = 0xffff, | ||
340 | I2400M_MT_REPORT_MASK = 0x8000, | ||
341 | |||
342 | I2400M_MT_GET_SCAN_RESULT = 0x4202, | ||
343 | I2400M_MT_SET_SCAN_PARAM = 0x4402, | ||
344 | I2400M_MT_CMD_RF_CONTROL = 0x4602, | ||
345 | I2400M_MT_CMD_SCAN = 0x4603, | ||
346 | I2400M_MT_CMD_CONNECT = 0x4604, | ||
347 | I2400M_MT_CMD_DISCONNECT = 0x4605, | ||
348 | I2400M_MT_CMD_EXIT_IDLE = 0x4606, | ||
349 | I2400M_MT_GET_LM_VERSION = 0x5201, | ||
350 | I2400M_MT_GET_DEVICE_INFO = 0x5202, | ||
351 | I2400M_MT_GET_LINK_STATUS = 0x5203, | ||
352 | I2400M_MT_GET_STATISTICS = 0x5204, | ||
353 | I2400M_MT_GET_STATE = 0x5205, | ||
354 | I2400M_MT_GET_MEDIA_STATUS = 0x5206, | ||
355 | I2400M_MT_SET_INIT_CONFIG = 0x5404, | ||
356 | I2400M_MT_CMD_INIT = 0x5601, | ||
357 | I2400M_MT_CMD_TERMINATE = 0x5602, | ||
358 | I2400M_MT_CMD_MODE_OF_OP = 0x5603, | ||
359 | I2400M_MT_CMD_RESET_DEVICE = 0x5604, | ||
360 | I2400M_MT_CMD_MONITOR_CONTROL = 0x5605, | ||
361 | I2400M_MT_CMD_ENTER_POWERSAVE = 0x5606, | ||
362 | I2400M_MT_GET_TLS_OPERATION_RESULT = 0x6201, | ||
363 | I2400M_MT_SET_EAP_SUCCESS = 0x6402, | ||
364 | I2400M_MT_SET_EAP_FAIL = 0x6403, | ||
365 | I2400M_MT_SET_EAP_KEY = 0x6404, | ||
366 | I2400M_MT_CMD_SEND_EAP_RESPONSE = 0x6602, | ||
367 | I2400M_MT_REPORT_SCAN_RESULT = 0xc002, | ||
368 | I2400M_MT_REPORT_STATE = 0xd002, | ||
369 | I2400M_MT_REPORT_POWERSAVE_READY = 0xd005, | ||
370 | I2400M_MT_REPORT_EAP_REQUEST = 0xe002, | ||
371 | I2400M_MT_REPORT_EAP_RESTART = 0xe003, | ||
372 | I2400M_MT_REPORT_ALT_ACCEPT = 0xe004, | ||
373 | I2400M_MT_REPORT_KEY_REQUEST = 0xe005, | ||
374 | }; | ||
375 | |||
376 | |||
377 | /* | ||
378 | * Message Ack Status codes | ||
379 | * | ||
380 | * When a message is replied-to, this status is reported. | ||
381 | */ | ||
382 | enum i2400m_ms { | ||
383 | I2400M_MS_DONE_OK = 0, | ||
384 | I2400M_MS_DONE_IN_PROGRESS = 1, | ||
385 | I2400M_MS_INVALID_OP = 2, | ||
386 | I2400M_MS_BAD_STATE = 3, | ||
387 | I2400M_MS_ILLEGAL_VALUE = 4, | ||
388 | I2400M_MS_MISSING_PARAMS = 5, | ||
389 | I2400M_MS_VERSION_ERROR = 6, | ||
390 | I2400M_MS_ACCESSIBILITY_ERROR = 7, | ||
391 | I2400M_MS_BUSY = 8, | ||
392 | I2400M_MS_CORRUPTED_TLV = 9, | ||
393 | I2400M_MS_UNINITIALIZED = 10, | ||
394 | I2400M_MS_UNKNOWN_ERROR = 11, | ||
395 | I2400M_MS_PRODUCTION_ERROR = 12, | ||
396 | I2400M_MS_NO_RF = 13, | ||
397 | I2400M_MS_NOT_READY_FOR_POWERSAVE = 14, | ||
398 | I2400M_MS_THERMAL_CRITICAL = 15, | ||
399 | I2400M_MS_MAX | ||
400 | }; | ||
401 | |||
402 | |||
403 | /** | ||
404 | * i2400m_tlv - enumeration of the different types of TLVs | ||
405 | * | ||
406 | * TLVs stand for type-length-value and are the header for a payload | ||
407 | * composed of almost anything. Each payload has a type assigned | ||
408 | * and a length. | ||
409 | */ | ||
410 | enum i2400m_tlv { | ||
411 | I2400M_TLV_L4_MESSAGE_VERSIONS = 129, | ||
412 | I2400M_TLV_SYSTEM_STATE = 141, | ||
413 | I2400M_TLV_MEDIA_STATUS = 161, | ||
414 | I2400M_TLV_RF_OPERATION = 162, | ||
415 | I2400M_TLV_RF_STATUS = 163, | ||
416 | I2400M_TLV_DEVICE_RESET_TYPE = 132, | ||
417 | I2400M_TLV_CONFIG_IDLE_PARAMETERS = 601, | ||
418 | I2400M_TLV_CONFIG_IDLE_TIMEOUT = 611, | ||
419 | I2400M_TLV_CONFIG_D2H_DATA_FORMAT = 614, | ||
420 | I2400M_TLV_CONFIG_DL_HOST_REORDER = 615, | ||
421 | }; | ||
422 | |||
423 | |||
424 | struct i2400m_tlv_hdr { | ||
425 | __le16 type; | ||
426 | __le16 length; /* payload's */ | ||
427 | __u8 pl[0]; | ||
428 | } __attribute__((packed)); | ||
429 | |||
430 | |||
431 | struct i2400m_l3l4_hdr { | ||
432 | __le16 type; | ||
433 | __le16 length; /* payload's */ | ||
434 | __le16 version; | ||
435 | __le16 resv1; | ||
436 | __le16 status; | ||
437 | __le16 resv2; | ||
438 | struct i2400m_tlv_hdr pl[0]; | ||
439 | } __attribute__((packed)); | ||
440 | |||
441 | |||
442 | /** | ||
443 | * i2400m_system_state - different states of the device | ||
444 | */ | ||
445 | enum i2400m_system_state { | ||
446 | I2400M_SS_UNINITIALIZED = 1, | ||
447 | I2400M_SS_INIT, | ||
448 | I2400M_SS_READY, | ||
449 | I2400M_SS_SCAN, | ||
450 | I2400M_SS_STANDBY, | ||
451 | I2400M_SS_CONNECTING, | ||
452 | I2400M_SS_WIMAX_CONNECTED, | ||
453 | I2400M_SS_DATA_PATH_CONNECTED, | ||
454 | I2400M_SS_IDLE, | ||
455 | I2400M_SS_DISCONNECTING, | ||
456 | I2400M_SS_OUT_OF_ZONE, | ||
457 | I2400M_SS_SLEEPACTIVE, | ||
458 | I2400M_SS_PRODUCTION, | ||
459 | I2400M_SS_CONFIG, | ||
460 | I2400M_SS_RF_OFF, | ||
461 | I2400M_SS_RF_SHUTDOWN, | ||
462 | I2400M_SS_DEVICE_DISCONNECT, | ||
463 | I2400M_SS_MAX, | ||
464 | }; | ||
465 | |||
466 | |||
467 | /** | ||
468 | * i2400m_tlv_system_state - report on the state of the system | ||
469 | * | ||
470 | * @state: see enum i2400m_system_state | ||
471 | */ | ||
472 | struct i2400m_tlv_system_state { | ||
473 | struct i2400m_tlv_hdr hdr; | ||
474 | __le32 state; | ||
475 | } __attribute__((packed)); | ||
476 | |||
477 | |||
478 | struct i2400m_tlv_l4_message_versions { | ||
479 | struct i2400m_tlv_hdr hdr; | ||
480 | __le16 major; | ||
481 | __le16 minor; | ||
482 | __le16 branch; | ||
483 | __le16 reserved; | ||
484 | } __attribute__((packed)); | ||
485 | |||
486 | |||
487 | struct i2400m_tlv_detailed_device_info { | ||
488 | struct i2400m_tlv_hdr hdr; | ||
489 | __u8 reserved1[400]; | ||
490 | __u8 mac_address[6]; | ||
491 | __u8 reserved2[2]; | ||
492 | } __attribute__((packed)); | ||
493 | |||
494 | |||
495 | enum i2400m_rf_switch_status { | ||
496 | I2400M_RF_SWITCH_ON = 1, | ||
497 | I2400M_RF_SWITCH_OFF = 2, | ||
498 | }; | ||
499 | |||
500 | struct i2400m_tlv_rf_switches_status { | ||
501 | struct i2400m_tlv_hdr hdr; | ||
502 | __u8 sw_rf_switch; /* 1 ON, 2 OFF */ | ||
503 | __u8 hw_rf_switch; /* 1 ON, 2 OFF */ | ||
504 | __u8 reserved[2]; | ||
505 | } __attribute__((packed)); | ||
506 | |||
507 | |||
508 | enum { | ||
509 | i2400m_rf_operation_on = 1, | ||
510 | i2400m_rf_operation_off = 2 | ||
511 | }; | ||
512 | |||
513 | struct i2400m_tlv_rf_operation { | ||
514 | struct i2400m_tlv_hdr hdr; | ||
515 | __le32 status; /* 1 ON, 2 OFF */ | ||
516 | } __attribute__((packed)); | ||
517 | |||
518 | |||
519 | enum i2400m_tlv_reset_type { | ||
520 | I2400M_RESET_TYPE_COLD = 1, | ||
521 | I2400M_RESET_TYPE_WARM | ||
522 | }; | ||
523 | |||
524 | struct i2400m_tlv_device_reset_type { | ||
525 | struct i2400m_tlv_hdr hdr; | ||
526 | __le32 reset_type; | ||
527 | } __attribute__((packed)); | ||
528 | |||
529 | |||
530 | struct i2400m_tlv_config_idle_parameters { | ||
531 | struct i2400m_tlv_hdr hdr; | ||
532 | __le32 idle_timeout; /* 100 to 300000 ms [5min], 100 increments | ||
533 | * 0 disabled */ | ||
534 | __le32 idle_paging_interval; /* frames */ | ||
535 | } __attribute__((packed)); | ||
536 | |||
537 | |||
538 | enum i2400m_media_status { | ||
539 | I2400M_MEDIA_STATUS_LINK_UP = 1, | ||
540 | I2400M_MEDIA_STATUS_LINK_DOWN, | ||
541 | I2400M_MEDIA_STATUS_LINK_RENEW, | ||
542 | }; | ||
543 | |||
544 | struct i2400m_tlv_media_status { | ||
545 | struct i2400m_tlv_hdr hdr; | ||
546 | __le32 media_status; | ||
547 | } __attribute__((packed)); | ||
548 | |||
549 | |||
550 | /* New in v1.4 */ | ||
551 | struct i2400m_tlv_config_idle_timeout { | ||
552 | struct i2400m_tlv_hdr hdr; | ||
553 | __le32 timeout; /* 100 to 300000 ms [5min], 100 increments | ||
554 | * 0 disabled */ | ||
555 | } __attribute__((packed)); | ||
556 | |||
557 | /* New in v1.4 -- for backward compat, will be removed */ | ||
558 | struct i2400m_tlv_config_d2h_data_format { | ||
559 | struct i2400m_tlv_hdr hdr; | ||
560 | __u8 format; /* 0 old format, 1 enhanced */ | ||
561 | __u8 reserved[3]; | ||
562 | } __attribute__((packed)); | ||
563 | |||
564 | /* New in v1.4 */ | ||
565 | struct i2400m_tlv_config_dl_host_reorder { | ||
566 | struct i2400m_tlv_hdr hdr; | ||
567 | __u8 reorder; /* 0 disabled, 1 enabled */ | ||
568 | __u8 reserved[3]; | ||
569 | } __attribute__((packed)); | ||
570 | |||
571 | |||
572 | #endif /* #ifndef __LINUX__WIMAX__I2400M_H__ */ | ||