diff options
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/efi.h | 24 | ||||
-rw-r--r-- | include/linux/llist.h | 25 | ||||
-rw-r--r-- | include/linux/memcontrol.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/abx500.h | 2 | ||||
-rw-r--r-- | include/linux/mfd/abx500/ab8500-bm.h | 29 | ||||
-rw-r--r-- | include/linux/mfd/da9052/da9052.h | 66 | ||||
-rw-r--r-- | include/linux/mfd/da9052/reg.h | 3 | ||||
-rw-r--r-- | include/linux/mfd/rtsx_common.h | 3 | ||||
-rw-r--r-- | include/linux/mfd/rtsx_pci.h | 25 | ||||
-rw-r--r-- | include/linux/mmu_notifier.h | 2 | ||||
-rw-r--r-- | include/linux/security.h | 59 | ||||
-rw-r--r-- | include/linux/usb.h | 2 | ||||
-rw-r--r-- | include/linux/usb/hcd.h | 3 | ||||
-rw-r--r-- | include/linux/usb/usbnet.h | 3 |
14 files changed, 192 insertions, 56 deletions
diff --git a/include/linux/efi.h b/include/linux/efi.h index 8b84916dc671..7a9498ab3c2d 100644 --- a/include/linux/efi.h +++ b/include/linux/efi.h | |||
@@ -618,18 +618,30 @@ extern int __init efi_setup_pcdp_console(char *); | |||
618 | #endif | 618 | #endif |
619 | 619 | ||
620 | /* | 620 | /* |
621 | * We play games with efi_enabled so that the compiler will, if possible, remove | 621 | * We play games with efi_enabled so that the compiler will, if |
622 | * EFI-related code altogether. | 622 | * possible, remove EFI-related code altogether. |
623 | */ | 623 | */ |
624 | #define EFI_BOOT 0 /* Were we booted from EFI? */ | ||
625 | #define EFI_SYSTEM_TABLES 1 /* Can we use EFI system tables? */ | ||
626 | #define EFI_CONFIG_TABLES 2 /* Can we use EFI config tables? */ | ||
627 | #define EFI_RUNTIME_SERVICES 3 /* Can we use runtime services? */ | ||
628 | #define EFI_MEMMAP 4 /* Can we use EFI memory map? */ | ||
629 | #define EFI_64BIT 5 /* Is the firmware 64-bit? */ | ||
630 | |||
624 | #ifdef CONFIG_EFI | 631 | #ifdef CONFIG_EFI |
625 | # ifdef CONFIG_X86 | 632 | # ifdef CONFIG_X86 |
626 | extern int efi_enabled; | 633 | extern int efi_enabled(int facility); |
627 | extern bool efi_64bit; | ||
628 | # else | 634 | # else |
629 | # define efi_enabled 1 | 635 | static inline int efi_enabled(int facility) |
636 | { | ||
637 | return 1; | ||
638 | } | ||
630 | # endif | 639 | # endif |
631 | #else | 640 | #else |
632 | # define efi_enabled 0 | 641 | static inline int efi_enabled(int facility) |
642 | { | ||
643 | return 0; | ||
644 | } | ||
633 | #endif | 645 | #endif |
634 | 646 | ||
635 | /* | 647 | /* |
diff --git a/include/linux/llist.h b/include/linux/llist.h index a5199f6d0e82..d0ab98f73d38 100644 --- a/include/linux/llist.h +++ b/include/linux/llist.h | |||
@@ -125,6 +125,31 @@ static inline void init_llist_head(struct llist_head *list) | |||
125 | (pos) = llist_entry((pos)->member.next, typeof(*(pos)), member)) | 125 | (pos) = llist_entry((pos)->member.next, typeof(*(pos)), member)) |
126 | 126 | ||
127 | /** | 127 | /** |
128 | * llist_for_each_entry_safe - iterate safely against remove over some entries | ||
129 | * of lock-less list of given type. | ||
130 | * @pos: the type * to use as a loop cursor. | ||
131 | * @n: another type * to use as a temporary storage. | ||
132 | * @node: the fist entry of deleted list entries. | ||
133 | * @member: the name of the llist_node with the struct. | ||
134 | * | ||
135 | * In general, some entries of the lock-less list can be traversed | ||
136 | * safely only after being removed from list, so start with an entry | ||
137 | * instead of list head. This variant allows removal of entries | ||
138 | * as we iterate. | ||
139 | * | ||
140 | * If being used on entries deleted from lock-less list directly, the | ||
141 | * traverse order is from the newest to the oldest added entry. If | ||
142 | * you want to traverse from the oldest to the newest, you must | ||
143 | * reverse the order by yourself before traversing. | ||
144 | */ | ||
145 | #define llist_for_each_entry_safe(pos, n, node, member) \ | ||
146 | for ((pos) = llist_entry((node), typeof(*(pos)), member), \ | ||
147 | (n) = (pos)->member.next; \ | ||
148 | &(pos)->member != NULL; \ | ||
149 | (pos) = llist_entry(n, typeof(*(pos)), member), \ | ||
150 | (n) = (&(pos)->member != NULL) ? (pos)->member.next : NULL) | ||
151 | |||
152 | /** | ||
128 | * llist_empty - tests whether a lock-less list is empty | 153 | * llist_empty - tests whether a lock-less list is empty |
129 | * @head: the list to test | 154 | * @head: the list to test |
130 | * | 155 | * |
diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h index 0108a56f814e..28bd5fa2ff2e 100644 --- a/include/linux/memcontrol.h +++ b/include/linux/memcontrol.h | |||
@@ -429,7 +429,7 @@ extern int memcg_limited_groups_array_size; | |||
429 | * the slab_mutex must be held when looping through those caches | 429 | * the slab_mutex must be held when looping through those caches |
430 | */ | 430 | */ |
431 | #define for_each_memcg_cache_index(_idx) \ | 431 | #define for_each_memcg_cache_index(_idx) \ |
432 | for ((_idx) = 0; i < memcg_limited_groups_array_size; (_idx)++) | 432 | for ((_idx) = 0; (_idx) < memcg_limited_groups_array_size; (_idx)++) |
433 | 433 | ||
434 | static inline bool memcg_kmem_enabled(void) | 434 | static inline bool memcg_kmem_enabled(void) |
435 | { | 435 | { |
diff --git a/include/linux/mfd/abx500.h b/include/linux/mfd/abx500.h index 2138bd33021a..e53dcfeaee69 100644 --- a/include/linux/mfd/abx500.h +++ b/include/linux/mfd/abx500.h | |||
@@ -272,8 +272,6 @@ struct abx500_bm_data { | |||
272 | const struct abx500_fg_parameters *fg_params; | 272 | const struct abx500_fg_parameters *fg_params; |
273 | }; | 273 | }; |
274 | 274 | ||
275 | extern struct abx500_bm_data ab8500_bm_data; | ||
276 | |||
277 | enum { | 275 | enum { |
278 | NTC_EXTERNAL = 0, | 276 | NTC_EXTERNAL = 0, |
279 | NTC_INTERNAL, | 277 | NTC_INTERNAL, |
diff --git a/include/linux/mfd/abx500/ab8500-bm.h b/include/linux/mfd/abx500/ab8500-bm.h index 44310c98ee6e..9bd037df97d9 100644 --- a/include/linux/mfd/abx500/ab8500-bm.h +++ b/include/linux/mfd/abx500/ab8500-bm.h | |||
@@ -422,7 +422,10 @@ struct ab8500_chargalg_platform_data { | |||
422 | struct ab8500_btemp; | 422 | struct ab8500_btemp; |
423 | struct ab8500_gpadc; | 423 | struct ab8500_gpadc; |
424 | struct ab8500_fg; | 424 | struct ab8500_fg; |
425 | |||
425 | #ifdef CONFIG_AB8500_BM | 426 | #ifdef CONFIG_AB8500_BM |
427 | extern struct abx500_bm_data ab8500_bm_data; | ||
428 | |||
426 | void ab8500_fg_reinit(void); | 429 | void ab8500_fg_reinit(void); |
427 | void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); | 430 | void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA); |
428 | struct ab8500_btemp *ab8500_btemp_get(void); | 431 | struct ab8500_btemp *ab8500_btemp_get(void); |
@@ -434,31 +437,7 @@ int ab8500_fg_inst_curr_finalize(struct ab8500_fg *di, int *res); | |||
434 | int ab8500_fg_inst_curr_done(struct ab8500_fg *di); | 437 | int ab8500_fg_inst_curr_done(struct ab8500_fg *di); |
435 | 438 | ||
436 | #else | 439 | #else |
437 | int ab8500_fg_inst_curr_done(struct ab8500_fg *di) | 440 | static struct abx500_bm_data ab8500_bm_data; |
438 | { | ||
439 | } | ||
440 | static void ab8500_fg_reinit(void) | ||
441 | { | ||
442 | } | ||
443 | static void ab8500_charger_usb_state_changed(u8 bm_usb_state, u16 mA) | ||
444 | { | ||
445 | } | ||
446 | static struct ab8500_btemp *ab8500_btemp_get(void) | ||
447 | { | ||
448 | return NULL; | ||
449 | } | ||
450 | static int ab8500_btemp_get_batctrl_temp(struct ab8500_btemp *btemp) | ||
451 | { | ||
452 | return 0; | ||
453 | } | ||
454 | struct ab8500_fg *ab8500_fg_get(void) | ||
455 | { | ||
456 | return NULL; | ||
457 | } | ||
458 | static int ab8500_fg_inst_curr_blocking(struct ab8500_fg *dev) | ||
459 | { | ||
460 | return -ENODEV; | ||
461 | } | ||
462 | 441 | ||
463 | static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di) | 442 | static inline int ab8500_fg_inst_curr_start(struct ab8500_fg *di) |
464 | { | 443 | { |
diff --git a/include/linux/mfd/da9052/da9052.h b/include/linux/mfd/da9052/da9052.h index 86dd93de6ff2..786d02eb79d2 100644 --- a/include/linux/mfd/da9052/da9052.h +++ b/include/linux/mfd/da9052/da9052.h | |||
@@ -99,6 +99,9 @@ struct da9052 { | |||
99 | u8 chip_id; | 99 | u8 chip_id; |
100 | 100 | ||
101 | int chip_irq; | 101 | int chip_irq; |
102 | |||
103 | /* SOC I/O transfer related fixes for DA9052/53 */ | ||
104 | int (*fix_io) (struct da9052 *da9052, unsigned char reg); | ||
102 | }; | 105 | }; |
103 | 106 | ||
104 | /* ADC API */ | 107 | /* ADC API */ |
@@ -113,32 +116,87 @@ static inline int da9052_reg_read(struct da9052 *da9052, unsigned char reg) | |||
113 | ret = regmap_read(da9052->regmap, reg, &val); | 116 | ret = regmap_read(da9052->regmap, reg, &val); |
114 | if (ret < 0) | 117 | if (ret < 0) |
115 | return ret; | 118 | return ret; |
119 | |||
120 | if (da9052->fix_io) { | ||
121 | ret = da9052->fix_io(da9052, reg); | ||
122 | if (ret < 0) | ||
123 | return ret; | ||
124 | } | ||
125 | |||
116 | return val; | 126 | return val; |
117 | } | 127 | } |
118 | 128 | ||
119 | static inline int da9052_reg_write(struct da9052 *da9052, unsigned char reg, | 129 | static inline int da9052_reg_write(struct da9052 *da9052, unsigned char reg, |
120 | unsigned char val) | 130 | unsigned char val) |
121 | { | 131 | { |
122 | return regmap_write(da9052->regmap, reg, val); | 132 | int ret; |
133 | |||
134 | ret = regmap_write(da9052->regmap, reg, val); | ||
135 | if (ret < 0) | ||
136 | return ret; | ||
137 | |||
138 | if (da9052->fix_io) { | ||
139 | ret = da9052->fix_io(da9052, reg); | ||
140 | if (ret < 0) | ||
141 | return ret; | ||
142 | } | ||
143 | |||
144 | return ret; | ||
123 | } | 145 | } |
124 | 146 | ||
125 | static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg, | 147 | static inline int da9052_group_read(struct da9052 *da9052, unsigned char reg, |
126 | unsigned reg_cnt, unsigned char *val) | 148 | unsigned reg_cnt, unsigned char *val) |
127 | { | 149 | { |
128 | return regmap_bulk_read(da9052->regmap, reg, val, reg_cnt); | 150 | int ret; |
151 | |||
152 | ret = regmap_bulk_read(da9052->regmap, reg, val, reg_cnt); | ||
153 | if (ret < 0) | ||
154 | return ret; | ||
155 | |||
156 | if (da9052->fix_io) { | ||
157 | ret = da9052->fix_io(da9052, reg); | ||
158 | if (ret < 0) | ||
159 | return ret; | ||
160 | } | ||
161 | |||
162 | return ret; | ||
129 | } | 163 | } |
130 | 164 | ||
131 | static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, | 165 | static inline int da9052_group_write(struct da9052 *da9052, unsigned char reg, |
132 | unsigned reg_cnt, unsigned char *val) | 166 | unsigned reg_cnt, unsigned char *val) |
133 | { | 167 | { |
134 | return regmap_raw_write(da9052->regmap, reg, val, reg_cnt); | 168 | int ret; |
169 | |||
170 | ret = regmap_raw_write(da9052->regmap, reg, val, reg_cnt); | ||
171 | if (ret < 0) | ||
172 | return ret; | ||
173 | |||
174 | if (da9052->fix_io) { | ||
175 | ret = da9052->fix_io(da9052, reg); | ||
176 | if (ret < 0) | ||
177 | return ret; | ||
178 | } | ||
179 | |||
180 | return ret; | ||
135 | } | 181 | } |
136 | 182 | ||
137 | static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg, | 183 | static inline int da9052_reg_update(struct da9052 *da9052, unsigned char reg, |
138 | unsigned char bit_mask, | 184 | unsigned char bit_mask, |
139 | unsigned char reg_val) | 185 | unsigned char reg_val) |
140 | { | 186 | { |
141 | return regmap_update_bits(da9052->regmap, reg, bit_mask, reg_val); | 187 | int ret; |
188 | |||
189 | ret = regmap_update_bits(da9052->regmap, reg, bit_mask, reg_val); | ||
190 | if (ret < 0) | ||
191 | return ret; | ||
192 | |||
193 | if (da9052->fix_io) { | ||
194 | ret = da9052->fix_io(da9052, reg); | ||
195 | if (ret < 0) | ||
196 | return ret; | ||
197 | } | ||
198 | |||
199 | return ret; | ||
142 | } | 200 | } |
143 | 201 | ||
144 | int da9052_device_init(struct da9052 *da9052, u8 chip_id); | 202 | int da9052_device_init(struct da9052 *da9052, u8 chip_id); |
diff --git a/include/linux/mfd/da9052/reg.h b/include/linux/mfd/da9052/reg.h index b97f7309d7f6..c4dd3a8add21 100644 --- a/include/linux/mfd/da9052/reg.h +++ b/include/linux/mfd/da9052/reg.h | |||
@@ -34,6 +34,9 @@ | |||
34 | #define DA9052_STATUS_C_REG 3 | 34 | #define DA9052_STATUS_C_REG 3 |
35 | #define DA9052_STATUS_D_REG 4 | 35 | #define DA9052_STATUS_D_REG 4 |
36 | 36 | ||
37 | /* PARK REGISTER */ | ||
38 | #define DA9052_PARK_REGISTER DA9052_STATUS_D_REG | ||
39 | |||
37 | /* EVENT REGISTERS */ | 40 | /* EVENT REGISTERS */ |
38 | #define DA9052_EVENT_A_REG 5 | 41 | #define DA9052_EVENT_A_REG 5 |
39 | #define DA9052_EVENT_B_REG 6 | 42 | #define DA9052_EVENT_B_REG 6 |
diff --git a/include/linux/mfd/rtsx_common.h b/include/linux/mfd/rtsx_common.h index a8d393e3066b..2b13970596f5 100644 --- a/include/linux/mfd/rtsx_common.h +++ b/include/linux/mfd/rtsx_common.h | |||
@@ -38,6 +38,9 @@ | |||
38 | #define RTSX_SD_CARD 0 | 38 | #define RTSX_SD_CARD 0 |
39 | #define RTSX_MS_CARD 1 | 39 | #define RTSX_MS_CARD 1 |
40 | 40 | ||
41 | #define CLK_TO_DIV_N 0 | ||
42 | #define DIV_N_TO_CLK 1 | ||
43 | |||
41 | struct platform_device; | 44 | struct platform_device; |
42 | 45 | ||
43 | struct rtsx_slot { | 46 | struct rtsx_slot { |
diff --git a/include/linux/mfd/rtsx_pci.h b/include/linux/mfd/rtsx_pci.h index 060b721fcbfb..4b117a3f54d4 100644 --- a/include/linux/mfd/rtsx_pci.h +++ b/include/linux/mfd/rtsx_pci.h | |||
@@ -158,10 +158,9 @@ | |||
158 | #define SG_TRANS_DATA (0x02 << 4) | 158 | #define SG_TRANS_DATA (0x02 << 4) |
159 | #define SG_LINK_DESC (0x03 << 4) | 159 | #define SG_LINK_DESC (0x03 << 4) |
160 | 160 | ||
161 | /* SD bank voltage */ | 161 | /* Output voltage */ |
162 | #define SD_IO_3V3 0 | 162 | #define OUTPUT_3V3 0 |
163 | #define SD_IO_1V8 1 | 163 | #define OUTPUT_1V8 1 |
164 | |||
165 | 164 | ||
166 | /* Card Clock Enable Register */ | 165 | /* Card Clock Enable Register */ |
167 | #define SD_CLK_EN 0x04 | 166 | #define SD_CLK_EN 0x04 |
@@ -201,6 +200,20 @@ | |||
201 | #define CHANGE_CLK 0x01 | 200 | #define CHANGE_CLK 0x01 |
202 | 201 | ||
203 | /* LDO_CTL */ | 202 | /* LDO_CTL */ |
203 | #define BPP_ASIC_1V7 0x00 | ||
204 | #define BPP_ASIC_1V8 0x01 | ||
205 | #define BPP_ASIC_1V9 0x02 | ||
206 | #define BPP_ASIC_2V0 0x03 | ||
207 | #define BPP_ASIC_2V7 0x04 | ||
208 | #define BPP_ASIC_2V8 0x05 | ||
209 | #define BPP_ASIC_3V2 0x06 | ||
210 | #define BPP_ASIC_3V3 0x07 | ||
211 | #define BPP_REG_TUNED18 0x07 | ||
212 | #define BPP_TUNED18_SHIFT_8402 5 | ||
213 | #define BPP_TUNED18_SHIFT_8411 4 | ||
214 | #define BPP_PAD_MASK 0x04 | ||
215 | #define BPP_PAD_3V3 0x04 | ||
216 | #define BPP_PAD_1V8 0x00 | ||
204 | #define BPP_LDO_POWB 0x03 | 217 | #define BPP_LDO_POWB 0x03 |
205 | #define BPP_LDO_ON 0x00 | 218 | #define BPP_LDO_ON 0x00 |
206 | #define BPP_LDO_SUSPEND 0x02 | 219 | #define BPP_LDO_SUSPEND 0x02 |
@@ -688,7 +701,10 @@ struct pcr_ops { | |||
688 | int (*disable_auto_blink)(struct rtsx_pcr *pcr); | 701 | int (*disable_auto_blink)(struct rtsx_pcr *pcr); |
689 | int (*card_power_on)(struct rtsx_pcr *pcr, int card); | 702 | int (*card_power_on)(struct rtsx_pcr *pcr, int card); |
690 | int (*card_power_off)(struct rtsx_pcr *pcr, int card); | 703 | int (*card_power_off)(struct rtsx_pcr *pcr, int card); |
704 | int (*switch_output_voltage)(struct rtsx_pcr *pcr, | ||
705 | u8 voltage); | ||
691 | unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); | 706 | unsigned int (*cd_deglitch)(struct rtsx_pcr *pcr); |
707 | int (*conv_clk_and_div_n)(int clk, int dir); | ||
692 | }; | 708 | }; |
693 | 709 | ||
694 | enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN}; | 710 | enum PDEV_STAT {PDEV_STAT_IDLE, PDEV_STAT_RUN}; |
@@ -783,6 +799,7 @@ int rtsx_pci_switch_clock(struct rtsx_pcr *pcr, unsigned int card_clock, | |||
783 | u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk); | 799 | u8 ssc_depth, bool initial_mode, bool double_clk, bool vpclk); |
784 | int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card); | 800 | int rtsx_pci_card_power_on(struct rtsx_pcr *pcr, int card); |
785 | int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card); | 801 | int rtsx_pci_card_power_off(struct rtsx_pcr *pcr, int card); |
802 | int rtsx_pci_switch_output_voltage(struct rtsx_pcr *pcr, u8 voltage); | ||
786 | unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr); | 803 | unsigned int rtsx_pci_card_exist(struct rtsx_pcr *pcr); |
787 | void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr); | 804 | void rtsx_pci_complete_unfinished_transfer(struct rtsx_pcr *pcr); |
788 | 805 | ||
diff --git a/include/linux/mmu_notifier.h b/include/linux/mmu_notifier.h index bc823c4c028b..deca87452528 100644 --- a/include/linux/mmu_notifier.h +++ b/include/linux/mmu_notifier.h | |||
@@ -151,7 +151,7 @@ struct mmu_notifier_ops { | |||
151 | * Therefore notifier chains can only be traversed when either | 151 | * Therefore notifier chains can only be traversed when either |
152 | * | 152 | * |
153 | * 1. mmap_sem is held. | 153 | * 1. mmap_sem is held. |
154 | * 2. One of the reverse map locks is held (i_mmap_mutex or anon_vma->mutex). | 154 | * 2. One of the reverse map locks is held (i_mmap_mutex or anon_vma->rwsem). |
155 | * 3. No other concurrent thread can access the list (release) | 155 | * 3. No other concurrent thread can access the list (release) |
156 | */ | 156 | */ |
157 | struct mmu_notifier { | 157 | struct mmu_notifier { |
diff --git a/include/linux/security.h b/include/linux/security.h index 0f6afc657f77..eee7478cda70 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
@@ -989,17 +989,29 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
989 | * tells the LSM to decrement the number of secmark labeling rules loaded | 989 | * tells the LSM to decrement the number of secmark labeling rules loaded |
990 | * @req_classify_flow: | 990 | * @req_classify_flow: |
991 | * Sets the flow's sid to the openreq sid. | 991 | * Sets the flow's sid to the openreq sid. |
992 | * @tun_dev_alloc_security: | ||
993 | * This hook allows a module to allocate a security structure for a TUN | ||
994 | * device. | ||
995 | * @security pointer to a security structure pointer. | ||
996 | * Returns a zero on success, negative values on failure. | ||
997 | * @tun_dev_free_security: | ||
998 | * This hook allows a module to free the security structure for a TUN | ||
999 | * device. | ||
1000 | * @security pointer to the TUN device's security structure | ||
992 | * @tun_dev_create: | 1001 | * @tun_dev_create: |
993 | * Check permissions prior to creating a new TUN device. | 1002 | * Check permissions prior to creating a new TUN device. |
994 | * @tun_dev_post_create: | 1003 | * @tun_dev_attach_queue: |
995 | * This hook allows a module to update or allocate a per-socket security | 1004 | * Check permissions prior to attaching to a TUN device queue. |
996 | * structure. | 1005 | * @security pointer to the TUN device's security structure. |
997 | * @sk contains the newly created sock structure. | ||
998 | * @tun_dev_attach: | 1006 | * @tun_dev_attach: |
999 | * Check permissions prior to attaching to a persistent TUN device. This | 1007 | * This hook can be used by the module to update any security state |
1000 | * hook can also be used by the module to update any security state | ||
1001 | * associated with the TUN device's sock structure. | 1008 | * associated with the TUN device's sock structure. |
1002 | * @sk contains the existing sock structure. | 1009 | * @sk contains the existing sock structure. |
1010 | * @security pointer to the TUN device's security structure. | ||
1011 | * @tun_dev_open: | ||
1012 | * This hook can be used by the module to update any security state | ||
1013 | * associated with the TUN device's security structure. | ||
1014 | * @security pointer to the TUN devices's security structure. | ||
1003 | * | 1015 | * |
1004 | * Security hooks for XFRM operations. | 1016 | * Security hooks for XFRM operations. |
1005 | * | 1017 | * |
@@ -1620,9 +1632,12 @@ struct security_operations { | |||
1620 | void (*secmark_refcount_inc) (void); | 1632 | void (*secmark_refcount_inc) (void); |
1621 | void (*secmark_refcount_dec) (void); | 1633 | void (*secmark_refcount_dec) (void); |
1622 | void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl); | 1634 | void (*req_classify_flow) (const struct request_sock *req, struct flowi *fl); |
1623 | int (*tun_dev_create)(void); | 1635 | int (*tun_dev_alloc_security) (void **security); |
1624 | void (*tun_dev_post_create)(struct sock *sk); | 1636 | void (*tun_dev_free_security) (void *security); |
1625 | int (*tun_dev_attach)(struct sock *sk); | 1637 | int (*tun_dev_create) (void); |
1638 | int (*tun_dev_attach_queue) (void *security); | ||
1639 | int (*tun_dev_attach) (struct sock *sk, void *security); | ||
1640 | int (*tun_dev_open) (void *security); | ||
1626 | #endif /* CONFIG_SECURITY_NETWORK */ | 1641 | #endif /* CONFIG_SECURITY_NETWORK */ |
1627 | 1642 | ||
1628 | #ifdef CONFIG_SECURITY_NETWORK_XFRM | 1643 | #ifdef CONFIG_SECURITY_NETWORK_XFRM |
@@ -2566,9 +2581,12 @@ void security_inet_conn_established(struct sock *sk, | |||
2566 | int security_secmark_relabel_packet(u32 secid); | 2581 | int security_secmark_relabel_packet(u32 secid); |
2567 | void security_secmark_refcount_inc(void); | 2582 | void security_secmark_refcount_inc(void); |
2568 | void security_secmark_refcount_dec(void); | 2583 | void security_secmark_refcount_dec(void); |
2584 | int security_tun_dev_alloc_security(void **security); | ||
2585 | void security_tun_dev_free_security(void *security); | ||
2569 | int security_tun_dev_create(void); | 2586 | int security_tun_dev_create(void); |
2570 | void security_tun_dev_post_create(struct sock *sk); | 2587 | int security_tun_dev_attach_queue(void *security); |
2571 | int security_tun_dev_attach(struct sock *sk); | 2588 | int security_tun_dev_attach(struct sock *sk, void *security); |
2589 | int security_tun_dev_open(void *security); | ||
2572 | 2590 | ||
2573 | #else /* CONFIG_SECURITY_NETWORK */ | 2591 | #else /* CONFIG_SECURITY_NETWORK */ |
2574 | static inline int security_unix_stream_connect(struct sock *sock, | 2592 | static inline int security_unix_stream_connect(struct sock *sock, |
@@ -2733,16 +2751,31 @@ static inline void security_secmark_refcount_dec(void) | |||
2733 | { | 2751 | { |
2734 | } | 2752 | } |
2735 | 2753 | ||
2754 | static inline int security_tun_dev_alloc_security(void **security) | ||
2755 | { | ||
2756 | return 0; | ||
2757 | } | ||
2758 | |||
2759 | static inline void security_tun_dev_free_security(void *security) | ||
2760 | { | ||
2761 | } | ||
2762 | |||
2736 | static inline int security_tun_dev_create(void) | 2763 | static inline int security_tun_dev_create(void) |
2737 | { | 2764 | { |
2738 | return 0; | 2765 | return 0; |
2739 | } | 2766 | } |
2740 | 2767 | ||
2741 | static inline void security_tun_dev_post_create(struct sock *sk) | 2768 | static inline int security_tun_dev_attach_queue(void *security) |
2769 | { | ||
2770 | return 0; | ||
2771 | } | ||
2772 | |||
2773 | static inline int security_tun_dev_attach(struct sock *sk, void *security) | ||
2742 | { | 2774 | { |
2775 | return 0; | ||
2743 | } | 2776 | } |
2744 | 2777 | ||
2745 | static inline int security_tun_dev_attach(struct sock *sk) | 2778 | static inline int security_tun_dev_open(void *security) |
2746 | { | 2779 | { |
2747 | return 0; | 2780 | return 0; |
2748 | } | 2781 | } |
diff --git a/include/linux/usb.h b/include/linux/usb.h index 689b14b26c8d..4d22d0f6167a 100644 --- a/include/linux/usb.h +++ b/include/linux/usb.h | |||
@@ -357,6 +357,8 @@ struct usb_bus { | |||
357 | int bandwidth_int_reqs; /* number of Interrupt requests */ | 357 | int bandwidth_int_reqs; /* number of Interrupt requests */ |
358 | int bandwidth_isoc_reqs; /* number of Isoc. requests */ | 358 | int bandwidth_isoc_reqs; /* number of Isoc. requests */ |
359 | 359 | ||
360 | unsigned resuming_ports; /* bit array: resuming root-hub ports */ | ||
361 | |||
360 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) | 362 | #if defined(CONFIG_USB_MON) || defined(CONFIG_USB_MON_MODULE) |
361 | struct mon_bus *mon_bus; /* non-null when associated */ | 363 | struct mon_bus *mon_bus; /* non-null when associated */ |
362 | int monitored; /* non-zero when monitored */ | 364 | int monitored; /* non-zero when monitored */ |
diff --git a/include/linux/usb/hcd.h b/include/linux/usb/hcd.h index 608050b2545f..0a78df5f6cfd 100644 --- a/include/linux/usb/hcd.h +++ b/include/linux/usb/hcd.h | |||
@@ -430,6 +430,9 @@ extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd); | |||
430 | extern void usb_wakeup_notification(struct usb_device *hdev, | 430 | extern void usb_wakeup_notification(struct usb_device *hdev, |
431 | unsigned int portnum); | 431 | unsigned int portnum); |
432 | 432 | ||
433 | extern void usb_hcd_start_port_resume(struct usb_bus *bus, int portnum); | ||
434 | extern void usb_hcd_end_port_resume(struct usb_bus *bus, int portnum); | ||
435 | |||
433 | /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ | 436 | /* The D0/D1 toggle bits ... USE WITH CAUTION (they're almost hcd-internal) */ |
434 | #define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) | 437 | #define usb_gettoggle(dev, ep, out) (((dev)->toggle[out] >> (ep)) & 1) |
435 | #define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep))) | 438 | #define usb_dotoggle(dev, ep, out) ((dev)->toggle[out] ^= (1 << (ep))) |
diff --git a/include/linux/usb/usbnet.h b/include/linux/usb/usbnet.h index bd45eb7bedc8..0e5ac93bab10 100644 --- a/include/linux/usb/usbnet.h +++ b/include/linux/usb/usbnet.h | |||
@@ -33,6 +33,7 @@ struct usbnet { | |||
33 | wait_queue_head_t *wait; | 33 | wait_queue_head_t *wait; |
34 | struct mutex phy_mutex; | 34 | struct mutex phy_mutex; |
35 | unsigned char suspend_count; | 35 | unsigned char suspend_count; |
36 | unsigned char pkt_cnt, pkt_err; | ||
36 | 37 | ||
37 | /* i/o info: pipes etc */ | 38 | /* i/o info: pipes etc */ |
38 | unsigned in, out; | 39 | unsigned in, out; |
@@ -70,6 +71,7 @@ struct usbnet { | |||
70 | # define EVENT_DEV_OPEN 7 | 71 | # define EVENT_DEV_OPEN 7 |
71 | # define EVENT_DEVICE_REPORT_IDLE 8 | 72 | # define EVENT_DEVICE_REPORT_IDLE 8 |
72 | # define EVENT_NO_RUNTIME_PM 9 | 73 | # define EVENT_NO_RUNTIME_PM 9 |
74 | # define EVENT_RX_KILL 10 | ||
73 | }; | 75 | }; |
74 | 76 | ||
75 | static inline struct usb_driver *driver_of(struct usb_interface *intf) | 77 | static inline struct usb_driver *driver_of(struct usb_interface *intf) |
@@ -107,6 +109,7 @@ struct driver_info { | |||
107 | */ | 109 | */ |
108 | #define FLAG_MULTI_PACKET 0x2000 | 110 | #define FLAG_MULTI_PACKET 0x2000 |
109 | #define FLAG_RX_ASSEMBLE 0x4000 /* rx packets may span >1 frames */ | 111 | #define FLAG_RX_ASSEMBLE 0x4000 /* rx packets may span >1 frames */ |
112 | #define FLAG_NOARP 0x8000 /* device can't do ARP */ | ||
110 | 113 | ||
111 | /* init device ... can sleep, or cause probe() failure */ | 114 | /* init device ... can sleep, or cause probe() failure */ |
112 | int (*bind)(struct usbnet *, struct usb_interface *); | 115 | int (*bind)(struct usbnet *, struct usb_interface *); |