diff options
178 files changed, 2141 insertions, 2666 deletions
diff --git a/Documentation/rfkill.txt b/Documentation/rfkill.txt index 28b6ec87c642..6fcb3060dec5 100644 --- a/Documentation/rfkill.txt +++ b/Documentation/rfkill.txt | |||
@@ -363,6 +363,11 @@ This rule exists because users of the rfkill subsystem expect to get (and set, | |||
363 | when possible) the overall transmitter rfkill state, not of a particular rfkill | 363 | when possible) the overall transmitter rfkill state, not of a particular rfkill |
364 | line. | 364 | line. |
365 | 365 | ||
366 | 5. During suspend, the rfkill class will attempt to soft-block the radio | ||
367 | through a call to rfkill->toggle_radio, and will try to restore its previous | ||
368 | state during resume. After a rfkill class is suspended, it will *not* call | ||
369 | rfkill->toggle_radio until it is resumed. | ||
370 | |||
366 | Example of a WLAN wireless driver connected to the rfkill subsystem: | 371 | Example of a WLAN wireless driver connected to the rfkill subsystem: |
367 | -------------------------------------------------------------------- | 372 | -------------------------------------------------------------------- |
368 | 373 | ||
diff --git a/Documentation/scsi/ChangeLog.megaraid_sas b/Documentation/scsi/ChangeLog.megaraid_sas index 716fcc1cafb5..c851ef497795 100644 --- a/Documentation/scsi/ChangeLog.megaraid_sas +++ b/Documentation/scsi/ChangeLog.megaraid_sas | |||
@@ -1,3 +1,26 @@ | |||
1 | |||
2 | 1 Release Date : Thur.July. 24 11:41:51 PST 2008 - | ||
3 | (emaild-id:megaraidlinux@lsi.com) | ||
4 | Sumant Patro | ||
5 | Bo Yang | ||
6 | |||
7 | 2 Current Version : 00.00.04.01 | ||
8 | 3 Older Version : 00.00.03.22 | ||
9 | |||
10 | 1. Add the new controller (0078, 0079) support to the driver | ||
11 | Those controllers are LSI's next generatation(gen2) SAS controllers. | ||
12 | |||
13 | 1 Release Date : Mon.June. 23 10:12:45 PST 2008 - | ||
14 | (emaild-id:megaraidlinux@lsi.com) | ||
15 | Sumant Patro | ||
16 | Bo Yang | ||
17 | |||
18 | 2 Current Version : 00.00.03.22 | ||
19 | 3 Older Version : 00.00.03.20 | ||
20 | |||
21 | 1. Add shutdown DCMD cmd to the shutdown routine to make FW shutdown proper. | ||
22 | 2. Unexpected interrupt occurs in HWR Linux driver, add the dumy readl pci flush will fix this issue. | ||
23 | |||
1 | 1 Release Date : Mon. March 10 11:02:31 PDT 2008 - | 24 | 1 Release Date : Mon. March 10 11:02:31 PDT 2008 - |
2 | (emaild-id:megaraidlinux@lsi.com) | 25 | (emaild-id:megaraidlinux@lsi.com) |
3 | Sumant Patro | 26 | Sumant Patro |
diff --git a/MAINTAINERS b/MAINTAINERS index 663485b004fb..28c69aaefcd9 100644 --- a/MAINTAINERS +++ b/MAINTAINERS | |||
@@ -942,94 +942,19 @@ M: joern@lazybastard.org | |||
942 | L: linux-mtd@lists.infradead.org | 942 | L: linux-mtd@lists.infradead.org |
943 | S: Maintained | 943 | S: Maintained |
944 | 944 | ||
945 | BLUETOOTH SUBSYSTEM | 945 | BLUETOOTH DRIVERS |
946 | P: Marcel Holtmann | 946 | P: Marcel Holtmann |
947 | M: marcel@holtmann.org | 947 | M: marcel@holtmann.org |
948 | P: Maxim Krasnyansky | ||
949 | M: maxk@qualcomm.com | ||
950 | L: linux-bluetooth@vger.kernel.org | 948 | L: linux-bluetooth@vger.kernel.org |
951 | W: http://bluez.sf.net | 949 | W: http://www.bluez.org/ |
952 | W: http://www.bluez.org | ||
953 | W: http://www.holtmann.org/linux/bluetooth/ | ||
954 | T: git kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git | ||
955 | S: Maintained | ||
956 | |||
957 | BLUETOOTH RFCOMM LAYER | ||
958 | P: Marcel Holtmann | ||
959 | M: marcel@holtmann.org | ||
960 | P: Maxim Krasnyansky | ||
961 | M: maxk@qualcomm.com | ||
962 | S: Maintained | ||
963 | |||
964 | BLUETOOTH BNEP LAYER | ||
965 | P: Marcel Holtmann | ||
966 | M: marcel@holtmann.org | ||
967 | P: Maxim Krasnyansky | ||
968 | M: maxk@qualcomm.com | ||
969 | S: Maintained | ||
970 | |||
971 | BLUETOOTH CMTP LAYER | ||
972 | P: Marcel Holtmann | ||
973 | M: marcel@holtmann.org | ||
974 | S: Maintained | 950 | S: Maintained |
975 | 951 | ||
976 | BLUETOOTH HIDP LAYER | 952 | BLUETOOTH SUBSYSTEM |
977 | P: Marcel Holtmann | ||
978 | M: marcel@holtmann.org | ||
979 | S: Maintained | ||
980 | |||
981 | BLUETOOTH HCI UART DRIVER | ||
982 | P: Marcel Holtmann | ||
983 | M: marcel@holtmann.org | ||
984 | P: Maxim Krasnyansky | ||
985 | M: maxk@qualcomm.com | ||
986 | S: Maintained | ||
987 | |||
988 | BLUETOOTH HCI USB DRIVER | ||
989 | P: Marcel Holtmann | ||
990 | M: marcel@holtmann.org | ||
991 | P: Maxim Krasnyansky | ||
992 | M: maxk@qualcomm.com | ||
993 | S: Maintained | ||
994 | |||
995 | BLUETOOTH HCI BCM203X DRIVER | ||
996 | P: Marcel Holtmann | ||
997 | M: marcel@holtmann.org | ||
998 | S: Maintained | ||
999 | |||
1000 | BLUETOOTH HCI BPA10X DRIVER | ||
1001 | P: Marcel Holtmann | ||
1002 | M: marcel@holtmann.org | ||
1003 | S: Maintained | ||
1004 | |||
1005 | BLUETOOTH HCI BFUSB DRIVER | ||
1006 | P: Marcel Holtmann | ||
1007 | M: marcel@holtmann.org | ||
1008 | S: Maintained | ||
1009 | |||
1010 | BLUETOOTH HCI DTL1 DRIVER | ||
1011 | P: Marcel Holtmann | ||
1012 | M: marcel@holtmann.org | ||
1013 | S: Maintained | ||
1014 | |||
1015 | BLUETOOTH HCI BLUECARD DRIVER | ||
1016 | P: Marcel Holtmann | ||
1017 | M: marcel@holtmann.org | ||
1018 | S: Maintained | ||
1019 | |||
1020 | BLUETOOTH HCI BT3C DRIVER | ||
1021 | P: Marcel Holtmann | ||
1022 | M: marcel@holtmann.org | ||
1023 | S: Maintained | ||
1024 | |||
1025 | BLUETOOTH HCI BTUART DRIVER | ||
1026 | P: Marcel Holtmann | 953 | P: Marcel Holtmann |
1027 | M: marcel@holtmann.org | 954 | M: marcel@holtmann.org |
1028 | S: Maintained | 955 | L: linux-bluetooth@vger.kernel.org |
1029 | 956 | W: http://www.bluez.org/ | |
1030 | BLUETOOTH HCI VHCI DRIVER | 957 | T: git kernel.org:/pub/scm/linux/kernel/git/holtmann/bluetooth-2.6.git |
1031 | P: Maxim Krasnyansky | ||
1032 | M: maxk@qualcomm.com | ||
1033 | S: Maintained | 958 | S: Maintained |
1034 | 959 | ||
1035 | BONDING DRIVER | 960 | BONDING DRIVER |
diff --git a/arch/ia64/configs/sn2_defconfig b/arch/ia64/configs/sn2_defconfig deleted file mode 100644 index 7f6b2377d13f..000000000000 --- a/arch/ia64/configs/sn2_defconfig +++ /dev/null | |||
@@ -1,1285 +0,0 @@ | |||
1 | # | ||
2 | # Automatically generated make config: don't edit | ||
3 | # Linux kernel version: 2.6.23 | ||
4 | # Thu Oct 18 16:03:40 2007 | ||
5 | # | ||
6 | CONFIG_DEFCONFIG_LIST="/lib/modules/$UNAME_RELEASE/.config" | ||
7 | |||
8 | # | ||
9 | # General setup | ||
10 | # | ||
11 | CONFIG_EXPERIMENTAL=y | ||
12 | CONFIG_LOCK_KERNEL=y | ||
13 | CONFIG_INIT_ENV_ARG_LIMIT=32 | ||
14 | CONFIG_LOCALVERSION="" | ||
15 | # CONFIG_LOCALVERSION_AUTO is not set | ||
16 | CONFIG_SWAP=y | ||
17 | CONFIG_SYSVIPC=y | ||
18 | CONFIG_SYSVIPC_SYSCTL=y | ||
19 | CONFIG_POSIX_MQUEUE=y | ||
20 | # CONFIG_BSD_PROCESS_ACCT is not set | ||
21 | CONFIG_TASKSTATS=y | ||
22 | # CONFIG_TASK_DELAY_ACCT is not set | ||
23 | CONFIG_TASK_XACCT=y | ||
24 | CONFIG_TASK_IO_ACCOUNTING=y | ||
25 | # CONFIG_USER_NS is not set | ||
26 | # CONFIG_AUDIT is not set | ||
27 | # CONFIG_IKCONFIG is not set | ||
28 | CONFIG_LOG_BUF_SHIFT=20 | ||
29 | CONFIG_CGROUPS=y | ||
30 | CONFIG_CPUSETS=y | ||
31 | CONFIG_FAIR_GROUP_SCHED=y | ||
32 | CONFIG_FAIR_USER_SCHED=y | ||
33 | CONFIG_SYSFS_DEPRECATED=y | ||
34 | CONFIG_RELAY=y | ||
35 | CONFIG_BLK_DEV_INITRD=y | ||
36 | CONFIG_INITRAMFS_SOURCE="" | ||
37 | CONFIG_CC_OPTIMIZE_FOR_SIZE=y | ||
38 | CONFIG_SYSCTL=y | ||
39 | # CONFIG_EMBEDDED is not set | ||
40 | CONFIG_SYSCTL_SYSCALL=y | ||
41 | CONFIG_KALLSYMS=y | ||
42 | CONFIG_KALLSYMS_ALL=y | ||
43 | # CONFIG_KALLSYMS_EXTRA_PASS is not set | ||
44 | CONFIG_HOTPLUG=y | ||
45 | CONFIG_PRINTK=y | ||
46 | CONFIG_BUG=y | ||
47 | CONFIG_ELF_CORE=y | ||
48 | CONFIG_BASE_FULL=y | ||
49 | CONFIG_FUTEX=y | ||
50 | CONFIG_ANON_INODES=y | ||
51 | CONFIG_EPOLL=y | ||
52 | CONFIG_SIGNALFD=y | ||
53 | CONFIG_EVENTFD=y | ||
54 | CONFIG_SHMEM=y | ||
55 | CONFIG_VM_EVENT_COUNTERS=y | ||
56 | CONFIG_SLUB_DEBUG=y | ||
57 | # CONFIG_SLAB is not set | ||
58 | CONFIG_SLUB=y | ||
59 | # CONFIG_SLOB is not set | ||
60 | CONFIG_RT_MUTEXES=y | ||
61 | # CONFIG_TINY_SHMEM is not set | ||
62 | CONFIG_BASE_SMALL=0 | ||
63 | CONFIG_MODULES=y | ||
64 | CONFIG_MODULE_UNLOAD=y | ||
65 | # CONFIG_MODULE_FORCE_UNLOAD is not set | ||
66 | # CONFIG_MODVERSIONS is not set | ||
67 | # CONFIG_MODULE_SRCVERSION_ALL is not set | ||
68 | CONFIG_KMOD=y | ||
69 | CONFIG_STOP_MACHINE=y | ||
70 | CONFIG_BLOCK=y | ||
71 | # CONFIG_BLK_DEV_IO_TRACE is not set | ||
72 | CONFIG_BLK_DEV_BSG=y | ||
73 | CONFIG_BLOCK_COMPAT=y | ||
74 | |||
75 | # | ||
76 | # IO Schedulers | ||
77 | # | ||
78 | CONFIG_IOSCHED_NOOP=y | ||
79 | CONFIG_IOSCHED_AS=y | ||
80 | CONFIG_IOSCHED_DEADLINE=y | ||
81 | CONFIG_IOSCHED_CFQ=y | ||
82 | CONFIG_DEFAULT_AS=y | ||
83 | # CONFIG_DEFAULT_DEADLINE is not set | ||
84 | # CONFIG_DEFAULT_CFQ is not set | ||
85 | # CONFIG_DEFAULT_NOOP is not set | ||
86 | CONFIG_DEFAULT_IOSCHED="anticipatory" | ||
87 | |||
88 | # | ||
89 | # Processor type and features | ||
90 | # | ||
91 | CONFIG_IA64=y | ||
92 | CONFIG_64BIT=y | ||
93 | CONFIG_QUICKLIST=y | ||
94 | CONFIG_MMU=y | ||
95 | CONFIG_RWSEM_XCHGADD_ALGORITHM=y | ||
96 | # CONFIG_ARCH_HAS_ILOG2_U32 is not set | ||
97 | # CONFIG_ARCH_HAS_ILOG2_U64 is not set | ||
98 | CONFIG_HUGETLB_PAGE_SIZE_VARIABLE=y | ||
99 | CONFIG_GENERIC_FIND_NEXT_BIT=y | ||
100 | CONFIG_GENERIC_CALIBRATE_DELAY=y | ||
101 | CONFIG_GENERIC_TIME=y | ||
102 | CONFIG_GENERIC_TIME_VSYSCALL=y | ||
103 | CONFIG_DMI=y | ||
104 | CONFIG_EFI=y | ||
105 | CONFIG_GENERIC_IOMAP=y | ||
106 | CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y | ||
107 | CONFIG_IA64_UNCACHED_ALLOCATOR=y | ||
108 | CONFIG_AUDIT_ARCH=y | ||
109 | # CONFIG_IA64_GENERIC is not set | ||
110 | # CONFIG_IA64_DIG is not set | ||
111 | # CONFIG_IA64_HP_ZX1 is not set | ||
112 | # CONFIG_IA64_HP_ZX1_SWIOTLB is not set | ||
113 | CONFIG_IA64_SGI_SN2=y | ||
114 | # CONFIG_IA64_HP_SIM is not set | ||
115 | # CONFIG_ITANIUM is not set | ||
116 | CONFIG_MCKINLEY=y | ||
117 | # CONFIG_IA64_PAGE_SIZE_4KB is not set | ||
118 | # CONFIG_IA64_PAGE_SIZE_8KB is not set | ||
119 | # CONFIG_IA64_PAGE_SIZE_16KB is not set | ||
120 | CONFIG_IA64_PAGE_SIZE_64KB=y | ||
121 | CONFIG_PGTABLE_3=y | ||
122 | # CONFIG_PGTABLE_4 is not set | ||
123 | # CONFIG_HZ_100 is not set | ||
124 | CONFIG_HZ_250=y | ||
125 | # CONFIG_HZ_300 is not set | ||
126 | # CONFIG_HZ_1000 is not set | ||
127 | CONFIG_HZ=250 | ||
128 | CONFIG_IA64_L1_CACHE_SHIFT=7 | ||
129 | # CONFIG_IA64_CYCLONE is not set | ||
130 | CONFIG_IOSAPIC=y | ||
131 | CONFIG_IA64_SGI_SN_XP=m | ||
132 | CONFIG_FORCE_MAX_ZONEORDER=17 | ||
133 | CONFIG_SMP=y | ||
134 | CONFIG_NR_CPUS=1024 | ||
135 | # CONFIG_HOTPLUG_CPU is not set | ||
136 | CONFIG_ARCH_ENABLE_MEMORY_HOTPLUG=y | ||
137 | CONFIG_ARCH_ENABLE_MEMORY_HOTREMOVE=y | ||
138 | CONFIG_SCHED_SMT=y | ||
139 | CONFIG_PREEMPT_NONE=y | ||
140 | # CONFIG_PREEMPT_VOLUNTARY is not set | ||
141 | # CONFIG_PREEMPT is not set | ||
142 | CONFIG_PREEMPT_BKL=y | ||
143 | CONFIG_SELECT_MEMORY_MODEL=y | ||
144 | # CONFIG_FLATMEM_MANUAL is not set | ||
145 | CONFIG_DISCONTIGMEM_MANUAL=y | ||
146 | # CONFIG_SPARSEMEM_MANUAL is not set | ||
147 | CONFIG_DISCONTIGMEM=y | ||
148 | CONFIG_FLAT_NODE_MEM_MAP=y | ||
149 | CONFIG_NEED_MULTIPLE_NODES=y | ||
150 | # CONFIG_SPARSEMEM_STATIC is not set | ||
151 | CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y | ||
152 | CONFIG_SPLIT_PTLOCK_CPUS=4 | ||
153 | CONFIG_MIGRATION=y | ||
154 | CONFIG_RESOURCES_64BIT=y | ||
155 | CONFIG_ZONE_DMA_FLAG=0 | ||
156 | CONFIG_NR_QUICK=1 | ||
157 | CONFIG_VIRT_TO_BUS=y | ||
158 | CONFIG_ARCH_SELECT_MEMORY_MODEL=y | ||
159 | CONFIG_ARCH_DISCONTIGMEM_ENABLE=y | ||
160 | CONFIG_ARCH_FLATMEM_ENABLE=y | ||
161 | CONFIG_ARCH_SPARSEMEM_ENABLE=y | ||
162 | CONFIG_ARCH_DISCONTIGMEM_DEFAULT=y | ||
163 | CONFIG_NUMA=y | ||
164 | CONFIG_NODES_SHIFT=10 | ||
165 | CONFIG_ARCH_POPULATES_NODE_MAP=y | ||
166 | CONFIG_VIRTUAL_MEM_MAP=y | ||
167 | CONFIG_HOLES_IN_ZONE=y | ||
168 | CONFIG_HAVE_ARCH_EARLY_PFN_TO_NID=y | ||
169 | CONFIG_HAVE_ARCH_NODEDATA_EXTENSION=y | ||
170 | CONFIG_IA32_SUPPORT=y | ||
171 | CONFIG_COMPAT=y | ||
172 | CONFIG_COMPAT_FOR_U64_ALIGNMENT=y | ||
173 | CONFIG_IA64_MCA_RECOVERY=y | ||
174 | CONFIG_PERFMON=y | ||
175 | CONFIG_IA64_PALINFO=y | ||
176 | CONFIG_IA64_MC_ERR_INJECT=y | ||
177 | CONFIG_SGI_SN=y | ||
178 | # CONFIG_IA64_ESI is not set | ||
179 | # CONFIG_IA64_HP_AML_NFW is not set | ||
180 | |||
181 | # | ||
182 | # SN Devices | ||
183 | # | ||
184 | CONFIG_SGI_IOC3=y | ||
185 | |||
186 | # | ||
187 | # Firmware Drivers | ||
188 | # | ||
189 | CONFIG_EFI_VARS=y | ||
190 | CONFIG_EFI_PCDP=y | ||
191 | CONFIG_DMIID=y | ||
192 | CONFIG_BINFMT_ELF=y | ||
193 | # CONFIG_BINFMT_MISC is not set | ||
194 | |||
195 | # | ||
196 | # Power management and ACPI | ||
197 | # | ||
198 | CONFIG_PM=y | ||
199 | # CONFIG_PM_LEGACY is not set | ||
200 | # CONFIG_PM_DEBUG is not set | ||
201 | CONFIG_ACPI=y | ||
202 | # CONFIG_ACPI_PROCFS is not set | ||
203 | CONFIG_ACPI_PROC_EVENT=y | ||
204 | # CONFIG_ACPI_BUTTON is not set | ||
205 | # CONFIG_ACPI_FAN is not set | ||
206 | # CONFIG_ACPI_DOCK is not set | ||
207 | # CONFIG_ACPI_PROCESSOR is not set | ||
208 | CONFIG_ACPI_NUMA=y | ||
209 | CONFIG_ACPI_BLACKLIST_YEAR=0 | ||
210 | # CONFIG_ACPI_DEBUG is not set | ||
211 | CONFIG_ACPI_EC=y | ||
212 | CONFIG_ACPI_POWER=y | ||
213 | CONFIG_ACPI_SYSTEM=y | ||
214 | # CONFIG_ACPI_CONTAINER is not set | ||
215 | |||
216 | # | ||
217 | # CPU Frequency scaling | ||
218 | # | ||
219 | # CONFIG_CPU_FREQ is not set | ||
220 | |||
221 | # | ||
222 | # Bus options (PCI, PCMCIA) | ||
223 | # | ||
224 | CONFIG_PCI=y | ||
225 | CONFIG_PCI_DOMAINS=y | ||
226 | CONFIG_PCI_SYSCALL=y | ||
227 | CONFIG_PCIEPORTBUS=y | ||
228 | CONFIG_HOTPLUG_PCI_PCIE=y | ||
229 | CONFIG_PCIEAER=y | ||
230 | CONFIG_ARCH_SUPPORTS_MSI=y | ||
231 | # CONFIG_PCI_MSI is not set | ||
232 | # CONFIG_PCI_DEBUG is not set | ||
233 | CONFIG_HOTPLUG_PCI=y | ||
234 | # CONFIG_HOTPLUG_PCI_FAKE is not set | ||
235 | # CONFIG_HOTPLUG_PCI_ACPI is not set | ||
236 | # CONFIG_HOTPLUG_PCI_CPCI is not set | ||
237 | # CONFIG_HOTPLUG_PCI_SHPC is not set | ||
238 | CONFIG_HOTPLUG_PCI_SGI=y | ||
239 | # CONFIG_PCCARD is not set | ||
240 | |||
241 | # | ||
242 | # Networking | ||
243 | # | ||
244 | CONFIG_NET=y | ||
245 | |||
246 | # | ||
247 | # Networking options | ||
248 | # | ||
249 | CONFIG_PACKET=y | ||
250 | CONFIG_PACKET_MMAP=y | ||
251 | CONFIG_UNIX=y | ||
252 | CONFIG_XFRM=y | ||
253 | # CONFIG_XFRM_USER is not set | ||
254 | # CONFIG_XFRM_SUB_POLICY is not set | ||
255 | # CONFIG_XFRM_MIGRATE is not set | ||
256 | # CONFIG_NET_KEY is not set | ||
257 | CONFIG_INET=y | ||
258 | CONFIG_IP_MULTICAST=y | ||
259 | # CONFIG_IP_ADVANCED_ROUTER is not set | ||
260 | CONFIG_IP_FIB_HASH=y | ||
261 | # CONFIG_IP_PNP is not set | ||
262 | # CONFIG_NET_IPIP is not set | ||
263 | # CONFIG_NET_IPGRE is not set | ||
264 | # CONFIG_IP_MROUTE is not set | ||
265 | # CONFIG_ARPD is not set | ||
266 | CONFIG_SYN_COOKIES=y | ||
267 | # CONFIG_INET_AH is not set | ||
268 | # CONFIG_INET_ESP is not set | ||
269 | # CONFIG_INET_IPCOMP is not set | ||
270 | # CONFIG_INET_XFRM_TUNNEL is not set | ||
271 | CONFIG_INET_TUNNEL=m | ||
272 | CONFIG_INET_XFRM_MODE_TRANSPORT=y | ||
273 | CONFIG_INET_XFRM_MODE_TUNNEL=y | ||
274 | CONFIG_INET_XFRM_MODE_BEET=y | ||
275 | CONFIG_INET_LRO=y | ||
276 | CONFIG_INET_DIAG=m | ||
277 | CONFIG_INET_TCP_DIAG=m | ||
278 | # CONFIG_TCP_CONG_ADVANCED is not set | ||
279 | CONFIG_TCP_CONG_CUBIC=y | ||
280 | CONFIG_DEFAULT_TCP_CONG="cubic" | ||
281 | # CONFIG_TCP_MD5SIG is not set | ||
282 | CONFIG_IPV6=m | ||
283 | # CONFIG_IPV6_PRIVACY is not set | ||
284 | # CONFIG_IPV6_ROUTER_PREF is not set | ||
285 | # CONFIG_IPV6_OPTIMISTIC_DAD is not set | ||
286 | # CONFIG_INET6_AH is not set | ||
287 | # CONFIG_INET6_ESP is not set | ||
288 | # CONFIG_INET6_IPCOMP is not set | ||
289 | # CONFIG_IPV6_MIP6 is not set | ||
290 | # CONFIG_INET6_XFRM_TUNNEL is not set | ||
291 | # CONFIG_INET6_TUNNEL is not set | ||
292 | CONFIG_INET6_XFRM_MODE_TRANSPORT=m | ||
293 | CONFIG_INET6_XFRM_MODE_TUNNEL=m | ||
294 | CONFIG_INET6_XFRM_MODE_BEET=m | ||
295 | # CONFIG_INET6_XFRM_MODE_ROUTEOPTIMIZATION is not set | ||
296 | CONFIG_IPV6_SIT=m | ||
297 | # CONFIG_IPV6_TUNNEL is not set | ||
298 | # CONFIG_IPV6_MULTIPLE_TABLES is not set | ||
299 | # CONFIG_NETWORK_SECMARK is not set | ||
300 | # CONFIG_NETFILTER is not set | ||
301 | # CONFIG_IP_DCCP is not set | ||
302 | # CONFIG_IP_SCTP is not set | ||
303 | # CONFIG_TIPC is not set | ||
304 | # CONFIG_ATM is not set | ||
305 | # CONFIG_BRIDGE is not set | ||
306 | # CONFIG_VLAN_8021Q is not set | ||
307 | # CONFIG_DECNET is not set | ||
308 | # CONFIG_LLC2 is not set | ||
309 | # CONFIG_IPX is not set | ||
310 | # CONFIG_ATALK is not set | ||
311 | # CONFIG_X25 is not set | ||
312 | # CONFIG_LAPB is not set | ||
313 | # CONFIG_ECONET is not set | ||
314 | # CONFIG_WAN_ROUTER is not set | ||
315 | |||
316 | # | ||
317 | # QoS and/or fair queueing | ||
318 | # | ||
319 | # CONFIG_NET_SCHED is not set | ||
320 | |||
321 | # | ||
322 | # Network testing | ||
323 | # | ||
324 | # CONFIG_NET_PKTGEN is not set | ||
325 | # CONFIG_HAMRADIO is not set | ||
326 | # CONFIG_IRDA is not set | ||
327 | # CONFIG_BT is not set | ||
328 | # CONFIG_AF_RXRPC is not set | ||
329 | |||
330 | # | ||
331 | # Wireless | ||
332 | # | ||
333 | # CONFIG_CFG80211 is not set | ||
334 | # CONFIG_WIRELESS_EXT is not set | ||
335 | # CONFIG_MAC80211 is not set | ||
336 | # CONFIG_IEEE80211 is not set | ||
337 | # CONFIG_RFKILL is not set | ||
338 | # CONFIG_NET_9P is not set | ||
339 | |||
340 | # | ||
341 | # Device Drivers | ||
342 | # | ||
343 | |||
344 | # | ||
345 | # Generic Driver Options | ||
346 | # | ||
347 | CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug" | ||
348 | CONFIG_STANDALONE=y | ||
349 | CONFIG_PREVENT_FIRMWARE_BUILD=y | ||
350 | CONFIG_FW_LOADER=y | ||
351 | # CONFIG_DEBUG_DRIVER is not set | ||
352 | # CONFIG_DEBUG_DEVRES is not set | ||
353 | # CONFIG_SYS_HYPERVISOR is not set | ||
354 | # CONFIG_CONNECTOR is not set | ||
355 | # CONFIG_MTD is not set | ||
356 | # CONFIG_PARPORT is not set | ||
357 | CONFIG_PNP=y | ||
358 | # CONFIG_PNP_DEBUG is not set | ||
359 | |||
360 | # | ||
361 | # Protocols | ||
362 | # | ||
363 | CONFIG_PNPACPI=y | ||
364 | CONFIG_BLK_DEV=y | ||
365 | # CONFIG_BLK_CPQ_DA is not set | ||
366 | # CONFIG_BLK_CPQ_CISS_DA is not set | ||
367 | # CONFIG_BLK_DEV_DAC960 is not set | ||
368 | # CONFIG_BLK_DEV_UMEM is not set | ||
369 | # CONFIG_BLK_DEV_COW_COMMON is not set | ||
370 | CONFIG_BLK_DEV_LOOP=y | ||
371 | CONFIG_BLK_DEV_CRYPTOLOOP=m | ||
372 | CONFIG_BLK_DEV_NBD=m | ||
373 | # CONFIG_BLK_DEV_SX8 is not set | ||
374 | # CONFIG_BLK_DEV_UB is not set | ||
375 | CONFIG_BLK_DEV_RAM=y | ||
376 | CONFIG_BLK_DEV_RAM_COUNT=16 | ||
377 | CONFIG_BLK_DEV_RAM_SIZE=4096 | ||
378 | CONFIG_BLK_DEV_RAM_BLOCKSIZE=1024 | ||
379 | # CONFIG_CDROM_PKTCDVD is not set | ||
380 | CONFIG_ATA_OVER_ETH=m | ||
381 | CONFIG_MISC_DEVICES=y | ||
382 | # CONFIG_PHANTOM is not set | ||
383 | # CONFIG_EEPROM_93CX6 is not set | ||
384 | CONFIG_SGI_IOC4=y | ||
385 | # CONFIG_TIFM_CORE is not set | ||
386 | CONFIG_IDE=y | ||
387 | CONFIG_IDE_MAX_HWIFS=4 | ||
388 | CONFIG_BLK_DEV_IDE=y | ||
389 | |||
390 | # | ||
391 | # Please see Documentation/ide.txt for help/info on IDE drives | ||
392 | # | ||
393 | # CONFIG_BLK_DEV_IDE_SATA is not set | ||
394 | CONFIG_BLK_DEV_IDEDISK=y | ||
395 | # CONFIG_IDEDISK_MULTI_MODE is not set | ||
396 | CONFIG_BLK_DEV_IDECD=y | ||
397 | # CONFIG_BLK_DEV_IDETAPE is not set | ||
398 | # CONFIG_BLK_DEV_IDEFLOPPY is not set | ||
399 | # CONFIG_BLK_DEV_IDESCSI is not set | ||
400 | # CONFIG_BLK_DEV_IDEACPI is not set | ||
401 | # CONFIG_IDE_TASK_IOCTL is not set | ||
402 | CONFIG_IDE_PROC_FS=y | ||
403 | |||
404 | # | ||
405 | # IDE chipset support/bugfixes | ||
406 | # | ||
407 | CONFIG_IDE_GENERIC=y | ||
408 | # CONFIG_BLK_DEV_PLATFORM is not set | ||
409 | # CONFIG_BLK_DEV_IDEPNP is not set | ||
410 | |||
411 | # | ||
412 | # PCI IDE chipsets support | ||
413 | # | ||
414 | CONFIG_BLK_DEV_IDEPCI=y | ||
415 | CONFIG_IDEPCI_SHARE_IRQ=y | ||
416 | CONFIG_IDEPCI_PCIBUS_ORDER=y | ||
417 | # CONFIG_BLK_DEV_OFFBOARD is not set | ||
418 | # CONFIG_BLK_DEV_GENERIC is not set | ||
419 | # CONFIG_BLK_DEV_OPTI621 is not set | ||
420 | CONFIG_BLK_DEV_IDEDMA_PCI=y | ||
421 | # CONFIG_BLK_DEV_AEC62XX is not set | ||
422 | # CONFIG_BLK_DEV_ALI15X3 is not set | ||
423 | # CONFIG_BLK_DEV_AMD74XX is not set | ||
424 | # CONFIG_BLK_DEV_CMD64X is not set | ||
425 | # CONFIG_BLK_DEV_TRIFLEX is not set | ||
426 | # CONFIG_BLK_DEV_CY82C693 is not set | ||
427 | # CONFIG_BLK_DEV_CS5520 is not set | ||
428 | # CONFIG_BLK_DEV_CS5530 is not set | ||
429 | # CONFIG_BLK_DEV_HPT34X is not set | ||
430 | # CONFIG_BLK_DEV_HPT366 is not set | ||
431 | # CONFIG_BLK_DEV_JMICRON is not set | ||
432 | # CONFIG_BLK_DEV_SC1200 is not set | ||
433 | # CONFIG_BLK_DEV_PIIX is not set | ||
434 | # CONFIG_BLK_DEV_IT8213 is not set | ||
435 | # CONFIG_BLK_DEV_IT821X is not set | ||
436 | # CONFIG_BLK_DEV_NS87415 is not set | ||
437 | # CONFIG_BLK_DEV_PDC202XX_OLD is not set | ||
438 | # CONFIG_BLK_DEV_PDC202XX_NEW is not set | ||
439 | # CONFIG_BLK_DEV_SVWKS is not set | ||
440 | CONFIG_BLK_DEV_SGIIOC4=y | ||
441 | # CONFIG_BLK_DEV_SIIMAGE is not set | ||
442 | # CONFIG_BLK_DEV_SLC90E66 is not set | ||
443 | # CONFIG_BLK_DEV_TRM290 is not set | ||
444 | # CONFIG_BLK_DEV_VIA82CXXX is not set | ||
445 | # CONFIG_BLK_DEV_TC86C001 is not set | ||
446 | # CONFIG_IDE_ARM is not set | ||
447 | CONFIG_BLK_DEV_IDEDMA=y | ||
448 | # CONFIG_BLK_DEV_HD is not set | ||
449 | |||
450 | # | ||
451 | # SCSI device support | ||
452 | # | ||
453 | # CONFIG_RAID_ATTRS is not set | ||
454 | CONFIG_SCSI=y | ||
455 | CONFIG_SCSI_DMA=y | ||
456 | # CONFIG_SCSI_TGT is not set | ||
457 | CONFIG_SCSI_NETLINK=y | ||
458 | CONFIG_SCSI_PROC_FS=y | ||
459 | |||
460 | # | ||
461 | # SCSI support type (disk, tape, CD-ROM) | ||
462 | # | ||
463 | CONFIG_BLK_DEV_SD=y | ||
464 | CONFIG_CHR_DEV_ST=m | ||
465 | # CONFIG_CHR_DEV_OSST is not set | ||
466 | CONFIG_BLK_DEV_SR=m | ||
467 | # CONFIG_BLK_DEV_SR_VENDOR is not set | ||
468 | CONFIG_CHR_DEV_SG=m | ||
469 | CONFIG_CHR_DEV_SCH=m | ||
470 | |||
471 | # | ||
472 | # Some SCSI devices (e.g. CD jukebox) support multiple LUNs | ||
473 | # | ||
474 | # CONFIG_SCSI_MULTI_LUN is not set | ||
475 | CONFIG_SCSI_CONSTANTS=y | ||
476 | # CONFIG_SCSI_LOGGING is not set | ||
477 | # CONFIG_SCSI_SCAN_ASYNC is not set | ||
478 | CONFIG_SCSI_WAIT_SCAN=m | ||
479 | |||
480 | # | ||
481 | # SCSI Transports | ||
482 | # | ||
483 | CONFIG_SCSI_SPI_ATTRS=y | ||
484 | CONFIG_SCSI_FC_ATTRS=y | ||
485 | CONFIG_SCSI_ISCSI_ATTRS=m | ||
486 | CONFIG_SCSI_SAS_ATTRS=y | ||
487 | CONFIG_SCSI_SAS_LIBSAS=y | ||
488 | # CONFIG_SCSI_SAS_ATA is not set | ||
489 | # CONFIG_SCSI_SAS_LIBSAS_DEBUG is not set | ||
490 | CONFIG_SCSI_SRP_ATTRS=y | ||
491 | CONFIG_SCSI_LOWLEVEL=y | ||
492 | CONFIG_ISCSI_TCP=m | ||
493 | # CONFIG_BLK_DEV_3W_XXXX_RAID is not set | ||
494 | # CONFIG_SCSI_3W_9XXX is not set | ||
495 | # CONFIG_SCSI_ACARD is not set | ||
496 | # CONFIG_SCSI_AACRAID is not set | ||
497 | # CONFIG_SCSI_AIC7XXX is not set | ||
498 | # CONFIG_SCSI_AIC7XXX_OLD is not set | ||
499 | # CONFIG_SCSI_AIC79XX is not set | ||
500 | # CONFIG_SCSI_AIC94XX is not set | ||
501 | # CONFIG_SCSI_ADVANSYS is not set | ||
502 | # CONFIG_SCSI_ARCMSR is not set | ||
503 | # CONFIG_MEGARAID_NEWGEN is not set | ||
504 | # CONFIG_MEGARAID_LEGACY is not set | ||
505 | # CONFIG_MEGARAID_SAS is not set | ||
506 | # CONFIG_SCSI_HPTIOP is not set | ||
507 | # CONFIG_SCSI_DMX3191D is not set | ||
508 | # CONFIG_SCSI_FUTURE_DOMAIN is not set | ||
509 | # CONFIG_SCSI_IPS is not set | ||
510 | # CONFIG_SCSI_INITIO is not set | ||
511 | # CONFIG_SCSI_INIA100 is not set | ||
512 | # CONFIG_SCSI_STEX is not set | ||
513 | # CONFIG_SCSI_SYM53C8XX_2 is not set | ||
514 | # CONFIG_SCSI_IPR is not set | ||
515 | CONFIG_SCSI_QLOGIC_1280=y | ||
516 | CONFIG_SCSI_QLA_FC=y | ||
517 | # CONFIG_SCSI_QLA_ISCSI is not set | ||
518 | # CONFIG_SCSI_LPFC is not set | ||
519 | # CONFIG_SCSI_DC395x is not set | ||
520 | # CONFIG_SCSI_DC390T is not set | ||
521 | # CONFIG_SCSI_DEBUG is not set | ||
522 | # CONFIG_SCSI_SRP is not set | ||
523 | CONFIG_ATA=y | ||
524 | CONFIG_ATA_NONSTANDARD=y | ||
525 | CONFIG_ATA_ACPI=y | ||
526 | # CONFIG_SATA_AHCI is not set | ||
527 | # CONFIG_SATA_SVW is not set | ||
528 | # CONFIG_ATA_PIIX is not set | ||
529 | # CONFIG_SATA_MV is not set | ||
530 | # CONFIG_SATA_NV is not set | ||
531 | # CONFIG_PDC_ADMA is not set | ||
532 | # CONFIG_SATA_QSTOR is not set | ||
533 | # CONFIG_SATA_PROMISE is not set | ||
534 | # CONFIG_SATA_SX4 is not set | ||
535 | # CONFIG_SATA_SIL is not set | ||
536 | # CONFIG_SATA_SIL24 is not set | ||
537 | # CONFIG_SATA_SIS is not set | ||
538 | # CONFIG_SATA_ULI is not set | ||
539 | # CONFIG_SATA_VIA is not set | ||
540 | CONFIG_SATA_VITESSE=y | ||
541 | # CONFIG_SATA_INIC162X is not set | ||
542 | # CONFIG_PATA_ACPI is not set | ||
543 | # CONFIG_PATA_ALI is not set | ||
544 | # CONFIG_PATA_AMD is not set | ||
545 | # CONFIG_PATA_ARTOP is not set | ||
546 | # CONFIG_PATA_ATIIXP is not set | ||
547 | # CONFIG_PATA_CMD640_PCI is not set | ||
548 | # CONFIG_PATA_CMD64X is not set | ||
549 | # CONFIG_PATA_CS5520 is not set | ||
550 | # CONFIG_PATA_CS5530 is not set | ||
551 | # CONFIG_PATA_CYPRESS is not set | ||
552 | # CONFIG_PATA_EFAR is not set | ||
553 | # CONFIG_ATA_GENERIC is not set | ||
554 | # CONFIG_PATA_HPT366 is not set | ||
555 | # CONFIG_PATA_HPT37X is not set | ||
556 | # CONFIG_PATA_HPT3X2N is not set | ||
557 | # CONFIG_PATA_HPT3X3 is not set | ||
558 | # CONFIG_PATA_IT821X is not set | ||
559 | # CONFIG_PATA_IT8213 is not set | ||
560 | # CONFIG_PATA_JMICRON is not set | ||
561 | # CONFIG_PATA_TRIFLEX is not set | ||
562 | # CONFIG_PATA_MARVELL is not set | ||
563 | # CONFIG_PATA_MPIIX is not set | ||
564 | # CONFIG_PATA_OLDPIIX is not set | ||
565 | # CONFIG_PATA_NETCELL is not set | ||
566 | # CONFIG_PATA_NS87410 is not set | ||
567 | # CONFIG_PATA_NS87415 is not set | ||
568 | # CONFIG_PATA_OPTI is not set | ||
569 | # CONFIG_PATA_OPTIDMA is not set | ||
570 | # CONFIG_PATA_PDC_OLD is not set | ||
571 | # CONFIG_PATA_RADISYS is not set | ||
572 | # CONFIG_PATA_RZ1000 is not set | ||
573 | # CONFIG_PATA_SC1200 is not set | ||
574 | # CONFIG_PATA_SERVERWORKS is not set | ||
575 | # CONFIG_PATA_PDC2027X is not set | ||
576 | # CONFIG_PATA_SIL680 is not set | ||
577 | # CONFIG_PATA_SIS is not set | ||
578 | # CONFIG_PATA_VIA is not set | ||
579 | # CONFIG_PATA_WINBOND is not set | ||
580 | CONFIG_MD=y | ||
581 | CONFIG_BLK_DEV_MD=y | ||
582 | CONFIG_MD_LINEAR=y | ||
583 | CONFIG_MD_RAID0=y | ||
584 | CONFIG_MD_RAID1=y | ||
585 | # CONFIG_MD_RAID10 is not set | ||
586 | CONFIG_MD_RAID456=y | ||
587 | # CONFIG_MD_RAID5_RESHAPE is not set | ||
588 | CONFIG_MD_MULTIPATH=y | ||
589 | # CONFIG_MD_FAULTY is not set | ||
590 | CONFIG_BLK_DEV_DM=y | ||
591 | # CONFIG_DM_DEBUG is not set | ||
592 | CONFIG_DM_CRYPT=m | ||
593 | CONFIG_DM_SNAPSHOT=m | ||
594 | CONFIG_DM_MIRROR=m | ||
595 | CONFIG_DM_ZERO=m | ||
596 | CONFIG_DM_MULTIPATH=m | ||
597 | CONFIG_DM_MULTIPATH_EMC=m | ||
598 | # CONFIG_DM_MULTIPATH_RDAC is not set | ||
599 | # CONFIG_DM_DELAY is not set | ||
600 | CONFIG_FUSION=y | ||
601 | CONFIG_FUSION_SPI=y | ||
602 | CONFIG_FUSION_FC=y | ||
603 | CONFIG_FUSION_SAS=y | ||
604 | CONFIG_FUSION_MAX_SGE=128 | ||
605 | CONFIG_FUSION_CTL=m | ||
606 | CONFIG_FUSION_LOGGING=y | ||
607 | |||
608 | # | ||
609 | # IEEE 1394 (FireWire) support | ||
610 | # | ||
611 | # CONFIG_FIREWIRE is not set | ||
612 | # CONFIG_IEEE1394 is not set | ||
613 | # CONFIG_I2O is not set | ||
614 | CONFIG_NETDEVICES=y | ||
615 | # CONFIG_NETDEVICES_MULTIQUEUE is not set | ||
616 | # CONFIG_DUMMY is not set | ||
617 | # CONFIG_BONDING is not set | ||
618 | # CONFIG_MACVLAN is not set | ||
619 | # CONFIG_EQUALIZER is not set | ||
620 | # CONFIG_TUN is not set | ||
621 | # CONFIG_VETH is not set | ||
622 | # CONFIG_NET_SB1000 is not set | ||
623 | # CONFIG_IP1000 is not set | ||
624 | # CONFIG_ARCNET is not set | ||
625 | # CONFIG_NET_ETHERNET is not set | ||
626 | CONFIG_NETDEV_1000=y | ||
627 | # CONFIG_ACENIC is not set | ||
628 | # CONFIG_DL2K is not set | ||
629 | # CONFIG_E1000 is not set | ||
630 | # CONFIG_E1000E is not set | ||
631 | # CONFIG_NS83820 is not set | ||
632 | # CONFIG_HAMACHI is not set | ||
633 | # CONFIG_YELLOWFIN is not set | ||
634 | # CONFIG_R8169 is not set | ||
635 | # CONFIG_SIS190 is not set | ||
636 | # CONFIG_SKGE is not set | ||
637 | # CONFIG_SKY2 is not set | ||
638 | # CONFIG_SK98LIN is not set | ||
639 | # CONFIG_VIA_VELOCITY is not set | ||
640 | CONFIG_TIGON3=y | ||
641 | # CONFIG_BNX2 is not set | ||
642 | # CONFIG_QLA3XXX is not set | ||
643 | # CONFIG_ATL1 is not set | ||
644 | CONFIG_NETDEV_10000=y | ||
645 | CONFIG_CHELSIO_T1=m | ||
646 | CONFIG_CHELSIO_T1_1G=y | ||
647 | # CONFIG_CHELSIO_T1_NAPI is not set | ||
648 | CONFIG_CHELSIO_T3=m | ||
649 | CONFIG_IXGBE=m | ||
650 | # CONFIG_IXGB is not set | ||
651 | CONFIG_S2IO=m | ||
652 | # CONFIG_S2IO_NAPI is not set | ||
653 | # CONFIG_MYRI10GE is not set | ||
654 | # CONFIG_NETXEN_NIC is not set | ||
655 | # CONFIG_NIU is not set | ||
656 | # CONFIG_MLX4_CORE is not set | ||
657 | # CONFIG_TEHUTI is not set | ||
658 | # CONFIG_TR is not set | ||
659 | |||
660 | # | ||
661 | # Wireless LAN | ||
662 | # | ||
663 | # CONFIG_WLAN_PRE80211 is not set | ||
664 | # CONFIG_WLAN_80211 is not set | ||
665 | |||
666 | # | ||
667 | # USB Network Adapters | ||
668 | # | ||
669 | # CONFIG_USB_CATC is not set | ||
670 | # CONFIG_USB_KAWETH is not set | ||
671 | # CONFIG_USB_PEGASUS is not set | ||
672 | # CONFIG_USB_RTL8150 is not set | ||
673 | # CONFIG_USB_USBNET_MII is not set | ||
674 | # CONFIG_USB_USBNET is not set | ||
675 | # CONFIG_WAN is not set | ||
676 | # CONFIG_FDDI is not set | ||
677 | # CONFIG_HIPPI is not set | ||
678 | # CONFIG_PPP is not set | ||
679 | # CONFIG_SLIP is not set | ||
680 | # CONFIG_NET_FC is not set | ||
681 | # CONFIG_SHAPER is not set | ||
682 | CONFIG_NETCONSOLE=y | ||
683 | # CONFIG_NETCONSOLE_DYNAMIC is not set | ||
684 | CONFIG_NETPOLL=y | ||
685 | # CONFIG_NETPOLL_TRAP is not set | ||
686 | CONFIG_NET_POLL_CONTROLLER=y | ||
687 | # CONFIG_ISDN is not set | ||
688 | # CONFIG_PHONE is not set | ||
689 | |||
690 | # | ||
691 | # Input device support | ||
692 | # | ||
693 | CONFIG_INPUT=y | ||
694 | # CONFIG_INPUT_FF_MEMLESS is not set | ||
695 | # CONFIG_INPUT_POLLDEV is not set | ||
696 | |||
697 | # | ||
698 | # Userland interfaces | ||
699 | # | ||
700 | CONFIG_INPUT_MOUSEDEV=y | ||
701 | # CONFIG_INPUT_MOUSEDEV_PSAUX is not set | ||
702 | CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024 | ||
703 | CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768 | ||
704 | # CONFIG_INPUT_JOYDEV is not set | ||
705 | # CONFIG_INPUT_EVDEV is not set | ||
706 | # CONFIG_INPUT_EVBUG is not set | ||
707 | |||
708 | # | ||
709 | # Input Device Drivers | ||
710 | # | ||
711 | # CONFIG_INPUT_KEYBOARD is not set | ||
712 | # CONFIG_INPUT_MOUSE is not set | ||
713 | # CONFIG_INPUT_JOYSTICK is not set | ||
714 | # CONFIG_INPUT_TABLET is not set | ||
715 | # CONFIG_INPUT_TOUCHSCREEN is not set | ||
716 | # CONFIG_INPUT_MISC is not set | ||
717 | |||
718 | # | ||
719 | # Hardware I/O ports | ||
720 | # | ||
721 | # CONFIG_SERIO is not set | ||
722 | # CONFIG_GAMEPORT is not set | ||
723 | |||
724 | # | ||
725 | # Character devices | ||
726 | # | ||
727 | CONFIG_VT=y | ||
728 | # CONFIG_VT_UNICODE is not set | ||
729 | CONFIG_VT_CONSOLE=y | ||
730 | CONFIG_HW_CONSOLE=y | ||
731 | # CONFIG_VT_HW_CONSOLE_BINDING is not set | ||
732 | CONFIG_SERIAL_NONSTANDARD=y | ||
733 | # CONFIG_COMPUTONE is not set | ||
734 | # CONFIG_ROCKETPORT is not set | ||
735 | # CONFIG_CYCLADES is not set | ||
736 | # CONFIG_DIGIEPCA is not set | ||
737 | # CONFIG_MOXA_INTELLIO is not set | ||
738 | # CONFIG_MOXA_SMARTIO is not set | ||
739 | # CONFIG_MOXA_SMARTIO_NEW is not set | ||
740 | # CONFIG_ISI is not set | ||
741 | # CONFIG_SYNCLINKMP is not set | ||
742 | # CONFIG_SYNCLINK_GT is not set | ||
743 | # CONFIG_N_HDLC is not set | ||
744 | # CONFIG_SPECIALIX is not set | ||
745 | # CONFIG_SX is not set | ||
746 | # CONFIG_RIO is not set | ||
747 | # CONFIG_STALDRV is not set | ||
748 | CONFIG_SGI_SNSC=y | ||
749 | CONFIG_SGI_TIOCX=y | ||
750 | CONFIG_SGI_MBCS=m | ||
751 | |||
752 | # | ||
753 | # Serial drivers | ||
754 | # | ||
755 | # CONFIG_SERIAL_8250 is not set | ||
756 | |||
757 | # | ||
758 | # Non-8250 serial port support | ||
759 | # | ||
760 | CONFIG_SERIAL_CORE=y | ||
761 | CONFIG_SERIAL_CORE_CONSOLE=y | ||
762 | CONFIG_SERIAL_SGI_L1_CONSOLE=y | ||
763 | # CONFIG_SERIAL_JSM is not set | ||
764 | CONFIG_SERIAL_SGI_IOC4=y | ||
765 | CONFIG_SERIAL_SGI_IOC3=y | ||
766 | CONFIG_UNIX98_PTYS=y | ||
767 | CONFIG_LEGACY_PTYS=y | ||
768 | CONFIG_LEGACY_PTY_COUNT=256 | ||
769 | # CONFIG_IPMI_HANDLER is not set | ||
770 | # CONFIG_WATCHDOG is not set | ||
771 | # CONFIG_HW_RANDOM is not set | ||
772 | CONFIG_EFI_RTC=y | ||
773 | # CONFIG_R3964 is not set | ||
774 | # CONFIG_APPLICOM is not set | ||
775 | CONFIG_RAW_DRIVER=m | ||
776 | CONFIG_MAX_RAW_DEVS=256 | ||
777 | # CONFIG_HPET is not set | ||
778 | # CONFIG_HANGCHECK_TIMER is not set | ||
779 | CONFIG_MMTIMER=y | ||
780 | # CONFIG_TCG_TPM is not set | ||
781 | CONFIG_DEVPORT=y | ||
782 | # CONFIG_I2C is not set | ||
783 | |||
784 | # | ||
785 | # SPI support | ||
786 | # | ||
787 | # CONFIG_SPI is not set | ||
788 | # CONFIG_SPI_MASTER is not set | ||
789 | # CONFIG_W1 is not set | ||
790 | # CONFIG_POWER_SUPPLY is not set | ||
791 | # CONFIG_HWMON is not set | ||
792 | |||
793 | # | ||
794 | # Sonics Silicon Backplane | ||
795 | # | ||
796 | CONFIG_SSB_POSSIBLE=y | ||
797 | # CONFIG_SSB is not set | ||
798 | |||
799 | # | ||
800 | # Multifunction device drivers | ||
801 | # | ||
802 | # CONFIG_MFD_SM501 is not set | ||
803 | |||
804 | # | ||
805 | # Multimedia devices | ||
806 | # | ||
807 | # CONFIG_VIDEO_DEV is not set | ||
808 | # CONFIG_DVB_CORE is not set | ||
809 | # CONFIG_DAB is not set | ||
810 | |||
811 | # | ||
812 | # Graphics support | ||
813 | # | ||
814 | CONFIG_AGP=y | ||
815 | CONFIG_AGP_SGI_TIOCA=y | ||
816 | # CONFIG_DRM is not set | ||
817 | # CONFIG_VGASTATE is not set | ||
818 | CONFIG_VIDEO_OUTPUT_CONTROL=m | ||
819 | # CONFIG_FB is not set | ||
820 | # CONFIG_BACKLIGHT_LCD_SUPPORT is not set | ||
821 | |||
822 | # | ||
823 | # Display device support | ||
824 | # | ||
825 | # CONFIG_DISPLAY_SUPPORT is not set | ||
826 | |||
827 | # | ||
828 | # Console display driver support | ||
829 | # | ||
830 | CONFIG_VGA_CONSOLE=y | ||
831 | # CONFIG_VGACON_SOFT_SCROLLBACK is not set | ||
832 | CONFIG_DUMMY_CONSOLE=y | ||
833 | |||
834 | # | ||
835 | # Sound | ||
836 | # | ||
837 | # CONFIG_SOUND is not set | ||
838 | CONFIG_HID_SUPPORT=y | ||
839 | CONFIG_HID=y | ||
840 | CONFIG_HID_DEBUG=y | ||
841 | # CONFIG_HIDRAW is not set | ||
842 | |||
843 | # | ||
844 | # USB Input Devices | ||
845 | # | ||
846 | CONFIG_USB_HID=m | ||
847 | # CONFIG_USB_HIDINPUT_POWERBOOK is not set | ||
848 | # CONFIG_HID_FF is not set | ||
849 | # CONFIG_USB_HIDDEV is not set | ||
850 | |||
851 | # | ||
852 | # USB HID Boot Protocol drivers | ||
853 | # | ||
854 | # CONFIG_USB_KBD is not set | ||
855 | # CONFIG_USB_MOUSE is not set | ||
856 | CONFIG_USB_SUPPORT=y | ||
857 | CONFIG_USB_ARCH_HAS_HCD=y | ||
858 | CONFIG_USB_ARCH_HAS_OHCI=y | ||
859 | CONFIG_USB_ARCH_HAS_EHCI=y | ||
860 | CONFIG_USB=m | ||
861 | # CONFIG_USB_DEBUG is not set | ||
862 | |||
863 | # | ||
864 | # Miscellaneous USB options | ||
865 | # | ||
866 | # CONFIG_USB_DEVICEFS is not set | ||
867 | CONFIG_USB_DEVICE_CLASS=y | ||
868 | # CONFIG_USB_DYNAMIC_MINORS is not set | ||
869 | # CONFIG_USB_SUSPEND is not set | ||
870 | # CONFIG_USB_PERSIST is not set | ||
871 | # CONFIG_USB_OTG is not set | ||
872 | |||
873 | # | ||
874 | # USB Host Controller Drivers | ||
875 | # | ||
876 | CONFIG_USB_EHCI_HCD=m | ||
877 | # CONFIG_USB_EHCI_SPLIT_ISO is not set | ||
878 | # CONFIG_USB_EHCI_ROOT_HUB_TT is not set | ||
879 | # CONFIG_USB_EHCI_TT_NEWSCHED is not set | ||
880 | # CONFIG_USB_ISP116X_HCD is not set | ||
881 | CONFIG_USB_OHCI_HCD=m | ||
882 | # CONFIG_USB_OHCI_BIG_ENDIAN_DESC is not set | ||
883 | # CONFIG_USB_OHCI_BIG_ENDIAN_MMIO is not set | ||
884 | CONFIG_USB_OHCI_LITTLE_ENDIAN=y | ||
885 | CONFIG_USB_UHCI_HCD=m | ||
886 | # CONFIG_USB_SL811_HCD is not set | ||
887 | # CONFIG_USB_R8A66597_HCD is not set | ||
888 | |||
889 | # | ||
890 | # USB Device Class drivers | ||
891 | # | ||
892 | # CONFIG_USB_ACM is not set | ||
893 | # CONFIG_USB_PRINTER is not set | ||
894 | |||
895 | # | ||
896 | # NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support' | ||
897 | # | ||
898 | |||
899 | # | ||
900 | # may also be needed; see USB_STORAGE Help for more information | ||
901 | # | ||
902 | # CONFIG_USB_STORAGE is not set | ||
903 | # CONFIG_USB_LIBUSUAL is not set | ||
904 | |||
905 | # | ||
906 | # USB Imaging devices | ||
907 | # | ||
908 | # CONFIG_USB_MDC800 is not set | ||
909 | # CONFIG_USB_MICROTEK is not set | ||
910 | CONFIG_USB_MON=y | ||
911 | |||
912 | # | ||
913 | # USB port drivers | ||
914 | # | ||
915 | |||
916 | # | ||
917 | # USB Serial Converter support | ||
918 | # | ||
919 | # CONFIG_USB_SERIAL is not set | ||
920 | |||
921 | # | ||
922 | # USB Miscellaneous drivers | ||
923 | # | ||
924 | # CONFIG_USB_EMI62 is not set | ||
925 | # CONFIG_USB_EMI26 is not set | ||
926 | # CONFIG_USB_ADUTUX is not set | ||
927 | # CONFIG_USB_AUERSWALD is not set | ||
928 | # CONFIG_USB_RIO500 is not set | ||
929 | # CONFIG_USB_LEGOTOWER is not set | ||
930 | # CONFIG_USB_LCD is not set | ||
931 | # CONFIG_USB_BERRY_CHARGE is not set | ||
932 | # CONFIG_USB_LED is not set | ||
933 | # CONFIG_USB_CYPRESS_CY7C63 is not set | ||
934 | # CONFIG_USB_CYTHERM is not set | ||
935 | # CONFIG_USB_PHIDGET is not set | ||
936 | # CONFIG_USB_IDMOUSE is not set | ||
937 | # CONFIG_USB_FTDI_ELAN is not set | ||
938 | # CONFIG_USB_APPLEDISPLAY is not set | ||
939 | # CONFIG_USB_SISUSBVGA is not set | ||
940 | # CONFIG_USB_LD is not set | ||
941 | # CONFIG_USB_TRANCEVIBRATOR is not set | ||
942 | # CONFIG_USB_IOWARRIOR is not set | ||
943 | |||
944 | # | ||
945 | # USB DSL modem support | ||
946 | # | ||
947 | |||
948 | # | ||
949 | # USB Gadget Support | ||
950 | # | ||
951 | # CONFIG_USB_GADGET is not set | ||
952 | # CONFIG_MMC is not set | ||
953 | # CONFIG_NEW_LEDS is not set | ||
954 | CONFIG_INFINIBAND=m | ||
955 | # CONFIG_INFINIBAND_USER_MAD is not set | ||
956 | CONFIG_INFINIBAND_USER_ACCESS=m | ||
957 | CONFIG_INFINIBAND_USER_MEM=y | ||
958 | CONFIG_INFINIBAND_ADDR_TRANS=y | ||
959 | CONFIG_INFINIBAND_MTHCA=m | ||
960 | CONFIG_INFINIBAND_MTHCA_DEBUG=y | ||
961 | # CONFIG_INFINIBAND_AMSO1100 is not set | ||
962 | # CONFIG_INFINIBAND_CXGB3 is not set | ||
963 | # CONFIG_MLX4_INFINIBAND is not set | ||
964 | CONFIG_INFINIBAND_IPOIB=m | ||
965 | # CONFIG_INFINIBAND_IPOIB_CM is not set | ||
966 | CONFIG_INFINIBAND_IPOIB_DEBUG=y | ||
967 | # CONFIG_INFINIBAND_IPOIB_DEBUG_DATA is not set | ||
968 | CONFIG_INFINIBAND_SRP=m | ||
969 | # CONFIG_INFINIBAND_ISER is not set | ||
970 | # CONFIG_RTC_CLASS is not set | ||
971 | |||
972 | # | ||
973 | # Userspace I/O | ||
974 | # | ||
975 | # CONFIG_UIO is not set | ||
976 | CONFIG_MSPEC=y | ||
977 | |||
978 | # | ||
979 | # File systems | ||
980 | # | ||
981 | CONFIG_EXT2_FS=y | ||
982 | CONFIG_EXT2_FS_XATTR=y | ||
983 | CONFIG_EXT2_FS_POSIX_ACL=y | ||
984 | CONFIG_EXT2_FS_SECURITY=y | ||
985 | # CONFIG_EXT2_FS_XIP is not set | ||
986 | CONFIG_EXT3_FS=y | ||
987 | CONFIG_EXT3_FS_XATTR=y | ||
988 | CONFIG_EXT3_FS_POSIX_ACL=y | ||
989 | CONFIG_EXT3_FS_SECURITY=y | ||
990 | # CONFIG_EXT4DEV_FS is not set | ||
991 | CONFIG_JBD=y | ||
992 | # CONFIG_JBD_DEBUG is not set | ||
993 | CONFIG_FS_MBCACHE=y | ||
994 | CONFIG_REISERFS_FS=y | ||
995 | # CONFIG_REISERFS_CHECK is not set | ||
996 | # CONFIG_REISERFS_PROC_INFO is not set | ||
997 | CONFIG_REISERFS_FS_XATTR=y | ||
998 | CONFIG_REISERFS_FS_POSIX_ACL=y | ||
999 | CONFIG_REISERFS_FS_SECURITY=y | ||
1000 | # CONFIG_JFS_FS is not set | ||
1001 | CONFIG_FS_POSIX_ACL=y | ||
1002 | CONFIG_XFS_FS=y | ||
1003 | CONFIG_XFS_QUOTA=y | ||
1004 | # CONFIG_XFS_SECURITY is not set | ||
1005 | CONFIG_XFS_POSIX_ACL=y | ||
1006 | CONFIG_XFS_RT=y | ||
1007 | # CONFIG_GFS2_FS is not set | ||
1008 | # CONFIG_OCFS2_FS is not set | ||
1009 | # CONFIG_MINIX_FS is not set | ||
1010 | # CONFIG_ROMFS_FS is not set | ||
1011 | CONFIG_INOTIFY=y | ||
1012 | CONFIG_INOTIFY_USER=y | ||
1013 | CONFIG_QUOTA=y | ||
1014 | CONFIG_QUOTA_NETLINK_INTERFACE=y | ||
1015 | CONFIG_PRINT_QUOTA_WARNING=y | ||
1016 | # CONFIG_QFMT_V1 is not set | ||
1017 | # CONFIG_QFMT_V2 is not set | ||
1018 | CONFIG_QUOTACTL=y | ||
1019 | CONFIG_DNOTIFY=y | ||
1020 | CONFIG_AUTOFS_FS=m | ||
1021 | CONFIG_AUTOFS4_FS=m | ||
1022 | CONFIG_FUSE_FS=m | ||
1023 | |||
1024 | # | ||
1025 | # CD-ROM/DVD Filesystems | ||
1026 | # | ||
1027 | CONFIG_ISO9660_FS=y | ||
1028 | CONFIG_JOLIET=y | ||
1029 | # CONFIG_ZISOFS is not set | ||
1030 | CONFIG_UDF_FS=m | ||
1031 | CONFIG_UDF_NLS=y | ||
1032 | |||
1033 | # | ||
1034 | # DOS/FAT/NT Filesystems | ||
1035 | # | ||
1036 | CONFIG_FAT_FS=y | ||
1037 | # CONFIG_MSDOS_FS is not set | ||
1038 | CONFIG_VFAT_FS=y | ||
1039 | CONFIG_FAT_DEFAULT_CODEPAGE=437 | ||
1040 | CONFIG_FAT_DEFAULT_IOCHARSET="iso8859-1" | ||
1041 | # CONFIG_NTFS_FS is not set | ||
1042 | |||
1043 | # | ||
1044 | # Pseudo filesystems | ||
1045 | # | ||
1046 | CONFIG_PROC_FS=y | ||
1047 | CONFIG_PROC_KCORE=y | ||
1048 | CONFIG_PROC_SYSCTL=y | ||
1049 | CONFIG_SYSFS=y | ||
1050 | CONFIG_TMPFS=y | ||
1051 | # CONFIG_TMPFS_POSIX_ACL is not set | ||
1052 | CONFIG_HUGETLBFS=y | ||
1053 | CONFIG_HUGETLB_PAGE=y | ||
1054 | # CONFIG_CONFIGFS_FS is not set | ||
1055 | |||
1056 | # | ||
1057 | # Miscellaneous filesystems | ||
1058 | # | ||
1059 | # CONFIG_ADFS_FS is not set | ||
1060 | # CONFIG_AFFS_FS is not set | ||
1061 | # CONFIG_HFS_FS is not set | ||
1062 | # CONFIG_HFSPLUS_FS is not set | ||
1063 | # CONFIG_BEFS_FS is not set | ||
1064 | # CONFIG_BFS_FS is not set | ||
1065 | # CONFIG_EFS_FS is not set | ||
1066 | # CONFIG_CRAMFS is not set | ||
1067 | # CONFIG_VXFS_FS is not set | ||
1068 | # CONFIG_HPFS_FS is not set | ||
1069 | # CONFIG_QNX4FS_FS is not set | ||
1070 | # CONFIG_SYSV_FS is not set | ||
1071 | # CONFIG_UFS_FS is not set | ||
1072 | CONFIG_NETWORK_FILESYSTEMS=y | ||
1073 | CONFIG_NFS_FS=m | ||
1074 | CONFIG_NFS_V3=y | ||
1075 | # CONFIG_NFS_V3_ACL is not set | ||
1076 | CONFIG_NFS_V4=y | ||
1077 | CONFIG_NFS_DIRECTIO=y | ||
1078 | CONFIG_NFSD=m | ||
1079 | CONFIG_NFSD_V3=y | ||
1080 | # CONFIG_NFSD_V3_ACL is not set | ||
1081 | CONFIG_NFSD_V4=y | ||
1082 | CONFIG_NFSD_TCP=y | ||
1083 | CONFIG_LOCKD=m | ||
1084 | CONFIG_LOCKD_V4=y | ||
1085 | CONFIG_EXPORTFS=m | ||
1086 | CONFIG_NFS_COMMON=y | ||
1087 | CONFIG_SUNRPC=m | ||
1088 | CONFIG_SUNRPC_GSS=m | ||
1089 | CONFIG_SUNRPC_XPRT_RDMA=m | ||
1090 | # CONFIG_SUNRPC_BIND34 is not set | ||
1091 | CONFIG_RPCSEC_GSS_KRB5=m | ||
1092 | # CONFIG_RPCSEC_GSS_SPKM3 is not set | ||
1093 | CONFIG_SMB_FS=m | ||
1094 | # CONFIG_SMB_NLS_DEFAULT is not set | ||
1095 | CONFIG_CIFS=m | ||
1096 | # CONFIG_CIFS_STATS is not set | ||
1097 | # CONFIG_CIFS_WEAK_PW_HASH is not set | ||
1098 | # CONFIG_CIFS_XATTR is not set | ||
1099 | # CONFIG_CIFS_DEBUG2 is not set | ||
1100 | # CONFIG_CIFS_EXPERIMENTAL is not set | ||
1101 | # CONFIG_NCP_FS is not set | ||
1102 | # CONFIG_CODA_FS is not set | ||
1103 | # CONFIG_AFS_FS is not set | ||
1104 | |||
1105 | # | ||
1106 | # Partition Types | ||
1107 | # | ||
1108 | CONFIG_PARTITION_ADVANCED=y | ||
1109 | # CONFIG_ACORN_PARTITION is not set | ||
1110 | # CONFIG_OSF_PARTITION is not set | ||
1111 | # CONFIG_AMIGA_PARTITION is not set | ||
1112 | # CONFIG_ATARI_PARTITION is not set | ||
1113 | # CONFIG_MAC_PARTITION is not set | ||
1114 | CONFIG_MSDOS_PARTITION=y | ||
1115 | # CONFIG_BSD_DISKLABEL is not set | ||
1116 | # CONFIG_MINIX_SUBPARTITION is not set | ||
1117 | # CONFIG_SOLARIS_X86_PARTITION is not set | ||
1118 | # CONFIG_UNIXWARE_DISKLABEL is not set | ||
1119 | # CONFIG_LDM_PARTITION is not set | ||
1120 | CONFIG_SGI_PARTITION=y | ||
1121 | # CONFIG_ULTRIX_PARTITION is not set | ||
1122 | # CONFIG_SUN_PARTITION is not set | ||
1123 | # CONFIG_KARMA_PARTITION is not set | ||
1124 | CONFIG_EFI_PARTITION=y | ||
1125 | # CONFIG_SYSV68_PARTITION is not set | ||
1126 | CONFIG_NLS=y | ||
1127 | CONFIG_NLS_DEFAULT="iso8859-1" | ||
1128 | CONFIG_NLS_CODEPAGE_437=y | ||
1129 | # CONFIG_NLS_CODEPAGE_737 is not set | ||
1130 | # CONFIG_NLS_CODEPAGE_775 is not set | ||
1131 | # CONFIG_NLS_CODEPAGE_850 is not set | ||
1132 | # CONFIG_NLS_CODEPAGE_852 is not set | ||
1133 | # CONFIG_NLS_CODEPAGE_855 is not set | ||
1134 | # CONFIG_NLS_CODEPAGE_857 is not set | ||
1135 | # CONFIG_NLS_CODEPAGE_860 is not set | ||
1136 | # CONFIG_NLS_CODEPAGE_861 is not set | ||
1137 | # CONFIG_NLS_CODEPAGE_862 is not set | ||
1138 | # CONFIG_NLS_CODEPAGE_863 is not set | ||
1139 | # CONFIG_NLS_CODEPAGE_864 is not set | ||
1140 | # CONFIG_NLS_CODEPAGE_865 is not set | ||
1141 | # CONFIG_NLS_CODEPAGE_866 is not set | ||
1142 | # CONFIG_NLS_CODEPAGE_869 is not set | ||
1143 | # CONFIG_NLS_CODEPAGE_936 is not set | ||
1144 | # CONFIG_NLS_CODEPAGE_950 is not set | ||
1145 | # CONFIG_NLS_CODEPAGE_932 is not set | ||
1146 | # CONFIG_NLS_CODEPAGE_949 is not set | ||
1147 | # CONFIG_NLS_CODEPAGE_874 is not set | ||
1148 | # CONFIG_NLS_ISO8859_8 is not set | ||
1149 | # CONFIG_NLS_CODEPAGE_1250 is not set | ||
1150 | # CONFIG_NLS_CODEPAGE_1251 is not set | ||
1151 | # CONFIG_NLS_ASCII is not set | ||
1152 | CONFIG_NLS_ISO8859_1=y | ||
1153 | # CONFIG_NLS_ISO8859_2 is not set | ||
1154 | # CONFIG_NLS_ISO8859_3 is not set | ||
1155 | # CONFIG_NLS_ISO8859_4 is not set | ||
1156 | # CONFIG_NLS_ISO8859_5 is not set | ||
1157 | # CONFIG_NLS_ISO8859_6 is not set | ||
1158 | # CONFIG_NLS_ISO8859_7 is not set | ||
1159 | # CONFIG_NLS_ISO8859_9 is not set | ||
1160 | # CONFIG_NLS_ISO8859_13 is not set | ||
1161 | # CONFIG_NLS_ISO8859_14 is not set | ||
1162 | # CONFIG_NLS_ISO8859_15 is not set | ||
1163 | # CONFIG_NLS_KOI8_R is not set | ||
1164 | # CONFIG_NLS_KOI8_U is not set | ||
1165 | CONFIG_NLS_UTF8=y | ||
1166 | # CONFIG_DLM is not set | ||
1167 | |||
1168 | # | ||
1169 | # Library routines | ||
1170 | # | ||
1171 | CONFIG_BITREVERSE=y | ||
1172 | # CONFIG_CRC_CCITT is not set | ||
1173 | CONFIG_CRC16=m | ||
1174 | # CONFIG_CRC_ITU_T is not set | ||
1175 | CONFIG_CRC32=y | ||
1176 | # CONFIG_CRC7 is not set | ||
1177 | CONFIG_LIBCRC32C=m | ||
1178 | CONFIG_ZLIB_INFLATE=m | ||
1179 | CONFIG_ZLIB_DEFLATE=m | ||
1180 | CONFIG_GENERIC_ALLOCATOR=y | ||
1181 | CONFIG_PLIST=y | ||
1182 | CONFIG_HAS_IOMEM=y | ||
1183 | CONFIG_HAS_IOPORT=y | ||
1184 | CONFIG_HAS_DMA=y | ||
1185 | CONFIG_GENERIC_HARDIRQS=y | ||
1186 | CONFIG_GENERIC_IRQ_PROBE=y | ||
1187 | CONFIG_GENERIC_PENDING_IRQ=y | ||
1188 | CONFIG_IRQ_PER_CPU=y | ||
1189 | |||
1190 | # | ||
1191 | # Instrumentation Support | ||
1192 | # | ||
1193 | # CONFIG_PROFILING is not set | ||
1194 | # CONFIG_KPROBES is not set | ||
1195 | |||
1196 | # | ||
1197 | # Kernel hacking | ||
1198 | # | ||
1199 | # CONFIG_PRINTK_TIME is not set | ||
1200 | CONFIG_ENABLE_MUST_CHECK=y | ||
1201 | CONFIG_MAGIC_SYSRQ=y | ||
1202 | # CONFIG_UNUSED_SYMBOLS is not set | ||
1203 | # CONFIG_DEBUG_FS is not set | ||
1204 | # CONFIG_HEADERS_CHECK is not set | ||
1205 | CONFIG_DEBUG_KERNEL=y | ||
1206 | # CONFIG_DEBUG_SHIRQ is not set | ||
1207 | CONFIG_DETECT_SOFTLOCKUP=y | ||
1208 | CONFIG_SCHED_DEBUG=y | ||
1209 | # CONFIG_SCHEDSTATS is not set | ||
1210 | # CONFIG_TIMER_STATS is not set | ||
1211 | # CONFIG_SLUB_DEBUG_ON is not set | ||
1212 | # CONFIG_DEBUG_RT_MUTEXES is not set | ||
1213 | # CONFIG_RT_MUTEX_TESTER is not set | ||
1214 | # CONFIG_DEBUG_SPINLOCK is not set | ||
1215 | # CONFIG_DEBUG_MUTEXES is not set | ||
1216 | # CONFIG_DEBUG_SPINLOCK_SLEEP is not set | ||
1217 | # CONFIG_DEBUG_LOCKING_API_SELFTESTS is not set | ||
1218 | # CONFIG_DEBUG_KOBJECT is not set | ||
1219 | CONFIG_DEBUG_INFO=y | ||
1220 | # CONFIG_DEBUG_VM is not set | ||
1221 | # CONFIG_DEBUG_LIST is not set | ||
1222 | CONFIG_FORCED_INLINING=y | ||
1223 | # CONFIG_BOOT_PRINTK_DELAY is not set | ||
1224 | # CONFIG_RCU_TORTURE_TEST is not set | ||
1225 | # CONFIG_FAULT_INJECTION is not set | ||
1226 | CONFIG_IA64_GRANULE_16MB=y | ||
1227 | # CONFIG_IA64_GRANULE_64MB is not set | ||
1228 | # CONFIG_IA64_PRINT_HAZARDS is not set | ||
1229 | # CONFIG_DISABLE_VHPT is not set | ||
1230 | # CONFIG_IA64_DEBUG_CMPXCHG is not set | ||
1231 | # CONFIG_IA64_DEBUG_IRQ is not set | ||
1232 | CONFIG_SYSVIPC_COMPAT=y | ||
1233 | |||
1234 | # | ||
1235 | # Security options | ||
1236 | # | ||
1237 | # CONFIG_KEYS is not set | ||
1238 | # CONFIG_SECURITY is not set | ||
1239 | # CONFIG_SECURITY_FILE_CAPABILITIES is not set | ||
1240 | CONFIG_XOR_BLOCKS=y | ||
1241 | CONFIG_ASYNC_CORE=y | ||
1242 | CONFIG_ASYNC_MEMCPY=y | ||
1243 | CONFIG_ASYNC_XOR=y | ||
1244 | CONFIG_CRYPTO=y | ||
1245 | CONFIG_CRYPTO_ALGAPI=y | ||
1246 | CONFIG_CRYPTO_BLKCIPHER=m | ||
1247 | CONFIG_CRYPTO_HASH=y | ||
1248 | CONFIG_CRYPTO_MANAGER=y | ||
1249 | CONFIG_CRYPTO_HMAC=y | ||
1250 | # CONFIG_CRYPTO_XCBC is not set | ||
1251 | # CONFIG_CRYPTO_NULL is not set | ||
1252 | # CONFIG_CRYPTO_MD4 is not set | ||
1253 | CONFIG_CRYPTO_MD5=y | ||
1254 | CONFIG_CRYPTO_SHA1=m | ||
1255 | # CONFIG_CRYPTO_SHA256 is not set | ||
1256 | # CONFIG_CRYPTO_SHA512 is not set | ||
1257 | # CONFIG_CRYPTO_WP512 is not set | ||
1258 | # CONFIG_CRYPTO_TGR192 is not set | ||
1259 | # CONFIG_CRYPTO_GF128MUL is not set | ||
1260 | CONFIG_CRYPTO_ECB=m | ||
1261 | CONFIG_CRYPTO_CBC=m | ||
1262 | CONFIG_CRYPTO_PCBC=m | ||
1263 | # CONFIG_CRYPTO_LRW is not set | ||
1264 | # CONFIG_CRYPTO_XTS is not set | ||
1265 | # CONFIG_CRYPTO_CRYPTD is not set | ||
1266 | CONFIG_CRYPTO_DES=m | ||
1267 | # CONFIG_CRYPTO_FCRYPT is not set | ||
1268 | # CONFIG_CRYPTO_BLOWFISH is not set | ||
1269 | # CONFIG_CRYPTO_TWOFISH is not set | ||
1270 | # CONFIG_CRYPTO_SERPENT is not set | ||
1271 | # CONFIG_CRYPTO_AES is not set | ||
1272 | # CONFIG_CRYPTO_CAST5 is not set | ||
1273 | # CONFIG_CRYPTO_CAST6 is not set | ||
1274 | # CONFIG_CRYPTO_TEA is not set | ||
1275 | # CONFIG_CRYPTO_ARC4 is not set | ||
1276 | # CONFIG_CRYPTO_KHAZAD is not set | ||
1277 | # CONFIG_CRYPTO_ANUBIS is not set | ||
1278 | # CONFIG_CRYPTO_SEED is not set | ||
1279 | CONFIG_CRYPTO_DEFLATE=m | ||
1280 | # CONFIG_CRYPTO_MICHAEL_MIC is not set | ||
1281 | CONFIG_CRYPTO_CRC32C=m | ||
1282 | # CONFIG_CRYPTO_CAMELLIA is not set | ||
1283 | # CONFIG_CRYPTO_TEST is not set | ||
1284 | # CONFIG_CRYPTO_AUTHENC is not set | ||
1285 | # CONFIG_CRYPTO_HW is not set | ||
diff --git a/arch/ia64/ia32/ia32_entry.S b/arch/ia64/ia32/ia32_entry.S index 06efd1f9b800..ff88c48c5d19 100644 --- a/arch/ia64/ia32/ia32_entry.S +++ b/arch/ia64/ia32/ia32_entry.S | |||
@@ -262,7 +262,7 @@ ia32_syscall_table: | |||
262 | data8 sys_uselib | 262 | data8 sys_uselib |
263 | data8 sys_swapon | 263 | data8 sys_swapon |
264 | data8 sys_reboot | 264 | data8 sys_reboot |
265 | data8 sys32_readdir | 265 | data8 compat_sys_old_readdir |
266 | data8 sys32_mmap /* 90 */ | 266 | data8 sys32_mmap /* 90 */ |
267 | data8 sys32_munmap | 267 | data8 sys32_munmap |
268 | data8 sys_truncate | 268 | data8 sys_truncate |
diff --git a/arch/ia64/ia32/ia32priv.h b/arch/ia64/ia32/ia32priv.h index c5c872b250da..dd0c53687a96 100644 --- a/arch/ia64/ia32/ia32priv.h +++ b/arch/ia64/ia32/ia32priv.h | |||
@@ -276,13 +276,6 @@ typedef struct compat_siginfo { | |||
276 | } _sifields; | 276 | } _sifields; |
277 | } compat_siginfo_t; | 277 | } compat_siginfo_t; |
278 | 278 | ||
279 | struct old_linux32_dirent { | ||
280 | u32 d_ino; | ||
281 | u32 d_offset; | ||
282 | u16 d_namlen; | ||
283 | char d_name[1]; | ||
284 | }; | ||
285 | |||
286 | /* | 279 | /* |
287 | * IA-32 ELF specific definitions for IA-64. | 280 | * IA-32 ELF specific definitions for IA-64. |
288 | */ | 281 | */ |
diff --git a/arch/ia64/ia32/sys_ia32.c b/arch/ia64/ia32/sys_ia32.c index 465116aecb85..bf196cbb3796 100644 --- a/arch/ia64/ia32/sys_ia32.c +++ b/arch/ia64/ia32/sys_ia32.c | |||
@@ -1210,138 +1210,6 @@ sys32_settimeofday (struct compat_timeval __user *tv, struct timezone __user *tz | |||
1210 | return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); | 1210 | return do_sys_settimeofday(tv ? &kts : NULL, tz ? &ktz : NULL); |
1211 | } | 1211 | } |
1212 | 1212 | ||
1213 | struct getdents32_callback { | ||
1214 | struct compat_dirent __user *current_dir; | ||
1215 | struct compat_dirent __user *previous; | ||
1216 | int count; | ||
1217 | int error; | ||
1218 | }; | ||
1219 | |||
1220 | struct readdir32_callback { | ||
1221 | struct old_linux32_dirent __user * dirent; | ||
1222 | int count; | ||
1223 | }; | ||
1224 | |||
1225 | static int | ||
1226 | filldir32 (void *__buf, const char *name, int namlen, loff_t offset, u64 ino, | ||
1227 | unsigned int d_type) | ||
1228 | { | ||
1229 | struct compat_dirent __user * dirent; | ||
1230 | struct getdents32_callback * buf = (struct getdents32_callback *) __buf; | ||
1231 | int reclen = ROUND_UP(offsetof(struct compat_dirent, d_name) + namlen + 1, 4); | ||
1232 | u32 d_ino; | ||
1233 | |||
1234 | buf->error = -EINVAL; /* only used if we fail.. */ | ||
1235 | if (reclen > buf->count) | ||
1236 | return -EINVAL; | ||
1237 | d_ino = ino; | ||
1238 | if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) | ||
1239 | return -EOVERFLOW; | ||
1240 | buf->error = -EFAULT; /* only used if we fail.. */ | ||
1241 | dirent = buf->previous; | ||
1242 | if (dirent) | ||
1243 | if (put_user(offset, &dirent->d_off)) | ||
1244 | return -EFAULT; | ||
1245 | dirent = buf->current_dir; | ||
1246 | buf->previous = dirent; | ||
1247 | if (put_user(d_ino, &dirent->d_ino) | ||
1248 | || put_user(reclen, &dirent->d_reclen) | ||
1249 | || copy_to_user(dirent->d_name, name, namlen) | ||
1250 | || put_user(0, dirent->d_name + namlen)) | ||
1251 | return -EFAULT; | ||
1252 | dirent = (struct compat_dirent __user *) ((char __user *) dirent + reclen); | ||
1253 | buf->current_dir = dirent; | ||
1254 | buf->count -= reclen; | ||
1255 | return 0; | ||
1256 | } | ||
1257 | |||
1258 | asmlinkage long | ||
1259 | sys32_getdents (unsigned int fd, struct compat_dirent __user *dirent, unsigned int count) | ||
1260 | { | ||
1261 | struct file * file; | ||
1262 | struct compat_dirent __user * lastdirent; | ||
1263 | struct getdents32_callback buf; | ||
1264 | int error; | ||
1265 | |||
1266 | error = -EFAULT; | ||
1267 | if (!access_ok(VERIFY_WRITE, dirent, count)) | ||
1268 | goto out; | ||
1269 | |||
1270 | error = -EBADF; | ||
1271 | file = fget(fd); | ||
1272 | if (!file) | ||
1273 | goto out; | ||
1274 | |||
1275 | buf.current_dir = dirent; | ||
1276 | buf.previous = NULL; | ||
1277 | buf.count = count; | ||
1278 | buf.error = 0; | ||
1279 | |||
1280 | error = vfs_readdir(file, filldir32, &buf); | ||
1281 | if (error < 0) | ||
1282 | goto out_putf; | ||
1283 | error = buf.error; | ||
1284 | lastdirent = buf.previous; | ||
1285 | if (lastdirent) { | ||
1286 | if (put_user(file->f_pos, &lastdirent->d_off)) | ||
1287 | error = -EFAULT; | ||
1288 | else | ||
1289 | error = count - buf.count; | ||
1290 | } | ||
1291 | |||
1292 | out_putf: | ||
1293 | fput(file); | ||
1294 | out: | ||
1295 | return error; | ||
1296 | } | ||
1297 | |||
1298 | static int | ||
1299 | fillonedir32 (void * __buf, const char * name, int namlen, loff_t offset, u64 ino, | ||
1300 | unsigned int d_type) | ||
1301 | { | ||
1302 | struct readdir32_callback * buf = (struct readdir32_callback *) __buf; | ||
1303 | struct old_linux32_dirent __user * dirent; | ||
1304 | u32 d_ino; | ||
1305 | |||
1306 | if (buf->count) | ||
1307 | return -EINVAL; | ||
1308 | d_ino = ino; | ||
1309 | if (sizeof(d_ino) < sizeof(ino) && d_ino != ino) | ||
1310 | return -EOVERFLOW; | ||
1311 | buf->count++; | ||
1312 | dirent = buf->dirent; | ||
1313 | if (put_user(d_ino, &dirent->d_ino) | ||
1314 | || put_user(offset, &dirent->d_offset) | ||
1315 | || put_user(namlen, &dirent->d_namlen) | ||
1316 | || copy_to_user(dirent->d_name, name, namlen) | ||
1317 | || put_user(0, dirent->d_name + namlen)) | ||
1318 | return -EFAULT; | ||
1319 | return 0; | ||
1320 | } | ||
1321 | |||
1322 | asmlinkage long | ||
1323 | sys32_readdir (unsigned int fd, void __user *dirent, unsigned int count) | ||
1324 | { | ||
1325 | int error; | ||
1326 | struct file * file; | ||
1327 | struct readdir32_callback buf; | ||
1328 | |||
1329 | error = -EBADF; | ||
1330 | file = fget(fd); | ||
1331 | if (!file) | ||
1332 | goto out; | ||
1333 | |||
1334 | buf.count = 0; | ||
1335 | buf.dirent = dirent; | ||
1336 | |||
1337 | error = vfs_readdir(file, fillonedir32, &buf); | ||
1338 | if (error >= 0) | ||
1339 | error = buf.count; | ||
1340 | fput(file); | ||
1341 | out: | ||
1342 | return error; | ||
1343 | } | ||
1344 | |||
1345 | struct sel_arg_struct { | 1213 | struct sel_arg_struct { |
1346 | unsigned int n; | 1214 | unsigned int n; |
1347 | unsigned int inp; | 1215 | unsigned int inp; |
diff --git a/arch/ia64/kernel/smp.c b/arch/ia64/kernel/smp.c index 3676468612b6..da8f020d82c1 100644 --- a/arch/ia64/kernel/smp.c +++ b/arch/ia64/kernel/smp.c | |||
@@ -58,7 +58,7 @@ static struct local_tlb_flush_counts { | |||
58 | unsigned int count; | 58 | unsigned int count; |
59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; | 59 | } __attribute__((__aligned__(32))) local_tlb_flush_counts[NR_CPUS]; |
60 | 60 | ||
61 | static DEFINE_PER_CPU(unsigned int, shadow_flush_counts[NR_CPUS]) ____cacheline_aligned; | 61 | static DEFINE_PER_CPU(unsigned short, shadow_flush_counts[NR_CPUS]) ____cacheline_aligned; |
62 | 62 | ||
63 | #define IPI_CALL_FUNC 0 | 63 | #define IPI_CALL_FUNC 0 |
64 | #define IPI_CPU_STOP 1 | 64 | #define IPI_CPU_STOP 1 |
@@ -254,7 +254,7 @@ smp_local_flush_tlb(void) | |||
254 | void | 254 | void |
255 | smp_flush_tlb_cpumask(cpumask_t xcpumask) | 255 | smp_flush_tlb_cpumask(cpumask_t xcpumask) |
256 | { | 256 | { |
257 | unsigned int *counts = __ia64_per_cpu_var(shadow_flush_counts); | 257 | unsigned short *counts = __ia64_per_cpu_var(shadow_flush_counts); |
258 | cpumask_t cpumask = xcpumask; | 258 | cpumask_t cpumask = xcpumask; |
259 | int mycpu, cpu, flush_mycpu = 0; | 259 | int mycpu, cpu, flush_mycpu = 0; |
260 | 260 | ||
@@ -262,7 +262,7 @@ smp_flush_tlb_cpumask(cpumask_t xcpumask) | |||
262 | mycpu = smp_processor_id(); | 262 | mycpu = smp_processor_id(); |
263 | 263 | ||
264 | for_each_cpu_mask(cpu, cpumask) | 264 | for_each_cpu_mask(cpu, cpumask) |
265 | counts[cpu] = local_tlb_flush_counts[cpu].count; | 265 | counts[cpu] = local_tlb_flush_counts[cpu].count & 0xffff; |
266 | 266 | ||
267 | mb(); | 267 | mb(); |
268 | for_each_cpu_mask(cpu, cpumask) { | 268 | for_each_cpu_mask(cpu, cpumask) { |
@@ -276,7 +276,7 @@ smp_flush_tlb_cpumask(cpumask_t xcpumask) | |||
276 | smp_local_flush_tlb(); | 276 | smp_local_flush_tlb(); |
277 | 277 | ||
278 | for_each_cpu_mask(cpu, cpumask) | 278 | for_each_cpu_mask(cpu, cpumask) |
279 | while(counts[cpu] == local_tlb_flush_counts[cpu].count) | 279 | while(counts[cpu] == (local_tlb_flush_counts[cpu].count & 0xffff)) |
280 | udelay(FLUSH_DELAY); | 280 | udelay(FLUSH_DELAY); |
281 | 281 | ||
282 | preempt_enable(); | 282 | preempt_enable(); |
diff --git a/arch/ia64/pci/pci.c b/arch/ia64/pci/pci.c index 77b15f80f101..7545037a8625 100644 --- a/arch/ia64/pci/pci.c +++ b/arch/ia64/pci/pci.c | |||
@@ -324,7 +324,6 @@ pcibios_setup_root_windows(struct pci_bus *bus, struct pci_controller *ctrl) | |||
324 | struct pci_bus * __devinit | 324 | struct pci_bus * __devinit |
325 | pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) | 325 | pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) |
326 | { | 326 | { |
327 | struct pci_root_info info; | ||
328 | struct pci_controller *controller; | 327 | struct pci_controller *controller; |
329 | unsigned int windows = 0; | 328 | unsigned int windows = 0; |
330 | struct pci_bus *pbus; | 329 | struct pci_bus *pbus; |
@@ -346,22 +345,24 @@ pci_acpi_scan_root(struct acpi_device *device, int domain, int bus) | |||
346 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, | 345 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, count_window, |
347 | &windows); | 346 | &windows); |
348 | if (windows) { | 347 | if (windows) { |
348 | struct pci_root_info info; | ||
349 | |||
349 | controller->window = | 350 | controller->window = |
350 | kmalloc_node(sizeof(*controller->window) * windows, | 351 | kmalloc_node(sizeof(*controller->window) * windows, |
351 | GFP_KERNEL, controller->node); | 352 | GFP_KERNEL, controller->node); |
352 | if (!controller->window) | 353 | if (!controller->window) |
353 | goto out2; | 354 | goto out2; |
354 | } | ||
355 | 355 | ||
356 | name = kmalloc(16, GFP_KERNEL); | 356 | name = kmalloc(16, GFP_KERNEL); |
357 | if (!name) | 357 | if (!name) |
358 | goto out3; | 358 | goto out3; |
359 | 359 | ||
360 | sprintf(name, "PCI Bus %04x:%02x", domain, bus); | 360 | sprintf(name, "PCI Bus %04x:%02x", domain, bus); |
361 | info.controller = controller; | 361 | info.controller = controller; |
362 | info.name = name; | 362 | info.name = name; |
363 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, add_window, | 363 | acpi_walk_resources(device->handle, METHOD_NAME__CRS, |
364 | &info); | 364 | add_window, &info); |
365 | } | ||
365 | /* | 366 | /* |
366 | * See arch/x86/pci/acpi.c. | 367 | * See arch/x86/pci/acpi.c. |
367 | * The desired pci bus might already be scanned in a quirk. We | 368 | * The desired pci bus might already be scanned in a quirk. We |
diff --git a/arch/powerpc/include/asm/ide.h b/arch/powerpc/include/asm/ide.h index 048480e340f2..da01b20aea59 100644 --- a/arch/powerpc/include/asm/ide.h +++ b/arch/powerpc/include/asm/ide.h | |||
@@ -6,12 +6,7 @@ | |||
6 | #ifndef _ASM_POWERPC_IDE_H | 6 | #ifndef _ASM_POWERPC_IDE_H |
7 | #define _ASM_POWERPC_IDE_H | 7 | #define _ASM_POWERPC_IDE_H |
8 | 8 | ||
9 | #ifdef __KERNEL__ | 9 | #include <linux/compiler.h> |
10 | |||
11 | #ifndef __powerpc64__ | ||
12 | #include <linux/sched.h> | ||
13 | #include <asm/mpc8xx.h> | ||
14 | #endif | ||
15 | #include <asm/io.h> | 10 | #include <asm/io.h> |
16 | 11 | ||
17 | #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c)) | 12 | #define __ide_mm_insw(p, a, c) readsw((void __iomem *)(p), (a), (c)) |
@@ -19,40 +14,4 @@ | |||
19 | #define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c)) | 14 | #define __ide_mm_outsw(p, a, c) writesw((void __iomem *)(p), (a), (c)) |
20 | #define __ide_mm_outsl(p, a, c) writesl((void __iomem *)(p), (a), (c)) | 15 | #define __ide_mm_outsl(p, a, c) writesl((void __iomem *)(p), (a), (c)) |
21 | 16 | ||
22 | #ifndef __powerpc64__ | ||
23 | #include <linux/ioport.h> | ||
24 | |||
25 | /* FIXME: use ide_platform host driver */ | ||
26 | static __inline__ int ide_default_irq(unsigned long base) | ||
27 | { | ||
28 | #ifdef CONFIG_PPLUS | ||
29 | switch (base) { | ||
30 | case 0x1f0: return 14; | ||
31 | case 0x170: return 15; | ||
32 | } | ||
33 | #endif | ||
34 | return 0; | ||
35 | } | ||
36 | |||
37 | /* FIXME: use ide_platform host driver */ | ||
38 | static __inline__ unsigned long ide_default_io_base(int index) | ||
39 | { | ||
40 | #ifdef CONFIG_PPLUS | ||
41 | switch (index) { | ||
42 | case 0: return 0x1f0; | ||
43 | case 1: return 0x170; | ||
44 | } | ||
45 | #endif | ||
46 | return 0; | ||
47 | } | ||
48 | |||
49 | #ifdef CONFIG_BLK_DEV_MPC8xx_IDE | ||
50 | #define IDE_ARCH_ACK_INTR 1 | ||
51 | #define ide_ack_intr(hwif) ((hwif)->ack_intr ? (hwif)->ack_intr(hwif) : 1) | ||
52 | #endif | ||
53 | |||
54 | #endif /* __powerpc64__ */ | ||
55 | |||
56 | #endif /* __KERNEL__ */ | ||
57 | |||
58 | #endif /* _ASM_POWERPC_IDE_H */ | 17 | #endif /* _ASM_POWERPC_IDE_H */ |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c index 4e7271999a74..84bb395038d8 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.c +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.c | |||
@@ -737,63 +737,44 @@ static int find_psb_table(struct powernow_k8_data *data) | |||
737 | #ifdef CONFIG_X86_POWERNOW_K8_ACPI | 737 | #ifdef CONFIG_X86_POWERNOW_K8_ACPI |
738 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) | 738 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) |
739 | { | 739 | { |
740 | if (!data->acpi_data->state_count || (cpu_family == CPU_HW_PSTATE)) | 740 | if (!data->acpi_data.state_count || (cpu_family == CPU_HW_PSTATE)) |
741 | return; | 741 | return; |
742 | 742 | ||
743 | data->irt = (data->acpi_data->states[index].control >> IRT_SHIFT) & IRT_MASK; | 743 | data->irt = (data->acpi_data.states[index].control >> IRT_SHIFT) & IRT_MASK; |
744 | data->rvo = (data->acpi_data->states[index].control >> RVO_SHIFT) & RVO_MASK; | 744 | data->rvo = (data->acpi_data.states[index].control >> RVO_SHIFT) & RVO_MASK; |
745 | data->exttype = (data->acpi_data->states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK; | 745 | data->exttype = (data->acpi_data.states[index].control >> EXT_TYPE_SHIFT) & EXT_TYPE_MASK; |
746 | data->plllock = (data->acpi_data->states[index].control >> PLL_L_SHIFT) & PLL_L_MASK; | 746 | data->plllock = (data->acpi_data.states[index].control >> PLL_L_SHIFT) & PLL_L_MASK; |
747 | data->vidmvs = 1 << ((data->acpi_data->states[index].control >> MVS_SHIFT) & MVS_MASK); | 747 | data->vidmvs = 1 << ((data->acpi_data.states[index].control >> MVS_SHIFT) & MVS_MASK); |
748 | data->vstable = (data->acpi_data->states[index].control >> VST_SHIFT) & VST_MASK; | 748 | data->vstable = (data->acpi_data.states[index].control >> VST_SHIFT) & VST_MASK; |
749 | } | ||
750 | |||
751 | |||
752 | static struct acpi_processor_performance *acpi_perf_data; | ||
753 | static int preregister_valid; | ||
754 | |||
755 | static int powernow_k8_cpu_preinit_acpi(void) | ||
756 | { | ||
757 | acpi_perf_data = alloc_percpu(struct acpi_processor_performance); | ||
758 | if (!acpi_perf_data) | ||
759 | return -ENODEV; | ||
760 | |||
761 | if (acpi_processor_preregister_performance(acpi_perf_data)) | ||
762 | return -ENODEV; | ||
763 | else | ||
764 | preregister_valid = 1; | ||
765 | return 0; | ||
766 | } | 749 | } |
767 | 750 | ||
768 | static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | 751 | static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) |
769 | { | 752 | { |
770 | struct cpufreq_frequency_table *powernow_table; | 753 | struct cpufreq_frequency_table *powernow_table; |
771 | int ret_val; | 754 | int ret_val; |
772 | int cpu = 0; | ||
773 | 755 | ||
774 | data->acpi_data = percpu_ptr(acpi_perf_data, cpu); | 756 | if (acpi_processor_register_performance(&data->acpi_data, data->cpu)) { |
775 | if (acpi_processor_register_performance(data->acpi_data, data->cpu)) { | ||
776 | dprintk("register performance failed: bad ACPI data\n"); | 757 | dprintk("register performance failed: bad ACPI data\n"); |
777 | return -EIO; | 758 | return -EIO; |
778 | } | 759 | } |
779 | 760 | ||
780 | /* verify the data contained in the ACPI structures */ | 761 | /* verify the data contained in the ACPI structures */ |
781 | if (data->acpi_data->state_count <= 1) { | 762 | if (data->acpi_data.state_count <= 1) { |
782 | dprintk("No ACPI P-States\n"); | 763 | dprintk("No ACPI P-States\n"); |
783 | goto err_out; | 764 | goto err_out; |
784 | } | 765 | } |
785 | 766 | ||
786 | if ((data->acpi_data->control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || | 767 | if ((data->acpi_data.control_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE) || |
787 | (data->acpi_data->status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { | 768 | (data->acpi_data.status_register.space_id != ACPI_ADR_SPACE_FIXED_HARDWARE)) { |
788 | dprintk("Invalid control/status registers (%x - %x)\n", | 769 | dprintk("Invalid control/status registers (%x - %x)\n", |
789 | data->acpi_data->control_register.space_id, | 770 | data->acpi_data.control_register.space_id, |
790 | data->acpi_data->status_register.space_id); | 771 | data->acpi_data.status_register.space_id); |
791 | goto err_out; | 772 | goto err_out; |
792 | } | 773 | } |
793 | 774 | ||
794 | /* fill in data->powernow_table */ | 775 | /* fill in data->powernow_table */ |
795 | powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) | 776 | powernow_table = kmalloc((sizeof(struct cpufreq_frequency_table) |
796 | * (data->acpi_data->state_count + 1)), GFP_KERNEL); | 777 | * (data->acpi_data.state_count + 1)), GFP_KERNEL); |
797 | if (!powernow_table) { | 778 | if (!powernow_table) { |
798 | dprintk("powernow_table memory alloc failure\n"); | 779 | dprintk("powernow_table memory alloc failure\n"); |
799 | goto err_out; | 780 | goto err_out; |
@@ -806,12 +787,12 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
806 | if (ret_val) | 787 | if (ret_val) |
807 | goto err_out_mem; | 788 | goto err_out_mem; |
808 | 789 | ||
809 | powernow_table[data->acpi_data->state_count].frequency = CPUFREQ_TABLE_END; | 790 | powernow_table[data->acpi_data.state_count].frequency = CPUFREQ_TABLE_END; |
810 | powernow_table[data->acpi_data->state_count].index = 0; | 791 | powernow_table[data->acpi_data.state_count].index = 0; |
811 | data->powernow_table = powernow_table; | 792 | data->powernow_table = powernow_table; |
812 | 793 | ||
813 | /* fill in data */ | 794 | /* fill in data */ |
814 | data->numps = data->acpi_data->state_count; | 795 | data->numps = data->acpi_data.state_count; |
815 | if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu) | 796 | if (first_cpu(per_cpu(cpu_core_map, data->cpu)) == data->cpu) |
816 | print_basics(data); | 797 | print_basics(data); |
817 | powernow_k8_acpi_pst_values(data, 0); | 798 | powernow_k8_acpi_pst_values(data, 0); |
@@ -819,31 +800,16 @@ static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) | |||
819 | /* notify BIOS that we exist */ | 800 | /* notify BIOS that we exist */ |
820 | acpi_processor_notify_smm(THIS_MODULE); | 801 | acpi_processor_notify_smm(THIS_MODULE); |
821 | 802 | ||
822 | /* determine affinity, from ACPI if available */ | ||
823 | if (preregister_valid) { | ||
824 | if ((data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ALL) || | ||
825 | (data->acpi_data->shared_type == CPUFREQ_SHARED_TYPE_ANY)) | ||
826 | data->starting_core_affinity = data->acpi_data->shared_cpu_map; | ||
827 | else | ||
828 | data->starting_core_affinity = cpumask_of_cpu(data->cpu); | ||
829 | } else { | ||
830 | /* best guess from family if not */ | ||
831 | if (cpu_family == CPU_HW_PSTATE) | ||
832 | data->starting_core_affinity = cpumask_of_cpu(data->cpu); | ||
833 | else | ||
834 | data->starting_core_affinity = per_cpu(cpu_core_map, data->cpu); | ||
835 | } | ||
836 | |||
837 | return 0; | 803 | return 0; |
838 | 804 | ||
839 | err_out_mem: | 805 | err_out_mem: |
840 | kfree(powernow_table); | 806 | kfree(powernow_table); |
841 | 807 | ||
842 | err_out: | 808 | err_out: |
843 | acpi_processor_unregister_performance(data->acpi_data, data->cpu); | 809 | acpi_processor_unregister_performance(&data->acpi_data, data->cpu); |
844 | 810 | ||
845 | /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */ | 811 | /* data->acpi_data.state_count informs us at ->exit() whether ACPI was used */ |
846 | data->acpi_data->state_count = 0; | 812 | data->acpi_data.state_count = 0; |
847 | 813 | ||
848 | return -ENODEV; | 814 | return -ENODEV; |
849 | } | 815 | } |
@@ -855,10 +821,10 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpuf | |||
855 | rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo); | 821 | rdmsr(MSR_PSTATE_CUR_LIMIT, hi, lo); |
856 | data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT; | 822 | data->max_hw_pstate = (hi & HW_PSTATE_MAX_MASK) >> HW_PSTATE_MAX_SHIFT; |
857 | 823 | ||
858 | for (i = 0; i < data->acpi_data->state_count; i++) { | 824 | for (i = 0; i < data->acpi_data.state_count; i++) { |
859 | u32 index; | 825 | u32 index; |
860 | 826 | ||
861 | index = data->acpi_data->states[i].control & HW_PSTATE_MASK; | 827 | index = data->acpi_data.states[i].control & HW_PSTATE_MASK; |
862 | if (index > data->max_hw_pstate) { | 828 | if (index > data->max_hw_pstate) { |
863 | printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index); | 829 | printk(KERN_ERR PFX "invalid pstate %d - bad value %d.\n", i, index); |
864 | printk(KERN_ERR PFX "Please report to BIOS manufacturer\n"); | 830 | printk(KERN_ERR PFX "Please report to BIOS manufacturer\n"); |
@@ -874,7 +840,7 @@ static int fill_powernow_table_pstate(struct powernow_k8_data *data, struct cpuf | |||
874 | 840 | ||
875 | powernow_table[i].index = index; | 841 | powernow_table[i].index = index; |
876 | 842 | ||
877 | powernow_table[i].frequency = data->acpi_data->states[i].core_frequency * 1000; | 843 | powernow_table[i].frequency = data->acpi_data.states[i].core_frequency * 1000; |
878 | } | 844 | } |
879 | return 0; | 845 | return 0; |
880 | } | 846 | } |
@@ -883,16 +849,16 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf | |||
883 | { | 849 | { |
884 | int i; | 850 | int i; |
885 | int cntlofreq = 0; | 851 | int cntlofreq = 0; |
886 | for (i = 0; i < data->acpi_data->state_count; i++) { | 852 | for (i = 0; i < data->acpi_data.state_count; i++) { |
887 | u32 fid; | 853 | u32 fid; |
888 | u32 vid; | 854 | u32 vid; |
889 | 855 | ||
890 | if (data->exttype) { | 856 | if (data->exttype) { |
891 | fid = data->acpi_data->states[i].status & EXT_FID_MASK; | 857 | fid = data->acpi_data.states[i].status & EXT_FID_MASK; |
892 | vid = (data->acpi_data->states[i].status >> VID_SHIFT) & EXT_VID_MASK; | 858 | vid = (data->acpi_data.states[i].status >> VID_SHIFT) & EXT_VID_MASK; |
893 | } else { | 859 | } else { |
894 | fid = data->acpi_data->states[i].control & FID_MASK; | 860 | fid = data->acpi_data.states[i].control & FID_MASK; |
895 | vid = (data->acpi_data->states[i].control >> VID_SHIFT) & VID_MASK; | 861 | vid = (data->acpi_data.states[i].control >> VID_SHIFT) & VID_MASK; |
896 | } | 862 | } |
897 | 863 | ||
898 | dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); | 864 | dprintk(" %d : fid 0x%x, vid 0x%x\n", i, fid, vid); |
@@ -933,10 +899,10 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf | |||
933 | cntlofreq = i; | 899 | cntlofreq = i; |
934 | } | 900 | } |
935 | 901 | ||
936 | if (powernow_table[i].frequency != (data->acpi_data->states[i].core_frequency * 1000)) { | 902 | if (powernow_table[i].frequency != (data->acpi_data.states[i].core_frequency * 1000)) { |
937 | printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n", | 903 | printk(KERN_INFO PFX "invalid freq entries %u kHz vs. %u kHz\n", |
938 | powernow_table[i].frequency, | 904 | powernow_table[i].frequency, |
939 | (unsigned int) (data->acpi_data->states[i].core_frequency * 1000)); | 905 | (unsigned int) (data->acpi_data.states[i].core_frequency * 1000)); |
940 | powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; | 906 | powernow_table[i].frequency = CPUFREQ_ENTRY_INVALID; |
941 | continue; | 907 | continue; |
942 | } | 908 | } |
@@ -946,12 +912,11 @@ static int fill_powernow_table_fidvid(struct powernow_k8_data *data, struct cpuf | |||
946 | 912 | ||
947 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) | 913 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) |
948 | { | 914 | { |
949 | if (data->acpi_data->state_count) | 915 | if (data->acpi_data.state_count) |
950 | acpi_processor_unregister_performance(data->acpi_data, data->cpu); | 916 | acpi_processor_unregister_performance(&data->acpi_data, data->cpu); |
951 | } | 917 | } |
952 | 918 | ||
953 | #else | 919 | #else |
954 | static int powernow_k8_cpu_preinit_acpi(void) { return -ENODEV; } | ||
955 | static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; } | 920 | static int powernow_k8_cpu_init_acpi(struct powernow_k8_data *data) { return -ENODEV; } |
956 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; } | 921 | static void powernow_k8_cpu_exit_acpi(struct powernow_k8_data *data) { return; } |
957 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; } | 922 | static void powernow_k8_acpi_pst_values(struct powernow_k8_data *data, unsigned int index) { return; } |
@@ -1136,7 +1101,7 @@ static int powernowk8_verify(struct cpufreq_policy *pol) | |||
1136 | static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | 1101 | static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) |
1137 | { | 1102 | { |
1138 | struct powernow_k8_data *data; | 1103 | struct powernow_k8_data *data; |
1139 | cpumask_t oldmask = CPU_MASK_ALL; | 1104 | cpumask_t oldmask; |
1140 | int rc; | 1105 | int rc; |
1141 | 1106 | ||
1142 | if (!cpu_online(pol->cpu)) | 1107 | if (!cpu_online(pol->cpu)) |
@@ -1209,7 +1174,10 @@ static int __cpuinit powernowk8_cpu_init(struct cpufreq_policy *pol) | |||
1209 | /* run on any CPU again */ | 1174 | /* run on any CPU again */ |
1210 | set_cpus_allowed_ptr(current, &oldmask); | 1175 | set_cpus_allowed_ptr(current, &oldmask); |
1211 | 1176 | ||
1212 | pol->cpus = data->starting_core_affinity; | 1177 | if (cpu_family == CPU_HW_PSTATE) |
1178 | pol->cpus = cpumask_of_cpu(pol->cpu); | ||
1179 | else | ||
1180 | pol->cpus = per_cpu(cpu_core_map, pol->cpu); | ||
1213 | data->available_cores = &(pol->cpus); | 1181 | data->available_cores = &(pol->cpus); |
1214 | 1182 | ||
1215 | /* Take a crude guess here. | 1183 | /* Take a crude guess here. |
@@ -1332,7 +1300,6 @@ static int __cpuinit powernowk8_init(void) | |||
1332 | } | 1300 | } |
1333 | 1301 | ||
1334 | if (supported_cpus == num_online_cpus()) { | 1302 | if (supported_cpus == num_online_cpus()) { |
1335 | powernow_k8_cpu_preinit_acpi(); | ||
1336 | printk(KERN_INFO PFX "Found %d %s " | 1303 | printk(KERN_INFO PFX "Found %d %s " |
1337 | "processors (%d cpu cores) (" VERSION ")\n", | 1304 | "processors (%d cpu cores) (" VERSION ")\n", |
1338 | num_online_nodes(), | 1305 | num_online_nodes(), |
@@ -1349,10 +1316,6 @@ static void __exit powernowk8_exit(void) | |||
1349 | dprintk("exit\n"); | 1316 | dprintk("exit\n"); |
1350 | 1317 | ||
1351 | cpufreq_unregister_driver(&cpufreq_amd64_driver); | 1318 | cpufreq_unregister_driver(&cpufreq_amd64_driver); |
1352 | |||
1353 | #ifdef CONFIG_X86_POWERNOW_K8_ACPI | ||
1354 | free_percpu(acpi_perf_data); | ||
1355 | #endif | ||
1356 | } | 1319 | } |
1357 | 1320 | ||
1358 | MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>"); | 1321 | MODULE_AUTHOR("Paul Devriendt <paul.devriendt@amd.com> and Mark Langsdorf <mark.langsdorf@amd.com>"); |
diff --git a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h index a62612cd4be8..ab48cfed4d96 100644 --- a/arch/x86/kernel/cpu/cpufreq/powernow-k8.h +++ b/arch/x86/kernel/cpu/cpufreq/powernow-k8.h | |||
@@ -33,13 +33,12 @@ struct powernow_k8_data { | |||
33 | #ifdef CONFIG_X86_POWERNOW_K8_ACPI | 33 | #ifdef CONFIG_X86_POWERNOW_K8_ACPI |
34 | /* the acpi table needs to be kept. it's only available if ACPI was | 34 | /* the acpi table needs to be kept. it's only available if ACPI was |
35 | * used to determine valid frequency/vid/fid states */ | 35 | * used to determine valid frequency/vid/fid states */ |
36 | struct acpi_processor_performance *acpi_data; | 36 | struct acpi_processor_performance acpi_data; |
37 | #endif | 37 | #endif |
38 | /* we need to keep track of associated cores, but let cpufreq | 38 | /* we need to keep track of associated cores, but let cpufreq |
39 | * handle hotplug events - so just point at cpufreq pol->cpus | 39 | * handle hotplug events - so just point at cpufreq pol->cpus |
40 | * structure */ | 40 | * structure */ |
41 | cpumask_t *available_cores; | 41 | cpumask_t *available_cores; |
42 | cpumask_t starting_core_affinity; | ||
43 | }; | 42 | }; |
44 | 43 | ||
45 | 44 | ||
diff --git a/arch/x86/pci/irq.c b/arch/x86/pci/irq.c index fec0123b33a9..8e077185e185 100644 --- a/arch/x86/pci/irq.c +++ b/arch/x86/pci/irq.c | |||
@@ -590,6 +590,8 @@ static __init int intel_router_probe(struct irq_router *r, struct pci_dev *route | |||
590 | case PCI_DEVICE_ID_INTEL_ICH10_1: | 590 | case PCI_DEVICE_ID_INTEL_ICH10_1: |
591 | case PCI_DEVICE_ID_INTEL_ICH10_2: | 591 | case PCI_DEVICE_ID_INTEL_ICH10_2: |
592 | case PCI_DEVICE_ID_INTEL_ICH10_3: | 592 | case PCI_DEVICE_ID_INTEL_ICH10_3: |
593 | case PCI_DEVICE_ID_INTEL_PCH_0: | ||
594 | case PCI_DEVICE_ID_INTEL_PCH_1: | ||
593 | r->name = "PIIX/ICH"; | 595 | r->name = "PIIX/ICH"; |
594 | r->get = pirq_piix_get; | 596 | r->get = pirq_piix_get; |
595 | r->set = pirq_piix_set; | 597 | r->set = pirq_piix_set; |
diff --git a/arch/x86/pci/legacy.c b/arch/x86/pci/legacy.c index ec9ce35e44d6..b722dd481b39 100644 --- a/arch/x86/pci/legacy.c +++ b/arch/x86/pci/legacy.c | |||
@@ -14,7 +14,7 @@ static void __devinit pcibios_fixup_peer_bridges(void) | |||
14 | int n, devfn; | 14 | int n, devfn; |
15 | long node; | 15 | long node; |
16 | 16 | ||
17 | if (pcibios_last_bus <= 0 || pcibios_last_bus >= 0xff) | 17 | if (pcibios_last_bus <= 0 || pcibios_last_bus > 0xff) |
18 | return; | 18 | return; |
19 | DBG("PCI: Peer bridge fixup\n"); | 19 | DBG("PCI: Peer bridge fixup\n"); |
20 | 20 | ||
diff --git a/arch/x86/pci/mmconfig-shared.c b/arch/x86/pci/mmconfig-shared.c index 2bd5c53f6386..d9635764ce3d 100644 --- a/arch/x86/pci/mmconfig-shared.c +++ b/arch/x86/pci/mmconfig-shared.c | |||
@@ -293,7 +293,7 @@ static acpi_status __init find_mboard_resource(acpi_handle handle, u32 lvl, | |||
293 | return AE_OK; | 293 | return AE_OK; |
294 | } | 294 | } |
295 | 295 | ||
296 | static int __init is_acpi_reserved(unsigned long start, unsigned long end) | 296 | static int __init is_acpi_reserved(u64 start, u64 end, unsigned not_used) |
297 | { | 297 | { |
298 | struct resource mcfg_res; | 298 | struct resource mcfg_res; |
299 | 299 | ||
@@ -310,6 +310,41 @@ static int __init is_acpi_reserved(unsigned long start, unsigned long end) | |||
310 | return mcfg_res.flags; | 310 | return mcfg_res.flags; |
311 | } | 311 | } |
312 | 312 | ||
313 | typedef int (*check_reserved_t)(u64 start, u64 end, unsigned type); | ||
314 | |||
315 | static int __init is_mmconf_reserved(check_reserved_t is_reserved, | ||
316 | u64 addr, u64 size, int i, | ||
317 | typeof(pci_mmcfg_config[0]) *cfg, int with_e820) | ||
318 | { | ||
319 | u64 old_size = size; | ||
320 | int valid = 0; | ||
321 | |||
322 | while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) { | ||
323 | size >>= 1; | ||
324 | if (size < (16UL<<20)) | ||
325 | break; | ||
326 | } | ||
327 | |||
328 | if (size >= (16UL<<20) || size == old_size) { | ||
329 | printk(KERN_NOTICE | ||
330 | "PCI: MCFG area at %Lx reserved in %s\n", | ||
331 | addr, with_e820?"E820":"ACPI motherboard resources"); | ||
332 | valid = 1; | ||
333 | |||
334 | if (old_size != size) { | ||
335 | /* update end_bus_number */ | ||
336 | cfg->end_bus_number = cfg->start_bus_number + ((size>>20) - 1); | ||
337 | printk(KERN_NOTICE "PCI: updated MCFG configuration %d: base %lx " | ||
338 | "segment %hu buses %u - %u\n", | ||
339 | i, (unsigned long)cfg->address, cfg->pci_segment, | ||
340 | (unsigned int)cfg->start_bus_number, | ||
341 | (unsigned int)cfg->end_bus_number); | ||
342 | } | ||
343 | } | ||
344 | |||
345 | return valid; | ||
346 | } | ||
347 | |||
313 | static void __init pci_mmcfg_reject_broken(int early) | 348 | static void __init pci_mmcfg_reject_broken(int early) |
314 | { | 349 | { |
315 | typeof(pci_mmcfg_config[0]) *cfg; | 350 | typeof(pci_mmcfg_config[0]) *cfg; |
@@ -324,21 +359,22 @@ static void __init pci_mmcfg_reject_broken(int early) | |||
324 | 359 | ||
325 | for (i = 0; i < pci_mmcfg_config_num; i++) { | 360 | for (i = 0; i < pci_mmcfg_config_num; i++) { |
326 | int valid = 0; | 361 | int valid = 0; |
327 | u32 size = (cfg->end_bus_number + 1) << 20; | 362 | u64 addr, size; |
363 | |||
328 | cfg = &pci_mmcfg_config[i]; | 364 | cfg = &pci_mmcfg_config[i]; |
365 | addr = cfg->start_bus_number; | ||
366 | addr <<= 20; | ||
367 | addr += cfg->address; | ||
368 | size = cfg->end_bus_number + 1 - cfg->start_bus_number; | ||
369 | size <<= 20; | ||
329 | printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx " | 370 | printk(KERN_NOTICE "PCI: MCFG configuration %d: base %lx " |
330 | "segment %hu buses %u - %u\n", | 371 | "segment %hu buses %u - %u\n", |
331 | i, (unsigned long)cfg->address, cfg->pci_segment, | 372 | i, (unsigned long)cfg->address, cfg->pci_segment, |
332 | (unsigned int)cfg->start_bus_number, | 373 | (unsigned int)cfg->start_bus_number, |
333 | (unsigned int)cfg->end_bus_number); | 374 | (unsigned int)cfg->end_bus_number); |
334 | 375 | ||
335 | if (!early && | 376 | if (!early) |
336 | is_acpi_reserved(cfg->address, cfg->address + size - 1)) { | 377 | valid = is_mmconf_reserved(is_acpi_reserved, addr, size, i, cfg, 0); |
337 | printk(KERN_NOTICE "PCI: MCFG area at %Lx reserved " | ||
338 | "in ACPI motherboard resources\n", | ||
339 | cfg->address); | ||
340 | valid = 1; | ||
341 | } | ||
342 | 378 | ||
343 | if (valid) | 379 | if (valid) |
344 | continue; | 380 | continue; |
@@ -347,16 +383,11 @@ static void __init pci_mmcfg_reject_broken(int early) | |||
347 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not" | 383 | printk(KERN_ERR "PCI: BIOS Bug: MCFG area at %Lx is not" |
348 | " reserved in ACPI motherboard resources\n", | 384 | " reserved in ACPI motherboard resources\n", |
349 | cfg->address); | 385 | cfg->address); |
386 | |||
350 | /* Don't try to do this check unless configuration | 387 | /* Don't try to do this check unless configuration |
351 | type 1 is available. how about type 2 ?*/ | 388 | type 1 is available. how about type 2 ?*/ |
352 | if (raw_pci_ops && e820_all_mapped(cfg->address, | 389 | if (raw_pci_ops) |
353 | cfg->address + size - 1, | 390 | valid = is_mmconf_reserved(e820_all_mapped, addr, size, i, cfg, 1); |
354 | E820_RESERVED)) { | ||
355 | printk(KERN_NOTICE | ||
356 | "PCI: MCFG area at %Lx reserved in E820\n", | ||
357 | cfg->address); | ||
358 | valid = 1; | ||
359 | } | ||
360 | 391 | ||
361 | if (!valid) | 392 | if (!valid) |
362 | goto reject; | 393 | goto reject; |
diff --git a/drivers/bluetooth/Kconfig b/drivers/bluetooth/Kconfig index a235ca787465..7cb4029a5375 100644 --- a/drivers/bluetooth/Kconfig +++ b/drivers/bluetooth/Kconfig | |||
@@ -3,8 +3,8 @@ menu "Bluetooth device drivers" | |||
3 | depends on BT | 3 | depends on BT |
4 | 4 | ||
5 | config BT_HCIUSB | 5 | config BT_HCIUSB |
6 | tristate "HCI USB driver" | 6 | tristate "HCI USB driver (old version)" |
7 | depends on USB | 7 | depends on USB && BT_HCIBTUSB=n |
8 | help | 8 | help |
9 | Bluetooth HCI USB driver. | 9 | Bluetooth HCI USB driver. |
10 | This driver is required if you want to use Bluetooth devices with | 10 | This driver is required if you want to use Bluetooth devices with |
@@ -23,15 +23,13 @@ config BT_HCIUSB_SCO | |||
23 | Say Y here to compile support for SCO over HCI USB. | 23 | Say Y here to compile support for SCO over HCI USB. |
24 | 24 | ||
25 | config BT_HCIBTUSB | 25 | config BT_HCIBTUSB |
26 | tristate "HCI USB driver (alternate version)" | 26 | tristate "HCI USB driver" |
27 | depends on USB && EXPERIMENTAL && BT_HCIUSB=n | 27 | depends on USB |
28 | help | 28 | help |
29 | Bluetooth HCI USB driver. | 29 | Bluetooth HCI USB driver. |
30 | This driver is required if you want to use Bluetooth devices with | 30 | This driver is required if you want to use Bluetooth devices with |
31 | USB interface. | 31 | USB interface. |
32 | 32 | ||
33 | This driver is still experimental and has no SCO support. | ||
34 | |||
35 | Say Y here to compile support for Bluetooth USB devices into the | 33 | Say Y here to compile support for Bluetooth USB devices into the |
36 | kernel or say M to compile it as module (btusb). | 34 | kernel or say M to compile it as module (btusb). |
37 | 35 | ||
diff --git a/drivers/bluetooth/bt3c_cs.c b/drivers/bluetooth/bt3c_cs.c index 593b7c595038..27058477cc8b 100644 --- a/drivers/bluetooth/bt3c_cs.c +++ b/drivers/bluetooth/bt3c_cs.c | |||
@@ -60,7 +60,7 @@ | |||
60 | /* ======================== Module parameters ======================== */ | 60 | /* ======================== Module parameters ======================== */ |
61 | 61 | ||
62 | 62 | ||
63 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>, Jose Orlando Pereira <jop@di.uminho.pt>"); | 63 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
64 | MODULE_DESCRIPTION("Bluetooth driver for the 3Com Bluetooth PCMCIA card"); | 64 | MODULE_DESCRIPTION("Bluetooth driver for the 3Com Bluetooth PCMCIA card"); |
65 | MODULE_LICENSE("GPL"); | 65 | MODULE_LICENSE("GPL"); |
66 | MODULE_FIRMWARE("BT3CPCC.bin"); | 66 | MODULE_FIRMWARE("BT3CPCC.bin"); |
diff --git a/drivers/bluetooth/btusb.c b/drivers/bluetooth/btusb.c index 95ae9ba5661e..6a010681ecf3 100644 --- a/drivers/bluetooth/btusb.c +++ b/drivers/bluetooth/btusb.c | |||
@@ -2,7 +2,7 @@ | |||
2 | * | 2 | * |
3 | * Generic Bluetooth USB driver | 3 | * Generic Bluetooth USB driver |
4 | * | 4 | * |
5 | * Copyright (C) 2005-2007 Marcel Holtmann <marcel@holtmann.org> | 5 | * Copyright (C) 2005-2008 Marcel Holtmann <marcel@holtmann.org> |
6 | * | 6 | * |
7 | * | 7 | * |
8 | * This program is free software; you can redistribute it and/or modify | 8 | * This program is free software; you can redistribute it and/or modify |
@@ -41,7 +41,7 @@ | |||
41 | #define BT_DBG(D...) | 41 | #define BT_DBG(D...) |
42 | #endif | 42 | #endif |
43 | 43 | ||
44 | #define VERSION "0.2" | 44 | #define VERSION "0.3" |
45 | 45 | ||
46 | static int ignore_dga; | 46 | static int ignore_dga; |
47 | static int ignore_csr; | 47 | static int ignore_csr; |
@@ -160,12 +160,16 @@ static struct usb_device_id blacklist_table[] = { | |||
160 | { } /* Terminating entry */ | 160 | { } /* Terminating entry */ |
161 | }; | 161 | }; |
162 | 162 | ||
163 | #define BTUSB_MAX_ISOC_FRAMES 10 | ||
164 | |||
163 | #define BTUSB_INTR_RUNNING 0 | 165 | #define BTUSB_INTR_RUNNING 0 |
164 | #define BTUSB_BULK_RUNNING 1 | 166 | #define BTUSB_BULK_RUNNING 1 |
167 | #define BTUSB_ISOC_RUNNING 2 | ||
165 | 168 | ||
166 | struct btusb_data { | 169 | struct btusb_data { |
167 | struct hci_dev *hdev; | 170 | struct hci_dev *hdev; |
168 | struct usb_device *udev; | 171 | struct usb_device *udev; |
172 | struct usb_interface *isoc; | ||
169 | 173 | ||
170 | spinlock_t lock; | 174 | spinlock_t lock; |
171 | 175 | ||
@@ -176,10 +180,15 @@ struct btusb_data { | |||
176 | struct usb_anchor tx_anchor; | 180 | struct usb_anchor tx_anchor; |
177 | struct usb_anchor intr_anchor; | 181 | struct usb_anchor intr_anchor; |
178 | struct usb_anchor bulk_anchor; | 182 | struct usb_anchor bulk_anchor; |
183 | struct usb_anchor isoc_anchor; | ||
179 | 184 | ||
180 | struct usb_endpoint_descriptor *intr_ep; | 185 | struct usb_endpoint_descriptor *intr_ep; |
181 | struct usb_endpoint_descriptor *bulk_tx_ep; | 186 | struct usb_endpoint_descriptor *bulk_tx_ep; |
182 | struct usb_endpoint_descriptor *bulk_rx_ep; | 187 | struct usb_endpoint_descriptor *bulk_rx_ep; |
188 | struct usb_endpoint_descriptor *isoc_tx_ep; | ||
189 | struct usb_endpoint_descriptor *isoc_rx_ep; | ||
190 | |||
191 | int isoc_altsetting; | ||
183 | }; | 192 | }; |
184 | 193 | ||
185 | static void btusb_intr_complete(struct urb *urb) | 194 | static void btusb_intr_complete(struct urb *urb) |
@@ -195,6 +204,8 @@ static void btusb_intr_complete(struct urb *urb) | |||
195 | return; | 204 | return; |
196 | 205 | ||
197 | if (urb->status == 0) { | 206 | if (urb->status == 0) { |
207 | hdev->stat.byte_rx += urb->actual_length; | ||
208 | |||
198 | if (hci_recv_fragment(hdev, HCI_EVENT_PKT, | 209 | if (hci_recv_fragment(hdev, HCI_EVENT_PKT, |
199 | urb->transfer_buffer, | 210 | urb->transfer_buffer, |
200 | urb->actual_length) < 0) { | 211 | urb->actual_length) < 0) { |
@@ -216,7 +227,7 @@ static void btusb_intr_complete(struct urb *urb) | |||
216 | } | 227 | } |
217 | } | 228 | } |
218 | 229 | ||
219 | static inline int btusb_submit_intr_urb(struct hci_dev *hdev) | 230 | static int btusb_submit_intr_urb(struct hci_dev *hdev) |
220 | { | 231 | { |
221 | struct btusb_data *data = hdev->driver_data; | 232 | struct btusb_data *data = hdev->driver_data; |
222 | struct urb *urb; | 233 | struct urb *urb; |
@@ -226,6 +237,9 @@ static inline int btusb_submit_intr_urb(struct hci_dev *hdev) | |||
226 | 237 | ||
227 | BT_DBG("%s", hdev->name); | 238 | BT_DBG("%s", hdev->name); |
228 | 239 | ||
240 | if (!data->intr_ep) | ||
241 | return -ENODEV; | ||
242 | |||
229 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 243 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
230 | if (!urb) | 244 | if (!urb) |
231 | return -ENOMEM; | 245 | return -ENOMEM; |
@@ -274,6 +288,8 @@ static void btusb_bulk_complete(struct urb *urb) | |||
274 | return; | 288 | return; |
275 | 289 | ||
276 | if (urb->status == 0) { | 290 | if (urb->status == 0) { |
291 | hdev->stat.byte_rx += urb->actual_length; | ||
292 | |||
277 | if (hci_recv_fragment(hdev, HCI_ACLDATA_PKT, | 293 | if (hci_recv_fragment(hdev, HCI_ACLDATA_PKT, |
278 | urb->transfer_buffer, | 294 | urb->transfer_buffer, |
279 | urb->actual_length) < 0) { | 295 | urb->actual_length) < 0) { |
@@ -295,7 +311,7 @@ static void btusb_bulk_complete(struct urb *urb) | |||
295 | } | 311 | } |
296 | } | 312 | } |
297 | 313 | ||
298 | static inline int btusb_submit_bulk_urb(struct hci_dev *hdev) | 314 | static int btusb_submit_bulk_urb(struct hci_dev *hdev) |
299 | { | 315 | { |
300 | struct btusb_data *data = hdev->driver_data; | 316 | struct btusb_data *data = hdev->driver_data; |
301 | struct urb *urb; | 317 | struct urb *urb; |
@@ -305,6 +321,9 @@ static inline int btusb_submit_bulk_urb(struct hci_dev *hdev) | |||
305 | 321 | ||
306 | BT_DBG("%s", hdev->name); | 322 | BT_DBG("%s", hdev->name); |
307 | 323 | ||
324 | if (!data->bulk_rx_ep) | ||
325 | return -ENODEV; | ||
326 | |||
308 | urb = usb_alloc_urb(0, GFP_KERNEL); | 327 | urb = usb_alloc_urb(0, GFP_KERNEL); |
309 | if (!urb) | 328 | if (!urb) |
310 | return -ENOMEM; | 329 | return -ENOMEM; |
@@ -339,6 +358,127 @@ static inline int btusb_submit_bulk_urb(struct hci_dev *hdev) | |||
339 | return err; | 358 | return err; |
340 | } | 359 | } |
341 | 360 | ||
361 | static void btusb_isoc_complete(struct urb *urb) | ||
362 | { | ||
363 | struct hci_dev *hdev = urb->context; | ||
364 | struct btusb_data *data = hdev->driver_data; | ||
365 | int i, err; | ||
366 | |||
367 | BT_DBG("%s urb %p status %d count %d", hdev->name, | ||
368 | urb, urb->status, urb->actual_length); | ||
369 | |||
370 | if (!test_bit(HCI_RUNNING, &hdev->flags)) | ||
371 | return; | ||
372 | |||
373 | if (urb->status == 0) { | ||
374 | for (i = 0; i < urb->number_of_packets; i++) { | ||
375 | unsigned int offset = urb->iso_frame_desc[i].offset; | ||
376 | unsigned int length = urb->iso_frame_desc[i].actual_length; | ||
377 | |||
378 | if (urb->iso_frame_desc[i].status) | ||
379 | continue; | ||
380 | |||
381 | hdev->stat.byte_rx += length; | ||
382 | |||
383 | if (hci_recv_fragment(hdev, HCI_SCODATA_PKT, | ||
384 | urb->transfer_buffer + offset, | ||
385 | length) < 0) { | ||
386 | BT_ERR("%s corrupted SCO packet", hdev->name); | ||
387 | hdev->stat.err_rx++; | ||
388 | } | ||
389 | } | ||
390 | } | ||
391 | |||
392 | if (!test_bit(BTUSB_ISOC_RUNNING, &data->flags)) | ||
393 | return; | ||
394 | |||
395 | usb_anchor_urb(urb, &data->isoc_anchor); | ||
396 | |||
397 | err = usb_submit_urb(urb, GFP_ATOMIC); | ||
398 | if (err < 0) { | ||
399 | BT_ERR("%s urb %p failed to resubmit (%d)", | ||
400 | hdev->name, urb, -err); | ||
401 | usb_unanchor_urb(urb); | ||
402 | } | ||
403 | } | ||
404 | |||
405 | static void inline __fill_isoc_descriptor(struct urb *urb, int len, int mtu) | ||
406 | { | ||
407 | int i, offset = 0; | ||
408 | |||
409 | BT_DBG("len %d mtu %d", len, mtu); | ||
410 | |||
411 | for (i = 0; i < BTUSB_MAX_ISOC_FRAMES && len >= mtu; | ||
412 | i++, offset += mtu, len -= mtu) { | ||
413 | urb->iso_frame_desc[i].offset = offset; | ||
414 | urb->iso_frame_desc[i].length = mtu; | ||
415 | } | ||
416 | |||
417 | if (len && i < BTUSB_MAX_ISOC_FRAMES) { | ||
418 | urb->iso_frame_desc[i].offset = offset; | ||
419 | urb->iso_frame_desc[i].length = len; | ||
420 | i++; | ||
421 | } | ||
422 | |||
423 | urb->number_of_packets = i; | ||
424 | } | ||
425 | |||
426 | static int btusb_submit_isoc_urb(struct hci_dev *hdev) | ||
427 | { | ||
428 | struct btusb_data *data = hdev->driver_data; | ||
429 | struct urb *urb; | ||
430 | unsigned char *buf; | ||
431 | unsigned int pipe; | ||
432 | int err, size; | ||
433 | |||
434 | BT_DBG("%s", hdev->name); | ||
435 | |||
436 | if (!data->isoc_rx_ep) | ||
437 | return -ENODEV; | ||
438 | |||
439 | urb = usb_alloc_urb(BTUSB_MAX_ISOC_FRAMES, GFP_KERNEL); | ||
440 | if (!urb) | ||
441 | return -ENOMEM; | ||
442 | |||
443 | size = le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize) * | ||
444 | BTUSB_MAX_ISOC_FRAMES; | ||
445 | |||
446 | buf = kmalloc(size, GFP_KERNEL); | ||
447 | if (!buf) { | ||
448 | usb_free_urb(urb); | ||
449 | return -ENOMEM; | ||
450 | } | ||
451 | |||
452 | pipe = usb_rcvisocpipe(data->udev, data->isoc_rx_ep->bEndpointAddress); | ||
453 | |||
454 | urb->dev = data->udev; | ||
455 | urb->pipe = pipe; | ||
456 | urb->context = hdev; | ||
457 | urb->complete = btusb_isoc_complete; | ||
458 | urb->interval = data->isoc_rx_ep->bInterval; | ||
459 | |||
460 | urb->transfer_flags = URB_FREE_BUFFER | URB_ISO_ASAP; | ||
461 | urb->transfer_buffer = buf; | ||
462 | urb->transfer_buffer_length = size; | ||
463 | |||
464 | __fill_isoc_descriptor(urb, size, | ||
465 | le16_to_cpu(data->isoc_rx_ep->wMaxPacketSize)); | ||
466 | |||
467 | usb_anchor_urb(urb, &data->isoc_anchor); | ||
468 | |||
469 | err = usb_submit_urb(urb, GFP_KERNEL); | ||
470 | if (err < 0) { | ||
471 | BT_ERR("%s urb %p submission failed (%d)", | ||
472 | hdev->name, urb, -err); | ||
473 | usb_unanchor_urb(urb); | ||
474 | kfree(buf); | ||
475 | } | ||
476 | |||
477 | usb_free_urb(urb); | ||
478 | |||
479 | return err; | ||
480 | } | ||
481 | |||
342 | static void btusb_tx_complete(struct urb *urb) | 482 | static void btusb_tx_complete(struct urb *urb) |
343 | { | 483 | { |
344 | struct sk_buff *skb = urb->context; | 484 | struct sk_buff *skb = urb->context; |
@@ -392,6 +532,9 @@ static int btusb_close(struct hci_dev *hdev) | |||
392 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) | 532 | if (!test_and_clear_bit(HCI_RUNNING, &hdev->flags)) |
393 | return 0; | 533 | return 0; |
394 | 534 | ||
535 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); | ||
536 | usb_kill_anchored_urbs(&data->intr_anchor); | ||
537 | |||
395 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); | 538 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); |
396 | usb_kill_anchored_urbs(&data->bulk_anchor); | 539 | usb_kill_anchored_urbs(&data->bulk_anchor); |
397 | 540 | ||
@@ -453,6 +596,9 @@ static int btusb_send_frame(struct sk_buff *skb) | |||
453 | break; | 596 | break; |
454 | 597 | ||
455 | case HCI_ACLDATA_PKT: | 598 | case HCI_ACLDATA_PKT: |
599 | if (!data->bulk_tx_ep || hdev->conn_hash.acl_num < 1) | ||
600 | return -ENODEV; | ||
601 | |||
456 | urb = usb_alloc_urb(0, GFP_ATOMIC); | 602 | urb = usb_alloc_urb(0, GFP_ATOMIC); |
457 | if (!urb) | 603 | if (!urb) |
458 | return -ENOMEM; | 604 | return -ENOMEM; |
@@ -467,9 +613,31 @@ static int btusb_send_frame(struct sk_buff *skb) | |||
467 | break; | 613 | break; |
468 | 614 | ||
469 | case HCI_SCODATA_PKT: | 615 | case HCI_SCODATA_PKT: |
616 | if (!data->isoc_tx_ep || hdev->conn_hash.sco_num < 1) | ||
617 | return -ENODEV; | ||
618 | |||
619 | urb = usb_alloc_urb(BTUSB_MAX_ISOC_FRAMES, GFP_ATOMIC); | ||
620 | if (!urb) | ||
621 | return -ENOMEM; | ||
622 | |||
623 | pipe = usb_sndisocpipe(data->udev, | ||
624 | data->isoc_tx_ep->bEndpointAddress); | ||
625 | |||
626 | urb->dev = data->udev; | ||
627 | urb->pipe = pipe; | ||
628 | urb->context = skb; | ||
629 | urb->complete = btusb_tx_complete; | ||
630 | urb->interval = data->isoc_tx_ep->bInterval; | ||
631 | |||
632 | urb->transfer_flags = URB_ISO_ASAP; | ||
633 | urb->transfer_buffer = skb->data; | ||
634 | urb->transfer_buffer_length = skb->len; | ||
635 | |||
636 | __fill_isoc_descriptor(urb, skb->len, | ||
637 | le16_to_cpu(data->isoc_tx_ep->wMaxPacketSize)); | ||
638 | |||
470 | hdev->stat.sco_tx++; | 639 | hdev->stat.sco_tx++; |
471 | kfree_skb(skb); | 640 | break; |
472 | return 0; | ||
473 | 641 | ||
474 | default: | 642 | default: |
475 | return -EILSEQ; | 643 | return -EILSEQ; |
@@ -508,22 +676,86 @@ static void btusb_notify(struct hci_dev *hdev, unsigned int evt) | |||
508 | schedule_work(&data->work); | 676 | schedule_work(&data->work); |
509 | } | 677 | } |
510 | 678 | ||
679 | static int inline __set_isoc_interface(struct hci_dev *hdev, int altsetting) | ||
680 | { | ||
681 | struct btusb_data *data = hdev->driver_data; | ||
682 | struct usb_interface *intf = data->isoc; | ||
683 | struct usb_endpoint_descriptor *ep_desc; | ||
684 | int i, err; | ||
685 | |||
686 | if (!data->isoc) | ||
687 | return -ENODEV; | ||
688 | |||
689 | err = usb_set_interface(data->udev, 1, altsetting); | ||
690 | if (err < 0) { | ||
691 | BT_ERR("%s setting interface failed (%d)", hdev->name, -err); | ||
692 | return err; | ||
693 | } | ||
694 | |||
695 | data->isoc_altsetting = altsetting; | ||
696 | |||
697 | data->isoc_tx_ep = NULL; | ||
698 | data->isoc_rx_ep = NULL; | ||
699 | |||
700 | for (i = 0; i < intf->cur_altsetting->desc.bNumEndpoints; i++) { | ||
701 | ep_desc = &intf->cur_altsetting->endpoint[i].desc; | ||
702 | |||
703 | if (!data->isoc_tx_ep && usb_endpoint_is_isoc_out(ep_desc)) { | ||
704 | data->isoc_tx_ep = ep_desc; | ||
705 | continue; | ||
706 | } | ||
707 | |||
708 | if (!data->isoc_rx_ep && usb_endpoint_is_isoc_in(ep_desc)) { | ||
709 | data->isoc_rx_ep = ep_desc; | ||
710 | continue; | ||
711 | } | ||
712 | } | ||
713 | |||
714 | if (!data->isoc_tx_ep || !data->isoc_rx_ep) { | ||
715 | BT_ERR("%s invalid SCO descriptors", hdev->name); | ||
716 | return -ENODEV; | ||
717 | } | ||
718 | |||
719 | return 0; | ||
720 | } | ||
721 | |||
511 | static void btusb_work(struct work_struct *work) | 722 | static void btusb_work(struct work_struct *work) |
512 | { | 723 | { |
513 | struct btusb_data *data = container_of(work, struct btusb_data, work); | 724 | struct btusb_data *data = container_of(work, struct btusb_data, work); |
514 | struct hci_dev *hdev = data->hdev; | 725 | struct hci_dev *hdev = data->hdev; |
515 | 726 | ||
516 | if (hdev->conn_hash.acl_num == 0) { | 727 | if (hdev->conn_hash.acl_num > 0) { |
728 | if (!test_and_set_bit(BTUSB_BULK_RUNNING, &data->flags)) { | ||
729 | if (btusb_submit_bulk_urb(hdev) < 0) | ||
730 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); | ||
731 | else | ||
732 | btusb_submit_bulk_urb(hdev); | ||
733 | } | ||
734 | } else { | ||
517 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); | 735 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); |
518 | usb_kill_anchored_urbs(&data->bulk_anchor); | 736 | usb_kill_anchored_urbs(&data->bulk_anchor); |
519 | return; | ||
520 | } | 737 | } |
521 | 738 | ||
522 | if (!test_and_set_bit(BTUSB_BULK_RUNNING, &data->flags)) { | 739 | if (hdev->conn_hash.sco_num > 0) { |
523 | if (btusb_submit_bulk_urb(hdev) < 0) | 740 | if (data->isoc_altsetting != 2) { |
524 | clear_bit(BTUSB_BULK_RUNNING, &data->flags); | 741 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); |
525 | else | 742 | usb_kill_anchored_urbs(&data->isoc_anchor); |
526 | btusb_submit_bulk_urb(hdev); | 743 | |
744 | if (__set_isoc_interface(hdev, 2) < 0) | ||
745 | return; | ||
746 | } | ||
747 | |||
748 | if (!test_and_set_bit(BTUSB_ISOC_RUNNING, &data->flags)) { | ||
749 | if (btusb_submit_isoc_urb(hdev) < 0) | ||
750 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); | ||
751 | else | ||
752 | btusb_submit_isoc_urb(hdev); | ||
753 | } | ||
754 | } else { | ||
755 | clear_bit(BTUSB_ISOC_RUNNING, &data->flags); | ||
756 | usb_kill_anchored_urbs(&data->isoc_anchor); | ||
757 | |||
758 | __set_isoc_interface(hdev, 0); | ||
527 | } | 759 | } |
528 | } | 760 | } |
529 | 761 | ||
@@ -597,6 +829,7 @@ static int btusb_probe(struct usb_interface *intf, | |||
597 | init_usb_anchor(&data->tx_anchor); | 829 | init_usb_anchor(&data->tx_anchor); |
598 | init_usb_anchor(&data->intr_anchor); | 830 | init_usb_anchor(&data->intr_anchor); |
599 | init_usb_anchor(&data->bulk_anchor); | 831 | init_usb_anchor(&data->bulk_anchor); |
832 | init_usb_anchor(&data->isoc_anchor); | ||
600 | 833 | ||
601 | hdev = hci_alloc_dev(); | 834 | hdev = hci_alloc_dev(); |
602 | if (!hdev) { | 835 | if (!hdev) { |
@@ -620,6 +853,9 @@ static int btusb_probe(struct usb_interface *intf, | |||
620 | 853 | ||
621 | hdev->owner = THIS_MODULE; | 854 | hdev->owner = THIS_MODULE; |
622 | 855 | ||
856 | /* interface numbers are hardcoded in the spec */ | ||
857 | data->isoc = usb_ifnum_to_if(data->udev, 1); | ||
858 | |||
623 | if (reset || id->driver_info & BTUSB_RESET) | 859 | if (reset || id->driver_info & BTUSB_RESET) |
624 | set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks); | 860 | set_bit(HCI_QUIRK_RESET_ON_INIT, &hdev->quirks); |
625 | 861 | ||
@@ -628,11 +864,16 @@ static int btusb_probe(struct usb_interface *intf, | |||
628 | set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks); | 864 | set_bit(HCI_QUIRK_FIXUP_BUFFER_SIZE, &hdev->quirks); |
629 | } | 865 | } |
630 | 866 | ||
867 | if (id->driver_info & BTUSB_BROKEN_ISOC) | ||
868 | data->isoc = NULL; | ||
869 | |||
631 | if (id->driver_info & BTUSB_SNIFFER) { | 870 | if (id->driver_info & BTUSB_SNIFFER) { |
632 | struct usb_device *udev = interface_to_usbdev(intf); | 871 | struct usb_device *udev = data->udev; |
633 | 872 | ||
634 | if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997) | 873 | if (le16_to_cpu(udev->descriptor.bcdDevice) > 0x997) |
635 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); | 874 | set_bit(HCI_QUIRK_RAW_DEVICE, &hdev->quirks); |
875 | |||
876 | data->isoc = NULL; | ||
636 | } | 877 | } |
637 | 878 | ||
638 | if (id->driver_info & BTUSB_BCM92035) { | 879 | if (id->driver_info & BTUSB_BCM92035) { |
@@ -646,6 +887,16 @@ static int btusb_probe(struct usb_interface *intf, | |||
646 | } | 887 | } |
647 | } | 888 | } |
648 | 889 | ||
890 | if (data->isoc) { | ||
891 | err = usb_driver_claim_interface(&btusb_driver, | ||
892 | data->isoc, NULL); | ||
893 | if (err < 0) { | ||
894 | hci_free_dev(hdev); | ||
895 | kfree(data); | ||
896 | return err; | ||
897 | } | ||
898 | } | ||
899 | |||
649 | err = hci_register_dev(hdev); | 900 | err = hci_register_dev(hdev); |
650 | if (err < 0) { | 901 | if (err < 0) { |
651 | hci_free_dev(hdev); | 902 | hci_free_dev(hdev); |
@@ -670,6 +921,9 @@ static void btusb_disconnect(struct usb_interface *intf) | |||
670 | 921 | ||
671 | hdev = data->hdev; | 922 | hdev = data->hdev; |
672 | 923 | ||
924 | if (data->isoc) | ||
925 | usb_driver_release_interface(&btusb_driver, data->isoc); | ||
926 | |||
673 | usb_set_intfdata(intf, NULL); | 927 | usb_set_intfdata(intf, NULL); |
674 | 928 | ||
675 | hci_unregister_dev(hdev); | 929 | hci_unregister_dev(hdev); |
diff --git a/drivers/bluetooth/hci_ldisc.c b/drivers/bluetooth/hci_ldisc.c index 69df187d74ce..8dfcf77cb717 100644 --- a/drivers/bluetooth/hci_ldisc.c +++ b/drivers/bluetooth/hci_ldisc.c | |||
@@ -577,7 +577,7 @@ module_exit(hci_uart_exit); | |||
577 | module_param(reset, bool, 0644); | 577 | module_param(reset, bool, 0644); |
578 | MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); | 578 | MODULE_PARM_DESC(reset, "Send HCI reset command on initialization"); |
579 | 579 | ||
580 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 580 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
581 | MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION); | 581 | MODULE_DESCRIPTION("Bluetooth HCI UART driver ver " VERSION); |
582 | MODULE_VERSION(VERSION); | 582 | MODULE_VERSION(VERSION); |
583 | MODULE_LICENSE("GPL"); | 583 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/bluetooth/hci_usb.c b/drivers/bluetooth/hci_usb.c index e397572bf574..3c453924f838 100644 --- a/drivers/bluetooth/hci_usb.c +++ b/drivers/bluetooth/hci_usb.c | |||
@@ -1130,7 +1130,7 @@ module_param(isoc, int, 0644); | |||
1130 | MODULE_PARM_DESC(isoc, "Set isochronous transfers for SCO over HCI support"); | 1130 | MODULE_PARM_DESC(isoc, "Set isochronous transfers for SCO over HCI support"); |
1131 | #endif | 1131 | #endif |
1132 | 1132 | ||
1133 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 1133 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
1134 | MODULE_DESCRIPTION("Bluetooth HCI USB driver ver " VERSION); | 1134 | MODULE_DESCRIPTION("Bluetooth HCI USB driver ver " VERSION); |
1135 | MODULE_VERSION(VERSION); | 1135 | MODULE_VERSION(VERSION); |
1136 | MODULE_LICENSE("GPL"); | 1136 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/bluetooth/hci_vhci.c b/drivers/bluetooth/hci_vhci.c index d97700aa54a9..7320a71b6368 100644 --- a/drivers/bluetooth/hci_vhci.c +++ b/drivers/bluetooth/hci_vhci.c | |||
@@ -377,7 +377,7 @@ module_exit(vhci_exit); | |||
377 | module_param(minor, int, 0444); | 377 | module_param(minor, int, 0444); |
378 | MODULE_PARM_DESC(minor, "Miscellaneous minor device number"); | 378 | MODULE_PARM_DESC(minor, "Miscellaneous minor device number"); |
379 | 379 | ||
380 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 380 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
381 | MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION); | 381 | MODULE_DESCRIPTION("Bluetooth virtual HCI driver ver " VERSION); |
382 | MODULE_VERSION(VERSION); | 382 | MODULE_VERSION(VERSION); |
383 | MODULE_LICENSE("GPL"); | 383 | MODULE_LICENSE("GPL"); |
diff --git a/drivers/cdrom/cdrom.c b/drivers/cdrom/cdrom.c index d9d1b65d206c..74031de517e6 100644 --- a/drivers/cdrom/cdrom.c +++ b/drivers/cdrom/cdrom.c | |||
@@ -408,7 +408,6 @@ int register_cdrom(struct cdrom_device_info *cdi) | |||
408 | ENSURE(get_last_session, CDC_MULTI_SESSION); | 408 | ENSURE(get_last_session, CDC_MULTI_SESSION); |
409 | ENSURE(get_mcn, CDC_MCN); | 409 | ENSURE(get_mcn, CDC_MCN); |
410 | ENSURE(reset, CDC_RESET); | 410 | ENSURE(reset, CDC_RESET); |
411 | ENSURE(audio_ioctl, CDC_PLAY_AUDIO); | ||
412 | ENSURE(generic_packet, CDC_GENERIC_PACKET); | 411 | ENSURE(generic_packet, CDC_GENERIC_PACKET); |
413 | cdi->mc_flags = 0; | 412 | cdi->mc_flags = 0; |
414 | cdo->n_minors = 0; | 413 | cdo->n_minors = 0; |
@@ -2506,8 +2505,6 @@ static int cdrom_ioctl_get_subchnl(struct cdrom_device_info *cdi, | |||
2506 | 2505 | ||
2507 | /* cdinfo(CD_DO_IOCTL,"entering CDROMSUBCHNL\n");*/ | 2506 | /* cdinfo(CD_DO_IOCTL,"entering CDROMSUBCHNL\n");*/ |
2508 | 2507 | ||
2509 | if (!CDROM_CAN(CDC_PLAY_AUDIO)) | ||
2510 | return -ENOSYS; | ||
2511 | if (copy_from_user(&q, argp, sizeof(q))) | 2508 | if (copy_from_user(&q, argp, sizeof(q))) |
2512 | return -EFAULT; | 2509 | return -EFAULT; |
2513 | 2510 | ||
@@ -2538,8 +2535,6 @@ static int cdrom_ioctl_read_tochdr(struct cdrom_device_info *cdi, | |||
2538 | 2535 | ||
2539 | /* cdinfo(CD_DO_IOCTL, "entering CDROMREADTOCHDR\n"); */ | 2536 | /* cdinfo(CD_DO_IOCTL, "entering CDROMREADTOCHDR\n"); */ |
2540 | 2537 | ||
2541 | if (!CDROM_CAN(CDC_PLAY_AUDIO)) | ||
2542 | return -ENOSYS; | ||
2543 | if (copy_from_user(&header, argp, sizeof(header))) | 2538 | if (copy_from_user(&header, argp, sizeof(header))) |
2544 | return -EFAULT; | 2539 | return -EFAULT; |
2545 | 2540 | ||
@@ -2562,8 +2557,6 @@ static int cdrom_ioctl_read_tocentry(struct cdrom_device_info *cdi, | |||
2562 | 2557 | ||
2563 | /* cdinfo(CD_DO_IOCTL, "entering CDROMREADTOCENTRY\n"); */ | 2558 | /* cdinfo(CD_DO_IOCTL, "entering CDROMREADTOCENTRY\n"); */ |
2564 | 2559 | ||
2565 | if (!CDROM_CAN(CDC_PLAY_AUDIO)) | ||
2566 | return -ENOSYS; | ||
2567 | if (copy_from_user(&entry, argp, sizeof(entry))) | 2560 | if (copy_from_user(&entry, argp, sizeof(entry))) |
2568 | return -EFAULT; | 2561 | return -EFAULT; |
2569 | 2562 | ||
diff --git a/drivers/cdrom/gdrom.c b/drivers/cdrom/gdrom.c index 1e0455bd6df9..1231d95aa695 100644 --- a/drivers/cdrom/gdrom.c +++ b/drivers/cdrom/gdrom.c | |||
@@ -471,6 +471,12 @@ cleanup_sense_final: | |||
471 | return err; | 471 | return err; |
472 | } | 472 | } |
473 | 473 | ||
474 | static int gdrom_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | ||
475 | void *arg) | ||
476 | { | ||
477 | return -EINVAL; | ||
478 | } | ||
479 | |||
474 | static struct cdrom_device_ops gdrom_ops = { | 480 | static struct cdrom_device_ops gdrom_ops = { |
475 | .open = gdrom_open, | 481 | .open = gdrom_open, |
476 | .release = gdrom_release, | 482 | .release = gdrom_release, |
@@ -478,6 +484,7 @@ static struct cdrom_device_ops gdrom_ops = { | |||
478 | .media_changed = gdrom_mediachanged, | 484 | .media_changed = gdrom_mediachanged, |
479 | .get_last_session = gdrom_get_last_session, | 485 | .get_last_session = gdrom_get_last_session, |
480 | .reset = gdrom_hardreset, | 486 | .reset = gdrom_hardreset, |
487 | .audio_ioctl = gdrom_audio_ioctl, | ||
481 | .capability = CDC_MULTI_SESSION | CDC_MEDIA_CHANGED | | 488 | .capability = CDC_MULTI_SESSION | CDC_MEDIA_CHANGED | |
482 | CDC_RESET | CDC_DRIVE_STATUS | CDC_CD_R, | 489 | CDC_RESET | CDC_DRIVE_STATUS | CDC_CD_R, |
483 | .n_minors = 1, | 490 | .n_minors = 1, |
diff --git a/drivers/cdrom/viocd.c b/drivers/cdrom/viocd.c index 9d0dfe6e0d63..031e0e1a1a3b 100644 --- a/drivers/cdrom/viocd.c +++ b/drivers/cdrom/viocd.c | |||
@@ -550,12 +550,19 @@ return_complete: | |||
550 | } | 550 | } |
551 | } | 551 | } |
552 | 552 | ||
553 | static int viocd_audio_ioctl(struct cdrom_device_info *cdi, unsigned int cmd, | ||
554 | void *arg) | ||
555 | { | ||
556 | return -EINVAL; | ||
557 | } | ||
558 | |||
553 | static struct cdrom_device_ops viocd_dops = { | 559 | static struct cdrom_device_ops viocd_dops = { |
554 | .open = viocd_open, | 560 | .open = viocd_open, |
555 | .release = viocd_release, | 561 | .release = viocd_release, |
556 | .media_changed = viocd_media_changed, | 562 | .media_changed = viocd_media_changed, |
557 | .lock_door = viocd_lock_door, | 563 | .lock_door = viocd_lock_door, |
558 | .generic_packet = viocd_packet, | 564 | .generic_packet = viocd_packet, |
565 | .audio_ioctl = viocd_audio_ioctl, | ||
559 | .capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_SELECT_DISC | CDC_MULTI_SESSION | CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_DRIVE_STATUS | CDC_GENERIC_PACKET | CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R | CDC_DVD_RAM | CDC_RAM | 566 | .capability = CDC_CLOSE_TRAY | CDC_OPEN_TRAY | CDC_LOCK | CDC_SELECT_SPEED | CDC_SELECT_DISC | CDC_MULTI_SESSION | CDC_MCN | CDC_MEDIA_CHANGED | CDC_PLAY_AUDIO | CDC_RESET | CDC_DRIVE_STATUS | CDC_GENERIC_PACKET | CDC_CD_R | CDC_CD_RW | CDC_DVD | CDC_DVD_R | CDC_DVD_RAM | CDC_RAM |
560 | }; | 567 | }; |
561 | 568 | ||
diff --git a/drivers/char/random.c b/drivers/char/random.c index e0d0e371909c..1838aa3d24fe 100644 --- a/drivers/char/random.c +++ b/drivers/char/random.c | |||
@@ -1571,6 +1571,7 @@ u32 secure_ipv4_port_ephemeral(__be32 saddr, __be32 daddr, __be16 dport) | |||
1571 | 1571 | ||
1572 | return half_md4_transform(hash, keyptr->secret); | 1572 | return half_md4_transform(hash, keyptr->secret); |
1573 | } | 1573 | } |
1574 | EXPORT_SYMBOL_GPL(secure_ipv4_port_ephemeral); | ||
1574 | 1575 | ||
1575 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) | 1576 | #if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE) |
1576 | u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, | 1577 | u32 secure_ipv6_port_ephemeral(const __be32 *saddr, const __be32 *daddr, |
diff --git a/drivers/firewire/Kconfig b/drivers/firewire/Kconfig index fa6d6abefd4d..450902438208 100644 --- a/drivers/firewire/Kconfig +++ b/drivers/firewire/Kconfig | |||
@@ -12,8 +12,8 @@ config FIREWIRE | |||
12 | This is the "Juju" FireWire stack, a new alternative implementation | 12 | This is the "Juju" FireWire stack, a new alternative implementation |
13 | designed for robustness and simplicity. You can build either this | 13 | designed for robustness and simplicity. You can build either this |
14 | stack, or the old stack (the ieee1394 driver, ohci1394 etc.) or both. | 14 | stack, or the old stack (the ieee1394 driver, ohci1394 etc.) or both. |
15 | Please read http://wiki.linux1394.org/JujuMigration before you | 15 | Please read http://ieee1394.wiki.kernel.org/index.php/Juju_Migration |
16 | enable the new stack. | 16 | before you enable the new stack. |
17 | 17 | ||
18 | To compile this driver as a module, say M here: the module will be | 18 | To compile this driver as a module, say M here: the module will be |
19 | called firewire-core. | 19 | called firewire-core. |
diff --git a/drivers/ide/ide-cd.c b/drivers/ide/ide-cd.c index 89a112d513ad..49a8c589e346 100644 --- a/drivers/ide/ide-cd.c +++ b/drivers/ide/ide-cd.c | |||
@@ -1272,9 +1272,9 @@ static ide_startstop_t ide_cd_do_request(ide_drive_t *drive, struct request *rq, | |||
1272 | */ | 1272 | */ |
1273 | static void msf_from_bcd(struct atapi_msf *msf) | 1273 | static void msf_from_bcd(struct atapi_msf *msf) |
1274 | { | 1274 | { |
1275 | msf->minute = BCD2BIN(msf->minute); | 1275 | msf->minute = bcd2bin(msf->minute); |
1276 | msf->second = BCD2BIN(msf->second); | 1276 | msf->second = bcd2bin(msf->second); |
1277 | msf->frame = BCD2BIN(msf->frame); | 1277 | msf->frame = bcd2bin(msf->frame); |
1278 | } | 1278 | } |
1279 | 1279 | ||
1280 | int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense) | 1280 | int cdrom_check_status(ide_drive_t *drive, struct request_sense *sense) |
@@ -1415,8 +1415,8 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1415 | return stat; | 1415 | return stat; |
1416 | 1416 | ||
1417 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { | 1417 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { |
1418 | toc->hdr.first_track = BCD2BIN(toc->hdr.first_track); | 1418 | toc->hdr.first_track = bcd2bin(toc->hdr.first_track); |
1419 | toc->hdr.last_track = BCD2BIN(toc->hdr.last_track); | 1419 | toc->hdr.last_track = bcd2bin(toc->hdr.last_track); |
1420 | } | 1420 | } |
1421 | 1421 | ||
1422 | ntracks = toc->hdr.last_track - toc->hdr.first_track + 1; | 1422 | ntracks = toc->hdr.last_track - toc->hdr.first_track + 1; |
@@ -1456,8 +1456,8 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1456 | return stat; | 1456 | return stat; |
1457 | 1457 | ||
1458 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { | 1458 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { |
1459 | toc->hdr.first_track = (u8)BIN2BCD(CDROM_LEADOUT); | 1459 | toc->hdr.first_track = (u8)bin2bcd(CDROM_LEADOUT); |
1460 | toc->hdr.last_track = (u8)BIN2BCD(CDROM_LEADOUT); | 1460 | toc->hdr.last_track = (u8)bin2bcd(CDROM_LEADOUT); |
1461 | } else { | 1461 | } else { |
1462 | toc->hdr.first_track = CDROM_LEADOUT; | 1462 | toc->hdr.first_track = CDROM_LEADOUT; |
1463 | toc->hdr.last_track = CDROM_LEADOUT; | 1463 | toc->hdr.last_track = CDROM_LEADOUT; |
@@ -1470,14 +1470,14 @@ int ide_cd_read_toc(ide_drive_t *drive, struct request_sense *sense) | |||
1470 | toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length); | 1470 | toc->hdr.toc_length = be16_to_cpu(toc->hdr.toc_length); |
1471 | 1471 | ||
1472 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { | 1472 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) { |
1473 | toc->hdr.first_track = BCD2BIN(toc->hdr.first_track); | 1473 | toc->hdr.first_track = bcd2bin(toc->hdr.first_track); |
1474 | toc->hdr.last_track = BCD2BIN(toc->hdr.last_track); | 1474 | toc->hdr.last_track = bcd2bin(toc->hdr.last_track); |
1475 | } | 1475 | } |
1476 | 1476 | ||
1477 | for (i = 0; i <= ntracks; i++) { | 1477 | for (i = 0; i <= ntracks; i++) { |
1478 | if (drive->atapi_flags & IDE_AFLAG_TOCADDR_AS_BCD) { | 1478 | if (drive->atapi_flags & IDE_AFLAG_TOCADDR_AS_BCD) { |
1479 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) | 1479 | if (drive->atapi_flags & IDE_AFLAG_TOCTRACKS_AS_BCD) |
1480 | toc->ent[i].track = BCD2BIN(toc->ent[i].track); | 1480 | toc->ent[i].track = bcd2bin(toc->ent[i].track); |
1481 | msf_from_bcd(&toc->ent[i].addr.msf); | 1481 | msf_from_bcd(&toc->ent[i].addr.msf); |
1482 | } | 1482 | } |
1483 | toc->ent[i].addr.lba = msf_to_lba(toc->ent[i].addr.msf.minute, | 1483 | toc->ent[i].addr.lba = msf_to_lba(toc->ent[i].addr.msf.minute, |
diff --git a/drivers/ide/pci/aec62xx.c b/drivers/ide/pci/aec62xx.c index 40644b6f1c00..3187215e8f89 100644 --- a/drivers/ide/pci/aec62xx.c +++ b/drivers/ide/pci/aec62xx.c | |||
@@ -307,7 +307,7 @@ static struct pci_driver driver = { | |||
307 | .name = "AEC62xx_IDE", | 307 | .name = "AEC62xx_IDE", |
308 | .id_table = aec62xx_pci_tbl, | 308 | .id_table = aec62xx_pci_tbl, |
309 | .probe = aec62xx_init_one, | 309 | .probe = aec62xx_init_one, |
310 | .remove = aec62xx_remove, | 310 | .remove = __devexit_p(aec62xx_remove), |
311 | }; | 311 | }; |
312 | 312 | ||
313 | static int __init aec62xx_ide_init(void) | 313 | static int __init aec62xx_ide_init(void) |
diff --git a/drivers/ide/pci/cy82c693.c b/drivers/ide/pci/cy82c693.c index bfae2f882f48..e6d8ee88d56d 100644 --- a/drivers/ide/pci/cy82c693.c +++ b/drivers/ide/pci/cy82c693.c | |||
@@ -447,7 +447,7 @@ static struct pci_driver driver = { | |||
447 | .name = "Cypress_IDE", | 447 | .name = "Cypress_IDE", |
448 | .id_table = cy82c693_pci_tbl, | 448 | .id_table = cy82c693_pci_tbl, |
449 | .probe = cy82c693_init_one, | 449 | .probe = cy82c693_init_one, |
450 | .remove = cy82c693_remove, | 450 | .remove = __devexit_p(cy82c693_remove), |
451 | }; | 451 | }; |
452 | 452 | ||
453 | static int __init cy82c693_ide_init(void) | 453 | static int __init cy82c693_ide_init(void) |
diff --git a/drivers/ide/pci/hpt366.c b/drivers/ide/pci/hpt366.c index 748793a413ab..eb107eef0dbc 100644 --- a/drivers/ide/pci/hpt366.c +++ b/drivers/ide/pci/hpt366.c | |||
@@ -1620,7 +1620,7 @@ static struct pci_driver driver = { | |||
1620 | .name = "HPT366_IDE", | 1620 | .name = "HPT366_IDE", |
1621 | .id_table = hpt366_pci_tbl, | 1621 | .id_table = hpt366_pci_tbl, |
1622 | .probe = hpt366_init_one, | 1622 | .probe = hpt366_init_one, |
1623 | .remove = hpt366_remove, | 1623 | .remove = __devexit_p(hpt366_remove), |
1624 | }; | 1624 | }; |
1625 | 1625 | ||
1626 | static int __init hpt366_ide_init(void) | 1626 | static int __init hpt366_ide_init(void) |
diff --git a/drivers/ide/pci/it821x.c b/drivers/ide/pci/it821x.c index b6dc723de702..4a1508a707cc 100644 --- a/drivers/ide/pci/it821x.c +++ b/drivers/ide/pci/it821x.c | |||
@@ -686,7 +686,7 @@ static struct pci_driver driver = { | |||
686 | .name = "ITE821x IDE", | 686 | .name = "ITE821x IDE", |
687 | .id_table = it821x_pci_tbl, | 687 | .id_table = it821x_pci_tbl, |
688 | .probe = it821x_init_one, | 688 | .probe = it821x_init_one, |
689 | .remove = it821x_remove, | 689 | .remove = __devexit_p(it821x_remove), |
690 | }; | 690 | }; |
691 | 691 | ||
692 | static int __init it821x_ide_init(void) | 692 | static int __init it821x_ide_init(void) |
diff --git a/drivers/ide/pci/pdc202xx_new.c b/drivers/ide/pci/pdc202xx_new.c index 0f609b72f470..d477da6b5858 100644 --- a/drivers/ide/pci/pdc202xx_new.c +++ b/drivers/ide/pci/pdc202xx_new.c | |||
@@ -566,7 +566,7 @@ static struct pci_driver driver = { | |||
566 | .name = "Promise_IDE", | 566 | .name = "Promise_IDE", |
567 | .id_table = pdc202new_pci_tbl, | 567 | .id_table = pdc202new_pci_tbl, |
568 | .probe = pdc202new_init_one, | 568 | .probe = pdc202new_init_one, |
569 | .remove = pdc202new_remove, | 569 | .remove = __devexit_p(pdc202new_remove), |
570 | }; | 570 | }; |
571 | 571 | ||
572 | static int __init pdc202new_ide_init(void) | 572 | static int __init pdc202new_ide_init(void) |
diff --git a/drivers/ide/pci/scc_pata.c b/drivers/ide/pci/scc_pata.c index 6cde48bba6f8..44cccd1e086a 100644 --- a/drivers/ide/pci/scc_pata.c +++ b/drivers/ide/pci/scc_pata.c | |||
@@ -954,7 +954,7 @@ static struct pci_driver driver = { | |||
954 | .name = "SCC IDE", | 954 | .name = "SCC IDE", |
955 | .id_table = scc_pci_tbl, | 955 | .id_table = scc_pci_tbl, |
956 | .probe = scc_init_one, | 956 | .probe = scc_init_one, |
957 | .remove = scc_remove, | 957 | .remove = __devexit_p(scc_remove), |
958 | }; | 958 | }; |
959 | 959 | ||
960 | static int scc_ide_init(void) | 960 | static int scc_ide_init(void) |
diff --git a/drivers/ide/pci/sgiioc4.c b/drivers/ide/pci/sgiioc4.c index 42eef19a18f1..681306c9d79b 100644 --- a/drivers/ide/pci/sgiioc4.c +++ b/drivers/ide/pci/sgiioc4.c | |||
@@ -621,9 +621,9 @@ sgiioc4_ide_setup_pci_device(struct pci_dev *dev) | |||
621 | if (!request_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE, | 621 | if (!request_mem_region(cmd_phys_base, IOC4_CMD_CTL_BLK_SIZE, |
622 | DRV_NAME)) { | 622 | DRV_NAME)) { |
623 | printk(KERN_ERR | 623 | printk(KERN_ERR |
624 | "%s : %s -- ERROR, Addresses " | 624 | "%s %s: -- ERROR, Addresses " |
625 | "0x%p to 0x%p ALREADY in use\n", | 625 | "0x%p to 0x%p ALREADY in use\n", |
626 | __func__, DRV_NAME, (void *) cmd_phys_base, | 626 | DRV_NAME, pci_name(dev), (void *)cmd_phys_base, |
627 | (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE); | 627 | (void *) cmd_phys_base + IOC4_CMD_CTL_BLK_SIZE); |
628 | return -ENOMEM; | 628 | return -ENOMEM; |
629 | } | 629 | } |
diff --git a/drivers/ide/pci/siimage.c b/drivers/ide/pci/siimage.c index 445ce6fbea33..db2b88a369ab 100644 --- a/drivers/ide/pci/siimage.c +++ b/drivers/ide/pci/siimage.c | |||
@@ -832,7 +832,7 @@ static struct pci_driver driver = { | |||
832 | .name = "SiI_IDE", | 832 | .name = "SiI_IDE", |
833 | .id_table = siimage_pci_tbl, | 833 | .id_table = siimage_pci_tbl, |
834 | .probe = siimage_init_one, | 834 | .probe = siimage_init_one, |
835 | .remove = siimage_remove, | 835 | .remove = __devexit_p(siimage_remove), |
836 | }; | 836 | }; |
837 | 837 | ||
838 | static int __init siimage_ide_init(void) | 838 | static int __init siimage_ide_init(void) |
diff --git a/drivers/ide/pci/sis5513.c b/drivers/ide/pci/sis5513.c index e5a4b42b4e33..5efe21d6ef97 100644 --- a/drivers/ide/pci/sis5513.c +++ b/drivers/ide/pci/sis5513.c | |||
@@ -610,7 +610,7 @@ static struct pci_driver driver = { | |||
610 | .name = "SIS_IDE", | 610 | .name = "SIS_IDE", |
611 | .id_table = sis5513_pci_tbl, | 611 | .id_table = sis5513_pci_tbl, |
612 | .probe = sis5513_init_one, | 612 | .probe = sis5513_init_one, |
613 | .remove = sis5513_remove, | 613 | .remove = __devexit_p(sis5513_remove), |
614 | }; | 614 | }; |
615 | 615 | ||
616 | static int __init sis5513_ide_init(void) | 616 | static int __init sis5513_ide_init(void) |
diff --git a/drivers/ide/pci/tc86c001.c b/drivers/ide/pci/tc86c001.c index 7fc88c375e5d..927277c54ec9 100644 --- a/drivers/ide/pci/tc86c001.c +++ b/drivers/ide/pci/tc86c001.c | |||
@@ -249,7 +249,7 @@ static struct pci_driver driver = { | |||
249 | .name = "TC86C001", | 249 | .name = "TC86C001", |
250 | .id_table = tc86c001_pci_tbl, | 250 | .id_table = tc86c001_pci_tbl, |
251 | .probe = tc86c001_init_one, | 251 | .probe = tc86c001_init_one, |
252 | .remove = tc86c001_remove, | 252 | .remove = __devexit_p(tc86c001_remove), |
253 | }; | 253 | }; |
254 | 254 | ||
255 | static int __init tc86c001_ide_init(void) | 255 | static int __init tc86c001_ide_init(void) |
diff --git a/drivers/ide/pci/via82cxxx.c b/drivers/ide/pci/via82cxxx.c index a6b2cc83f293..94fb9ab3223f 100644 --- a/drivers/ide/pci/via82cxxx.c +++ b/drivers/ide/pci/via82cxxx.c | |||
@@ -491,7 +491,7 @@ static struct pci_driver driver = { | |||
491 | .name = "VIA_IDE", | 491 | .name = "VIA_IDE", |
492 | .id_table = via_pci_tbl, | 492 | .id_table = via_pci_tbl, |
493 | .probe = via_init_one, | 493 | .probe = via_init_one, |
494 | .remove = via_remove, | 494 | .remove = __devexit_p(via_remove), |
495 | }; | 495 | }; |
496 | 496 | ||
497 | static int __init via_ide_init(void) | 497 | static int __init via_ide_init(void) |
diff --git a/drivers/ieee1394/nodemgr.c b/drivers/ieee1394/nodemgr.c index 994a21e5a0aa..16240a789650 100644 --- a/drivers/ieee1394/nodemgr.c +++ b/drivers/ieee1394/nodemgr.c | |||
@@ -844,7 +844,7 @@ static struct node_entry *nodemgr_create_node(octlet_t guid, struct csr1212_csr | |||
844 | ne->host = host; | 844 | ne->host = host; |
845 | ne->nodeid = nodeid; | 845 | ne->nodeid = nodeid; |
846 | ne->generation = generation; | 846 | ne->generation = generation; |
847 | ne->needs_probe = 1; | 847 | ne->needs_probe = true; |
848 | 848 | ||
849 | ne->guid = guid; | 849 | ne->guid = guid; |
850 | ne->guid_vendor_id = (guid >> 40) & 0xffffff; | 850 | ne->guid_vendor_id = (guid >> 40) & 0xffffff; |
@@ -1144,7 +1144,7 @@ static void nodemgr_process_root_directory(struct host_info *hi, struct node_ent | |||
1144 | struct csr1212_keyval *kv, *vendor_name_kv = NULL; | 1144 | struct csr1212_keyval *kv, *vendor_name_kv = NULL; |
1145 | u8 last_key_id = 0; | 1145 | u8 last_key_id = 0; |
1146 | 1146 | ||
1147 | ne->needs_probe = 0; | 1147 | ne->needs_probe = false; |
1148 | 1148 | ||
1149 | csr1212_for_each_dir_entry(ne->csr, kv, ne->csr->root_kv, dentry) { | 1149 | csr1212_for_each_dir_entry(ne->csr, kv, ne->csr->root_kv, dentry) { |
1150 | switch (kv->key.id) { | 1150 | switch (kv->key.id) { |
@@ -1295,7 +1295,7 @@ static void nodemgr_update_node(struct node_entry *ne, struct csr1212_csr *csr, | |||
1295 | nodemgr_update_bus_options(ne); | 1295 | nodemgr_update_bus_options(ne); |
1296 | 1296 | ||
1297 | /* Mark the node as new, so it gets re-probed */ | 1297 | /* Mark the node as new, so it gets re-probed */ |
1298 | ne->needs_probe = 1; | 1298 | ne->needs_probe = true; |
1299 | } else { | 1299 | } else { |
1300 | /* old cache is valid, so update its generation */ | 1300 | /* old cache is valid, so update its generation */ |
1301 | struct nodemgr_csr_info *ci = ne->csr->private; | 1301 | struct nodemgr_csr_info *ci = ne->csr->private; |
@@ -1566,57 +1566,60 @@ static void nodemgr_probe_ne(struct host_info *hi, struct node_entry *ne, int ge | |||
1566 | struct probe_param { | 1566 | struct probe_param { |
1567 | struct host_info *hi; | 1567 | struct host_info *hi; |
1568 | int generation; | 1568 | int generation; |
1569 | bool probe_now; | ||
1569 | }; | 1570 | }; |
1570 | 1571 | ||
1571 | static int __nodemgr_node_probe(struct device *dev, void *data) | 1572 | static int node_probe(struct device *dev, void *data) |
1572 | { | 1573 | { |
1573 | struct probe_param *param = (struct probe_param *)data; | 1574 | struct probe_param *p = data; |
1574 | struct node_entry *ne; | 1575 | struct node_entry *ne; |
1575 | 1576 | ||
1577 | if (p->generation != get_hpsb_generation(p->hi->host)) | ||
1578 | return -EAGAIN; | ||
1579 | |||
1576 | ne = container_of(dev, struct node_entry, node_dev); | 1580 | ne = container_of(dev, struct node_entry, node_dev); |
1577 | if (!ne->needs_probe) | 1581 | if (ne->needs_probe == p->probe_now) |
1578 | nodemgr_probe_ne(param->hi, ne, param->generation); | 1582 | nodemgr_probe_ne(p->hi, ne, p->generation); |
1579 | if (ne->needs_probe) | ||
1580 | nodemgr_probe_ne(param->hi, ne, param->generation); | ||
1581 | return 0; | 1583 | return 0; |
1582 | } | 1584 | } |
1583 | 1585 | ||
1584 | static void nodemgr_node_probe(struct host_info *hi, int generation) | 1586 | static void nodemgr_node_probe(struct host_info *hi, int generation) |
1585 | { | 1587 | { |
1586 | struct hpsb_host *host = hi->host; | 1588 | struct probe_param p; |
1587 | struct probe_param param; | ||
1588 | 1589 | ||
1589 | param.hi = hi; | 1590 | p.hi = hi; |
1590 | param.generation = generation; | 1591 | p.generation = generation; |
1591 | /* Do some processing of the nodes we've probed. This pulls them | 1592 | /* |
1593 | * Do some processing of the nodes we've probed. This pulls them | ||
1592 | * into the sysfs layer if needed, and can result in processing of | 1594 | * into the sysfs layer if needed, and can result in processing of |
1593 | * unit-directories, or just updating the node and it's | 1595 | * unit-directories, or just updating the node and it's |
1594 | * unit-directories. | 1596 | * unit-directories. |
1595 | * | 1597 | * |
1596 | * Run updates before probes. Usually, updates are time-critical | 1598 | * Run updates before probes. Usually, updates are time-critical |
1597 | * while probes are time-consuming. (Well, those probes need some | 1599 | * while probes are time-consuming. |
1598 | * improvement...) */ | ||
1599 | |||
1600 | class_for_each_device(&nodemgr_ne_class, NULL, ¶m, | ||
1601 | __nodemgr_node_probe); | ||
1602 | |||
1603 | /* If we had a bus reset while we were scanning the bus, it is | ||
1604 | * possible that we did not probe all nodes. In that case, we | ||
1605 | * skip the clean up for now, since we could remove nodes that | ||
1606 | * were still on the bus. Another bus scan is pending which will | ||
1607 | * do the clean up eventually. | ||
1608 | * | 1600 | * |
1601 | * Meanwhile, another bus reset may have happened. In this case we | ||
1602 | * skip everything here and let the next bus scan handle it. | ||
1603 | * Otherwise we may prematurely remove nodes which are still there. | ||
1604 | */ | ||
1605 | p.probe_now = false; | ||
1606 | if (class_for_each_device(&nodemgr_ne_class, NULL, &p, node_probe) != 0) | ||
1607 | return; | ||
1608 | |||
1609 | p.probe_now = true; | ||
1610 | if (class_for_each_device(&nodemgr_ne_class, NULL, &p, node_probe) != 0) | ||
1611 | return; | ||
1612 | /* | ||
1609 | * Now let's tell the bus to rescan our devices. This may seem | 1613 | * Now let's tell the bus to rescan our devices. This may seem |
1610 | * like overhead, but the driver-model core will only scan a | 1614 | * like overhead, but the driver-model core will only scan a |
1611 | * device for a driver when either the device is added, or when a | 1615 | * device for a driver when either the device is added, or when a |
1612 | * new driver is added. A bus reset is a good reason to rescan | 1616 | * new driver is added. A bus reset is a good reason to rescan |
1613 | * devices that were there before. For example, an sbp2 device | 1617 | * devices that were there before. For example, an sbp2 device |
1614 | * may become available for login, if the host that held it was | 1618 | * may become available for login, if the host that held it was |
1615 | * just removed. */ | 1619 | * just removed. |
1616 | 1620 | */ | |
1617 | if (generation == get_hpsb_generation(host)) | 1621 | if (bus_rescan_devices(&ieee1394_bus_type) != 0) |
1618 | if (bus_rescan_devices(&ieee1394_bus_type)) | 1622 | HPSB_DEBUG("bus_rescan_devices had an error"); |
1619 | HPSB_DEBUG("bus_rescan_devices had an error"); | ||
1620 | } | 1623 | } |
1621 | 1624 | ||
1622 | static int nodemgr_send_resume_packet(struct hpsb_host *host) | 1625 | static int nodemgr_send_resume_packet(struct hpsb_host *host) |
diff --git a/drivers/ieee1394/nodemgr.h b/drivers/ieee1394/nodemgr.h index 919e92e2a955..6eb26465a84c 100644 --- a/drivers/ieee1394/nodemgr.h +++ b/drivers/ieee1394/nodemgr.h | |||
@@ -97,7 +97,7 @@ struct node_entry { | |||
97 | struct hpsb_host *host; /* Host this node is attached to */ | 97 | struct hpsb_host *host; /* Host this node is attached to */ |
98 | nodeid_t nodeid; /* NodeID */ | 98 | nodeid_t nodeid; /* NodeID */ |
99 | struct bus_options busopt; /* Bus Options */ | 99 | struct bus_options busopt; /* Bus Options */ |
100 | int needs_probe; | 100 | bool needs_probe; |
101 | unsigned int generation; /* Synced with hpsb generation */ | 101 | unsigned int generation; /* Synced with hpsb generation */ |
102 | 102 | ||
103 | /* The following is read from the config rom */ | 103 | /* The following is read from the config rom */ |
diff --git a/drivers/ieee1394/sbp2.c b/drivers/ieee1394/sbp2.c index 9cbf3154d243..1d6ad3435537 100644 --- a/drivers/ieee1394/sbp2.c +++ b/drivers/ieee1394/sbp2.c | |||
@@ -731,15 +731,26 @@ static int sbp2_update(struct unit_directory *ud) | |||
731 | { | 731 | { |
732 | struct sbp2_lu *lu = ud->device.driver_data; | 732 | struct sbp2_lu *lu = ud->device.driver_data; |
733 | 733 | ||
734 | if (sbp2_reconnect_device(lu)) { | 734 | if (sbp2_reconnect_device(lu) != 0) { |
735 | /* Reconnect has failed. Perhaps we didn't reconnect fast | 735 | /* |
736 | * enough. Try a regular login, but first log out just in | 736 | * Reconnect failed. If another bus reset happened, |
737 | * case of any weirdness. */ | 737 | * let nodemgr proceed and call sbp2_update again later |
738 | * (or sbp2_remove if this node went away). | ||
739 | */ | ||
740 | if (!hpsb_node_entry_valid(lu->ne)) | ||
741 | return 0; | ||
742 | /* | ||
743 | * Or the target rejected the reconnect because we weren't | ||
744 | * fast enough. Try a regular login, but first log out | ||
745 | * just in case of any weirdness. | ||
746 | */ | ||
738 | sbp2_logout_device(lu); | 747 | sbp2_logout_device(lu); |
739 | 748 | ||
740 | if (sbp2_login_device(lu)) { | 749 | if (sbp2_login_device(lu) != 0) { |
741 | /* Login failed too, just fail, and the backend | 750 | if (!hpsb_node_entry_valid(lu->ne)) |
742 | * will call our sbp2_remove for us */ | 751 | return 0; |
752 | |||
753 | /* Maybe another initiator won the login. */ | ||
743 | SBP2_ERR("Failed to reconnect to sbp2 device!"); | 754 | SBP2_ERR("Failed to reconnect to sbp2 device!"); |
744 | return -EBUSY; | 755 | return -EBUSY; |
745 | } | 756 | } |
diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c index a92d81567559..3524bef62be6 100644 --- a/drivers/input/evdev.c +++ b/drivers/input/evdev.c | |||
@@ -677,8 +677,8 @@ static int handle_eviocgbit(struct input_dev *dev, unsigned int cmd, void __user | |||
677 | len = OLD_KEY_MAX; | 677 | len = OLD_KEY_MAX; |
678 | if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000)) | 678 | if (printk_timed_ratelimit(&keymax_warn_time, 10 * 1000)) |
679 | printk(KERN_WARNING | 679 | printk(KERN_WARNING |
680 | "evdev.c(EVIOCGBIT): Suspicious buffer size %d, " | 680 | "evdev.c(EVIOCGBIT): Suspicious buffer size %u, " |
681 | "limiting output to %d bytes. See " | 681 | "limiting output to %zu bytes. See " |
682 | "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n", | 682 | "http://userweb.kernel.org/~dtor/eviocgbit-bug.html\n", |
683 | OLD_KEY_MAX, | 683 | OLD_KEY_MAX, |
684 | BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long)); | 684 | BITS_TO_LONGS(OLD_KEY_MAX) * sizeof(long)); |
diff --git a/drivers/input/keyboard/gpio_keys.c b/drivers/input/keyboard/gpio_keys.c index 3f48279f2195..ec96b369dd7a 100644 --- a/drivers/input/keyboard/gpio_keys.c +++ b/drivers/input/keyboard/gpio_keys.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/module.h> | 11 | #include <linux/module.h> |
12 | #include <linux/version.h> | ||
13 | 12 | ||
14 | #include <linux/init.h> | 13 | #include <linux/init.h> |
15 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
diff --git a/drivers/input/misc/cobalt_btns.c b/drivers/input/misc/cobalt_btns.c index 6a1f48b76e32..2adf9cb265da 100644 --- a/drivers/input/misc/cobalt_btns.c +++ b/drivers/input/misc/cobalt_btns.c | |||
@@ -148,6 +148,9 @@ static int __devexit cobalt_buttons_remove(struct platform_device *pdev) | |||
148 | return 0; | 148 | return 0; |
149 | } | 149 | } |
150 | 150 | ||
151 | MODULE_AUTHOR("Yoichi Yuasa <yoichi_yuasa@tripeaks.co.jp>"); | ||
152 | MODULE_DESCRIPTION("Cobalt button interface driver"); | ||
153 | MODULE_LICENSE("GPL"); | ||
151 | /* work with hotplug and coldplug */ | 154 | /* work with hotplug and coldplug */ |
152 | MODULE_ALIAS("platform:Cobalt buttons"); | 155 | MODULE_ALIAS("platform:Cobalt buttons"); |
153 | 156 | ||
diff --git a/drivers/input/mouse/gpio_mouse.c b/drivers/input/mouse/gpio_mouse.c index 339290184871..72cf5e33790e 100644 --- a/drivers/input/mouse/gpio_mouse.c +++ b/drivers/input/mouse/gpio_mouse.c | |||
@@ -9,7 +9,6 @@ | |||
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/init.h> | 11 | #include <linux/init.h> |
12 | #include <linux/version.h> | ||
13 | #include <linux/module.h> | 12 | #include <linux/module.h> |
14 | #include <linux/platform_device.h> | 13 | #include <linux/platform_device.h> |
15 | #include <linux/input-polldev.h> | 14 | #include <linux/input-polldev.h> |
diff --git a/drivers/input/tablet/gtco.c b/drivers/input/tablet/gtco.c index b9b7a98bc5a5..7df0228e836e 100644 --- a/drivers/input/tablet/gtco.c +++ b/drivers/input/tablet/gtco.c | |||
@@ -64,7 +64,6 @@ Scott Hill shill@gtcocalcomp.com | |||
64 | #include <asm/byteorder.h> | 64 | #include <asm/byteorder.h> |
65 | 65 | ||
66 | 66 | ||
67 | #include <linux/version.h> | ||
68 | #include <linux/usb/input.h> | 67 | #include <linux/usb/input.h> |
69 | 68 | ||
70 | /* Version with a Major number of 2 is for kernel inclusion only. */ | 69 | /* Version with a Major number of 2 is for kernel inclusion only. */ |
diff --git a/drivers/input/touchscreen/wm9705.c b/drivers/input/touchscreen/wm9705.c index 978e1a13ffc7..372efbc694ff 100644 --- a/drivers/input/touchscreen/wm9705.c +++ b/drivers/input/touchscreen/wm9705.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/version.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/wm9712.c b/drivers/input/touchscreen/wm9712.c index 4c5d85a249ae..c8bb1e7335fc 100644 --- a/drivers/input/touchscreen/wm9712.c +++ b/drivers/input/touchscreen/wm9712.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/version.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/wm9713.c b/drivers/input/touchscreen/wm9713.c index 838458792ea0..781ee83547e6 100644 --- a/drivers/input/touchscreen/wm9713.c +++ b/drivers/input/touchscreen/wm9713.c | |||
@@ -17,7 +17,6 @@ | |||
17 | 17 | ||
18 | #include <linux/module.h> | 18 | #include <linux/module.h> |
19 | #include <linux/moduleparam.h> | 19 | #include <linux/moduleparam.h> |
20 | #include <linux/version.h> | ||
21 | #include <linux/kernel.h> | 20 | #include <linux/kernel.h> |
22 | #include <linux/input.h> | 21 | #include <linux/input.h> |
23 | #include <linux/delay.h> | 22 | #include <linux/delay.h> |
diff --git a/drivers/input/touchscreen/wm97xx-core.c b/drivers/input/touchscreen/wm97xx-core.c index cdc24ad314e0..d589ab0e3adc 100644 --- a/drivers/input/touchscreen/wm97xx-core.c +++ b/drivers/input/touchscreen/wm97xx-core.c | |||
@@ -37,7 +37,6 @@ | |||
37 | 37 | ||
38 | #include <linux/module.h> | 38 | #include <linux/module.h> |
39 | #include <linux/moduleparam.h> | 39 | #include <linux/moduleparam.h> |
40 | #include <linux/version.h> | ||
41 | #include <linux/kernel.h> | 40 | #include <linux/kernel.h> |
42 | #include <linux/init.h> | 41 | #include <linux/init.h> |
43 | #include <linux/delay.h> | 42 | #include <linux/delay.h> |
diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig index 4b4cb2bf4f11..a5c141cecd4e 100644 --- a/drivers/net/Kconfig +++ b/drivers/net/Kconfig | |||
@@ -1172,7 +1172,7 @@ config ETH16I | |||
1172 | 1172 | ||
1173 | config NE2000 | 1173 | config NE2000 |
1174 | tristate "NE2000/NE1000 support" | 1174 | tristate "NE2000/NE1000 support" |
1175 | depends on NET_ISA || (Q40 && m) || M32R || TOSHIBA_RBTX4927 || TOSHIBA_RBTX4938 | 1175 | depends on NET_ISA || (Q40 && m) || M32R || MACH_TX49XX |
1176 | select CRC32 | 1176 | select CRC32 |
1177 | ---help--- | 1177 | ---help--- |
1178 | If you have a network (Ethernet) card of this type, say Y and read | 1178 | If you have a network (Ethernet) card of this type, say Y and read |
diff --git a/drivers/net/acenic.c b/drivers/net/acenic.c index e4483de84e7f..66de80b64b92 100644 --- a/drivers/net/acenic.c +++ b/drivers/net/acenic.c | |||
@@ -52,7 +52,6 @@ | |||
52 | 52 | ||
53 | #include <linux/module.h> | 53 | #include <linux/module.h> |
54 | #include <linux/moduleparam.h> | 54 | #include <linux/moduleparam.h> |
55 | #include <linux/version.h> | ||
56 | #include <linux/types.h> | 55 | #include <linux/types.h> |
57 | #include <linux/errno.h> | 56 | #include <linux/errno.h> |
58 | #include <linux/ioport.h> | 57 | #include <linux/ioport.h> |
diff --git a/drivers/net/arm/ixp4xx_eth.c b/drivers/net/arm/ixp4xx_eth.c index 020771bfb603..e2d702b8b2e4 100644 --- a/drivers/net/arm/ixp4xx_eth.c +++ b/drivers/net/arm/ixp4xx_eth.c | |||
@@ -551,7 +551,7 @@ static int eth_poll(struct napi_struct *napi, int budget) | |||
551 | if ((skb = netdev_alloc_skb(dev, RX_BUFF_SIZE))) { | 551 | if ((skb = netdev_alloc_skb(dev, RX_BUFF_SIZE))) { |
552 | phys = dma_map_single(&dev->dev, skb->data, | 552 | phys = dma_map_single(&dev->dev, skb->data, |
553 | RX_BUFF_SIZE, DMA_FROM_DEVICE); | 553 | RX_BUFF_SIZE, DMA_FROM_DEVICE); |
554 | if (dma_mapping_error(phys)) { | 554 | if (dma_mapping_error(&dev->dev, phys)) { |
555 | dev_kfree_skb(skb); | 555 | dev_kfree_skb(skb); |
556 | skb = NULL; | 556 | skb = NULL; |
557 | } | 557 | } |
@@ -698,7 +698,7 @@ static int eth_xmit(struct sk_buff *skb, struct net_device *dev) | |||
698 | #endif | 698 | #endif |
699 | 699 | ||
700 | phys = dma_map_single(&dev->dev, mem, bytes, DMA_TO_DEVICE); | 700 | phys = dma_map_single(&dev->dev, mem, bytes, DMA_TO_DEVICE); |
701 | if (dma_mapping_error(phys)) { | 701 | if (dma_mapping_error(&dev->dev, phys)) { |
702 | #ifdef __ARMEB__ | 702 | #ifdef __ARMEB__ |
703 | dev_kfree_skb(skb); | 703 | dev_kfree_skb(skb); |
704 | #else | 704 | #else |
@@ -883,7 +883,7 @@ static int init_queues(struct port *port) | |||
883 | desc->buf_len = MAX_MRU; | 883 | desc->buf_len = MAX_MRU; |
884 | desc->data = dma_map_single(&port->netdev->dev, data, | 884 | desc->data = dma_map_single(&port->netdev->dev, data, |
885 | RX_BUFF_SIZE, DMA_FROM_DEVICE); | 885 | RX_BUFF_SIZE, DMA_FROM_DEVICE); |
886 | if (dma_mapping_error(desc->data)) { | 886 | if (dma_mapping_error(&port->netdev->dev, desc->data)) { |
887 | free_buffer(buff); | 887 | free_buffer(buff); |
888 | return -EIO; | 888 | return -EIO; |
889 | } | 889 | } |
diff --git a/drivers/net/atl1e/atl1e_ethtool.c b/drivers/net/atl1e/atl1e_ethtool.c index cdc3b85b10b9..619c6583e1aa 100644 --- a/drivers/net/atl1e/atl1e_ethtool.c +++ b/drivers/net/atl1e/atl1e_ethtool.c | |||
@@ -355,7 +355,7 @@ static int atl1e_set_wol(struct net_device *netdev, struct ethtool_wolinfo *wol) | |||
355 | struct atl1e_adapter *adapter = netdev_priv(netdev); | 355 | struct atl1e_adapter *adapter = netdev_priv(netdev); |
356 | 356 | ||
357 | if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | | 357 | if (wol->wolopts & (WAKE_ARP | WAKE_MAGICSECURE | |
358 | WAKE_MCAST | WAKE_BCAST | WAKE_MCAST)) | 358 | WAKE_UCAST | WAKE_MCAST | WAKE_BCAST)) |
359 | return -EOPNOTSUPP; | 359 | return -EOPNOTSUPP; |
360 | /* these settings will always override what we currently have */ | 360 | /* these settings will always override what we currently have */ |
361 | adapter->wol = 0; | 361 | adapter->wol = 0; |
diff --git a/drivers/net/au1000_eth.c b/drivers/net/au1000_eth.c index cb8be490e5ae..5ee1b0557a02 100644 --- a/drivers/net/au1000_eth.c +++ b/drivers/net/au1000_eth.c | |||
@@ -807,7 +807,7 @@ err_out: | |||
807 | static int au1000_init(struct net_device *dev) | 807 | static int au1000_init(struct net_device *dev) |
808 | { | 808 | { |
809 | struct au1000_private *aup = (struct au1000_private *) dev->priv; | 809 | struct au1000_private *aup = (struct au1000_private *) dev->priv; |
810 | u32 flags; | 810 | unsigned long flags; |
811 | int i; | 811 | int i; |
812 | u32 control; | 812 | u32 control; |
813 | 813 | ||
diff --git a/drivers/net/ax88796.c b/drivers/net/ax88796.c index 0b4adf4a0f7d..a886a4b9f7e5 100644 --- a/drivers/net/ax88796.c +++ b/drivers/net/ax88796.c | |||
@@ -554,7 +554,7 @@ static int ax_get_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
554 | 554 | ||
555 | spin_lock_irqsave(&ax->mii_lock, flags); | 555 | spin_lock_irqsave(&ax->mii_lock, flags); |
556 | mii_ethtool_gset(&ax->mii, cmd); | 556 | mii_ethtool_gset(&ax->mii, cmd); |
557 | spin_lock_irqsave(&ax->mii_lock, flags); | 557 | spin_unlock_irqrestore(&ax->mii_lock, flags); |
558 | 558 | ||
559 | return 0; | 559 | return 0; |
560 | } | 560 | } |
@@ -567,7 +567,7 @@ static int ax_set_settings(struct net_device *dev, struct ethtool_cmd *cmd) | |||
567 | 567 | ||
568 | spin_lock_irqsave(&ax->mii_lock, flags); | 568 | spin_lock_irqsave(&ax->mii_lock, flags); |
569 | rc = mii_ethtool_sset(&ax->mii, cmd); | 569 | rc = mii_ethtool_sset(&ax->mii, cmd); |
570 | spin_lock_irqsave(&ax->mii_lock, flags); | 570 | spin_unlock_irqrestore(&ax->mii_lock, flags); |
571 | 571 | ||
572 | return rc; | 572 | return rc; |
573 | } | 573 | } |
diff --git a/drivers/net/bnx2.c b/drivers/net/bnx2.c index 5ebde67d4297..2486a656f12d 100644 --- a/drivers/net/bnx2.c +++ b/drivers/net/bnx2.c | |||
@@ -35,8 +35,8 @@ | |||
35 | #include <linux/time.h> | 35 | #include <linux/time.h> |
36 | #include <linux/ethtool.h> | 36 | #include <linux/ethtool.h> |
37 | #include <linux/mii.h> | 37 | #include <linux/mii.h> |
38 | #ifdef NETIF_F_HW_VLAN_TX | ||
39 | #include <linux/if_vlan.h> | 38 | #include <linux/if_vlan.h> |
39 | #if defined(CONFIG_VLAN_8021Q) || defined(CONFIG_VLAN_8021Q_MODULE) | ||
40 | #define BCM_VLAN 1 | 40 | #define BCM_VLAN 1 |
41 | #endif | 41 | #endif |
42 | #include <net/ip.h> | 42 | #include <net/ip.h> |
@@ -57,8 +57,8 @@ | |||
57 | 57 | ||
58 | #define DRV_MODULE_NAME "bnx2" | 58 | #define DRV_MODULE_NAME "bnx2" |
59 | #define PFX DRV_MODULE_NAME ": " | 59 | #define PFX DRV_MODULE_NAME ": " |
60 | #define DRV_MODULE_VERSION "1.7.9" | 60 | #define DRV_MODULE_VERSION "1.8.0" |
61 | #define DRV_MODULE_RELDATE "July 18, 2008" | 61 | #define DRV_MODULE_RELDATE "Aug 14, 2008" |
62 | 62 | ||
63 | #define RUN_AT(x) (jiffies + (x)) | 63 | #define RUN_AT(x) (jiffies + (x)) |
64 | 64 | ||
@@ -2876,6 +2876,8 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) | |||
2876 | struct sw_bd *rx_buf; | 2876 | struct sw_bd *rx_buf; |
2877 | struct sk_buff *skb; | 2877 | struct sk_buff *skb; |
2878 | dma_addr_t dma_addr; | 2878 | dma_addr_t dma_addr; |
2879 | u16 vtag = 0; | ||
2880 | int hw_vlan __maybe_unused = 0; | ||
2879 | 2881 | ||
2880 | sw_ring_cons = RX_RING_IDX(sw_cons); | 2882 | sw_ring_cons = RX_RING_IDX(sw_cons); |
2881 | sw_ring_prod = RX_RING_IDX(sw_prod); | 2883 | sw_ring_prod = RX_RING_IDX(sw_prod); |
@@ -2919,7 +2921,7 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) | |||
2919 | if (len <= bp->rx_copy_thresh) { | 2921 | if (len <= bp->rx_copy_thresh) { |
2920 | struct sk_buff *new_skb; | 2922 | struct sk_buff *new_skb; |
2921 | 2923 | ||
2922 | new_skb = netdev_alloc_skb(bp->dev, len + 2); | 2924 | new_skb = netdev_alloc_skb(bp->dev, len + 6); |
2923 | if (new_skb == NULL) { | 2925 | if (new_skb == NULL) { |
2924 | bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons, | 2926 | bnx2_reuse_rx_skb(bp, rxr, skb, sw_ring_cons, |
2925 | sw_ring_prod); | 2927 | sw_ring_prod); |
@@ -2928,9 +2930,9 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) | |||
2928 | 2930 | ||
2929 | /* aligned copy */ | 2931 | /* aligned copy */ |
2930 | skb_copy_from_linear_data_offset(skb, | 2932 | skb_copy_from_linear_data_offset(skb, |
2931 | BNX2_RX_OFFSET - 2, | 2933 | BNX2_RX_OFFSET - 6, |
2932 | new_skb->data, len + 2); | 2934 | new_skb->data, len + 6); |
2933 | skb_reserve(new_skb, 2); | 2935 | skb_reserve(new_skb, 6); |
2934 | skb_put(new_skb, len); | 2936 | skb_put(new_skb, len); |
2935 | 2937 | ||
2936 | bnx2_reuse_rx_skb(bp, rxr, skb, | 2938 | bnx2_reuse_rx_skb(bp, rxr, skb, |
@@ -2941,6 +2943,25 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) | |||
2941 | dma_addr, (sw_ring_cons << 16) | sw_ring_prod))) | 2943 | dma_addr, (sw_ring_cons << 16) | sw_ring_prod))) |
2942 | goto next_rx; | 2944 | goto next_rx; |
2943 | 2945 | ||
2946 | if ((status & L2_FHDR_STATUS_L2_VLAN_TAG) && | ||
2947 | !(bp->rx_mode & BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG)) { | ||
2948 | vtag = rx_hdr->l2_fhdr_vlan_tag; | ||
2949 | #ifdef BCM_VLAN | ||
2950 | if (bp->vlgrp) | ||
2951 | hw_vlan = 1; | ||
2952 | else | ||
2953 | #endif | ||
2954 | { | ||
2955 | struct vlan_ethhdr *ve = (struct vlan_ethhdr *) | ||
2956 | __skb_push(skb, 4); | ||
2957 | |||
2958 | memmove(ve, skb->data + 4, ETH_ALEN * 2); | ||
2959 | ve->h_vlan_proto = htons(ETH_P_8021Q); | ||
2960 | ve->h_vlan_TCI = htons(vtag); | ||
2961 | len += 4; | ||
2962 | } | ||
2963 | } | ||
2964 | |||
2944 | skb->protocol = eth_type_trans(skb, bp->dev); | 2965 | skb->protocol = eth_type_trans(skb, bp->dev); |
2945 | 2966 | ||
2946 | if ((len > (bp->dev->mtu + ETH_HLEN)) && | 2967 | if ((len > (bp->dev->mtu + ETH_HLEN)) && |
@@ -2962,10 +2983,8 @@ bnx2_rx_int(struct bnx2 *bp, struct bnx2_napi *bnapi, int budget) | |||
2962 | } | 2983 | } |
2963 | 2984 | ||
2964 | #ifdef BCM_VLAN | 2985 | #ifdef BCM_VLAN |
2965 | if ((status & L2_FHDR_STATUS_L2_VLAN_TAG) && bp->vlgrp) { | 2986 | if (hw_vlan) |
2966 | vlan_hwaccel_receive_skb(skb, bp->vlgrp, | 2987 | vlan_hwaccel_receive_skb(skb, bp->vlgrp, vtag); |
2967 | rx_hdr->l2_fhdr_vlan_tag); | ||
2968 | } | ||
2969 | else | 2988 | else |
2970 | #endif | 2989 | #endif |
2971 | netif_receive_skb(skb); | 2990 | netif_receive_skb(skb); |
@@ -3237,10 +3256,10 @@ bnx2_set_rx_mode(struct net_device *dev) | |||
3237 | BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG); | 3256 | BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG); |
3238 | sort_mode = 1 | BNX2_RPM_SORT_USER0_BC_EN; | 3257 | sort_mode = 1 | BNX2_RPM_SORT_USER0_BC_EN; |
3239 | #ifdef BCM_VLAN | 3258 | #ifdef BCM_VLAN |
3240 | if (!bp->vlgrp && !(bp->flags & BNX2_FLAG_ASF_ENABLE)) | 3259 | if (!bp->vlgrp && (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN)) |
3241 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; | 3260 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; |
3242 | #else | 3261 | #else |
3243 | if (!(bp->flags & BNX2_FLAG_ASF_ENABLE)) | 3262 | if (bp->flags & BNX2_FLAG_CAN_KEEP_VLAN) |
3244 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; | 3263 | rx_mode |= BNX2_EMAC_RX_MODE_KEEP_VLAN_TAG; |
3245 | #endif | 3264 | #endif |
3246 | if (dev->flags & IFF_PROMISC) { | 3265 | if (dev->flags & IFF_PROMISC) { |
@@ -5963,10 +5982,12 @@ bnx2_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
5963 | vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; | 5982 | vlan_tag_flags |= TX_BD_FLAGS_TCP_UDP_CKSUM; |
5964 | } | 5983 | } |
5965 | 5984 | ||
5985 | #ifdef BCM_VLAN | ||
5966 | if (bp->vlgrp && vlan_tx_tag_present(skb)) { | 5986 | if (bp->vlgrp && vlan_tx_tag_present(skb)) { |
5967 | vlan_tag_flags |= | 5987 | vlan_tag_flags |= |
5968 | (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); | 5988 | (TX_BD_FLAGS_VLAN_TAG | (vlan_tx_tag_get(skb) << 16)); |
5969 | } | 5989 | } |
5990 | #endif | ||
5970 | if ((mss = skb_shinfo(skb)->gso_size)) { | 5991 | if ((mss = skb_shinfo(skb)->gso_size)) { |
5971 | u32 tcp_opt_len, ip_tcp_len; | 5992 | u32 tcp_opt_len, ip_tcp_len; |
5972 | struct iphdr *iph; | 5993 | struct iphdr *iph; |
diff --git a/drivers/net/bnx2x_link.c b/drivers/net/bnx2x_link.c index 8b92c6ad0759..4ce7fe9c5251 100644 --- a/drivers/net/bnx2x_link.c +++ b/drivers/net/bnx2x_link.c | |||
@@ -21,7 +21,6 @@ | |||
21 | #include <linux/delay.h> | 21 | #include <linux/delay.h> |
22 | #include <linux/ethtool.h> | 22 | #include <linux/ethtool.h> |
23 | #include <linux/mutex.h> | 23 | #include <linux/mutex.h> |
24 | #include <linux/version.h> | ||
25 | 24 | ||
26 | #include "bnx2x_reg.h" | 25 | #include "bnx2x_reg.h" |
27 | #include "bnx2x_fw_defs.h" | 26 | #include "bnx2x_fw_defs.h" |
diff --git a/drivers/net/bnx2x_main.c b/drivers/net/bnx2x_main.c index 3e7dc171cdf1..971576b43687 100644 --- a/drivers/net/bnx2x_main.c +++ b/drivers/net/bnx2x_main.c | |||
@@ -44,7 +44,6 @@ | |||
44 | #include <net/ip.h> | 44 | #include <net/ip.h> |
45 | #include <net/tcp.h> | 45 | #include <net/tcp.h> |
46 | #include <net/checksum.h> | 46 | #include <net/checksum.h> |
47 | #include <linux/version.h> | ||
48 | #include <net/ip6_checksum.h> | 47 | #include <net/ip6_checksum.h> |
49 | #include <linux/workqueue.h> | 48 | #include <linux/workqueue.h> |
50 | #include <linux/crc32.h> | 49 | #include <linux/crc32.h> |
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index a7800e559090..ec6b0af3d46b 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c | |||
@@ -26,7 +26,6 @@ | |||
26 | #include <linux/errno.h> | 26 | #include <linux/errno.h> |
27 | #include <linux/types.h> | 27 | #include <linux/types.h> |
28 | #include <linux/delay.h> | 28 | #include <linux/delay.h> |
29 | #include <linux/version.h> | ||
30 | 29 | ||
31 | #include <linux/netdevice.h> | 30 | #include <linux/netdevice.h> |
32 | #include <linux/etherdevice.h> | 31 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/e1000e/defines.h b/drivers/net/e1000e/defines.h index f823b8ba5785..14b0e6cd3b8d 100644 --- a/drivers/net/e1000e/defines.h +++ b/drivers/net/e1000e/defines.h | |||
@@ -389,7 +389,7 @@ | |||
389 | 389 | ||
390 | /* Interrupt Cause Set */ | 390 | /* Interrupt Cause Set */ |
391 | #define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */ | 391 | #define E1000_ICS_LSC E1000_ICR_LSC /* Link Status Change */ |
392 | #define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* rx desc min. threshold */ | 392 | #define E1000_ICS_RXSEQ E1000_ICR_RXSEQ /* Rx sequence error */ |
393 | #define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */ | 393 | #define E1000_ICS_RXDMT0 E1000_ICR_RXDMT0 /* Rx desc min. threshold */ |
394 | 394 | ||
395 | /* Transmit Descriptor Control */ | 395 | /* Transmit Descriptor Control */ |
diff --git a/drivers/net/e1000e/e1000.h b/drivers/net/e1000e/e1000.h index cf57050d99d8..ac4e506b4f88 100644 --- a/drivers/net/e1000e/e1000.h +++ b/drivers/net/e1000e/e1000.h | |||
@@ -326,6 +326,7 @@ struct e1000_info { | |||
326 | #define FLAG_RX_CSUM_ENABLED (1 << 28) | 326 | #define FLAG_RX_CSUM_ENABLED (1 << 28) |
327 | #define FLAG_TSO_FORCE (1 << 29) | 327 | #define FLAG_TSO_FORCE (1 << 29) |
328 | #define FLAG_RX_RESTART_NOW (1 << 30) | 328 | #define FLAG_RX_RESTART_NOW (1 << 30) |
329 | #define FLAG_MSI_TEST_FAILED (1 << 31) | ||
329 | 330 | ||
330 | #define E1000_RX_DESC_PS(R, i) \ | 331 | #define E1000_RX_DESC_PS(R, i) \ |
331 | (&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) | 332 | (&(((union e1000_rx_desc_packet_split *)((R).desc))[i])) |
diff --git a/drivers/net/e1000e/ethtool.c b/drivers/net/e1000e/ethtool.c index cf9679f2b7c4..e21c9e0f3738 100644 --- a/drivers/net/e1000e/ethtool.c +++ b/drivers/net/e1000e/ethtool.c | |||
@@ -177,7 +177,7 @@ static u32 e1000_get_link(struct net_device *netdev) | |||
177 | u32 status; | 177 | u32 status; |
178 | 178 | ||
179 | status = er32(STATUS); | 179 | status = er32(STATUS); |
180 | return (status & E1000_STATUS_LU); | 180 | return (status & E1000_STATUS_LU) ? 1 : 0; |
181 | } | 181 | } |
182 | 182 | ||
183 | static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) | 183 | static int e1000_set_spd_dplx(struct e1000_adapter *adapter, u16 spddplx) |
diff --git a/drivers/net/e1000e/netdev.c b/drivers/net/e1000e/netdev.c index 05b0b2f9c54b..d266510c8a94 100644 --- a/drivers/net/e1000e/netdev.c +++ b/drivers/net/e1000e/netdev.c | |||
@@ -510,9 +510,12 @@ static bool e1000_clean_rx_irq(struct e1000_adapter *adapter, | |||
510 | netdev_alloc_skb(netdev, length + NET_IP_ALIGN); | 510 | netdev_alloc_skb(netdev, length + NET_IP_ALIGN); |
511 | if (new_skb) { | 511 | if (new_skb) { |
512 | skb_reserve(new_skb, NET_IP_ALIGN); | 512 | skb_reserve(new_skb, NET_IP_ALIGN); |
513 | memcpy(new_skb->data - NET_IP_ALIGN, | 513 | skb_copy_to_linear_data_offset(new_skb, |
514 | skb->data - NET_IP_ALIGN, | 514 | -NET_IP_ALIGN, |
515 | length + NET_IP_ALIGN); | 515 | (skb->data - |
516 | NET_IP_ALIGN), | ||
517 | (length + | ||
518 | NET_IP_ALIGN)); | ||
516 | /* save the skb in buffer_info as good */ | 519 | /* save the skb in buffer_info as good */ |
517 | buffer_info->skb = skb; | 520 | buffer_info->skb = skb; |
518 | skb = new_skb; | 521 | skb = new_skb; |
@@ -1233,26 +1236,36 @@ static irqreturn_t e1000_intr(int irq, void *data) | |||
1233 | return IRQ_HANDLED; | 1236 | return IRQ_HANDLED; |
1234 | } | 1237 | } |
1235 | 1238 | ||
1239 | /** | ||
1240 | * e1000_request_irq - initialize interrupts | ||
1241 | * | ||
1242 | * Attempts to configure interrupts using the best available | ||
1243 | * capabilities of the hardware and kernel. | ||
1244 | **/ | ||
1236 | static int e1000_request_irq(struct e1000_adapter *adapter) | 1245 | static int e1000_request_irq(struct e1000_adapter *adapter) |
1237 | { | 1246 | { |
1238 | struct net_device *netdev = adapter->netdev; | 1247 | struct net_device *netdev = adapter->netdev; |
1239 | irq_handler_t handler = e1000_intr; | ||
1240 | int irq_flags = IRQF_SHARED; | 1248 | int irq_flags = IRQF_SHARED; |
1241 | int err; | 1249 | int err; |
1242 | 1250 | ||
1243 | if (!pci_enable_msi(adapter->pdev)) { | 1251 | if (!(adapter->flags & FLAG_MSI_TEST_FAILED)) { |
1244 | adapter->flags |= FLAG_MSI_ENABLED; | 1252 | err = pci_enable_msi(adapter->pdev); |
1245 | handler = e1000_intr_msi; | 1253 | if (!err) { |
1246 | irq_flags = 0; | 1254 | adapter->flags |= FLAG_MSI_ENABLED; |
1255 | irq_flags = 0; | ||
1256 | } | ||
1247 | } | 1257 | } |
1248 | 1258 | ||
1249 | err = request_irq(adapter->pdev->irq, handler, irq_flags, netdev->name, | 1259 | err = request_irq(adapter->pdev->irq, |
1250 | netdev); | 1260 | ((adapter->flags & FLAG_MSI_ENABLED) ? |
1261 | &e1000_intr_msi : &e1000_intr), | ||
1262 | irq_flags, netdev->name, netdev); | ||
1251 | if (err) { | 1263 | if (err) { |
1252 | e_err("Unable to allocate %s interrupt (return: %d)\n", | 1264 | if (adapter->flags & FLAG_MSI_ENABLED) { |
1253 | adapter->flags & FLAG_MSI_ENABLED ? "MSI":"INTx", err); | ||
1254 | if (adapter->flags & FLAG_MSI_ENABLED) | ||
1255 | pci_disable_msi(adapter->pdev); | 1265 | pci_disable_msi(adapter->pdev); |
1266 | adapter->flags &= ~FLAG_MSI_ENABLED; | ||
1267 | } | ||
1268 | e_err("Unable to allocate interrupt, Error: %d\n", err); | ||
1256 | } | 1269 | } |
1257 | 1270 | ||
1258 | return err; | 1271 | return err; |
@@ -2592,6 +2605,135 @@ err: | |||
2592 | } | 2605 | } |
2593 | 2606 | ||
2594 | /** | 2607 | /** |
2608 | * e1000_intr_msi_test - Interrupt Handler | ||
2609 | * @irq: interrupt number | ||
2610 | * @data: pointer to a network interface device structure | ||
2611 | **/ | ||
2612 | static irqreturn_t e1000_intr_msi_test(int irq, void *data) | ||
2613 | { | ||
2614 | struct net_device *netdev = data; | ||
2615 | struct e1000_adapter *adapter = netdev_priv(netdev); | ||
2616 | struct e1000_hw *hw = &adapter->hw; | ||
2617 | u32 icr = er32(ICR); | ||
2618 | |||
2619 | e_dbg("%s: icr is %08X\n", netdev->name, icr); | ||
2620 | if (icr & E1000_ICR_RXSEQ) { | ||
2621 | adapter->flags &= ~FLAG_MSI_TEST_FAILED; | ||
2622 | wmb(); | ||
2623 | } | ||
2624 | |||
2625 | return IRQ_HANDLED; | ||
2626 | } | ||
2627 | |||
2628 | /** | ||
2629 | * e1000_test_msi_interrupt - Returns 0 for successful test | ||
2630 | * @adapter: board private struct | ||
2631 | * | ||
2632 | * code flow taken from tg3.c | ||
2633 | **/ | ||
2634 | static int e1000_test_msi_interrupt(struct e1000_adapter *adapter) | ||
2635 | { | ||
2636 | struct net_device *netdev = adapter->netdev; | ||
2637 | struct e1000_hw *hw = &adapter->hw; | ||
2638 | int err; | ||
2639 | |||
2640 | /* poll_enable hasn't been called yet, so don't need disable */ | ||
2641 | /* clear any pending events */ | ||
2642 | er32(ICR); | ||
2643 | |||
2644 | /* free the real vector and request a test handler */ | ||
2645 | e1000_free_irq(adapter); | ||
2646 | |||
2647 | /* Assume that the test fails, if it succeeds then the test | ||
2648 | * MSI irq handler will unset this flag */ | ||
2649 | adapter->flags |= FLAG_MSI_TEST_FAILED; | ||
2650 | |||
2651 | err = pci_enable_msi(adapter->pdev); | ||
2652 | if (err) | ||
2653 | goto msi_test_failed; | ||
2654 | |||
2655 | err = request_irq(adapter->pdev->irq, &e1000_intr_msi_test, 0, | ||
2656 | netdev->name, netdev); | ||
2657 | if (err) { | ||
2658 | pci_disable_msi(adapter->pdev); | ||
2659 | goto msi_test_failed; | ||
2660 | } | ||
2661 | |||
2662 | wmb(); | ||
2663 | |||
2664 | e1000_irq_enable(adapter); | ||
2665 | |||
2666 | /* fire an unusual interrupt on the test handler */ | ||
2667 | ew32(ICS, E1000_ICS_RXSEQ); | ||
2668 | e1e_flush(); | ||
2669 | msleep(50); | ||
2670 | |||
2671 | e1000_irq_disable(adapter); | ||
2672 | |||
2673 | rmb(); | ||
2674 | |||
2675 | if (adapter->flags & FLAG_MSI_TEST_FAILED) { | ||
2676 | err = -EIO; | ||
2677 | e_info("MSI interrupt test failed!\n"); | ||
2678 | } | ||
2679 | |||
2680 | free_irq(adapter->pdev->irq, netdev); | ||
2681 | pci_disable_msi(adapter->pdev); | ||
2682 | |||
2683 | if (err == -EIO) | ||
2684 | goto msi_test_failed; | ||
2685 | |||
2686 | /* okay so the test worked, restore settings */ | ||
2687 | e_dbg("%s: MSI interrupt test succeeded!\n", netdev->name); | ||
2688 | msi_test_failed: | ||
2689 | /* restore the original vector, even if it failed */ | ||
2690 | e1000_request_irq(adapter); | ||
2691 | return err; | ||
2692 | } | ||
2693 | |||
2694 | /** | ||
2695 | * e1000_test_msi - Returns 0 if MSI test succeeds or INTx mode is restored | ||
2696 | * @adapter: board private struct | ||
2697 | * | ||
2698 | * code flow taken from tg3.c, called with e1000 interrupts disabled. | ||
2699 | **/ | ||
2700 | static int e1000_test_msi(struct e1000_adapter *adapter) | ||
2701 | { | ||
2702 | int err; | ||
2703 | u16 pci_cmd; | ||
2704 | |||
2705 | if (!(adapter->flags & FLAG_MSI_ENABLED)) | ||
2706 | return 0; | ||
2707 | |||
2708 | /* disable SERR in case the MSI write causes a master abort */ | ||
2709 | pci_read_config_word(adapter->pdev, PCI_COMMAND, &pci_cmd); | ||
2710 | pci_write_config_word(adapter->pdev, PCI_COMMAND, | ||
2711 | pci_cmd & ~PCI_COMMAND_SERR); | ||
2712 | |||
2713 | err = e1000_test_msi_interrupt(adapter); | ||
2714 | |||
2715 | /* restore previous setting of command word */ | ||
2716 | pci_write_config_word(adapter->pdev, PCI_COMMAND, pci_cmd); | ||
2717 | |||
2718 | /* success ! */ | ||
2719 | if (!err) | ||
2720 | return 0; | ||
2721 | |||
2722 | /* EIO means MSI test failed */ | ||
2723 | if (err != -EIO) | ||
2724 | return err; | ||
2725 | |||
2726 | /* back to INTx mode */ | ||
2727 | e_warn("MSI interrupt test failed, using legacy interrupt.\n"); | ||
2728 | |||
2729 | e1000_free_irq(adapter); | ||
2730 | |||
2731 | err = e1000_request_irq(adapter); | ||
2732 | |||
2733 | return err; | ||
2734 | } | ||
2735 | |||
2736 | /** | ||
2595 | * e1000_open - Called when a network interface is made active | 2737 | * e1000_open - Called when a network interface is made active |
2596 | * @netdev: network interface device structure | 2738 | * @netdev: network interface device structure |
2597 | * | 2739 | * |
@@ -2649,6 +2791,19 @@ static int e1000_open(struct net_device *netdev) | |||
2649 | if (err) | 2791 | if (err) |
2650 | goto err_req_irq; | 2792 | goto err_req_irq; |
2651 | 2793 | ||
2794 | /* | ||
2795 | * Work around PCIe errata with MSI interrupts causing some chipsets to | ||
2796 | * ignore e1000e MSI messages, which means we need to test our MSI | ||
2797 | * interrupt now | ||
2798 | */ | ||
2799 | { | ||
2800 | err = e1000_test_msi(adapter); | ||
2801 | if (err) { | ||
2802 | e_err("Interrupt allocation failed\n"); | ||
2803 | goto err_req_irq; | ||
2804 | } | ||
2805 | } | ||
2806 | |||
2652 | /* From here on the code is the same as e1000e_up() */ | 2807 | /* From here on the code is the same as e1000e_up() */ |
2653 | clear_bit(__E1000_DOWN, &adapter->state); | 2808 | clear_bit(__E1000_DOWN, &adapter->state); |
2654 | 2809 | ||
@@ -3055,7 +3210,7 @@ static void e1000_watchdog_task(struct work_struct *work) | |||
3055 | case SPEED_10: | 3210 | case SPEED_10: |
3056 | txb2b = 0; | 3211 | txb2b = 0; |
3057 | netdev->tx_queue_len = 10; | 3212 | netdev->tx_queue_len = 10; |
3058 | adapter->tx_timeout_factor = 14; | 3213 | adapter->tx_timeout_factor = 16; |
3059 | break; | 3214 | break; |
3060 | case SPEED_100: | 3215 | case SPEED_100: |
3061 | txb2b = 0; | 3216 | txb2b = 0; |
@@ -3721,7 +3876,7 @@ static int e1000_change_mtu(struct net_device *netdev, int new_mtu) | |||
3721 | struct e1000_adapter *adapter = netdev_priv(netdev); | 3876 | struct e1000_adapter *adapter = netdev_priv(netdev); |
3722 | int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; | 3877 | int max_frame = new_mtu + ETH_HLEN + ETH_FCS_LEN; |
3723 | 3878 | ||
3724 | if ((max_frame < ETH_ZLEN + ETH_FCS_LEN) || | 3879 | if ((new_mtu < ETH_ZLEN + ETH_FCS_LEN + VLAN_HLEN) || |
3725 | (max_frame > MAX_JUMBO_FRAME_SIZE)) { | 3880 | (max_frame > MAX_JUMBO_FRAME_SIZE)) { |
3726 | e_err("Invalid MTU setting\n"); | 3881 | e_err("Invalid MTU setting\n"); |
3727 | return -EINVAL; | 3882 | return -EINVAL; |
diff --git a/drivers/net/e1000e/param.c b/drivers/net/e1000e/param.c index 8effc3107f9a..ed912e023a72 100644 --- a/drivers/net/e1000e/param.c +++ b/drivers/net/e1000e/param.c | |||
@@ -324,14 +324,27 @@ void __devinit e1000e_check_options(struct e1000_adapter *adapter) | |||
324 | adapter->itr = 20000; | 324 | adapter->itr = 20000; |
325 | break; | 325 | break; |
326 | default: | 326 | default: |
327 | e1000_validate_option(&adapter->itr, &opt, | ||
328 | adapter); | ||
329 | /* | 327 | /* |
330 | * save the setting, because the dynamic bits | 328 | * Save the setting, because the dynamic bits |
331 | * change itr. clear the lower two bits | 329 | * change itr. |
332 | * because they are used as control | ||
333 | */ | 330 | */ |
334 | adapter->itr_setting = adapter->itr & ~3; | 331 | if (e1000_validate_option(&adapter->itr, &opt, |
332 | adapter) && | ||
333 | (adapter->itr == 3)) { | ||
334 | /* | ||
335 | * In case of invalid user value, | ||
336 | * default to conservative mode. | ||
337 | */ | ||
338 | adapter->itr_setting = adapter->itr; | ||
339 | adapter->itr = 20000; | ||
340 | } else { | ||
341 | /* | ||
342 | * Clear the lower two bits because | ||
343 | * they are used as control. | ||
344 | */ | ||
345 | adapter->itr_setting = | ||
346 | adapter->itr & ~3; | ||
347 | } | ||
335 | break; | 348 | break; |
336 | } | 349 | } |
337 | } else { | 350 | } else { |
diff --git a/drivers/net/gianfar.c b/drivers/net/gianfar.c index ca6cf6ecb37b..999d69168277 100644 --- a/drivers/net/gianfar.c +++ b/drivers/net/gianfar.c | |||
@@ -134,9 +134,7 @@ static int gfar_process_frame(struct net_device *dev, struct sk_buff *skb, int l | |||
134 | static void gfar_vlan_rx_register(struct net_device *netdev, | 134 | static void gfar_vlan_rx_register(struct net_device *netdev, |
135 | struct vlan_group *grp); | 135 | struct vlan_group *grp); |
136 | void gfar_halt(struct net_device *dev); | 136 | void gfar_halt(struct net_device *dev); |
137 | #ifdef CONFIG_PM | ||
138 | static void gfar_halt_nodisable(struct net_device *dev); | 137 | static void gfar_halt_nodisable(struct net_device *dev); |
139 | #endif | ||
140 | void gfar_start(struct net_device *dev); | 138 | void gfar_start(struct net_device *dev); |
141 | static void gfar_clear_exact_match(struct net_device *dev); | 139 | static void gfar_clear_exact_match(struct net_device *dev); |
142 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr); | 140 | static void gfar_set_mac_for_addr(struct net_device *dev, int num, u8 *addr); |
@@ -631,7 +629,6 @@ static void init_registers(struct net_device *dev) | |||
631 | } | 629 | } |
632 | 630 | ||
633 | 631 | ||
634 | #ifdef CONFIG_PM | ||
635 | /* Halt the receive and transmit queues */ | 632 | /* Halt the receive and transmit queues */ |
636 | static void gfar_halt_nodisable(struct net_device *dev) | 633 | static void gfar_halt_nodisable(struct net_device *dev) |
637 | { | 634 | { |
@@ -657,7 +654,6 @@ static void gfar_halt_nodisable(struct net_device *dev) | |||
657 | cpu_relax(); | 654 | cpu_relax(); |
658 | } | 655 | } |
659 | } | 656 | } |
660 | #endif | ||
661 | 657 | ||
662 | /* Halt the receive and transmit queues */ | 658 | /* Halt the receive and transmit queues */ |
663 | void gfar_halt(struct net_device *dev) | 659 | void gfar_halt(struct net_device *dev) |
@@ -666,6 +662,8 @@ void gfar_halt(struct net_device *dev) | |||
666 | struct gfar __iomem *regs = priv->regs; | 662 | struct gfar __iomem *regs = priv->regs; |
667 | u32 tempval; | 663 | u32 tempval; |
668 | 664 | ||
665 | gfar_halt_nodisable(dev); | ||
666 | |||
669 | /* Disable Rx and Tx */ | 667 | /* Disable Rx and Tx */ |
670 | tempval = gfar_read(®s->maccfg1); | 668 | tempval = gfar_read(®s->maccfg1); |
671 | tempval &= ~(MACCFG1_RX_EN | MACCFG1_TX_EN); | 669 | tempval &= ~(MACCFG1_RX_EN | MACCFG1_TX_EN); |
diff --git a/drivers/net/gianfar_sysfs.c b/drivers/net/gianfar_sysfs.c index 5116f68e01b9..782c20170082 100644 --- a/drivers/net/gianfar_sysfs.c +++ b/drivers/net/gianfar_sysfs.c | |||
@@ -33,7 +33,6 @@ | |||
33 | 33 | ||
34 | #include <asm/uaccess.h> | 34 | #include <asm/uaccess.h> |
35 | #include <linux/module.h> | 35 | #include <linux/module.h> |
36 | #include <linux/version.h> | ||
37 | 36 | ||
38 | #include "gianfar.h" | 37 | #include "gianfar.h" |
39 | 38 | ||
diff --git a/drivers/net/ipg.h b/drivers/net/ipg.h index e0e718ab4c2e..dd9318f19497 100644 --- a/drivers/net/ipg.h +++ b/drivers/net/ipg.h | |||
@@ -7,7 +7,6 @@ | |||
7 | #ifndef __LINUX_IPG_H | 7 | #ifndef __LINUX_IPG_H |
8 | #define __LINUX_IPG_H | 8 | #define __LINUX_IPG_H |
9 | 9 | ||
10 | #include <linux/version.h> | ||
11 | #include <linux/module.h> | 10 | #include <linux/module.h> |
12 | 11 | ||
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
@@ -21,7 +20,6 @@ | |||
21 | #include <linux/etherdevice.h> | 20 | #include <linux/etherdevice.h> |
22 | #include <linux/init.h> | 21 | #include <linux/init.h> |
23 | #include <linux/skbuff.h> | 22 | #include <linux/skbuff.h> |
24 | #include <linux/version.h> | ||
25 | #include <asm/bitops.h> | 23 | #include <asm/bitops.h> |
26 | 24 | ||
27 | /* | 25 | /* |
diff --git a/drivers/net/ixgbe/ixgbe_82598.c b/drivers/net/ixgbe/ixgbe_82598.c index 2f38e847e2cd..f96358b641af 100644 --- a/drivers/net/ixgbe/ixgbe_82598.c +++ b/drivers/net/ixgbe/ixgbe_82598.c | |||
@@ -190,6 +190,7 @@ static enum ixgbe_media_type ixgbe_get_media_type_82598(struct ixgbe_hw *hw) | |||
190 | case IXGBE_DEV_ID_82598AF_DUAL_PORT: | 190 | case IXGBE_DEV_ID_82598AF_DUAL_PORT: |
191 | case IXGBE_DEV_ID_82598AF_SINGLE_PORT: | 191 | case IXGBE_DEV_ID_82598AF_SINGLE_PORT: |
192 | case IXGBE_DEV_ID_82598EB_CX4: | 192 | case IXGBE_DEV_ID_82598EB_CX4: |
193 | case IXGBE_DEV_ID_82598_CX4_DUAL_PORT: | ||
193 | media_type = ixgbe_media_type_fiber; | 194 | media_type = ixgbe_media_type_fiber; |
194 | break; | 195 | break; |
195 | case IXGBE_DEV_ID_82598AT_DUAL_PORT: | 196 | case IXGBE_DEV_ID_82598AT_DUAL_PORT: |
diff --git a/drivers/net/ixgbe/ixgbe_main.c b/drivers/net/ixgbe/ixgbe_main.c index e5f3da8468cc..34bca16d48a6 100644 --- a/drivers/net/ixgbe/ixgbe_main.c +++ b/drivers/net/ixgbe/ixgbe_main.c | |||
@@ -48,7 +48,7 @@ char ixgbe_driver_name[] = "ixgbe"; | |||
48 | static const char ixgbe_driver_string[] = | 48 | static const char ixgbe_driver_string[] = |
49 | "Intel(R) 10 Gigabit PCI Express Network Driver"; | 49 | "Intel(R) 10 Gigabit PCI Express Network Driver"; |
50 | 50 | ||
51 | #define DRV_VERSION "1.3.18-k2" | 51 | #define DRV_VERSION "1.3.18-k4" |
52 | const char ixgbe_driver_version[] = DRV_VERSION; | 52 | const char ixgbe_driver_version[] = DRV_VERSION; |
53 | static const char ixgbe_copyright[] = | 53 | static const char ixgbe_copyright[] = |
54 | "Copyright (c) 1999-2007 Intel Corporation."; | 54 | "Copyright (c) 1999-2007 Intel Corporation."; |
@@ -72,6 +72,8 @@ static struct pci_device_id ixgbe_pci_tbl[] = { | |||
72 | board_82598 }, | 72 | board_82598 }, |
73 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), | 73 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598EB_CX4), |
74 | board_82598 }, | 74 | board_82598 }, |
75 | {PCI_VDEVICE(INTEL, IXGBE_DEV_ID_82598_CX4_DUAL_PORT), | ||
76 | board_82598 }, | ||
75 | 77 | ||
76 | /* required last entry */ | 78 | /* required last entry */ |
77 | {0, } | 79 | {0, } |
diff --git a/drivers/net/ixgbe/ixgbe_type.h b/drivers/net/ixgbe/ixgbe_type.h index 1ad7cb9c25a8..c0282a223df3 100644 --- a/drivers/net/ixgbe/ixgbe_type.h +++ b/drivers/net/ixgbe/ixgbe_type.h | |||
@@ -39,6 +39,7 @@ | |||
39 | #define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 | 39 | #define IXGBE_DEV_ID_82598AF_SINGLE_PORT 0x10C7 |
40 | #define IXGBE_DEV_ID_82598AT_DUAL_PORT 0x10C8 | 40 | #define IXGBE_DEV_ID_82598AT_DUAL_PORT 0x10C8 |
41 | #define IXGBE_DEV_ID_82598EB_CX4 0x10DD | 41 | #define IXGBE_DEV_ID_82598EB_CX4 0x10DD |
42 | #define IXGBE_DEV_ID_82598_CX4_DUAL_PORT 0x10EC | ||
42 | 43 | ||
43 | /* General Registers */ | 44 | /* General Registers */ |
44 | #define IXGBE_CTRL 0x00000 | 45 | #define IXGBE_CTRL 0x00000 |
diff --git a/drivers/net/loopback.c b/drivers/net/loopback.c index 49f6bc036a92..3b43bfd85a0f 100644 --- a/drivers/net/loopback.c +++ b/drivers/net/loopback.c | |||
@@ -64,68 +64,6 @@ struct pcpu_lstats { | |||
64 | unsigned long bytes; | 64 | unsigned long bytes; |
65 | }; | 65 | }; |
66 | 66 | ||
67 | /* KISS: just allocate small chunks and copy bits. | ||
68 | * | ||
69 | * So, in fact, this is documentation, explaining what we expect | ||
70 | * of largesending device modulo TCP checksum, which is ignored for loopback. | ||
71 | */ | ||
72 | |||
73 | #ifdef LOOPBACK_TSO | ||
74 | static void emulate_large_send_offload(struct sk_buff *skb) | ||
75 | { | ||
76 | struct iphdr *iph = ip_hdr(skb); | ||
77 | struct tcphdr *th = (struct tcphdr *)(skb_network_header(skb) + | ||
78 | (iph->ihl * 4)); | ||
79 | unsigned int doffset = (iph->ihl + th->doff) * 4; | ||
80 | unsigned int mtu = skb_shinfo(skb)->gso_size + doffset; | ||
81 | unsigned int offset = 0; | ||
82 | u32 seq = ntohl(th->seq); | ||
83 | u16 id = ntohs(iph->id); | ||
84 | |||
85 | while (offset + doffset < skb->len) { | ||
86 | unsigned int frag_size = min(mtu, skb->len - offset) - doffset; | ||
87 | struct sk_buff *nskb = alloc_skb(mtu + 32, GFP_ATOMIC); | ||
88 | |||
89 | if (!nskb) | ||
90 | break; | ||
91 | skb_reserve(nskb, 32); | ||
92 | skb_set_mac_header(nskb, -ETH_HLEN); | ||
93 | skb_reset_network_header(nskb); | ||
94 | iph = ip_hdr(nskb); | ||
95 | skb_copy_to_linear_data(nskb, skb_network_header(skb), | ||
96 | doffset); | ||
97 | if (skb_copy_bits(skb, | ||
98 | doffset + offset, | ||
99 | nskb->data + doffset, | ||
100 | frag_size)) | ||
101 | BUG(); | ||
102 | skb_put(nskb, doffset + frag_size); | ||
103 | nskb->ip_summed = CHECKSUM_UNNECESSARY; | ||
104 | nskb->dev = skb->dev; | ||
105 | nskb->priority = skb->priority; | ||
106 | nskb->protocol = skb->protocol; | ||
107 | nskb->dst = dst_clone(skb->dst); | ||
108 | memcpy(nskb->cb, skb->cb, sizeof(skb->cb)); | ||
109 | nskb->pkt_type = skb->pkt_type; | ||
110 | |||
111 | th = (struct tcphdr *)(skb_network_header(nskb) + iph->ihl * 4); | ||
112 | iph->tot_len = htons(frag_size + doffset); | ||
113 | iph->id = htons(id); | ||
114 | iph->check = 0; | ||
115 | iph->check = ip_fast_csum((unsigned char *) iph, iph->ihl); | ||
116 | th->seq = htonl(seq); | ||
117 | if (offset + doffset + frag_size < skb->len) | ||
118 | th->fin = th->psh = 0; | ||
119 | netif_rx(nskb); | ||
120 | offset += frag_size; | ||
121 | seq += frag_size; | ||
122 | id++; | ||
123 | } | ||
124 | |||
125 | dev_kfree_skb(skb); | ||
126 | } | ||
127 | #endif /* LOOPBACK_TSO */ | ||
128 | |||
129 | /* | 67 | /* |
130 | * The higher levels take care of making this non-reentrant (it's | 68 | * The higher levels take care of making this non-reentrant (it's |
131 | * called with bh's disabled). | 69 | * called with bh's disabled). |
@@ -137,9 +75,6 @@ static int loopback_xmit(struct sk_buff *skb, struct net_device *dev) | |||
137 | skb_orphan(skb); | 75 | skb_orphan(skb); |
138 | 76 | ||
139 | skb->protocol = eth_type_trans(skb,dev); | 77 | skb->protocol = eth_type_trans(skb,dev); |
140 | #ifndef LOOPBACK_MUST_CHECKSUM | ||
141 | skb->ip_summed = CHECKSUM_UNNECESSARY; | ||
142 | #endif | ||
143 | 78 | ||
144 | #ifdef LOOPBACK_TSO | 79 | #ifdef LOOPBACK_TSO |
145 | if (skb_is_gso(skb)) { | 80 | if (skb_is_gso(skb)) { |
@@ -234,9 +169,7 @@ static void loopback_setup(struct net_device *dev) | |||
234 | dev->type = ARPHRD_LOOPBACK; /* 0x0001*/ | 169 | dev->type = ARPHRD_LOOPBACK; /* 0x0001*/ |
235 | dev->flags = IFF_LOOPBACK; | 170 | dev->flags = IFF_LOOPBACK; |
236 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST | 171 | dev->features = NETIF_F_SG | NETIF_F_FRAGLIST |
237 | #ifdef LOOPBACK_TSO | ||
238 | | NETIF_F_TSO | 172 | | NETIF_F_TSO |
239 | #endif | ||
240 | | NETIF_F_NO_CSUM | 173 | | NETIF_F_NO_CSUM |
241 | | NETIF_F_HIGHDMA | 174 | | NETIF_F_HIGHDMA |
242 | | NETIF_F_LLTX | 175 | | NETIF_F_LLTX |
diff --git a/drivers/net/myri10ge/myri10ge.c b/drivers/net/myri10ge/myri10ge.c index f1de38f8b742..5d76cd09e246 100644 --- a/drivers/net/myri10ge/myri10ge.c +++ b/drivers/net/myri10ge/myri10ge.c | |||
@@ -3548,7 +3548,11 @@ static void myri10ge_probe_slices(struct myri10ge_priv *mgp) | |||
3548 | 3548 | ||
3549 | /* try to load the slice aware rss firmware */ | 3549 | /* try to load the slice aware rss firmware */ |
3550 | old_fw = mgp->fw_name; | 3550 | old_fw = mgp->fw_name; |
3551 | if (old_fw == myri10ge_fw_aligned) | 3551 | if (myri10ge_fw_name != NULL) { |
3552 | dev_info(&mgp->pdev->dev, "overriding rss firmware to %s\n", | ||
3553 | myri10ge_fw_name); | ||
3554 | mgp->fw_name = myri10ge_fw_name; | ||
3555 | } else if (old_fw == myri10ge_fw_aligned) | ||
3552 | mgp->fw_name = myri10ge_fw_rss_aligned; | 3556 | mgp->fw_name = myri10ge_fw_rss_aligned; |
3553 | else | 3557 | else |
3554 | mgp->fw_name = myri10ge_fw_rss_unaligned; | 3558 | mgp->fw_name = myri10ge_fw_rss_unaligned; |
diff --git a/drivers/net/ne.c b/drivers/net/ne.c index 42443d697423..fa3ceca4e15c 100644 --- a/drivers/net/ne.c +++ b/drivers/net/ne.c | |||
@@ -118,7 +118,7 @@ bad_clone_list[] __initdata = { | |||
118 | {"E-LAN100", "E-LAN200", {0x00, 0x00, 0x5d}}, /* Broken ne1000 clones */ | 118 | {"E-LAN100", "E-LAN200", {0x00, 0x00, 0x5d}}, /* Broken ne1000 clones */ |
119 | {"PCM-4823", "PCM-4823", {0x00, 0xc0, 0x6c}}, /* Broken Advantech MoBo */ | 119 | {"PCM-4823", "PCM-4823", {0x00, 0xc0, 0x6c}}, /* Broken Advantech MoBo */ |
120 | {"REALTEK", "RTL8019", {0x00, 0x00, 0xe8}}, /* no-name with Realtek chip */ | 120 | {"REALTEK", "RTL8019", {0x00, 0x00, 0xe8}}, /* no-name with Realtek chip */ |
121 | #if defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938) | 121 | #ifdef CONFIG_MACH_TX49XX |
122 | {"RBHMA4X00-RTL8019", "RBHMA4X00/RTL8019", {0x00, 0x60, 0x0a}}, /* Toshiba built-in */ | 122 | {"RBHMA4X00-RTL8019", "RBHMA4X00/RTL8019", {0x00, 0x60, 0x0a}}, /* Toshiba built-in */ |
123 | #endif | 123 | #endif |
124 | {"LCS-8834", "LCS-8836", {0x04, 0x04, 0x37}}, /* ShinyNet (SET) */ | 124 | {"LCS-8834", "LCS-8836", {0x04, 0x04, 0x37}}, /* ShinyNet (SET) */ |
@@ -142,7 +142,7 @@ bad_clone_list[] __initdata = { | |||
142 | #if defined(CONFIG_PLAT_MAPPI) | 142 | #if defined(CONFIG_PLAT_MAPPI) |
143 | # define DCR_VAL 0x4b | 143 | # define DCR_VAL 0x4b |
144 | #elif defined(CONFIG_PLAT_OAKS32R) || \ | 144 | #elif defined(CONFIG_PLAT_OAKS32R) || \ |
145 | defined(CONFIG_TOSHIBA_RBTX4927) || defined(CONFIG_TOSHIBA_RBTX4938) | 145 | defined(CONFIG_MACH_TX49XX) |
146 | # define DCR_VAL 0x48 /* 8-bit mode */ | 146 | # define DCR_VAL 0x48 /* 8-bit mode */ |
147 | #else | 147 | #else |
148 | # define DCR_VAL 0x49 | 148 | # define DCR_VAL 0x49 |
diff --git a/drivers/net/netxen/netxen_nic.h b/drivers/net/netxen/netxen_nic.h index 93a7b9b668d5..ab871df6b1db 100644 --- a/drivers/net/netxen/netxen_nic.h +++ b/drivers/net/netxen/netxen_nic.h | |||
@@ -66,8 +66,8 @@ | |||
66 | 66 | ||
67 | #define _NETXEN_NIC_LINUX_MAJOR 4 | 67 | #define _NETXEN_NIC_LINUX_MAJOR 4 |
68 | #define _NETXEN_NIC_LINUX_MINOR 0 | 68 | #define _NETXEN_NIC_LINUX_MINOR 0 |
69 | #define _NETXEN_NIC_LINUX_SUBVERSION 0 | 69 | #define _NETXEN_NIC_LINUX_SUBVERSION 11 |
70 | #define NETXEN_NIC_LINUX_VERSIONID "4.0.0" | 70 | #define NETXEN_NIC_LINUX_VERSIONID "4.0.11" |
71 | 71 | ||
72 | #define NETXEN_VERSION_CODE(a, b, c) (((a) << 16) + ((b) << 8) + (c)) | 72 | #define NETXEN_VERSION_CODE(a, b, c) (((a) << 16) + ((b) << 8) + (c)) |
73 | 73 | ||
@@ -1615,7 +1615,8 @@ dma_watchdog_wakeup(struct netxen_adapter *adapter) | |||
1615 | 1615 | ||
1616 | 1616 | ||
1617 | int netxen_is_flash_supported(struct netxen_adapter *adapter); | 1617 | int netxen_is_flash_supported(struct netxen_adapter *adapter); |
1618 | int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 mac[]); | 1618 | int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac); |
1619 | int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac); | ||
1619 | extern void netxen_change_ringparam(struct netxen_adapter *adapter); | 1620 | extern void netxen_change_ringparam(struct netxen_adapter *adapter); |
1620 | extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr, | 1621 | extern int netxen_rom_fast_read(struct netxen_adapter *adapter, int addr, |
1621 | int *valp); | 1622 | int *valp); |
diff --git a/drivers/net/netxen/netxen_nic_hw.c b/drivers/net/netxen/netxen_nic_hw.c index 9aa20f961618..84978f80f396 100644 --- a/drivers/net/netxen/netxen_nic_hw.c +++ b/drivers/net/netxen/netxen_nic_hw.c | |||
@@ -733,31 +733,56 @@ static int netxen_get_flash_block(struct netxen_adapter *adapter, int base, | |||
733 | return 0; | 733 | return 0; |
734 | } | 734 | } |
735 | 735 | ||
736 | int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 mac[]) | 736 | int netxen_get_flash_mac_addr(struct netxen_adapter *adapter, __le64 *mac) |
737 | { | 737 | { |
738 | __le32 *pmac = (__le32 *) & mac[0]; | 738 | __le32 *pmac = (__le32 *) mac; |
739 | u32 offset; | ||
739 | 740 | ||
740 | if (netxen_get_flash_block(adapter, | 741 | offset = NETXEN_USER_START + |
741 | NETXEN_USER_START + | 742 | offsetof(struct netxen_new_user_info, mac_addr) + |
742 | offsetof(struct netxen_new_user_info, | 743 | adapter->portnum * sizeof(u64); |
743 | mac_addr), | 744 | |
744 | FLASH_NUM_PORTS * sizeof(u64), pmac) == -1) { | 745 | if (netxen_get_flash_block(adapter, offset, sizeof(u64), pmac) == -1) |
745 | return -1; | 746 | return -1; |
746 | } | 747 | |
747 | if (*mac == cpu_to_le64(~0ULL)) { | 748 | if (*mac == cpu_to_le64(~0ULL)) { |
749 | |||
750 | offset = NETXEN_USER_START_OLD + | ||
751 | offsetof(struct netxen_user_old_info, mac_addr) + | ||
752 | adapter->portnum * sizeof(u64); | ||
753 | |||
748 | if (netxen_get_flash_block(adapter, | 754 | if (netxen_get_flash_block(adapter, |
749 | NETXEN_USER_START_OLD + | 755 | offset, sizeof(u64), pmac) == -1) |
750 | offsetof(struct netxen_user_old_info, | ||
751 | mac_addr), | ||
752 | FLASH_NUM_PORTS * sizeof(u64), | ||
753 | pmac) == -1) | ||
754 | return -1; | 756 | return -1; |
757 | |||
755 | if (*mac == cpu_to_le64(~0ULL)) | 758 | if (*mac == cpu_to_le64(~0ULL)) |
756 | return -1; | 759 | return -1; |
757 | } | 760 | } |
758 | return 0; | 761 | return 0; |
759 | } | 762 | } |
760 | 763 | ||
764 | int netxen_p3_get_mac_addr(struct netxen_adapter *adapter, __le64 *mac) | ||
765 | { | ||
766 | uint32_t crbaddr, mac_hi, mac_lo; | ||
767 | int pci_func = adapter->ahw.pci_func; | ||
768 | |||
769 | crbaddr = CRB_MAC_BLOCK_START + | ||
770 | (4 * ((pci_func/2) * 3)) + (4 * (pci_func & 1)); | ||
771 | |||
772 | adapter->hw_read_wx(adapter, crbaddr, &mac_lo, 4); | ||
773 | adapter->hw_read_wx(adapter, crbaddr+4, &mac_hi, 4); | ||
774 | |||
775 | mac_hi = cpu_to_le32(mac_hi); | ||
776 | mac_lo = cpu_to_le32(mac_lo); | ||
777 | |||
778 | if (pci_func & 1) | ||
779 | *mac = ((mac_lo >> 16) | ((u64)mac_hi << 16)); | ||
780 | else | ||
781 | *mac = ((mac_lo) | ((u64)mac_hi << 32)); | ||
782 | |||
783 | return 0; | ||
784 | } | ||
785 | |||
761 | #define CRB_WIN_LOCK_TIMEOUT 100000000 | 786 | #define CRB_WIN_LOCK_TIMEOUT 100000000 |
762 | 787 | ||
763 | static int crb_win_lock(struct netxen_adapter *adapter) | 788 | static int crb_win_lock(struct netxen_adapter *adapter) |
@@ -2183,10 +2208,10 @@ void netxen_nic_flash_print(struct netxen_adapter *adapter) | |||
2183 | if (adapter->portnum == 0) { | 2208 | if (adapter->portnum == 0) { |
2184 | get_brd_name_by_type(board_info->board_type, brd_name); | 2209 | get_brd_name_by_type(board_info->board_type, brd_name); |
2185 | 2210 | ||
2186 | printk("NetXen %s Board S/N %s Chip id 0x%x\n", | 2211 | printk(KERN_INFO "NetXen %s Board S/N %s Chip rev 0x%x\n", |
2187 | brd_name, serial_num, board_info->chip_id); | 2212 | brd_name, serial_num, adapter->ahw.revision_id); |
2188 | printk("NetXen Firmware version %d.%d.%d\n", fw_major, | 2213 | printk(KERN_INFO "NetXen Firmware version %d.%d.%d\n", |
2189 | fw_minor, fw_build); | 2214 | fw_major, fw_minor, fw_build); |
2190 | } | 2215 | } |
2191 | 2216 | ||
2192 | if (NETXEN_VERSION_CODE(fw_major, fw_minor, fw_build) < | 2217 | if (NETXEN_VERSION_CODE(fw_major, fw_minor, fw_build) < |
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c index 519fc860e17e..5bba675d0504 100644 --- a/drivers/net/netxen/netxen_nic_init.c +++ b/drivers/net/netxen/netxen_nic_init.c | |||
@@ -1079,10 +1079,12 @@ int netxen_initialize_adapter_offload(struct netxen_adapter *adapter) | |||
1079 | 1079 | ||
1080 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) | 1080 | void netxen_free_adapter_offload(struct netxen_adapter *adapter) |
1081 | { | 1081 | { |
1082 | int i; | 1082 | int i = 100; |
1083 | |||
1084 | if (!adapter->dummy_dma.addr) | ||
1085 | return; | ||
1083 | 1086 | ||
1084 | if (adapter->dummy_dma.addr) { | 1087 | if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { |
1085 | i = 100; | ||
1086 | do { | 1088 | do { |
1087 | if (dma_watchdog_shutdown_request(adapter) == 1) | 1089 | if (dma_watchdog_shutdown_request(adapter) == 1) |
1088 | break; | 1090 | break; |
@@ -1090,17 +1092,17 @@ void netxen_free_adapter_offload(struct netxen_adapter *adapter) | |||
1090 | if (dma_watchdog_shutdown_poll_result(adapter) == 1) | 1092 | if (dma_watchdog_shutdown_poll_result(adapter) == 1) |
1091 | break; | 1093 | break; |
1092 | } while (--i); | 1094 | } while (--i); |
1095 | } | ||
1093 | 1096 | ||
1094 | if (i) { | 1097 | if (i) { |
1095 | pci_free_consistent(adapter->pdev, | 1098 | pci_free_consistent(adapter->pdev, |
1096 | NETXEN_HOST_DUMMY_DMA_SIZE, | 1099 | NETXEN_HOST_DUMMY_DMA_SIZE, |
1097 | adapter->dummy_dma.addr, | 1100 | adapter->dummy_dma.addr, |
1098 | adapter->dummy_dma.phys_addr); | 1101 | adapter->dummy_dma.phys_addr); |
1099 | adapter->dummy_dma.addr = NULL; | 1102 | adapter->dummy_dma.addr = NULL; |
1100 | } else { | 1103 | } else { |
1101 | printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n", | 1104 | printk(KERN_ERR "%s: dma_watchdog_shutdown failed\n", |
1102 | adapter->netdev->name); | 1105 | adapter->netdev->name); |
1103 | } | ||
1104 | } | 1106 | } |
1105 | } | 1107 | } |
1106 | 1108 | ||
diff --git a/drivers/net/netxen/netxen_nic_main.c b/drivers/net/netxen/netxen_nic_main.c index 7615c715e66e..32bb47adbe39 100644 --- a/drivers/net/netxen/netxen_nic_main.c +++ b/drivers/net/netxen/netxen_nic_main.c | |||
@@ -149,76 +149,18 @@ static uint32_t msi_tgt_status[8] = { | |||
149 | 149 | ||
150 | static struct netxen_legacy_intr_set legacy_intr[] = NX_LEGACY_INTR_CONFIG; | 150 | static struct netxen_legacy_intr_set legacy_intr[] = NX_LEGACY_INTR_CONFIG; |
151 | 151 | ||
152 | static void netxen_nic_disable_int(struct netxen_adapter *adapter) | 152 | static inline void netxen_nic_disable_int(struct netxen_adapter *adapter) |
153 | { | 153 | { |
154 | u32 mask = 0x7ff; | 154 | adapter->pci_write_normalize(adapter, adapter->crb_intr_mask, 0); |
155 | int retries = 32; | ||
156 | int pci_fn = adapter->ahw.pci_func; | ||
157 | |||
158 | if (adapter->msi_mode != MSI_MODE_MULTIFUNC) | ||
159 | adapter->pci_write_normalize(adapter, | ||
160 | adapter->crb_intr_mask, 0); | ||
161 | |||
162 | if (adapter->intr_scheme != -1 && | ||
163 | adapter->intr_scheme != INTR_SCHEME_PERPORT) | ||
164 | adapter->pci_write_immediate(adapter, ISR_INT_MASK, mask); | ||
165 | |||
166 | if (!NETXEN_IS_MSI_FAMILY(adapter)) { | ||
167 | do { | ||
168 | adapter->pci_write_immediate(adapter, | ||
169 | adapter->legacy_intr.tgt_status_reg, | ||
170 | 0xffffffff); | ||
171 | mask = adapter->pci_read_immediate(adapter, | ||
172 | ISR_INT_VECTOR); | ||
173 | if (!(mask & 0x80)) | ||
174 | break; | ||
175 | udelay(10); | ||
176 | } while (--retries); | ||
177 | |||
178 | if (!retries) { | ||
179 | printk(KERN_NOTICE "%s: Failed to disable interrupt\n", | ||
180 | netxen_nic_driver_name); | ||
181 | } | ||
182 | } else { | ||
183 | if (adapter->msi_mode == MSI_MODE_MULTIFUNC) { | ||
184 | adapter->pci_write_immediate(adapter, | ||
185 | msi_tgt_status[pci_fn], 0xffffffff); | ||
186 | } | ||
187 | } | ||
188 | } | 155 | } |
189 | 156 | ||
190 | static void netxen_nic_enable_int(struct netxen_adapter *adapter) | 157 | static inline void netxen_nic_enable_int(struct netxen_adapter *adapter) |
191 | { | 158 | { |
192 | u32 mask; | ||
193 | |||
194 | if (adapter->intr_scheme != -1 && | ||
195 | adapter->intr_scheme != INTR_SCHEME_PERPORT) { | ||
196 | switch (adapter->ahw.board_type) { | ||
197 | case NETXEN_NIC_GBE: | ||
198 | mask = 0x77b; | ||
199 | break; | ||
200 | case NETXEN_NIC_XGBE: | ||
201 | mask = 0x77f; | ||
202 | break; | ||
203 | default: | ||
204 | mask = 0x7ff; | ||
205 | break; | ||
206 | } | ||
207 | |||
208 | adapter->pci_write_immediate(adapter, ISR_INT_MASK, mask); | ||
209 | } | ||
210 | |||
211 | adapter->pci_write_normalize(adapter, adapter->crb_intr_mask, 0x1); | 159 | adapter->pci_write_normalize(adapter, adapter->crb_intr_mask, 0x1); |
212 | 160 | ||
213 | if (!NETXEN_IS_MSI_FAMILY(adapter)) { | 161 | if (!NETXEN_IS_MSI_FAMILY(adapter)) |
214 | mask = 0xbff; | 162 | adapter->pci_write_immediate(adapter, |
215 | if (adapter->intr_scheme == INTR_SCHEME_PERPORT) | 163 | adapter->legacy_intr.tgt_mask_reg, 0xfbff); |
216 | adapter->pci_write_immediate(adapter, | ||
217 | adapter->legacy_intr.tgt_mask_reg, mask); | ||
218 | else | ||
219 | adapter->pci_write_normalize(adapter, | ||
220 | CRB_INT_VECTOR, 0); | ||
221 | } | ||
222 | } | 164 | } |
223 | 165 | ||
224 | static int nx_set_dma_mask(struct netxen_adapter *adapter, uint8_t revision_id) | 166 | static int nx_set_dma_mask(struct netxen_adapter *adapter, uint8_t revision_id) |
@@ -501,6 +443,44 @@ static void netxen_init_msix_entries(struct netxen_adapter *adapter) | |||
501 | adapter->msix_entries[i].entry = i; | 443 | adapter->msix_entries[i].entry = i; |
502 | } | 444 | } |
503 | 445 | ||
446 | static int | ||
447 | netxen_read_mac_addr(struct netxen_adapter *adapter) | ||
448 | { | ||
449 | int i; | ||
450 | unsigned char *p; | ||
451 | __le64 mac_addr; | ||
452 | DECLARE_MAC_BUF(mac); | ||
453 | struct net_device *netdev = adapter->netdev; | ||
454 | struct pci_dev *pdev = adapter->pdev; | ||
455 | |||
456 | if (netxen_is_flash_supported(adapter) != 0) | ||
457 | return -EIO; | ||
458 | |||
459 | if (NX_IS_REVISION_P3(adapter->ahw.revision_id)) { | ||
460 | if (netxen_p3_get_mac_addr(adapter, &mac_addr) != 0) | ||
461 | return -EIO; | ||
462 | } else { | ||
463 | if (netxen_get_flash_mac_addr(adapter, &mac_addr) != 0) | ||
464 | return -EIO; | ||
465 | } | ||
466 | |||
467 | p = (unsigned char *)&mac_addr; | ||
468 | for (i = 0; i < 6; i++) | ||
469 | netdev->dev_addr[i] = *(p + 5 - i); | ||
470 | |||
471 | memcpy(netdev->perm_addr, netdev->dev_addr, netdev->addr_len); | ||
472 | |||
473 | /* set station address */ | ||
474 | |||
475 | if (!is_valid_ether_addr(netdev->perm_addr)) { | ||
476 | dev_warn(&pdev->dev, "Bad MAC address %s.\n", | ||
477 | print_mac(mac, netdev->dev_addr)); | ||
478 | } else | ||
479 | adapter->macaddr_set(adapter, netdev->dev_addr); | ||
480 | |||
481 | return 0; | ||
482 | } | ||
483 | |||
504 | /* | 484 | /* |
505 | * netxen_nic_probe() | 485 | * netxen_nic_probe() |
506 | * | 486 | * |
@@ -529,10 +509,8 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
529 | unsigned long mem_base, mem_len, db_base, db_len, pci_len0 = 0; | 509 | unsigned long mem_base, mem_len, db_base, db_len, pci_len0 = 0; |
530 | int i = 0, err; | 510 | int i = 0, err; |
531 | int first_driver, first_boot; | 511 | int first_driver, first_boot; |
532 | __le64 mac_addr[FLASH_NUM_PORTS + 1]; | ||
533 | u32 val; | 512 | u32 val; |
534 | int pci_func_id = PCI_FUNC(pdev->devfn); | 513 | int pci_func_id = PCI_FUNC(pdev->devfn); |
535 | DECLARE_MAC_BUF(mac); | ||
536 | struct netxen_legacy_intr_set *legacy_intrp; | 514 | struct netxen_legacy_intr_set *legacy_intrp; |
537 | uint8_t revision_id; | 515 | uint8_t revision_id; |
538 | 516 | ||
@@ -545,6 +523,13 @@ netxen_nic_probe(struct pci_dev *pdev, const struct pci_device_id *ent) | |||
545 | return -ENODEV; | 523 | return -ENODEV; |
546 | } | 524 | } |
547 | 525 | ||
526 | if (pdev->revision >= NX_P3_A0 && pdev->revision < NX_P3_B1) { | ||
527 | printk(KERN_WARNING "NetXen chip revisions between 0x%x-0x%x" | ||
528 | "will not be enabled.\n", | ||
529 | NX_P3_A0, NX_P3_B1); | ||
530 | return -ENODEV; | ||
531 | } | ||
532 | |||
548 | if ((err = pci_enable_device(pdev))) | 533 | if ((err = pci_enable_device(pdev))) |
549 | return err; | 534 | return err; |
550 | 535 | ||
@@ -898,34 +883,14 @@ request_msi: | |||
898 | goto err_out_disable_msi; | 883 | goto err_out_disable_msi; |
899 | 884 | ||
900 | init_timer(&adapter->watchdog_timer); | 885 | init_timer(&adapter->watchdog_timer); |
901 | adapter->ahw.linkup = 0; | ||
902 | adapter->watchdog_timer.function = &netxen_watchdog; | 886 | adapter->watchdog_timer.function = &netxen_watchdog; |
903 | adapter->watchdog_timer.data = (unsigned long)adapter; | 887 | adapter->watchdog_timer.data = (unsigned long)adapter; |
904 | INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task); | 888 | INIT_WORK(&adapter->watchdog_task, netxen_watchdog_task); |
905 | INIT_WORK(&adapter->tx_timeout_task, netxen_tx_timeout_task); | 889 | INIT_WORK(&adapter->tx_timeout_task, netxen_tx_timeout_task); |
906 | 890 | ||
907 | if (netxen_is_flash_supported(adapter) == 0 && | 891 | err = netxen_read_mac_addr(adapter); |
908 | netxen_get_flash_mac_addr(adapter, mac_addr) == 0) { | 892 | if (err) |
909 | unsigned char *p; | 893 | dev_warn(&pdev->dev, "failed to read mac addr\n"); |
910 | |||
911 | p = (unsigned char *)&mac_addr[adapter->portnum]; | ||
912 | netdev->dev_addr[0] = *(p + 5); | ||
913 | netdev->dev_addr[1] = *(p + 4); | ||
914 | netdev->dev_addr[2] = *(p + 3); | ||
915 | netdev->dev_addr[3] = *(p + 2); | ||
916 | netdev->dev_addr[4] = *(p + 1); | ||
917 | netdev->dev_addr[5] = *(p + 0); | ||
918 | |||
919 | memcpy(netdev->perm_addr, netdev->dev_addr, | ||
920 | netdev->addr_len); | ||
921 | if (!is_valid_ether_addr(netdev->perm_addr)) { | ||
922 | printk(KERN_ERR "%s: Bad MAC address %s.\n", | ||
923 | netxen_nic_driver_name, | ||
924 | print_mac(mac, netdev->dev_addr)); | ||
925 | } else { | ||
926 | adapter->macaddr_set(adapter, netdev->dev_addr); | ||
927 | } | ||
928 | } | ||
929 | 894 | ||
930 | netif_carrier_off(netdev); | 895 | netif_carrier_off(netdev); |
931 | netif_stop_queue(netdev); | 896 | netif_stop_queue(netdev); |
@@ -1000,6 +965,7 @@ static void __devexit netxen_nic_remove(struct pci_dev *pdev) | |||
1000 | 965 | ||
1001 | if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) { | 966 | if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) { |
1002 | netxen_free_hw_resources(adapter); | 967 | netxen_free_hw_resources(adapter); |
968 | netxen_release_rx_buffers(adapter); | ||
1003 | netxen_free_sw_resources(adapter); | 969 | netxen_free_sw_resources(adapter); |
1004 | } | 970 | } |
1005 | 971 | ||
@@ -1069,6 +1035,15 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1069 | goto err_out_free_sw; | 1035 | goto err_out_free_sw; |
1070 | } | 1036 | } |
1071 | 1037 | ||
1038 | if ((adapter->msi_mode != MSI_MODE_MULTIFUNC) || | ||
1039 | (adapter->intr_scheme != INTR_SCHEME_PERPORT)) { | ||
1040 | printk(KERN_ERR "%s: Firmware interrupt scheme is " | ||
1041 | "incompatible with driver\n", | ||
1042 | netdev->name); | ||
1043 | adapter->driver_mismatch = 1; | ||
1044 | goto err_out_free_hw; | ||
1045 | } | ||
1046 | |||
1072 | if (adapter->fw_major < 4) { | 1047 | if (adapter->fw_major < 4) { |
1073 | adapter->crb_addr_cmd_producer = | 1048 | adapter->crb_addr_cmd_producer = |
1074 | crb_cmd_producer[adapter->portnum]; | 1049 | crb_cmd_producer[adapter->portnum]; |
@@ -1094,7 +1069,7 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1094 | flags, netdev->name, adapter); | 1069 | flags, netdev->name, adapter); |
1095 | if (err) { | 1070 | if (err) { |
1096 | printk(KERN_ERR "request_irq failed with: %d\n", err); | 1071 | printk(KERN_ERR "request_irq failed with: %d\n", err); |
1097 | goto err_out_free_hw; | 1072 | goto err_out_free_rxbuf; |
1098 | } | 1073 | } |
1099 | 1074 | ||
1100 | adapter->is_up = NETXEN_ADAPTER_UP_MAGIC; | 1075 | adapter->is_up = NETXEN_ADAPTER_UP_MAGIC; |
@@ -1116,6 +1091,7 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1116 | if (adapter->set_mtu) | 1091 | if (adapter->set_mtu) |
1117 | adapter->set_mtu(adapter, netdev->mtu); | 1092 | adapter->set_mtu(adapter, netdev->mtu); |
1118 | 1093 | ||
1094 | adapter->ahw.linkup = 0; | ||
1119 | mod_timer(&adapter->watchdog_timer, jiffies); | 1095 | mod_timer(&adapter->watchdog_timer, jiffies); |
1120 | 1096 | ||
1121 | napi_enable(&adapter->napi); | 1097 | napi_enable(&adapter->napi); |
@@ -1127,6 +1103,8 @@ static int netxen_nic_open(struct net_device *netdev) | |||
1127 | 1103 | ||
1128 | err_out_free_irq: | 1104 | err_out_free_irq: |
1129 | free_irq(adapter->irq, adapter); | 1105 | free_irq(adapter->irq, adapter); |
1106 | err_out_free_rxbuf: | ||
1107 | netxen_release_rx_buffers(adapter); | ||
1130 | err_out_free_hw: | 1108 | err_out_free_hw: |
1131 | netxen_free_hw_resources(adapter); | 1109 | netxen_free_hw_resources(adapter); |
1132 | err_out_free_sw: | 1110 | err_out_free_sw: |
@@ -1152,10 +1130,8 @@ static int netxen_nic_close(struct net_device *netdev) | |||
1152 | 1130 | ||
1153 | netxen_release_tx_buffers(adapter); | 1131 | netxen_release_tx_buffers(adapter); |
1154 | 1132 | ||
1155 | if (adapter->is_up == NETXEN_ADAPTER_UP_MAGIC) { | 1133 | FLUSH_SCHEDULED_WORK(); |
1156 | FLUSH_SCHEDULED_WORK(); | 1134 | del_timer_sync(&adapter->watchdog_timer); |
1157 | del_timer_sync(&adapter->watchdog_timer); | ||
1158 | } | ||
1159 | 1135 | ||
1160 | return 0; | 1136 | return 0; |
1161 | } | 1137 | } |
@@ -1458,7 +1434,8 @@ void netxen_watchdog_task(struct work_struct *work) | |||
1458 | 1434 | ||
1459 | netxen_nic_handle_phy_intr(adapter); | 1435 | netxen_nic_handle_phy_intr(adapter); |
1460 | 1436 | ||
1461 | mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); | 1437 | if (netif_running(adapter->netdev)) |
1438 | mod_timer(&adapter->watchdog_timer, jiffies + 2 * HZ); | ||
1462 | } | 1439 | } |
1463 | 1440 | ||
1464 | static void netxen_tx_timeout(struct net_device *netdev) | 1441 | static void netxen_tx_timeout(struct net_device *netdev) |
@@ -1518,18 +1495,9 @@ struct net_device_stats *netxen_nic_get_stats(struct net_device *netdev) | |||
1518 | return stats; | 1495 | return stats; |
1519 | } | 1496 | } |
1520 | 1497 | ||
1521 | static inline void | ||
1522 | netxen_handle_int(struct netxen_adapter *adapter) | ||
1523 | { | ||
1524 | netxen_nic_disable_int(adapter); | ||
1525 | napi_schedule(&adapter->napi); | ||
1526 | } | ||
1527 | |||
1528 | static irqreturn_t netxen_intr(int irq, void *data) | 1498 | static irqreturn_t netxen_intr(int irq, void *data) |
1529 | { | 1499 | { |
1530 | struct netxen_adapter *adapter = data; | 1500 | struct netxen_adapter *adapter = data; |
1531 | u32 our_int = 0; | ||
1532 | |||
1533 | u32 status = 0; | 1501 | u32 status = 0; |
1534 | 1502 | ||
1535 | status = adapter->pci_read_immediate(adapter, ISR_INT_VECTOR); | 1503 | status = adapter->pci_read_immediate(adapter, ISR_INT_VECTOR); |
@@ -1544,22 +1512,32 @@ static irqreturn_t netxen_intr(int irq, void *data) | |||
1544 | if (!ISR_LEGACY_INT_TRIGGERED(status)) | 1512 | if (!ISR_LEGACY_INT_TRIGGERED(status)) |
1545 | return IRQ_NONE; | 1513 | return IRQ_NONE; |
1546 | 1514 | ||
1547 | } else if (NX_IS_REVISION_P2(adapter->ahw.revision_id)) { | 1515 | } else { |
1516 | unsigned long our_int = 0; | ||
1548 | 1517 | ||
1549 | our_int = adapter->pci_read_normalize(adapter, CRB_INT_VECTOR); | 1518 | our_int = adapter->pci_read_normalize(adapter, CRB_INT_VECTOR); |
1519 | |||
1550 | /* not our interrupt */ | 1520 | /* not our interrupt */ |
1551 | if ((our_int & (0x80 << adapter->portnum)) == 0) | 1521 | if (!test_and_clear_bit((7 + adapter->portnum), &our_int)) |
1552 | return IRQ_NONE; | 1522 | return IRQ_NONE; |
1553 | 1523 | ||
1554 | if (adapter->intr_scheme == INTR_SCHEME_PERPORT) { | 1524 | /* claim interrupt */ |
1555 | /* claim interrupt */ | 1525 | adapter->pci_write_normalize(adapter, |
1556 | adapter->pci_write_normalize(adapter, | 1526 | CRB_INT_VECTOR, (our_int & 0xffffffff)); |
1557 | CRB_INT_VECTOR, | ||
1558 | our_int & ~((u32)(0x80 << adapter->portnum))); | ||
1559 | } | ||
1560 | } | 1527 | } |
1561 | 1528 | ||
1562 | netxen_handle_int(adapter); | 1529 | /* clear interrupt */ |
1530 | if (adapter->fw_major < 4) | ||
1531 | netxen_nic_disable_int(adapter); | ||
1532 | |||
1533 | adapter->pci_write_immediate(adapter, | ||
1534 | adapter->legacy_intr.tgt_status_reg, | ||
1535 | 0xffffffff); | ||
1536 | /* read twice to ensure write is flushed */ | ||
1537 | adapter->pci_read_immediate(adapter, ISR_INT_VECTOR); | ||
1538 | adapter->pci_read_immediate(adapter, ISR_INT_VECTOR); | ||
1539 | |||
1540 | napi_schedule(&adapter->napi); | ||
1563 | 1541 | ||
1564 | return IRQ_HANDLED; | 1542 | return IRQ_HANDLED; |
1565 | } | 1543 | } |
@@ -1568,7 +1546,11 @@ static irqreturn_t netxen_msi_intr(int irq, void *data) | |||
1568 | { | 1546 | { |
1569 | struct netxen_adapter *adapter = data; | 1547 | struct netxen_adapter *adapter = data; |
1570 | 1548 | ||
1571 | netxen_handle_int(adapter); | 1549 | /* clear interrupt */ |
1550 | adapter->pci_write_immediate(adapter, | ||
1551 | msi_tgt_status[adapter->ahw.pci_func], 0xffffffff); | ||
1552 | |||
1553 | napi_schedule(&adapter->napi); | ||
1572 | return IRQ_HANDLED; | 1554 | return IRQ_HANDLED; |
1573 | } | 1555 | } |
1574 | 1556 | ||
diff --git a/drivers/net/netxen/netxen_nic_phan_reg.h b/drivers/net/netxen/netxen_nic_phan_reg.h index 83e5ee57bfef..b293adcc95ab 100644 --- a/drivers/net/netxen/netxen_nic_phan_reg.h +++ b/drivers/net/netxen/netxen_nic_phan_reg.h | |||
@@ -125,6 +125,8 @@ | |||
125 | #define CRB_SW_INT_MASK_2 NETXEN_NIC_REG(0x1e4) | 125 | #define CRB_SW_INT_MASK_2 NETXEN_NIC_REG(0x1e4) |
126 | #define CRB_SW_INT_MASK_3 NETXEN_NIC_REG(0x1e8) | 126 | #define CRB_SW_INT_MASK_3 NETXEN_NIC_REG(0x1e8) |
127 | 127 | ||
128 | #define CRB_MAC_BLOCK_START NETXEN_CAM_RAM(0x1c0) | ||
129 | |||
128 | /* | 130 | /* |
129 | * capabilities register, can be used to selectively enable/disable features | 131 | * capabilities register, can be used to selectively enable/disable features |
130 | * for backward compability | 132 | * for backward compability |
diff --git a/drivers/net/ppp_mppe.c b/drivers/net/ppp_mppe.c index b35d79449500..88f03c9e9403 100644 --- a/drivers/net/ppp_mppe.c +++ b/drivers/net/ppp_mppe.c | |||
@@ -46,7 +46,6 @@ | |||
46 | #include <linux/err.h> | 46 | #include <linux/err.h> |
47 | #include <linux/module.h> | 47 | #include <linux/module.h> |
48 | #include <linux/kernel.h> | 48 | #include <linux/kernel.h> |
49 | #include <linux/version.h> | ||
50 | #include <linux/init.h> | 49 | #include <linux/init.h> |
51 | #include <linux/types.h> | 50 | #include <linux/types.h> |
52 | #include <linux/slab.h> | 51 | #include <linux/slab.h> |
diff --git a/drivers/net/pppol2tp.c b/drivers/net/pppol2tp.c index f9298827a76c..ff175e8f36b2 100644 --- a/drivers/net/pppol2tp.c +++ b/drivers/net/pppol2tp.c | |||
@@ -61,7 +61,6 @@ | |||
61 | */ | 61 | */ |
62 | 62 | ||
63 | #include <linux/module.h> | 63 | #include <linux/module.h> |
64 | #include <linux/version.h> | ||
65 | #include <linux/string.h> | 64 | #include <linux/string.h> |
66 | #include <linux/list.h> | 65 | #include <linux/list.h> |
67 | #include <asm/uaccess.h> | 66 | #include <asm/uaccess.h> |
diff --git a/drivers/net/r6040.c b/drivers/net/r6040.c index 6531ff565c54..5d86281d9363 100644 --- a/drivers/net/r6040.c +++ b/drivers/net/r6040.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/kernel.h> | 25 | #include <linux/kernel.h> |
26 | #include <linux/module.h> | 26 | #include <linux/module.h> |
27 | #include <linux/version.h> | ||
28 | #include <linux/moduleparam.h> | 27 | #include <linux/moduleparam.h> |
29 | #include <linux/string.h> | 28 | #include <linux/string.h> |
30 | #include <linux/timer.h> | 29 | #include <linux/timer.h> |
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c index 25e62cf58d3a..1c370e6aa641 100644 --- a/drivers/net/sh_eth.c +++ b/drivers/net/sh_eth.c | |||
@@ -20,7 +20,6 @@ | |||
20 | * the file called "COPYING". | 20 | * the file called "COPYING". |
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <linux/version.h> | ||
24 | #include <linux/init.h> | 23 | #include <linux/init.h> |
25 | #include <linux/dma-mapping.h> | 24 | #include <linux/dma-mapping.h> |
26 | #include <linux/etherdevice.h> | 25 | #include <linux/etherdevice.h> |
diff --git a/drivers/net/sky2.c b/drivers/net/sky2.c index 7d29edcd40b4..e24b25ca1c69 100644 --- a/drivers/net/sky2.c +++ b/drivers/net/sky2.c | |||
@@ -24,7 +24,6 @@ | |||
24 | 24 | ||
25 | #include <linux/crc32.h> | 25 | #include <linux/crc32.h> |
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/version.h> | ||
28 | #include <linux/module.h> | 27 | #include <linux/module.h> |
29 | #include <linux/netdevice.h> | 28 | #include <linux/netdevice.h> |
30 | #include <linux/dma-mapping.h> | 29 | #include <linux/dma-mapping.h> |
@@ -666,11 +665,16 @@ static void sky2_phy_power_down(struct sky2_hw *hw, unsigned port) | |||
666 | 665 | ||
667 | if (hw->chip_id != CHIP_ID_YUKON_EC) { | 666 | if (hw->chip_id != CHIP_ID_YUKON_EC) { |
668 | if (hw->chip_id == CHIP_ID_YUKON_EC_U) { | 667 | if (hw->chip_id == CHIP_ID_YUKON_EC_U) { |
669 | ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL); | 668 | /* select page 2 to access MAC control register */ |
669 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 2); | ||
670 | 670 | ||
671 | ctrl = gm_phy_read(hw, port, PHY_MARV_PHY_CTRL); | ||
671 | /* enable Power Down */ | 672 | /* enable Power Down */ |
672 | ctrl |= PHY_M_PC_POW_D_ENA; | 673 | ctrl |= PHY_M_PC_POW_D_ENA; |
673 | gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); | 674 | gm_phy_write(hw, port, PHY_MARV_PHY_CTRL, ctrl); |
675 | |||
676 | /* set page register back to 0 */ | ||
677 | gm_phy_write(hw, port, PHY_MARV_EXT_ADR, 0); | ||
674 | } | 678 | } |
675 | 679 | ||
676 | /* set IEEE compatible Power Down Mode (dev. #4.99) */ | 680 | /* set IEEE compatible Power Down Mode (dev. #4.99) */ |
diff --git a/drivers/net/tehuti.h b/drivers/net/tehuti.h index c66dfc9ec1ec..7db48f1cd949 100644 --- a/drivers/net/tehuti.h +++ b/drivers/net/tehuti.h | |||
@@ -27,7 +27,6 @@ | |||
27 | #include <linux/sched.h> | 27 | #include <linux/sched.h> |
28 | #include <linux/tty.h> | 28 | #include <linux/tty.h> |
29 | #include <linux/if_vlan.h> | 29 | #include <linux/if_vlan.h> |
30 | #include <linux/version.h> | ||
31 | #include <linux/interrupt.h> | 30 | #include <linux/interrupt.h> |
32 | #include <linux/vmalloc.h> | 31 | #include <linux/vmalloc.h> |
33 | #include <asm/byteorder.h> | 32 | #include <asm/byteorder.h> |
diff --git a/drivers/net/tg3.c b/drivers/net/tg3.c index d2439b85a790..71d2c5cfdad9 100644 --- a/drivers/net/tg3.c +++ b/drivers/net/tg3.c | |||
@@ -66,8 +66,8 @@ | |||
66 | 66 | ||
67 | #define DRV_MODULE_NAME "tg3" | 67 | #define DRV_MODULE_NAME "tg3" |
68 | #define PFX DRV_MODULE_NAME ": " | 68 | #define PFX DRV_MODULE_NAME ": " |
69 | #define DRV_MODULE_VERSION "3.93" | 69 | #define DRV_MODULE_VERSION "3.94" |
70 | #define DRV_MODULE_RELDATE "May 22, 2008" | 70 | #define DRV_MODULE_RELDATE "August 14, 2008" |
71 | 71 | ||
72 | #define TG3_DEF_MAC_MODE 0 | 72 | #define TG3_DEF_MAC_MODE 0 |
73 | #define TG3_DEF_RX_MODE 0 | 73 | #define TG3_DEF_RX_MODE 0 |
@@ -536,6 +536,7 @@ static int tg3_ape_lock(struct tg3 *tp, int locknum) | |||
536 | return 0; | 536 | return 0; |
537 | 537 | ||
538 | switch (locknum) { | 538 | switch (locknum) { |
539 | case TG3_APE_LOCK_GRC: | ||
539 | case TG3_APE_LOCK_MEM: | 540 | case TG3_APE_LOCK_MEM: |
540 | break; | 541 | break; |
541 | default: | 542 | default: |
@@ -573,6 +574,7 @@ static void tg3_ape_unlock(struct tg3 *tp, int locknum) | |||
573 | return; | 574 | return; |
574 | 575 | ||
575 | switch (locknum) { | 576 | switch (locknum) { |
577 | case TG3_APE_LOCK_GRC: | ||
576 | case TG3_APE_LOCK_MEM: | 578 | case TG3_APE_LOCK_MEM: |
577 | break; | 579 | break; |
578 | default: | 580 | default: |
@@ -1018,15 +1020,43 @@ static void tg3_mdio_fini(struct tg3 *tp) | |||
1018 | } | 1020 | } |
1019 | 1021 | ||
1020 | /* tp->lock is held. */ | 1022 | /* tp->lock is held. */ |
1023 | static inline void tg3_generate_fw_event(struct tg3 *tp) | ||
1024 | { | ||
1025 | u32 val; | ||
1026 | |||
1027 | val = tr32(GRC_RX_CPU_EVENT); | ||
1028 | val |= GRC_RX_CPU_DRIVER_EVENT; | ||
1029 | tw32_f(GRC_RX_CPU_EVENT, val); | ||
1030 | |||
1031 | tp->last_event_jiffies = jiffies; | ||
1032 | } | ||
1033 | |||
1034 | #define TG3_FW_EVENT_TIMEOUT_USEC 2500 | ||
1035 | |||
1036 | /* tp->lock is held. */ | ||
1021 | static void tg3_wait_for_event_ack(struct tg3 *tp) | 1037 | static void tg3_wait_for_event_ack(struct tg3 *tp) |
1022 | { | 1038 | { |
1023 | int i; | 1039 | int i; |
1040 | unsigned int delay_cnt; | ||
1041 | long time_remain; | ||
1042 | |||
1043 | /* If enough time has passed, no wait is necessary. */ | ||
1044 | time_remain = (long)(tp->last_event_jiffies + 1 + | ||
1045 | usecs_to_jiffies(TG3_FW_EVENT_TIMEOUT_USEC)) - | ||
1046 | (long)jiffies; | ||
1047 | if (time_remain < 0) | ||
1048 | return; | ||
1024 | 1049 | ||
1025 | /* Wait for up to 2.5 milliseconds */ | 1050 | /* Check if we can shorten the wait time. */ |
1026 | for (i = 0; i < 250000; i++) { | 1051 | delay_cnt = jiffies_to_usecs(time_remain); |
1052 | if (delay_cnt > TG3_FW_EVENT_TIMEOUT_USEC) | ||
1053 | delay_cnt = TG3_FW_EVENT_TIMEOUT_USEC; | ||
1054 | delay_cnt = (delay_cnt >> 3) + 1; | ||
1055 | |||
1056 | for (i = 0; i < delay_cnt; i++) { | ||
1027 | if (!(tr32(GRC_RX_CPU_EVENT) & GRC_RX_CPU_DRIVER_EVENT)) | 1057 | if (!(tr32(GRC_RX_CPU_EVENT) & GRC_RX_CPU_DRIVER_EVENT)) |
1028 | break; | 1058 | break; |
1029 | udelay(10); | 1059 | udelay(8); |
1030 | } | 1060 | } |
1031 | } | 1061 | } |
1032 | 1062 | ||
@@ -1075,9 +1105,7 @@ static void tg3_ump_link_report(struct tg3 *tp) | |||
1075 | val = 0; | 1105 | val = 0; |
1076 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 12, val); | 1106 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX + 12, val); |
1077 | 1107 | ||
1078 | val = tr32(GRC_RX_CPU_EVENT); | 1108 | tg3_generate_fw_event(tp); |
1079 | val |= GRC_RX_CPU_DRIVER_EVENT; | ||
1080 | tw32_f(GRC_RX_CPU_EVENT, val); | ||
1081 | } | 1109 | } |
1082 | 1110 | ||
1083 | static void tg3_link_report(struct tg3 *tp) | 1111 | static void tg3_link_report(struct tg3 *tp) |
@@ -2124,6 +2152,13 @@ static int tg3_set_power_state(struct tg3 *tp, pci_power_t state) | |||
2124 | (tp->tg3_flags & TG3_FLAG_WOL_ENABLE)) | 2152 | (tp->tg3_flags & TG3_FLAG_WOL_ENABLE)) |
2125 | mac_mode |= MAC_MODE_MAGIC_PKT_ENABLE; | 2153 | mac_mode |= MAC_MODE_MAGIC_PKT_ENABLE; |
2126 | 2154 | ||
2155 | if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { | ||
2156 | mac_mode |= tp->mac_mode & | ||
2157 | (MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN); | ||
2158 | if (mac_mode & MAC_MODE_APE_TX_EN) | ||
2159 | mac_mode |= MAC_MODE_TDE_ENABLE; | ||
2160 | } | ||
2161 | |||
2127 | tw32_f(MAC_MODE, mac_mode); | 2162 | tw32_f(MAC_MODE, mac_mode); |
2128 | udelay(100); | 2163 | udelay(100); |
2129 | 2164 | ||
@@ -5493,7 +5528,7 @@ static void tg3_ape_send_event(struct tg3 *tp, u32 event) | |||
5493 | return; | 5528 | return; |
5494 | 5529 | ||
5495 | apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS); | 5530 | apedata = tg3_ape_read32(tp, TG3_APE_FW_STATUS); |
5496 | if (apedata != APE_FW_STATUS_READY) | 5531 | if (!(apedata & APE_FW_STATUS_READY)) |
5497 | return; | 5532 | return; |
5498 | 5533 | ||
5499 | /* Wait for up to 1 millisecond for APE to service previous event. */ | 5534 | /* Wait for up to 1 millisecond for APE to service previous event. */ |
@@ -5760,6 +5795,8 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
5760 | 5795 | ||
5761 | tg3_mdio_stop(tp); | 5796 | tg3_mdio_stop(tp); |
5762 | 5797 | ||
5798 | tg3_ape_lock(tp, TG3_APE_LOCK_GRC); | ||
5799 | |||
5763 | /* No matching tg3_nvram_unlock() after this because | 5800 | /* No matching tg3_nvram_unlock() after this because |
5764 | * chip reset below will undo the nvram lock. | 5801 | * chip reset below will undo the nvram lock. |
5765 | */ | 5802 | */ |
@@ -5908,12 +5945,19 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
5908 | } else if (tp->tg3_flags2 & TG3_FLG2_MII_SERDES) { | 5945 | } else if (tp->tg3_flags2 & TG3_FLG2_MII_SERDES) { |
5909 | tp->mac_mode = MAC_MODE_PORT_MODE_GMII; | 5946 | tp->mac_mode = MAC_MODE_PORT_MODE_GMII; |
5910 | tw32_f(MAC_MODE, tp->mac_mode); | 5947 | tw32_f(MAC_MODE, tp->mac_mode); |
5948 | } else if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) { | ||
5949 | tp->mac_mode &= (MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN); | ||
5950 | if (tp->mac_mode & MAC_MODE_APE_TX_EN) | ||
5951 | tp->mac_mode |= MAC_MODE_TDE_ENABLE; | ||
5952 | tw32_f(MAC_MODE, tp->mac_mode); | ||
5911 | } else | 5953 | } else |
5912 | tw32_f(MAC_MODE, 0); | 5954 | tw32_f(MAC_MODE, 0); |
5913 | udelay(40); | 5955 | udelay(40); |
5914 | 5956 | ||
5915 | tg3_mdio_start(tp); | 5957 | tg3_mdio_start(tp); |
5916 | 5958 | ||
5959 | tg3_ape_unlock(tp, TG3_APE_LOCK_GRC); | ||
5960 | |||
5917 | err = tg3_poll_fw(tp); | 5961 | err = tg3_poll_fw(tp); |
5918 | if (err) | 5962 | if (err) |
5919 | return err; | 5963 | return err; |
@@ -5935,6 +5979,7 @@ static int tg3_chip_reset(struct tg3 *tp) | |||
5935 | tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg); | 5979 | tg3_read_mem(tp, NIC_SRAM_DATA_CFG, &nic_cfg); |
5936 | if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) { | 5980 | if (nic_cfg & NIC_SRAM_DATA_CFG_ASF_ENABLE) { |
5937 | tp->tg3_flags |= TG3_FLAG_ENABLE_ASF; | 5981 | tp->tg3_flags |= TG3_FLAG_ENABLE_ASF; |
5982 | tp->last_event_jiffies = jiffies; | ||
5938 | if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) | 5983 | if (tp->tg3_flags2 & TG3_FLG2_5750_PLUS) |
5939 | tp->tg3_flags2 |= TG3_FLG2_ASF_NEW_HANDSHAKE; | 5984 | tp->tg3_flags2 |= TG3_FLG2_ASF_NEW_HANDSHAKE; |
5940 | } | 5985 | } |
@@ -5948,15 +5993,12 @@ static void tg3_stop_fw(struct tg3 *tp) | |||
5948 | { | 5993 | { |
5949 | if ((tp->tg3_flags & TG3_FLAG_ENABLE_ASF) && | 5994 | if ((tp->tg3_flags & TG3_FLAG_ENABLE_ASF) && |
5950 | !(tp->tg3_flags3 & TG3_FLG3_ENABLE_APE)) { | 5995 | !(tp->tg3_flags3 & TG3_FLG3_ENABLE_APE)) { |
5951 | u32 val; | ||
5952 | |||
5953 | /* Wait for RX cpu to ACK the previous event. */ | 5996 | /* Wait for RX cpu to ACK the previous event. */ |
5954 | tg3_wait_for_event_ack(tp); | 5997 | tg3_wait_for_event_ack(tp); |
5955 | 5998 | ||
5956 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); | 5999 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, FWCMD_NICDRV_PAUSE_FW); |
5957 | val = tr32(GRC_RX_CPU_EVENT); | 6000 | |
5958 | val |= GRC_RX_CPU_DRIVER_EVENT; | 6001 | tg3_generate_fw_event(tp); |
5959 | tw32(GRC_RX_CPU_EVENT, val); | ||
5960 | 6002 | ||
5961 | /* Wait for RX cpu to ACK this event. */ | 6003 | /* Wait for RX cpu to ACK this event. */ |
5962 | tg3_wait_for_event_ack(tp); | 6004 | tg3_wait_for_event_ack(tp); |
@@ -7406,7 +7448,11 @@ static int tg3_reset_hw(struct tg3 *tp, int reset_phy) | |||
7406 | udelay(10); | 7448 | udelay(10); |
7407 | } | 7449 | } |
7408 | 7450 | ||
7409 | tp->mac_mode = MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE | | 7451 | if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) |
7452 | tp->mac_mode &= MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN; | ||
7453 | else | ||
7454 | tp->mac_mode = 0; | ||
7455 | tp->mac_mode |= MAC_MODE_TXSTAT_ENABLE | MAC_MODE_RXSTAT_ENABLE | | ||
7410 | MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE; | 7456 | MAC_MODE_TDE_ENABLE | MAC_MODE_RDE_ENABLE | MAC_MODE_FHDE_ENABLE; |
7411 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && | 7457 | if (!(tp->tg3_flags2 & TG3_FLG2_5705_PLUS) && |
7412 | !(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) && | 7458 | !(tp->tg3_flags2 & TG3_FLG2_PHY_SERDES) && |
@@ -7840,9 +7886,8 @@ static void tg3_timer(unsigned long __opaque) | |||
7840 | * resets. | 7886 | * resets. |
7841 | */ | 7887 | */ |
7842 | if (!--tp->asf_counter) { | 7888 | if (!--tp->asf_counter) { |
7843 | if (tp->tg3_flags & TG3_FLAG_ENABLE_ASF) { | 7889 | if ((tp->tg3_flags & TG3_FLAG_ENABLE_ASF) && |
7844 | u32 val; | 7890 | !(tp->tg3_flags3 & TG3_FLG3_ENABLE_APE)) { |
7845 | |||
7846 | tg3_wait_for_event_ack(tp); | 7891 | tg3_wait_for_event_ack(tp); |
7847 | 7892 | ||
7848 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, | 7893 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_MBOX, |
@@ -7850,9 +7895,8 @@ static void tg3_timer(unsigned long __opaque) | |||
7850 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4); | 7895 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_LEN_MBOX, 4); |
7851 | /* 5 seconds timeout */ | 7896 | /* 5 seconds timeout */ |
7852 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX, 5); | 7897 | tg3_write_mem(tp, NIC_SRAM_FW_CMD_DATA_MBOX, 5); |
7853 | val = tr32(GRC_RX_CPU_EVENT); | 7898 | |
7854 | val |= GRC_RX_CPU_DRIVER_EVENT; | 7899 | tg3_generate_fw_event(tp); |
7855 | tw32_f(GRC_RX_CPU_EVENT, val); | ||
7856 | } | 7900 | } |
7857 | tp->asf_counter = tp->asf_multiplier; | 7901 | tp->asf_counter = tp->asf_multiplier; |
7858 | } | 7902 | } |
@@ -8422,6 +8466,11 @@ static inline unsigned long get_stat64(tg3_stat64_t *val) | |||
8422 | return ret; | 8466 | return ret; |
8423 | } | 8467 | } |
8424 | 8468 | ||
8469 | static inline u64 get_estat64(tg3_stat64_t *val) | ||
8470 | { | ||
8471 | return ((u64)val->high << 32) | ((u64)val->low); | ||
8472 | } | ||
8473 | |||
8425 | static unsigned long calc_crc_errors(struct tg3 *tp) | 8474 | static unsigned long calc_crc_errors(struct tg3 *tp) |
8426 | { | 8475 | { |
8427 | struct tg3_hw_stats *hw_stats = tp->hw_stats; | 8476 | struct tg3_hw_stats *hw_stats = tp->hw_stats; |
@@ -8450,7 +8499,7 @@ static unsigned long calc_crc_errors(struct tg3 *tp) | |||
8450 | 8499 | ||
8451 | #define ESTAT_ADD(member) \ | 8500 | #define ESTAT_ADD(member) \ |
8452 | estats->member = old_estats->member + \ | 8501 | estats->member = old_estats->member + \ |
8453 | get_stat64(&hw_stats->member) | 8502 | get_estat64(&hw_stats->member) |
8454 | 8503 | ||
8455 | static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp) | 8504 | static struct tg3_ethtool_stats *tg3_get_estats(struct tg3 *tp) |
8456 | { | 8505 | { |
@@ -12416,6 +12465,13 @@ static int __devinit tg3_get_invariants(struct tg3 *tp) | |||
12416 | tp->misc_host_ctrl); | 12465 | tp->misc_host_ctrl); |
12417 | } | 12466 | } |
12418 | 12467 | ||
12468 | /* Preserve the APE MAC_MODE bits */ | ||
12469 | if (tp->tg3_flags3 & TG3_FLG3_ENABLE_APE) | ||
12470 | tp->mac_mode = tr32(MAC_MODE) | | ||
12471 | MAC_MODE_APE_TX_EN | MAC_MODE_APE_RX_EN; | ||
12472 | else | ||
12473 | tp->mac_mode = TG3_DEF_MAC_MODE; | ||
12474 | |||
12419 | /* these are limited to 10/100 only */ | 12475 | /* these are limited to 10/100 only */ |
12420 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 && | 12476 | if ((GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5703 && |
12421 | (grc_misc_cfg == 0x8000 || grc_misc_cfg == 0x4000)) || | 12477 | (grc_misc_cfg == 0x8000 || grc_misc_cfg == 0x4000)) || |
@@ -13275,7 +13331,6 @@ static int __devinit tg3_init_one(struct pci_dev *pdev, | |||
13275 | tp->pdev = pdev; | 13331 | tp->pdev = pdev; |
13276 | tp->dev = dev; | 13332 | tp->dev = dev; |
13277 | tp->pm_cap = pm_cap; | 13333 | tp->pm_cap = pm_cap; |
13278 | tp->mac_mode = TG3_DEF_MAC_MODE; | ||
13279 | tp->rx_mode = TG3_DEF_RX_MODE; | 13334 | tp->rx_mode = TG3_DEF_RX_MODE; |
13280 | tp->tx_mode = TG3_DEF_TX_MODE; | 13335 | tp->tx_mode = TG3_DEF_TX_MODE; |
13281 | 13336 | ||
diff --git a/drivers/net/tg3.h b/drivers/net/tg3.h index df07842172b7..f5b8cab8d4b5 100644 --- a/drivers/net/tg3.h +++ b/drivers/net/tg3.h | |||
@@ -325,6 +325,8 @@ | |||
325 | #define MAC_MODE_TDE_ENABLE 0x00200000 | 325 | #define MAC_MODE_TDE_ENABLE 0x00200000 |
326 | #define MAC_MODE_RDE_ENABLE 0x00400000 | 326 | #define MAC_MODE_RDE_ENABLE 0x00400000 |
327 | #define MAC_MODE_FHDE_ENABLE 0x00800000 | 327 | #define MAC_MODE_FHDE_ENABLE 0x00800000 |
328 | #define MAC_MODE_APE_RX_EN 0x08000000 | ||
329 | #define MAC_MODE_APE_TX_EN 0x10000000 | ||
328 | #define MAC_STATUS 0x00000404 | 330 | #define MAC_STATUS 0x00000404 |
329 | #define MAC_STATUS_PCS_SYNCED 0x00000001 | 331 | #define MAC_STATUS_PCS_SYNCED 0x00000001 |
330 | #define MAC_STATUS_SIGNAL_DET 0x00000002 | 332 | #define MAC_STATUS_SIGNAL_DET 0x00000002 |
@@ -1889,6 +1891,7 @@ | |||
1889 | #define APE_EVENT_STATUS_EVENT_PENDING 0x80000000 | 1891 | #define APE_EVENT_STATUS_EVENT_PENDING 0x80000000 |
1890 | 1892 | ||
1891 | /* APE convenience enumerations. */ | 1893 | /* APE convenience enumerations. */ |
1894 | #define TG3_APE_LOCK_GRC 1 | ||
1892 | #define TG3_APE_LOCK_MEM 4 | 1895 | #define TG3_APE_LOCK_MEM 4 |
1893 | 1896 | ||
1894 | #define TG3_EEPROM_SB_F1R2_MBA_OFF 0x10 | 1897 | #define TG3_EEPROM_SB_F1R2_MBA_OFF 0x10 |
@@ -2429,7 +2432,10 @@ struct tg3 { | |||
2429 | struct tg3_ethtool_stats estats; | 2432 | struct tg3_ethtool_stats estats; |
2430 | struct tg3_ethtool_stats estats_prev; | 2433 | struct tg3_ethtool_stats estats_prev; |
2431 | 2434 | ||
2435 | union { | ||
2432 | unsigned long phy_crc_errors; | 2436 | unsigned long phy_crc_errors; |
2437 | unsigned long last_event_jiffies; | ||
2438 | }; | ||
2433 | 2439 | ||
2434 | u32 rx_offset; | 2440 | u32 rx_offset; |
2435 | u32 tg3_flags; | 2441 | u32 tg3_flags; |
diff --git a/drivers/net/tlan.c b/drivers/net/tlan.c index 85246ed7cb9c..ec871f646766 100644 --- a/drivers/net/tlan.c +++ b/drivers/net/tlan.c | |||
@@ -360,8 +360,8 @@ TLan_GetSKB( const struct tlan_list_tag *tag) | |||
360 | { | 360 | { |
361 | unsigned long addr; | 361 | unsigned long addr; |
362 | 362 | ||
363 | addr = tag->buffer[8].address; | 363 | addr = tag->buffer[9].address; |
364 | addr |= (tag->buffer[9].address << 16) << 16; | 364 | addr |= (tag->buffer[8].address << 16) << 16; |
365 | return (struct sk_buff *) addr; | 365 | return (struct sk_buff *) addr; |
366 | } | 366 | } |
367 | 367 | ||
@@ -1984,7 +1984,6 @@ static void TLan_ResetLists( struct net_device *dev ) | |||
1984 | TLanList *list; | 1984 | TLanList *list; |
1985 | dma_addr_t list_phys; | 1985 | dma_addr_t list_phys; |
1986 | struct sk_buff *skb; | 1986 | struct sk_buff *skb; |
1987 | void *t = NULL; | ||
1988 | 1987 | ||
1989 | priv->txHead = 0; | 1988 | priv->txHead = 0; |
1990 | priv->txTail = 0; | 1989 | priv->txTail = 0; |
@@ -2022,7 +2021,8 @@ static void TLan_ResetLists( struct net_device *dev ) | |||
2022 | } | 2021 | } |
2023 | 2022 | ||
2024 | skb_reserve( skb, NET_IP_ALIGN ); | 2023 | skb_reserve( skb, NET_IP_ALIGN ); |
2025 | list->buffer[0].address = pci_map_single(priv->pciDev, t, | 2024 | list->buffer[0].address = pci_map_single(priv->pciDev, |
2025 | skb->data, | ||
2026 | TLAN_MAX_FRAME_SIZE, | 2026 | TLAN_MAX_FRAME_SIZE, |
2027 | PCI_DMA_FROMDEVICE); | 2027 | PCI_DMA_FROMDEVICE); |
2028 | TLan_StoreSKB(list, skb); | 2028 | TLan_StoreSKB(list, skb); |
diff --git a/drivers/net/tun.c b/drivers/net/tun.c index e6bbc639c2d0..6daea0c91862 100644 --- a/drivers/net/tun.c +++ b/drivers/net/tun.c | |||
@@ -358,6 +358,66 @@ static unsigned int tun_chr_poll(struct file *file, poll_table * wait) | |||
358 | return mask; | 358 | return mask; |
359 | } | 359 | } |
360 | 360 | ||
361 | /* prepad is the amount to reserve at front. len is length after that. | ||
362 | * linear is a hint as to how much to copy (usually headers). */ | ||
363 | static struct sk_buff *tun_alloc_skb(size_t prepad, size_t len, size_t linear, | ||
364 | gfp_t gfp) | ||
365 | { | ||
366 | struct sk_buff *skb; | ||
367 | unsigned int i; | ||
368 | |||
369 | skb = alloc_skb(prepad + len, gfp|__GFP_NOWARN); | ||
370 | if (skb) { | ||
371 | skb_reserve(skb, prepad); | ||
372 | skb_put(skb, len); | ||
373 | return skb; | ||
374 | } | ||
375 | |||
376 | /* Under a page? Don't bother with paged skb. */ | ||
377 | if (prepad + len < PAGE_SIZE) | ||
378 | return NULL; | ||
379 | |||
380 | /* Start with a normal skb, and add pages. */ | ||
381 | skb = alloc_skb(prepad + linear, gfp); | ||
382 | if (!skb) | ||
383 | return NULL; | ||
384 | |||
385 | skb_reserve(skb, prepad); | ||
386 | skb_put(skb, linear); | ||
387 | |||
388 | len -= linear; | ||
389 | |||
390 | for (i = 0; i < MAX_SKB_FRAGS; i++) { | ||
391 | skb_frag_t *f = &skb_shinfo(skb)->frags[i]; | ||
392 | |||
393 | f->page = alloc_page(gfp|__GFP_ZERO); | ||
394 | if (!f->page) | ||
395 | break; | ||
396 | |||
397 | f->page_offset = 0; | ||
398 | f->size = PAGE_SIZE; | ||
399 | |||
400 | skb->data_len += PAGE_SIZE; | ||
401 | skb->len += PAGE_SIZE; | ||
402 | skb->truesize += PAGE_SIZE; | ||
403 | skb_shinfo(skb)->nr_frags++; | ||
404 | |||
405 | if (len < PAGE_SIZE) { | ||
406 | len = 0; | ||
407 | break; | ||
408 | } | ||
409 | len -= PAGE_SIZE; | ||
410 | } | ||
411 | |||
412 | /* Too large, or alloc fail? */ | ||
413 | if (unlikely(len)) { | ||
414 | kfree_skb(skb); | ||
415 | skb = NULL; | ||
416 | } | ||
417 | |||
418 | return skb; | ||
419 | } | ||
420 | |||
361 | /* Get packet from user space buffer */ | 421 | /* Get packet from user space buffer */ |
362 | static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count) | 422 | static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, size_t count) |
363 | { | 423 | { |
@@ -391,14 +451,12 @@ static __inline__ ssize_t tun_get_user(struct tun_struct *tun, struct iovec *iv, | |||
391 | return -EINVAL; | 451 | return -EINVAL; |
392 | } | 452 | } |
393 | 453 | ||
394 | if (!(skb = alloc_skb(len + align, GFP_KERNEL))) { | 454 | if (!(skb = tun_alloc_skb(align, len, gso.hdr_len, GFP_KERNEL))) { |
395 | tun->dev->stats.rx_dropped++; | 455 | tun->dev->stats.rx_dropped++; |
396 | return -ENOMEM; | 456 | return -ENOMEM; |
397 | } | 457 | } |
398 | 458 | ||
399 | if (align) | 459 | if (skb_copy_datagram_from_iovec(skb, 0, iv, len)) { |
400 | skb_reserve(skb, align); | ||
401 | if (memcpy_fromiovec(skb_put(skb, len), iv, len)) { | ||
402 | tun->dev->stats.rx_dropped++; | 460 | tun->dev->stats.rx_dropped++; |
403 | kfree_skb(skb); | 461 | kfree_skb(skb); |
404 | return -EFAULT; | 462 | return -EFAULT; |
@@ -748,6 +806,36 @@ static int tun_set_iff(struct net *net, struct file *file, struct ifreq *ifr) | |||
748 | return err; | 806 | return err; |
749 | } | 807 | } |
750 | 808 | ||
809 | static int tun_get_iff(struct net *net, struct file *file, struct ifreq *ifr) | ||
810 | { | ||
811 | struct tun_struct *tun = file->private_data; | ||
812 | |||
813 | if (!tun) | ||
814 | return -EBADFD; | ||
815 | |||
816 | DBG(KERN_INFO "%s: tun_get_iff\n", tun->dev->name); | ||
817 | |||
818 | strcpy(ifr->ifr_name, tun->dev->name); | ||
819 | |||
820 | ifr->ifr_flags = 0; | ||
821 | |||
822 | if (ifr->ifr_flags & TUN_TUN_DEV) | ||
823 | ifr->ifr_flags |= IFF_TUN; | ||
824 | else | ||
825 | ifr->ifr_flags |= IFF_TAP; | ||
826 | |||
827 | if (tun->flags & TUN_NO_PI) | ||
828 | ifr->ifr_flags |= IFF_NO_PI; | ||
829 | |||
830 | if (tun->flags & TUN_ONE_QUEUE) | ||
831 | ifr->ifr_flags |= IFF_ONE_QUEUE; | ||
832 | |||
833 | if (tun->flags & TUN_VNET_HDR) | ||
834 | ifr->ifr_flags |= IFF_VNET_HDR; | ||
835 | |||
836 | return 0; | ||
837 | } | ||
838 | |||
751 | /* This is like a cut-down ethtool ops, except done via tun fd so no | 839 | /* This is like a cut-down ethtool ops, except done via tun fd so no |
752 | * privs required. */ | 840 | * privs required. */ |
753 | static int set_offload(struct net_device *dev, unsigned long arg) | 841 | static int set_offload(struct net_device *dev, unsigned long arg) |
@@ -833,6 +921,15 @@ static int tun_chr_ioctl(struct inode *inode, struct file *file, | |||
833 | DBG(KERN_INFO "%s: tun_chr_ioctl cmd %d\n", tun->dev->name, cmd); | 921 | DBG(KERN_INFO "%s: tun_chr_ioctl cmd %d\n", tun->dev->name, cmd); |
834 | 922 | ||
835 | switch (cmd) { | 923 | switch (cmd) { |
924 | case TUNGETIFF: | ||
925 | ret = tun_get_iff(current->nsproxy->net_ns, file, &ifr); | ||
926 | if (ret) | ||
927 | return ret; | ||
928 | |||
929 | if (copy_to_user(argp, &ifr, sizeof(ifr))) | ||
930 | return -EFAULT; | ||
931 | break; | ||
932 | |||
836 | case TUNSETNOCSUM: | 933 | case TUNSETNOCSUM: |
837 | /* Disable/Enable checksum */ | 934 | /* Disable/Enable checksum */ |
838 | if (arg) | 935 | if (arg) |
diff --git a/drivers/net/typhoon.c b/drivers/net/typhoon.c index 8549f1159a30..734ce0977f02 100644 --- a/drivers/net/typhoon.c +++ b/drivers/net/typhoon.c | |||
@@ -128,7 +128,6 @@ static const int multicast_filter_limit = 32; | |||
128 | #include <asm/io.h> | 128 | #include <asm/io.h> |
129 | #include <asm/uaccess.h> | 129 | #include <asm/uaccess.h> |
130 | #include <linux/in6.h> | 130 | #include <linux/in6.h> |
131 | #include <linux/version.h> | ||
132 | #include <linux/dma-mapping.h> | 131 | #include <linux/dma-mapping.h> |
133 | 132 | ||
134 | #include "typhoon.h" | 133 | #include "typhoon.h" |
diff --git a/drivers/net/usb/Kconfig b/drivers/net/usb/Kconfig index 68e198bd538b..0973b6e37024 100644 --- a/drivers/net/usb/Kconfig +++ b/drivers/net/usb/Kconfig | |||
@@ -154,17 +154,6 @@ config USB_NET_AX8817X | |||
154 | This driver creates an interface named "ethX", where X depends on | 154 | This driver creates an interface named "ethX", where X depends on |
155 | what other networking devices you have in use. | 155 | what other networking devices you have in use. |
156 | 156 | ||
157 | config USB_HSO | ||
158 | tristate "Option USB High Speed Mobile Devices" | ||
159 | depends on USB && RFKILL | ||
160 | default n | ||
161 | help | ||
162 | Choose this option if you have an Option HSDPA/HSUPA card. | ||
163 | These cards support downlink speeds of 7.2Mbps or greater. | ||
164 | |||
165 | To compile this driver as a module, choose M here: the | ||
166 | module will be called hso. | ||
167 | |||
168 | config USB_NET_CDCETHER | 157 | config USB_NET_CDCETHER |
169 | tristate "CDC Ethernet support (smart devices such as cable modems)" | 158 | tristate "CDC Ethernet support (smart devices such as cable modems)" |
170 | depends on USB_USBNET | 159 | depends on USB_USBNET |
@@ -337,5 +326,15 @@ config USB_NET_ZAURUS | |||
337 | really need this non-conformant variant of CDC Ethernet (or in | 326 | really need this non-conformant variant of CDC Ethernet (or in |
338 | some cases CDC MDLM) protocol, not "g_ether". | 327 | some cases CDC MDLM) protocol, not "g_ether". |
339 | 328 | ||
329 | config USB_HSO | ||
330 | tristate "Option USB High Speed Mobile Devices" | ||
331 | depends on USB && RFKILL | ||
332 | default n | ||
333 | help | ||
334 | Choose this option if you have an Option HSDPA/HSUPA card. | ||
335 | These cards support downlink speeds of 7.2Mbps or greater. | ||
336 | |||
337 | To compile this driver as a module, choose M here: the | ||
338 | module will be called hso. | ||
340 | 339 | ||
341 | endmenu | 340 | endmenu |
diff --git a/drivers/net/usb/hso.c b/drivers/net/usb/hso.c index 031d07b105af..1b7cac77159e 100644 --- a/drivers/net/usb/hso.c +++ b/drivers/net/usb/hso.c | |||
@@ -102,8 +102,12 @@ | |||
102 | 102 | ||
103 | #define MAX_RX_URBS 2 | 103 | #define MAX_RX_URBS 2 |
104 | 104 | ||
105 | #define get_serial_by_tty(x) \ | 105 | static inline struct hso_serial *get_serial_by_tty(struct tty_struct *tty) |
106 | (x ? (struct hso_serial *)x->driver_data : NULL) | 106 | { |
107 | if (tty) | ||
108 | return tty->driver_data; | ||
109 | return NULL; | ||
110 | } | ||
107 | 111 | ||
108 | /*****************************************************************************/ | 112 | /*****************************************************************************/ |
109 | /* Debugging functions */ | 113 | /* Debugging functions */ |
@@ -294,24 +298,25 @@ static int hso_get_activity(struct hso_device *hso_dev); | |||
294 | 298 | ||
295 | /* #define DEBUG */ | 299 | /* #define DEBUG */ |
296 | 300 | ||
297 | #define dev2net(x) (x->port_data.dev_net) | 301 | static inline struct hso_net *dev2net(struct hso_device *hso_dev) |
298 | #define dev2ser(x) (x->port_data.dev_serial) | 302 | { |
303 | return hso_dev->port_data.dev_net; | ||
304 | } | ||
305 | |||
306 | static inline struct hso_serial *dev2ser(struct hso_device *hso_dev) | ||
307 | { | ||
308 | return hso_dev->port_data.dev_serial; | ||
309 | } | ||
299 | 310 | ||
300 | /* Debugging functions */ | 311 | /* Debugging functions */ |
301 | #ifdef DEBUG | 312 | #ifdef DEBUG |
302 | static void dbg_dump(int line_count, const char *func_name, unsigned char *buf, | 313 | static void dbg_dump(int line_count, const char *func_name, unsigned char *buf, |
303 | unsigned int len) | 314 | unsigned int len) |
304 | { | 315 | { |
305 | u8 i = 0; | 316 | static char name[255]; |
306 | 317 | ||
307 | printk(KERN_DEBUG "[%d:%s]: len %d", line_count, func_name, len); | 318 | sprintf(name, "hso[%d:%s]", line_count, func_name); |
308 | 319 | print_hex_dump_bytes(name, DUMP_PREFIX_NONE, buf, len); | |
309 | for (i = 0; i < len; i++) { | ||
310 | if (!(i % 16)) | ||
311 | printk("\n 0x%03x: ", i); | ||
312 | printk("%02x ", (unsigned char)buf[i]); | ||
313 | } | ||
314 | printk("\n"); | ||
315 | } | 320 | } |
316 | 321 | ||
317 | #define DUMP(buf_, len_) \ | 322 | #define DUMP(buf_, len_) \ |
@@ -528,13 +533,12 @@ static struct hso_serial *get_serial_by_shared_int_and_type( | |||
528 | 533 | ||
529 | static struct hso_serial *get_serial_by_index(unsigned index) | 534 | static struct hso_serial *get_serial_by_index(unsigned index) |
530 | { | 535 | { |
531 | struct hso_serial *serial; | 536 | struct hso_serial *serial = NULL; |
532 | unsigned long flags; | 537 | unsigned long flags; |
533 | 538 | ||
534 | if (!serial_table[index]) | ||
535 | return NULL; | ||
536 | spin_lock_irqsave(&serial_table_lock, flags); | 539 | spin_lock_irqsave(&serial_table_lock, flags); |
537 | serial = dev2ser(serial_table[index]); | 540 | if (serial_table[index]) |
541 | serial = dev2ser(serial_table[index]); | ||
538 | spin_unlock_irqrestore(&serial_table_lock, flags); | 542 | spin_unlock_irqrestore(&serial_table_lock, flags); |
539 | 543 | ||
540 | return serial; | 544 | return serial; |
@@ -561,6 +565,7 @@ static int get_free_serial_index(void) | |||
561 | static void set_serial_by_index(unsigned index, struct hso_serial *serial) | 565 | static void set_serial_by_index(unsigned index, struct hso_serial *serial) |
562 | { | 566 | { |
563 | unsigned long flags; | 567 | unsigned long flags; |
568 | |||
564 | spin_lock_irqsave(&serial_table_lock, flags); | 569 | spin_lock_irqsave(&serial_table_lock, flags); |
565 | if (serial) | 570 | if (serial) |
566 | serial_table[index] = serial->parent; | 571 | serial_table[index] = serial->parent; |
@@ -569,7 +574,7 @@ static void set_serial_by_index(unsigned index, struct hso_serial *serial) | |||
569 | spin_unlock_irqrestore(&serial_table_lock, flags); | 574 | spin_unlock_irqrestore(&serial_table_lock, flags); |
570 | } | 575 | } |
571 | 576 | ||
572 | /* log a meaningfull explanation of an USB status */ | 577 | /* log a meaningful explanation of an USB status */ |
573 | static void log_usb_status(int status, const char *function) | 578 | static void log_usb_status(int status, const char *function) |
574 | { | 579 | { |
575 | char *explanation; | 580 | char *explanation; |
@@ -1103,8 +1108,8 @@ static void hso_serial_close(struct tty_struct *tty, struct file *filp) | |||
1103 | /* reset the rts and dtr */ | 1108 | /* reset the rts and dtr */ |
1104 | /* do the actual close */ | 1109 | /* do the actual close */ |
1105 | serial->open_count--; | 1110 | serial->open_count--; |
1111 | kref_put(&serial->parent->ref, hso_serial_ref_free); | ||
1106 | if (serial->open_count <= 0) { | 1112 | if (serial->open_count <= 0) { |
1107 | kref_put(&serial->parent->ref, hso_serial_ref_free); | ||
1108 | serial->open_count = 0; | 1113 | serial->open_count = 0; |
1109 | if (serial->tty) { | 1114 | if (serial->tty) { |
1110 | serial->tty->driver_data = NULL; | 1115 | serial->tty->driver_data = NULL; |
@@ -1467,7 +1472,8 @@ static void hso_std_serial_write_bulk_callback(struct urb *urb) | |||
1467 | return; | 1472 | return; |
1468 | } | 1473 | } |
1469 | hso_put_activity(serial->parent); | 1474 | hso_put_activity(serial->parent); |
1470 | tty_wakeup(serial->tty); | 1475 | if (serial->tty) |
1476 | tty_wakeup(serial->tty); | ||
1471 | hso_kick_transmit(serial); | 1477 | hso_kick_transmit(serial); |
1472 | 1478 | ||
1473 | D1(" "); | 1479 | D1(" "); |
@@ -1538,7 +1544,8 @@ static void ctrl_callback(struct urb *urb) | |||
1538 | clear_bit(HSO_SERIAL_FLAG_RX_SENT, &serial->flags); | 1544 | clear_bit(HSO_SERIAL_FLAG_RX_SENT, &serial->flags); |
1539 | } else { | 1545 | } else { |
1540 | hso_put_activity(serial->parent); | 1546 | hso_put_activity(serial->parent); |
1541 | tty_wakeup(serial->tty); | 1547 | if (serial->tty) |
1548 | tty_wakeup(serial->tty); | ||
1542 | /* response to a write command */ | 1549 | /* response to a write command */ |
1543 | hso_kick_transmit(serial); | 1550 | hso_kick_transmit(serial); |
1544 | } | 1551 | } |
@@ -2652,7 +2659,7 @@ static void hso_free_interface(struct usb_interface *interface) | |||
2652 | hso_stop_net_device(network_table[i]); | 2659 | hso_stop_net_device(network_table[i]); |
2653 | cancel_work_sync(&network_table[i]->async_put_intf); | 2660 | cancel_work_sync(&network_table[i]->async_put_intf); |
2654 | cancel_work_sync(&network_table[i]->async_get_intf); | 2661 | cancel_work_sync(&network_table[i]->async_get_intf); |
2655 | if(rfk) | 2662 | if (rfk) |
2656 | rfkill_unregister(rfk); | 2663 | rfkill_unregister(rfk); |
2657 | hso_free_net_device(network_table[i]); | 2664 | hso_free_net_device(network_table[i]); |
2658 | } | 2665 | } |
@@ -2723,7 +2730,7 @@ static int hso_mux_submit_intr_urb(struct hso_shared_int *shared_int, | |||
2723 | } | 2730 | } |
2724 | 2731 | ||
2725 | /* operations setup of the serial interface */ | 2732 | /* operations setup of the serial interface */ |
2726 | static struct tty_operations hso_serial_ops = { | 2733 | static const struct tty_operations hso_serial_ops = { |
2727 | .open = hso_serial_open, | 2734 | .open = hso_serial_open, |
2728 | .close = hso_serial_close, | 2735 | .close = hso_serial_close, |
2729 | .write = hso_serial_write, | 2736 | .write = hso_serial_write, |
diff --git a/drivers/net/wireless/ath5k/base.c b/drivers/net/wireless/ath5k/base.c index 2028866f5995..b20a45aa8680 100644 --- a/drivers/net/wireless/ath5k/base.c +++ b/drivers/net/wireless/ath5k/base.c | |||
@@ -40,7 +40,6 @@ | |||
40 | * | 40 | * |
41 | */ | 41 | */ |
42 | 42 | ||
43 | #include <linux/version.h> | ||
44 | #include <linux/module.h> | 43 | #include <linux/module.h> |
45 | #include <linux/delay.h> | 44 | #include <linux/delay.h> |
46 | #include <linux/hardirq.h> | 45 | #include <linux/hardirq.h> |
@@ -587,7 +586,6 @@ ath5k_pci_suspend(struct pci_dev *pdev, pm_message_t state) | |||
587 | ath5k_stop_hw(sc); | 586 | ath5k_stop_hw(sc); |
588 | 587 | ||
589 | free_irq(pdev->irq, sc); | 588 | free_irq(pdev->irq, sc); |
590 | pci_disable_msi(pdev); | ||
591 | pci_save_state(pdev); | 589 | pci_save_state(pdev); |
592 | pci_disable_device(pdev); | 590 | pci_disable_device(pdev); |
593 | pci_set_power_state(pdev, PCI_D3hot); | 591 | pci_set_power_state(pdev, PCI_D3hot); |
@@ -616,12 +614,10 @@ ath5k_pci_resume(struct pci_dev *pdev) | |||
616 | */ | 614 | */ |
617 | pci_write_config_byte(pdev, 0x41, 0); | 615 | pci_write_config_byte(pdev, 0x41, 0); |
618 | 616 | ||
619 | pci_enable_msi(pdev); | ||
620 | |||
621 | err = request_irq(pdev->irq, ath5k_intr, IRQF_SHARED, "ath", sc); | 617 | err = request_irq(pdev->irq, ath5k_intr, IRQF_SHARED, "ath", sc); |
622 | if (err) { | 618 | if (err) { |
623 | ATH5K_ERR(sc, "request_irq failed\n"); | 619 | ATH5K_ERR(sc, "request_irq failed\n"); |
624 | goto err_msi; | 620 | goto err_no_irq; |
625 | } | 621 | } |
626 | 622 | ||
627 | err = ath5k_init(sc); | 623 | err = ath5k_init(sc); |
@@ -642,8 +638,7 @@ ath5k_pci_resume(struct pci_dev *pdev) | |||
642 | return 0; | 638 | return 0; |
643 | err_irq: | 639 | err_irq: |
644 | free_irq(pdev->irq, sc); | 640 | free_irq(pdev->irq, sc); |
645 | err_msi: | 641 | err_no_irq: |
646 | pci_disable_msi(pdev); | ||
647 | pci_disable_device(pdev); | 642 | pci_disable_device(pdev); |
648 | return err; | 643 | return err; |
649 | } | 644 | } |
diff --git a/drivers/net/wireless/ath9k/hw.c b/drivers/net/wireless/ath9k/hw.c index bde162f128ab..a17eb130f574 100644 --- a/drivers/net/wireless/ath9k/hw.c +++ b/drivers/net/wireless/ath9k/hw.c | |||
@@ -5017,7 +5017,11 @@ static void ath9k_hw_spur_mitigate(struct ath_hal *ah, | |||
5017 | 5017 | ||
5018 | for (i = 0; i < 123; i++) { | 5018 | for (i = 0; i < 123; i++) { |
5019 | if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) { | 5019 | if ((cur_vit_mask > lower) && (cur_vit_mask < upper)) { |
5020 | if ((abs(cur_vit_mask - bin)) < 75) | 5020 | |
5021 | /* workaround for gcc bug #37014 */ | ||
5022 | volatile int tmp = abs(cur_vit_mask - bin); | ||
5023 | |||
5024 | if (tmp < 75) | ||
5021 | mask_amt = 1; | 5025 | mask_amt = 1; |
5022 | else | 5026 | else |
5023 | mask_amt = 0; | 5027 | mask_amt = 0; |
diff --git a/drivers/net/wireless/b43/main.c b/drivers/net/wireless/b43/main.c index 3bf3a869361f..7205a936ec74 100644 --- a/drivers/net/wireless/b43/main.c +++ b/drivers/net/wireless/b43/main.c | |||
@@ -33,7 +33,6 @@ | |||
33 | #include <linux/moduleparam.h> | 33 | #include <linux/moduleparam.h> |
34 | #include <linux/if_arp.h> | 34 | #include <linux/if_arp.h> |
35 | #include <linux/etherdevice.h> | 35 | #include <linux/etherdevice.h> |
36 | #include <linux/version.h> | ||
37 | #include <linux/firmware.h> | 36 | #include <linux/firmware.h> |
38 | #include <linux/wireless.h> | 37 | #include <linux/wireless.h> |
39 | #include <linux/workqueue.h> | 38 | #include <linux/workqueue.h> |
@@ -4615,7 +4614,9 @@ static void b43_sprom_fixup(struct ssb_bus *bus) | |||
4615 | if (bus->bustype == SSB_BUSTYPE_PCI) { | 4614 | if (bus->bustype == SSB_BUSTYPE_PCI) { |
4616 | pdev = bus->host_pci; | 4615 | pdev = bus->host_pci; |
4617 | if (IS_PDEV(pdev, BROADCOM, 0x4318, ASUSTEK, 0x100F) || | 4616 | if (IS_PDEV(pdev, BROADCOM, 0x4318, ASUSTEK, 0x100F) || |
4617 | IS_PDEV(pdev, BROADCOM, 0x4320, DELL, 0x0003) || | ||
4618 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0015) || | 4618 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0015) || |
4619 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0014) || | ||
4619 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0013)) | 4620 | IS_PDEV(pdev, BROADCOM, 0x4320, LINKSYS, 0x0013)) |
4620 | bus->sprom.boardflags_lo &= ~B43_BFL_BTCOEXIST; | 4621 | bus->sprom.boardflags_lo &= ~B43_BFL_BTCOEXIST; |
4621 | } | 4622 | } |
diff --git a/drivers/net/wireless/ipw2100.c b/drivers/net/wireless/ipw2100.c index c6f886ec08a3..19a401c4a0dc 100644 --- a/drivers/net/wireless/ipw2100.c +++ b/drivers/net/wireless/ipw2100.c | |||
@@ -157,7 +157,6 @@ that only one external action is invoked at a time. | |||
157 | #include <linux/stringify.h> | 157 | #include <linux/stringify.h> |
158 | #include <linux/tcp.h> | 158 | #include <linux/tcp.h> |
159 | #include <linux/types.h> | 159 | #include <linux/types.h> |
160 | #include <linux/version.h> | ||
161 | #include <linux/time.h> | 160 | #include <linux/time.h> |
162 | #include <linux/firmware.h> | 161 | #include <linux/firmware.h> |
163 | #include <linux/acpi.h> | 162 | #include <linux/acpi.h> |
diff --git a/drivers/net/wireless/ipw2200.c b/drivers/net/wireless/ipw2200.c index 36e8d2f6e7b4..dcce3542d5a7 100644 --- a/drivers/net/wireless/ipw2200.c +++ b/drivers/net/wireless/ipw2200.c | |||
@@ -31,7 +31,6 @@ | |||
31 | ******************************************************************************/ | 31 | ******************************************************************************/ |
32 | 32 | ||
33 | #include "ipw2200.h" | 33 | #include "ipw2200.h" |
34 | #include <linux/version.h> | ||
35 | 34 | ||
36 | 35 | ||
37 | #ifndef KBUILD_EXTMOD | 36 | #ifndef KBUILD_EXTMOD |
diff --git a/drivers/net/wireless/iwlwifi/iwl-3945.c b/drivers/net/wireless/iwlwifi/iwl-3945.c index b3931f6135a4..3f51f3635344 100644 --- a/drivers/net/wireless/iwlwifi/iwl-3945.c +++ b/drivers/net/wireless/iwlwifi/iwl-3945.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/version.h> | ||
30 | #include <linux/init.h> | 29 | #include <linux/init.h> |
31 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
32 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-4965.c b/drivers/net/wireless/iwlwifi/iwl-4965.c index 22bb26985c2e..e2581229d8b2 100644 --- a/drivers/net/wireless/iwlwifi/iwl-4965.c +++ b/drivers/net/wireless/iwlwifi/iwl-4965.c | |||
@@ -26,7 +26,6 @@ | |||
26 | 26 | ||
27 | #include <linux/kernel.h> | 27 | #include <linux/kernel.h> |
28 | #include <linux/module.h> | 28 | #include <linux/module.h> |
29 | #include <linux/version.h> | ||
30 | #include <linux/init.h> | 29 | #include <linux/init.h> |
31 | #include <linux/pci.h> | 30 | #include <linux/pci.h> |
32 | #include <linux/dma-mapping.h> | 31 | #include <linux/dma-mapping.h> |
@@ -967,7 +966,7 @@ static int iwl4965_interpolate_chan(struct iwl_priv *priv, u32 channel, | |||
967 | 966 | ||
968 | s = iwl4965_get_sub_band(priv, channel); | 967 | s = iwl4965_get_sub_band(priv, channel); |
969 | if (s >= EEPROM_TX_POWER_BANDS) { | 968 | if (s >= EEPROM_TX_POWER_BANDS) { |
970 | IWL_ERROR("Tx Power can not find channel %d ", channel); | 969 | IWL_ERROR("Tx Power can not find channel %d\n", channel); |
971 | return -1; | 970 | return -1; |
972 | } | 971 | } |
973 | 972 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl-5000.c b/drivers/net/wireless/iwlwifi/iwl-5000.c index f3d139b663e6..cbc01a00eaf4 100644 --- a/drivers/net/wireless/iwlwifi/iwl-5000.c +++ b/drivers/net/wireless/iwlwifi/iwl-5000.c | |||
@@ -25,7 +25,6 @@ | |||
25 | 25 | ||
26 | #include <linux/kernel.h> | 26 | #include <linux/kernel.h> |
27 | #include <linux/module.h> | 27 | #include <linux/module.h> |
28 | #include <linux/version.h> | ||
29 | #include <linux/init.h> | 28 | #include <linux/init.h> |
30 | #include <linux/pci.h> | 29 | #include <linux/pci.h> |
31 | #include <linux/dma-mapping.h> | 30 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-agn.c b/drivers/net/wireless/iwlwifi/iwl-agn.c index ed09e48b1b61..061ffba9c884 100644 --- a/drivers/net/wireless/iwlwifi/iwl-agn.c +++ b/drivers/net/wireless/iwlwifi/iwl-agn.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/version.h> | ||
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
35 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-core.c b/drivers/net/wireless/iwlwifi/iwl-core.c index 9bd61809129f..c72f72579bea 100644 --- a/drivers/net/wireless/iwlwifi/iwl-core.c +++ b/drivers/net/wireless/iwlwifi/iwl-core.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/version.h> | ||
32 | #include <net/mac80211.h> | 31 | #include <net/mac80211.h> |
33 | 32 | ||
34 | struct iwl_priv; /* FIXME: remove */ | 33 | struct iwl_priv; /* FIXME: remove */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-eeprom.c b/drivers/net/wireless/iwlwifi/iwl-eeprom.c index bce53830b301..37155755efc5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-eeprom.c +++ b/drivers/net/wireless/iwlwifi/iwl-eeprom.c | |||
@@ -63,7 +63,6 @@ | |||
63 | 63 | ||
64 | #include <linux/kernel.h> | 64 | #include <linux/kernel.h> |
65 | #include <linux/module.h> | 65 | #include <linux/module.h> |
66 | #include <linux/version.h> | ||
67 | #include <linux/init.h> | 66 | #include <linux/init.h> |
68 | 67 | ||
69 | #include <net/mac80211.h> | 68 | #include <net/mac80211.h> |
@@ -146,7 +145,7 @@ int iwlcore_eeprom_verify_signature(struct iwl_priv *priv) | |||
146 | { | 145 | { |
147 | u32 gp = iwl_read32(priv, CSR_EEPROM_GP); | 146 | u32 gp = iwl_read32(priv, CSR_EEPROM_GP); |
148 | if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) { | 147 | if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) { |
149 | IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp); | 148 | IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp); |
150 | return -ENOENT; | 149 | return -ENOENT; |
151 | } | 150 | } |
152 | return 0; | 151 | return 0; |
@@ -227,7 +226,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
227 | 226 | ||
228 | ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv); | 227 | ret = priv->cfg->ops->lib->eeprom_ops.verify_signature(priv); |
229 | if (ret < 0) { | 228 | if (ret < 0) { |
230 | IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp); | 229 | IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp); |
231 | ret = -ENOENT; | 230 | ret = -ENOENT; |
232 | goto err; | 231 | goto err; |
233 | } | 232 | } |
@@ -254,7 +253,7 @@ int iwl_eeprom_init(struct iwl_priv *priv) | |||
254 | } | 253 | } |
255 | 254 | ||
256 | if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) { | 255 | if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) { |
257 | IWL_ERROR("Time out reading EEPROM[%d]", addr); | 256 | IWL_ERROR("Time out reading EEPROM[%d]\n", addr); |
258 | ret = -ETIMEDOUT; | 257 | ret = -ETIMEDOUT; |
259 | goto done; | 258 | goto done; |
260 | } | 259 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-hcmd.c b/drivers/net/wireless/iwlwifi/iwl-hcmd.c index 6512834bb916..2eb03eea1908 100644 --- a/drivers/net/wireless/iwlwifi/iwl-hcmd.c +++ b/drivers/net/wireless/iwlwifi/iwl-hcmd.c | |||
@@ -28,7 +28,6 @@ | |||
28 | 28 | ||
29 | #include <linux/kernel.h> | 29 | #include <linux/kernel.h> |
30 | #include <linux/module.h> | 30 | #include <linux/module.h> |
31 | #include <linux/version.h> | ||
32 | #include <net/mac80211.h> | 31 | #include <net/mac80211.h> |
33 | 32 | ||
34 | #include "iwl-dev.h" /* FIXME: remove */ | 33 | #include "iwl-dev.h" /* FIXME: remove */ |
diff --git a/drivers/net/wireless/iwlwifi/iwl-power.c b/drivers/net/wireless/iwlwifi/iwl-power.c index 028e3053c0ca..a099c9e30e55 100644 --- a/drivers/net/wireless/iwlwifi/iwl-power.c +++ b/drivers/net/wireless/iwlwifi/iwl-power.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/version.h> | ||
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | 33 | ||
35 | #include <net/mac80211.h> | 34 | #include <net/mac80211.h> |
diff --git a/drivers/net/wireless/iwlwifi/iwl-sta.c b/drivers/net/wireless/iwlwifi/iwl-sta.c index 60a6e0106036..6283a3a707f5 100644 --- a/drivers/net/wireless/iwlwifi/iwl-sta.c +++ b/drivers/net/wireless/iwlwifi/iwl-sta.c | |||
@@ -207,7 +207,7 @@ static void iwl_set_ht_add_station(struct iwl_priv *priv, u8 index, | |||
207 | case WLAN_HT_CAP_MIMO_PS_DISABLED: | 207 | case WLAN_HT_CAP_MIMO_PS_DISABLED: |
208 | break; | 208 | break; |
209 | default: | 209 | default: |
210 | IWL_WARNING("Invalid MIMO PS mode %d", mimo_ps_mode); | 210 | IWL_WARNING("Invalid MIMO PS mode %d\n", mimo_ps_mode); |
211 | break; | 211 | break; |
212 | } | 212 | } |
213 | 213 | ||
@@ -969,7 +969,7 @@ int iwl_get_sta_id(struct iwl_priv *priv, struct ieee80211_hdr *hdr) | |||
969 | return priv->hw_params.bcast_sta_id; | 969 | return priv->hw_params.bcast_sta_id; |
970 | 970 | ||
971 | default: | 971 | default: |
972 | IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode); | 972 | IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode); |
973 | return priv->hw_params.bcast_sta_id; | 973 | return priv->hw_params.bcast_sta_id; |
974 | } | 974 | } |
975 | } | 975 | } |
diff --git a/drivers/net/wireless/iwlwifi/iwl-tx.c b/drivers/net/wireless/iwlwifi/iwl-tx.c index 4108c7c8f00f..d82823b5c8ab 100644 --- a/drivers/net/wireless/iwlwifi/iwl-tx.c +++ b/drivers/net/wireless/iwlwifi/iwl-tx.c | |||
@@ -493,7 +493,7 @@ int iwl_txq_ctx_reset(struct iwl_priv *priv) | |||
493 | /* Alloc keep-warm buffer */ | 493 | /* Alloc keep-warm buffer */ |
494 | ret = iwl_kw_alloc(priv); | 494 | ret = iwl_kw_alloc(priv); |
495 | if (ret) { | 495 | if (ret) { |
496 | IWL_ERROR("Keep Warm allocation failed"); | 496 | IWL_ERROR("Keep Warm allocation failed\n"); |
497 | goto error_kw; | 497 | goto error_kw; |
498 | } | 498 | } |
499 | spin_lock_irqsave(&priv->lock, flags); | 499 | spin_lock_irqsave(&priv->lock, flags); |
@@ -1463,7 +1463,7 @@ void iwl_rx_reply_compressed_ba(struct iwl_priv *priv, | |||
1463 | u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn); | 1463 | u16 ba_resp_scd_ssn = le16_to_cpu(ba_resp->scd_ssn); |
1464 | 1464 | ||
1465 | if (scd_flow >= priv->hw_params.max_txq_num) { | 1465 | if (scd_flow >= priv->hw_params.max_txq_num) { |
1466 | IWL_ERROR("BUG_ON scd_flow is bigger than number of queues"); | 1466 | IWL_ERROR("BUG_ON scd_flow is bigger than number of queues\n"); |
1467 | return; | 1467 | return; |
1468 | } | 1468 | } |
1469 | 1469 | ||
diff --git a/drivers/net/wireless/iwlwifi/iwl3945-base.c b/drivers/net/wireless/iwlwifi/iwl3945-base.c index 444847ab1b5a..b775d5bab668 100644 --- a/drivers/net/wireless/iwlwifi/iwl3945-base.c +++ b/drivers/net/wireless/iwlwifi/iwl3945-base.c | |||
@@ -29,7 +29,6 @@ | |||
29 | 29 | ||
30 | #include <linux/kernel.h> | 30 | #include <linux/kernel.h> |
31 | #include <linux/module.h> | 31 | #include <linux/module.h> |
32 | #include <linux/version.h> | ||
33 | #include <linux/init.h> | 32 | #include <linux/init.h> |
34 | #include <linux/pci.h> | 33 | #include <linux/pci.h> |
35 | #include <linux/dma-mapping.h> | 34 | #include <linux/dma-mapping.h> |
@@ -1558,7 +1557,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv) | |||
1558 | BUILD_BUG_ON(sizeof(priv->eeprom) != IWL_EEPROM_IMAGE_SIZE); | 1557 | BUILD_BUG_ON(sizeof(priv->eeprom) != IWL_EEPROM_IMAGE_SIZE); |
1559 | 1558 | ||
1560 | if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) { | 1559 | if ((gp & CSR_EEPROM_GP_VALID_MSK) == CSR_EEPROM_GP_BAD_SIGNATURE) { |
1561 | IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x", gp); | 1560 | IWL_ERROR("EEPROM not found, EEPROM_GP=0x%08x\n", gp); |
1562 | return -ENOENT; | 1561 | return -ENOENT; |
1563 | } | 1562 | } |
1564 | 1563 | ||
@@ -1583,7 +1582,7 @@ int iwl3945_eeprom_init(struct iwl3945_priv *priv) | |||
1583 | } | 1582 | } |
1584 | 1583 | ||
1585 | if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) { | 1584 | if (!(r & CSR_EEPROM_REG_READ_VALID_MSK)) { |
1586 | IWL_ERROR("Time out reading EEPROM[%d]", addr); | 1585 | IWL_ERROR("Time out reading EEPROM[%d]\n", addr); |
1587 | return -ETIMEDOUT; | 1586 | return -ETIMEDOUT; |
1588 | } | 1587 | } |
1589 | e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16)); | 1588 | e[addr / 2] = le16_to_cpu((__force __le16)(r >> 16)); |
@@ -2507,7 +2506,7 @@ static int iwl3945_get_sta_id(struct iwl3945_priv *priv, struct ieee80211_hdr *h | |||
2507 | return priv->hw_setting.bcast_sta_id; | 2506 | return priv->hw_setting.bcast_sta_id; |
2508 | 2507 | ||
2509 | default: | 2508 | default: |
2510 | IWL_WARNING("Unknown mode of operation: %d", priv->iw_mode); | 2509 | IWL_WARNING("Unknown mode of operation: %d\n", priv->iw_mode); |
2511 | return priv->hw_setting.bcast_sta_id; | 2510 | return priv->hw_setting.bcast_sta_id; |
2512 | } | 2511 | } |
2513 | } | 2512 | } |
diff --git a/drivers/net/wireless/p54/p54common.c b/drivers/net/wireless/p54/p54common.c index 83cd85e1f847..29be3dc8ee09 100644 --- a/drivers/net/wireless/p54/p54common.c +++ b/drivers/net/wireless/p54/p54common.c | |||
@@ -413,12 +413,12 @@ static void p54_rx_frame_sent(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
413 | last_addr = range->end_addr; | 413 | last_addr = range->end_addr; |
414 | __skb_unlink(entry, &priv->tx_queue); | 414 | __skb_unlink(entry, &priv->tx_queue); |
415 | memset(&info->status, 0, sizeof(info->status)); | 415 | memset(&info->status, 0, sizeof(info->status)); |
416 | priv->tx_stats[skb_get_queue_mapping(skb)].len--; | ||
417 | entry_hdr = (struct p54_control_hdr *) entry->data; | 416 | entry_hdr = (struct p54_control_hdr *) entry->data; |
418 | entry_data = (struct p54_tx_control_allocdata *) entry_hdr->data; | 417 | entry_data = (struct p54_tx_control_allocdata *) entry_hdr->data; |
419 | if ((entry_hdr->magic1 & cpu_to_le16(0x4000)) != 0) | 418 | if ((entry_hdr->magic1 & cpu_to_le16(0x4000)) != 0) |
420 | pad = entry_data->align[0]; | 419 | pad = entry_data->align[0]; |
421 | 420 | ||
421 | priv->tx_stats[entry_data->hw_queue - 4].len--; | ||
422 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { | 422 | if (!(info->flags & IEEE80211_TX_CTL_NO_ACK)) { |
423 | if (!(payload->status & 0x01)) | 423 | if (!(payload->status & 0x01)) |
424 | info->flags |= IEEE80211_TX_STAT_ACK; | 424 | info->flags |= IEEE80211_TX_STAT_ACK; |
@@ -557,6 +557,7 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
557 | struct p54_tx_control_allocdata *txhdr; | 557 | struct p54_tx_control_allocdata *txhdr; |
558 | size_t padding, len; | 558 | size_t padding, len; |
559 | u8 rate; | 559 | u8 rate; |
560 | u8 cts_rate = 0x20; | ||
560 | 561 | ||
561 | current_queue = &priv->tx_stats[skb_get_queue_mapping(skb)]; | 562 | current_queue = &priv->tx_stats[skb_get_queue_mapping(skb)]; |
562 | if (unlikely(current_queue->len > current_queue->limit)) | 563 | if (unlikely(current_queue->len > current_queue->limit)) |
@@ -581,28 +582,28 @@ static int p54_tx(struct ieee80211_hw *dev, struct sk_buff *skb) | |||
581 | hdr->type = (info->flags & IEEE80211_TX_CTL_NO_ACK) ? 0 : cpu_to_le16(1); | 582 | hdr->type = (info->flags & IEEE80211_TX_CTL_NO_ACK) ? 0 : cpu_to_le16(1); |
582 | hdr->retry1 = hdr->retry2 = info->control.retry_limit; | 583 | hdr->retry1 = hdr->retry2 = info->control.retry_limit; |
583 | 584 | ||
584 | memset(txhdr->wep_key, 0x0, 16); | ||
585 | txhdr->padding = 0; | ||
586 | txhdr->padding2 = 0; | ||
587 | |||
588 | /* TODO: add support for alternate retry TX rates */ | 585 | /* TODO: add support for alternate retry TX rates */ |
589 | rate = ieee80211_get_tx_rate(dev, info)->hw_value; | 586 | rate = ieee80211_get_tx_rate(dev, info)->hw_value; |
590 | if (info->flags & IEEE80211_TX_CTL_SHORT_PREAMBLE) | 587 | if (info->flags & IEEE80211_TX_CTL_SHORT_PREAMBLE) { |
591 | rate |= 0x10; | 588 | rate |= 0x10; |
592 | if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) | 589 | cts_rate |= 0x10; |
590 | } | ||
591 | if (info->flags & IEEE80211_TX_CTL_USE_RTS_CTS) { | ||
593 | rate |= 0x40; | 592 | rate |= 0x40; |
594 | else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) | 593 | cts_rate |= ieee80211_get_rts_cts_rate(dev, info)->hw_value; |
594 | } else if (info->flags & IEEE80211_TX_CTL_USE_CTS_PROTECT) { | ||
595 | rate |= 0x20; | 595 | rate |= 0x20; |
596 | cts_rate |= ieee80211_get_rts_cts_rate(dev, info)->hw_value; | ||
597 | } | ||
596 | memset(txhdr->rateset, rate, 8); | 598 | memset(txhdr->rateset, rate, 8); |
597 | txhdr->wep_key_present = 0; | 599 | txhdr->key_type = 0; |
598 | txhdr->wep_key_len = 0; | 600 | txhdr->key_len = 0; |
599 | txhdr->frame_type = cpu_to_le32(skb_get_queue_mapping(skb) + 4); | 601 | txhdr->hw_queue = skb_get_queue_mapping(skb) + 4; |
600 | txhdr->magic4 = 0; | 602 | txhdr->tx_antenna = (info->antenna_sel_tx == 0) ? |
601 | txhdr->antenna = (info->antenna_sel_tx == 0) ? | ||
602 | 2 : info->antenna_sel_tx - 1; | 603 | 2 : info->antenna_sel_tx - 1; |
603 | txhdr->output_power = 0x7f; // HW Maximum | 604 | txhdr->output_power = 0x7f; // HW Maximum |
604 | txhdr->magic5 = (info->flags & IEEE80211_TX_CTL_NO_ACK) ? | 605 | txhdr->cts_rate = (info->flags & IEEE80211_TX_CTL_NO_ACK) ? |
605 | 0 : ((rate > 0x3) ? cpu_to_le32(0x33) : cpu_to_le32(0x23)); | 606 | 0 : cts_rate; |
606 | if (padding) | 607 | if (padding) |
607 | txhdr->align[0] = padding; | 608 | txhdr->align[0] = padding; |
608 | 609 | ||
@@ -836,10 +837,21 @@ static int p54_start(struct ieee80211_hw *dev) | |||
836 | struct p54_common *priv = dev->priv; | 837 | struct p54_common *priv = dev->priv; |
837 | int err; | 838 | int err; |
838 | 839 | ||
840 | if (!priv->cached_vdcf) { | ||
841 | priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf)+ | ||
842 | priv->tx_hdr_len + sizeof(struct p54_control_hdr), | ||
843 | GFP_KERNEL); | ||
844 | |||
845 | if (!priv->cached_vdcf) | ||
846 | return -ENOMEM; | ||
847 | } | ||
848 | |||
839 | err = priv->open(dev); | 849 | err = priv->open(dev); |
840 | if (!err) | 850 | if (!err) |
841 | priv->mode = IEEE80211_IF_TYPE_MNTR; | 851 | priv->mode = IEEE80211_IF_TYPE_MNTR; |
842 | 852 | ||
853 | p54_init_vdcf(dev); | ||
854 | |||
843 | return err; | 855 | return err; |
844 | } | 856 | } |
845 | 857 | ||
@@ -1019,15 +1031,6 @@ struct ieee80211_hw *p54_init_common(size_t priv_data_len) | |||
1019 | dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 + | 1031 | dev->extra_tx_headroom = sizeof(struct p54_control_hdr) + 4 + |
1020 | sizeof(struct p54_tx_control_allocdata); | 1032 | sizeof(struct p54_tx_control_allocdata); |
1021 | 1033 | ||
1022 | priv->cached_vdcf = kzalloc(sizeof(struct p54_tx_control_vdcf) + | ||
1023 | priv->tx_hdr_len + sizeof(struct p54_control_hdr), GFP_KERNEL); | ||
1024 | |||
1025 | if (!priv->cached_vdcf) { | ||
1026 | ieee80211_free_hw(dev); | ||
1027 | return NULL; | ||
1028 | } | ||
1029 | |||
1030 | p54_init_vdcf(dev); | ||
1031 | mutex_init(&priv->conf_mutex); | 1034 | mutex_init(&priv->conf_mutex); |
1032 | 1035 | ||
1033 | return dev; | 1036 | return dev; |
diff --git a/drivers/net/wireless/p54/p54common.h b/drivers/net/wireless/p54/p54common.h index 2245fcce92dc..8db6c0e8e540 100644 --- a/drivers/net/wireless/p54/p54common.h +++ b/drivers/net/wireless/p54/p54common.h | |||
@@ -183,16 +183,16 @@ struct p54_frame_sent_hdr { | |||
183 | 183 | ||
184 | struct p54_tx_control_allocdata { | 184 | struct p54_tx_control_allocdata { |
185 | u8 rateset[8]; | 185 | u8 rateset[8]; |
186 | u16 padding; | 186 | u8 unalloc0[2]; |
187 | u8 wep_key_present; | 187 | u8 key_type; |
188 | u8 wep_key_len; | 188 | u8 key_len; |
189 | u8 wep_key[16]; | 189 | u8 key[16]; |
190 | __le32 frame_type; | 190 | u8 hw_queue; |
191 | u32 padding2; | 191 | u8 unalloc1[9]; |
192 | __le16 magic4; | 192 | u8 tx_antenna; |
193 | u8 antenna; | ||
194 | u8 output_power; | 193 | u8 output_power; |
195 | __le32 magic5; | 194 | u8 cts_rate; |
195 | u8 unalloc2[3]; | ||
196 | u8 align[0]; | 196 | u8 align[0]; |
197 | } __attribute__ ((packed)); | 197 | } __attribute__ ((packed)); |
198 | 198 | ||
diff --git a/drivers/net/wireless/p54/p54usb.c b/drivers/net/wireless/p54/p54usb.c index 815c095ef797..cbaca23a9453 100644 --- a/drivers/net/wireless/p54/p54usb.c +++ b/drivers/net/wireless/p54/p54usb.c | |||
@@ -109,7 +109,17 @@ static void p54u_rx_cb(struct urb *urb) | |||
109 | urb->context = skb; | 109 | urb->context = skb; |
110 | skb_queue_tail(&priv->rx_queue, skb); | 110 | skb_queue_tail(&priv->rx_queue, skb); |
111 | } else { | 111 | } else { |
112 | if (!priv->hw_type) | ||
113 | skb_push(skb, sizeof(struct net2280_tx_hdr)); | ||
114 | |||
115 | skb_reset_tail_pointer(skb); | ||
112 | skb_trim(skb, 0); | 116 | skb_trim(skb, 0); |
117 | if (urb->transfer_buffer != skb_tail_pointer(skb)) { | ||
118 | /* this should not happen */ | ||
119 | WARN_ON(1); | ||
120 | urb->transfer_buffer = skb_tail_pointer(skb); | ||
121 | } | ||
122 | |||
113 | skb_queue_tail(&priv->rx_queue, skb); | 123 | skb_queue_tail(&priv->rx_queue, skb); |
114 | } | 124 | } |
115 | 125 | ||
diff --git a/drivers/net/wireless/rt2x00/rt2x00queue.h b/drivers/net/wireless/rt2x00/rt2x00queue.h index a4a8c57004db..ff78e52ce43c 100644 --- a/drivers/net/wireless/rt2x00/rt2x00queue.h +++ b/drivers/net/wireless/rt2x00/rt2x00queue.h | |||
@@ -173,10 +173,10 @@ struct rxdone_entry_desc { | |||
173 | * frame transmission failed due to excessive retries. | 173 | * frame transmission failed due to excessive retries. |
174 | */ | 174 | */ |
175 | enum txdone_entry_desc_flags { | 175 | enum txdone_entry_desc_flags { |
176 | TXDONE_UNKNOWN = 1 << 0, | 176 | TXDONE_UNKNOWN, |
177 | TXDONE_SUCCESS = 1 << 1, | 177 | TXDONE_SUCCESS, |
178 | TXDONE_FAILURE = 1 << 2, | 178 | TXDONE_FAILURE, |
179 | TXDONE_EXCESSIVE_RETRY = 1 << 3, | 179 | TXDONE_EXCESSIVE_RETRY, |
180 | }; | 180 | }; |
181 | 181 | ||
182 | /** | 182 | /** |
diff --git a/drivers/net/wireless/rt2x00/rt2x00usb.c b/drivers/net/wireless/rt2x00/rt2x00usb.c index 8d76bb2e0312..2050227ea530 100644 --- a/drivers/net/wireless/rt2x00/rt2x00usb.c +++ b/drivers/net/wireless/rt2x00/rt2x00usb.c | |||
@@ -181,6 +181,7 @@ static void rt2x00usb_interrupt_txdone(struct urb *urb) | |||
181 | * (Only indirectly by looking at the failed TX counters | 181 | * (Only indirectly by looking at the failed TX counters |
182 | * in the register). | 182 | * in the register). |
183 | */ | 183 | */ |
184 | txdesc.flags = 0; | ||
184 | if (!urb->status) | 185 | if (!urb->status) |
185 | __set_bit(TXDONE_UNKNOWN, &txdesc.flags); | 186 | __set_bit(TXDONE_UNKNOWN, &txdesc.flags); |
186 | else | 187 | else |
diff --git a/drivers/net/wireless/rtl8187_dev.c b/drivers/net/wireless/rtl8187_dev.c index 57376fb993ed..ca5deb6244e6 100644 --- a/drivers/net/wireless/rtl8187_dev.c +++ b/drivers/net/wireless/rtl8187_dev.c | |||
@@ -40,6 +40,7 @@ static struct usb_device_id rtl8187_table[] __devinitdata = { | |||
40 | /* Netgear */ | 40 | /* Netgear */ |
41 | {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187}, | 41 | {USB_DEVICE(0x0846, 0x6100), .driver_info = DEVICE_RTL8187}, |
42 | {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187}, | 42 | {USB_DEVICE(0x0846, 0x6a00), .driver_info = DEVICE_RTL8187}, |
43 | {USB_DEVICE(0x0846, 0x4260), .driver_info = DEVICE_RTL8187B}, | ||
43 | /* HP */ | 44 | /* HP */ |
44 | {USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187}, | 45 | {USB_DEVICE(0x03f0, 0xca02), .driver_info = DEVICE_RTL8187}, |
45 | /* Sitecom */ | 46 | /* Sitecom */ |
diff --git a/drivers/pci/hotplug/acpi_pcihp.c b/drivers/pci/hotplug/acpi_pcihp.c index 93e37f0666ab..e17ef54f0efc 100644 --- a/drivers/pci/hotplug/acpi_pcihp.c +++ b/drivers/pci/hotplug/acpi_pcihp.c | |||
@@ -382,7 +382,7 @@ EXPORT_SYMBOL_GPL(acpi_get_hp_params_from_firmware); | |||
382 | int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags) | 382 | int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags) |
383 | { | 383 | { |
384 | acpi_status status; | 384 | acpi_status status; |
385 | acpi_handle chandle, handle = DEVICE_ACPI_HANDLE(&(dev->dev)); | 385 | acpi_handle chandle, handle; |
386 | struct pci_dev *pdev = dev; | 386 | struct pci_dev *pdev = dev; |
387 | struct pci_bus *parent; | 387 | struct pci_bus *parent; |
388 | struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL }; | 388 | struct acpi_buffer string = { ACPI_ALLOCATE_BUFFER, NULL }; |
@@ -399,10 +399,25 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags) | |||
399 | * Per PCI firmware specification, we should run the ACPI _OSC | 399 | * Per PCI firmware specification, we should run the ACPI _OSC |
400 | * method to get control of hotplug hardware before using it. If | 400 | * method to get control of hotplug hardware before using it. If |
401 | * an _OSC is missing, we look for an OSHP to do the same thing. | 401 | * an _OSC is missing, we look for an OSHP to do the same thing. |
402 | * To handle different BIOS behavior, we look for _OSC and OSHP | 402 | * To handle different BIOS behavior, we look for _OSC on a root |
403 | * within the scope of the hotplug controller and its parents, | 403 | * bridge preferentially (according to PCI fw spec). Later for |
404 | * OSHP within the scope of the hotplug controller and its parents, | ||
404 | * upto the host bridge under which this controller exists. | 405 | * upto the host bridge under which this controller exists. |
405 | */ | 406 | */ |
407 | handle = acpi_find_root_bridge_handle(pdev); | ||
408 | if (handle) { | ||
409 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &string); | ||
410 | dbg("Trying to get hotplug control for %s\n", | ||
411 | (char *)string.pointer); | ||
412 | status = pci_osc_control_set(handle, flags); | ||
413 | if (ACPI_SUCCESS(status)) | ||
414 | goto got_one; | ||
415 | kfree(string.pointer); | ||
416 | string = (struct acpi_buffer){ ACPI_ALLOCATE_BUFFER, NULL }; | ||
417 | } | ||
418 | |||
419 | pdev = dev; | ||
420 | handle = DEVICE_ACPI_HANDLE(&dev->dev); | ||
406 | while (!handle) { | 421 | while (!handle) { |
407 | /* | 422 | /* |
408 | * This hotplug controller was not listed in the ACPI name | 423 | * This hotplug controller was not listed in the ACPI name |
@@ -427,15 +442,9 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags) | |||
427 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &string); | 442 | acpi_get_name(handle, ACPI_FULL_PATHNAME, &string); |
428 | dbg("Trying to get hotplug control for %s \n", | 443 | dbg("Trying to get hotplug control for %s \n", |
429 | (char *)string.pointer); | 444 | (char *)string.pointer); |
430 | status = pci_osc_control_set(handle, flags); | 445 | status = acpi_run_oshp(handle); |
431 | if (status == AE_NOT_FOUND) | 446 | if (ACPI_SUCCESS(status)) |
432 | status = acpi_run_oshp(handle); | 447 | goto got_one; |
433 | if (ACPI_SUCCESS(status)) { | ||
434 | dbg("Gained control for hotplug HW for pci %s (%s)\n", | ||
435 | pci_name(dev), (char *)string.pointer); | ||
436 | kfree(string.pointer); | ||
437 | return 0; | ||
438 | } | ||
439 | if (acpi_root_bridge(handle)) | 448 | if (acpi_root_bridge(handle)) |
440 | break; | 449 | break; |
441 | chandle = handle; | 450 | chandle = handle; |
@@ -449,6 +458,11 @@ int acpi_get_hp_hw_control_from_firmware(struct pci_dev *dev, u32 flags) | |||
449 | 458 | ||
450 | kfree(string.pointer); | 459 | kfree(string.pointer); |
451 | return -ENODEV; | 460 | return -ENODEV; |
461 | got_one: | ||
462 | dbg("Gained control for hotplug HW for pci %s (%s)\n", pci_name(dev), | ||
463 | (char *)string.pointer); | ||
464 | kfree(string.pointer); | ||
465 | return 0; | ||
452 | } | 466 | } |
453 | EXPORT_SYMBOL(acpi_get_hp_hw_control_from_firmware); | 467 | EXPORT_SYMBOL(acpi_get_hp_hw_control_from_firmware); |
454 | 468 | ||
diff --git a/drivers/pci/pcie/aer/aerdrv_acpi.c b/drivers/pci/pcie/aer/aerdrv_acpi.c index 30f581b8791f..6dd7b13e9808 100644 --- a/drivers/pci/pcie/aer/aerdrv_acpi.c +++ b/drivers/pci/pcie/aer/aerdrv_acpi.c | |||
@@ -36,12 +36,7 @@ int aer_osc_setup(struct pcie_device *pciedev) | |||
36 | if (acpi_pci_disabled) | 36 | if (acpi_pci_disabled) |
37 | return -1; | 37 | return -1; |
38 | 38 | ||
39 | /* Find root host bridge */ | 39 | handle = acpi_find_root_bridge_handle(pdev); |
40 | while (pdev->bus->self) | ||
41 | pdev = pdev->bus->self; | ||
42 | handle = acpi_get_pci_rootbridge_handle( | ||
43 | pci_domain_nr(pdev->bus), pdev->bus->number); | ||
44 | |||
45 | if (handle) { | 40 | if (handle) { |
46 | pcie_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT); | 41 | pcie_osc_support_set(OSC_EXT_PCI_CONFIG_SUPPORT); |
47 | status = pci_osc_control_set(handle, | 42 | status = pci_osc_control_set(handle, |
diff --git a/drivers/pci/probe.c b/drivers/pci/probe.c index a04498d390c8..cce2f4cb1fbf 100644 --- a/drivers/pci/probe.c +++ b/drivers/pci/probe.c | |||
@@ -383,6 +383,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
383 | res->start = base; | 383 | res->start = base; |
384 | if (!res->end) | 384 | if (!res->end) |
385 | res->end = limit + 0xfff; | 385 | res->end = limit + 0xfff; |
386 | printk(KERN_INFO "PCI: bridge %s io port: [%llx, %llx]\n", pci_name(dev), res->start, res->end); | ||
386 | } | 387 | } |
387 | 388 | ||
388 | res = child->resource[1]; | 389 | res = child->resource[1]; |
@@ -394,6 +395,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
394 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; | 395 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM; |
395 | res->start = base; | 396 | res->start = base; |
396 | res->end = limit + 0xfffff; | 397 | res->end = limit + 0xfffff; |
398 | printk(KERN_INFO "PCI: bridge %s 32bit mmio: [%llx, %llx]\n", pci_name(dev), res->start, res->end); | ||
397 | } | 399 | } |
398 | 400 | ||
399 | res = child->resource[2]; | 401 | res = child->resource[2]; |
@@ -429,6 +431,7 @@ void __devinit pci_read_bridge_bases(struct pci_bus *child) | |||
429 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; | 431 | res->flags = (mem_base_lo & PCI_MEMORY_RANGE_TYPE_MASK) | IORESOURCE_MEM | IORESOURCE_PREFETCH; |
430 | res->start = base; | 432 | res->start = base; |
431 | res->end = limit + 0xfffff; | 433 | res->end = limit + 0xfffff; |
434 | printk(KERN_INFO "PCI: bridge %s %sbit mmio pref: [%llx, %llx]\n", pci_name(dev), (res->flags & PCI_PREF_RANGE_TYPE_64)?"64":"32",res->start, res->end); | ||
432 | } | 435 | } |
433 | } | 436 | } |
434 | 437 | ||
diff --git a/drivers/pci/setup-bus.c b/drivers/pci/setup-bus.c index 827c0a520e2b..82634a2f1b1d 100644 --- a/drivers/pci/setup-bus.c +++ b/drivers/pci/setup-bus.c | |||
@@ -530,6 +530,36 @@ void __ref pci_bus_assign_resources(struct pci_bus *bus) | |||
530 | } | 530 | } |
531 | EXPORT_SYMBOL(pci_bus_assign_resources); | 531 | EXPORT_SYMBOL(pci_bus_assign_resources); |
532 | 532 | ||
533 | static void pci_bus_dump_res(struct pci_bus *bus) | ||
534 | { | ||
535 | int i; | ||
536 | |||
537 | for (i = 0; i < PCI_BUS_NUM_RESOURCES; i++) { | ||
538 | struct resource *res = bus->resource[i]; | ||
539 | if (!res) | ||
540 | continue; | ||
541 | |||
542 | printk(KERN_INFO "bus: %02x index %x %s: [%llx, %llx]\n", bus->number, i, (res->flags & IORESOURCE_IO)? "io port":"mmio", res->start, res->end); | ||
543 | } | ||
544 | } | ||
545 | |||
546 | static void pci_bus_dump_resources(struct pci_bus *bus) | ||
547 | { | ||
548 | struct pci_bus *b; | ||
549 | struct pci_dev *dev; | ||
550 | |||
551 | |||
552 | pci_bus_dump_res(bus); | ||
553 | |||
554 | list_for_each_entry(dev, &bus->devices, bus_list) { | ||
555 | b = dev->subordinate; | ||
556 | if (!b) | ||
557 | continue; | ||
558 | |||
559 | pci_bus_dump_resources(b); | ||
560 | } | ||
561 | } | ||
562 | |||
533 | void __init | 563 | void __init |
534 | pci_assign_unassigned_resources(void) | 564 | pci_assign_unassigned_resources(void) |
535 | { | 565 | { |
@@ -545,4 +575,9 @@ pci_assign_unassigned_resources(void) | |||
545 | pci_bus_assign_resources(bus); | 575 | pci_bus_assign_resources(bus); |
546 | pci_enable_bridges(bus); | 576 | pci_enable_bridges(bus); |
547 | } | 577 | } |
578 | |||
579 | /* dump the resource on buses */ | ||
580 | list_for_each_entry(bus, &pci_root_buses, node) { | ||
581 | pci_bus_dump_resources(bus); | ||
582 | } | ||
548 | } | 583 | } |
diff --git a/drivers/scsi/device_handler/scsi_dh_rdac.c b/drivers/scsi/device_handler/scsi_dh_rdac.c index e7c7b4ebc1fe..2dee69da35cf 100644 --- a/drivers/scsi/device_handler/scsi_dh_rdac.c +++ b/drivers/scsi/device_handler/scsi_dh_rdac.c | |||
@@ -376,7 +376,7 @@ static int get_lun(struct scsi_device *sdev, struct rdac_dh_data *h) | |||
376 | if (inqp->page_id[0] != 'e' || inqp->page_id[1] != 'd' || | 376 | if (inqp->page_id[0] != 'e' || inqp->page_id[1] != 'd' || |
377 | inqp->page_id[2] != 'i' || inqp->page_id[3] != 'd') | 377 | inqp->page_id[2] != 'i' || inqp->page_id[3] != 'd') |
378 | return SCSI_DH_NOSYS; | 378 | return SCSI_DH_NOSYS; |
379 | h->lun = scsilun_to_int((struct scsi_lun *)inqp->lun); | 379 | h->lun = inqp->lun[7]; /* Uses only the last byte */ |
380 | } | 380 | } |
381 | return err; | 381 | return err; |
382 | } | 382 | } |
@@ -386,6 +386,7 @@ static int check_ownership(struct scsi_device *sdev, struct rdac_dh_data *h) | |||
386 | int err; | 386 | int err; |
387 | struct c9_inquiry *inqp; | 387 | struct c9_inquiry *inqp; |
388 | 388 | ||
389 | h->lun_state = RDAC_LUN_UNOWNED; | ||
389 | err = submit_inquiry(sdev, 0xC9, sizeof(struct c9_inquiry), h); | 390 | err = submit_inquiry(sdev, 0xC9, sizeof(struct c9_inquiry), h); |
390 | if (err == SCSI_DH_OK) { | 391 | if (err == SCSI_DH_OK) { |
391 | inqp = &h->inq.c9; | 392 | inqp = &h->inq.c9; |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.c b/drivers/scsi/ibmvscsi/ibmvfc.c index ae560bc04f9d..4e0b7c8eb32e 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.c +++ b/drivers/scsi/ibmvscsi/ibmvfc.c | |||
@@ -556,11 +556,12 @@ static void ibmvfc_link_down(struct ibmvfc_host *vhost, | |||
556 | /** | 556 | /** |
557 | * ibmvfc_init_host - Start host initialization | 557 | * ibmvfc_init_host - Start host initialization |
558 | * @vhost: ibmvfc host struct | 558 | * @vhost: ibmvfc host struct |
559 | * @relogin: is this a re-login? | ||
559 | * | 560 | * |
560 | * Return value: | 561 | * Return value: |
561 | * nothing | 562 | * nothing |
562 | **/ | 563 | **/ |
563 | static void ibmvfc_init_host(struct ibmvfc_host *vhost) | 564 | static void ibmvfc_init_host(struct ibmvfc_host *vhost, int relogin) |
564 | { | 565 | { |
565 | struct ibmvfc_target *tgt; | 566 | struct ibmvfc_target *tgt; |
566 | 567 | ||
@@ -574,6 +575,11 @@ static void ibmvfc_init_host(struct ibmvfc_host *vhost) | |||
574 | } | 575 | } |
575 | 576 | ||
576 | if (!ibmvfc_set_host_state(vhost, IBMVFC_INITIALIZING)) { | 577 | if (!ibmvfc_set_host_state(vhost, IBMVFC_INITIALIZING)) { |
578 | if (!relogin) { | ||
579 | memset(vhost->async_crq.msgs, 0, PAGE_SIZE); | ||
580 | vhost->async_crq.cur = 0; | ||
581 | } | ||
582 | |||
577 | list_for_each_entry(tgt, &vhost->targets, queue) | 583 | list_for_each_entry(tgt, &vhost->targets, queue) |
578 | tgt->need_login = 1; | 584 | tgt->need_login = 1; |
579 | scsi_block_requests(vhost->host); | 585 | scsi_block_requests(vhost->host); |
@@ -1059,9 +1065,10 @@ static void ibmvfc_get_starget_port_id(struct scsi_target *starget) | |||
1059 | static int ibmvfc_wait_while_resetting(struct ibmvfc_host *vhost) | 1065 | static int ibmvfc_wait_while_resetting(struct ibmvfc_host *vhost) |
1060 | { | 1066 | { |
1061 | long timeout = wait_event_timeout(vhost->init_wait_q, | 1067 | long timeout = wait_event_timeout(vhost->init_wait_q, |
1062 | (vhost->state == IBMVFC_ACTIVE || | 1068 | ((vhost->state == IBMVFC_ACTIVE || |
1063 | vhost->state == IBMVFC_HOST_OFFLINE || | 1069 | vhost->state == IBMVFC_HOST_OFFLINE || |
1064 | vhost->state == IBMVFC_LINK_DEAD), | 1070 | vhost->state == IBMVFC_LINK_DEAD) && |
1071 | vhost->action == IBMVFC_HOST_ACTION_NONE), | ||
1065 | (init_timeout * HZ)); | 1072 | (init_timeout * HZ)); |
1066 | 1073 | ||
1067 | return timeout ? 0 : -EIO; | 1074 | return timeout ? 0 : -EIO; |
@@ -1450,8 +1457,8 @@ static void ibmvfc_scsi_done(struct ibmvfc_event *evt) | |||
1450 | struct ibmvfc_cmd *vfc_cmd = &evt->xfer_iu->cmd; | 1457 | struct ibmvfc_cmd *vfc_cmd = &evt->xfer_iu->cmd; |
1451 | struct ibmvfc_fcp_rsp *rsp = &vfc_cmd->rsp; | 1458 | struct ibmvfc_fcp_rsp *rsp = &vfc_cmd->rsp; |
1452 | struct scsi_cmnd *cmnd = evt->cmnd; | 1459 | struct scsi_cmnd *cmnd = evt->cmnd; |
1453 | int rsp_len = 0; | 1460 | u32 rsp_len = 0; |
1454 | int sense_len = rsp->fcp_sense_len; | 1461 | u32 sense_len = rsp->fcp_sense_len; |
1455 | 1462 | ||
1456 | if (cmnd) { | 1463 | if (cmnd) { |
1457 | if (vfc_cmd->response_flags & IBMVFC_ADAPTER_RESID_VALID) | 1464 | if (vfc_cmd->response_flags & IBMVFC_ADAPTER_RESID_VALID) |
@@ -1468,7 +1475,7 @@ static void ibmvfc_scsi_done(struct ibmvfc_event *evt) | |||
1468 | rsp_len = rsp->fcp_rsp_len; | 1475 | rsp_len = rsp->fcp_rsp_len; |
1469 | if ((sense_len + rsp_len) > SCSI_SENSE_BUFFERSIZE) | 1476 | if ((sense_len + rsp_len) > SCSI_SENSE_BUFFERSIZE) |
1470 | sense_len = SCSI_SENSE_BUFFERSIZE - rsp_len; | 1477 | sense_len = SCSI_SENSE_BUFFERSIZE - rsp_len; |
1471 | if ((rsp->flags & FCP_SNS_LEN_VALID) && rsp->fcp_sense_len) | 1478 | if ((rsp->flags & FCP_SNS_LEN_VALID) && rsp->fcp_sense_len && rsp_len <= 8) |
1472 | memcpy(cmnd->sense_buffer, rsp->data.sense + rsp_len, sense_len); | 1479 | memcpy(cmnd->sense_buffer, rsp->data.sense + rsp_len, sense_len); |
1473 | 1480 | ||
1474 | ibmvfc_log_error(evt); | 1481 | ibmvfc_log_error(evt); |
@@ -2077,17 +2084,18 @@ static void ibmvfc_handle_async(struct ibmvfc_async_crq *crq, | |||
2077 | { | 2084 | { |
2078 | const char *desc = ibmvfc_get_ae_desc(crq->event); | 2085 | const char *desc = ibmvfc_get_ae_desc(crq->event); |
2079 | 2086 | ||
2080 | ibmvfc_log(vhost, 3, "%s event received\n", desc); | 2087 | ibmvfc_log(vhost, 3, "%s event received. scsi_id: %lx, wwpn: %lx," |
2088 | " node_name: %lx\n", desc, crq->scsi_id, crq->wwpn, crq->node_name); | ||
2081 | 2089 | ||
2082 | switch (crq->event) { | 2090 | switch (crq->event) { |
2083 | case IBMVFC_AE_LINK_UP: | 2091 | case IBMVFC_AE_LINK_UP: |
2084 | case IBMVFC_AE_RESUME: | 2092 | case IBMVFC_AE_RESUME: |
2085 | vhost->events_to_log |= IBMVFC_AE_LINKUP; | 2093 | vhost->events_to_log |= IBMVFC_AE_LINKUP; |
2086 | ibmvfc_init_host(vhost); | 2094 | ibmvfc_init_host(vhost, 1); |
2087 | break; | 2095 | break; |
2088 | case IBMVFC_AE_SCN_FABRIC: | 2096 | case IBMVFC_AE_SCN_FABRIC: |
2089 | vhost->events_to_log |= IBMVFC_AE_RSCN; | 2097 | vhost->events_to_log |= IBMVFC_AE_RSCN; |
2090 | ibmvfc_init_host(vhost); | 2098 | ibmvfc_init_host(vhost, 1); |
2091 | break; | 2099 | break; |
2092 | case IBMVFC_AE_SCN_NPORT: | 2100 | case IBMVFC_AE_SCN_NPORT: |
2093 | case IBMVFC_AE_SCN_GROUP: | 2101 | case IBMVFC_AE_SCN_GROUP: |
@@ -2133,13 +2141,13 @@ static void ibmvfc_handle_crq(struct ibmvfc_crq *crq, struct ibmvfc_host *vhost) | |||
2133 | /* Send back a response */ | 2141 | /* Send back a response */ |
2134 | rc = ibmvfc_send_crq_init_complete(vhost); | 2142 | rc = ibmvfc_send_crq_init_complete(vhost); |
2135 | if (rc == 0) | 2143 | if (rc == 0) |
2136 | ibmvfc_init_host(vhost); | 2144 | ibmvfc_init_host(vhost, 0); |
2137 | else | 2145 | else |
2138 | dev_err(vhost->dev, "Unable to send init rsp. rc=%ld\n", rc); | 2146 | dev_err(vhost->dev, "Unable to send init rsp. rc=%ld\n", rc); |
2139 | break; | 2147 | break; |
2140 | case IBMVFC_CRQ_INIT_COMPLETE: | 2148 | case IBMVFC_CRQ_INIT_COMPLETE: |
2141 | dev_info(vhost->dev, "Partner initialization complete\n"); | 2149 | dev_info(vhost->dev, "Partner initialization complete\n"); |
2142 | ibmvfc_init_host(vhost); | 2150 | ibmvfc_init_host(vhost, 0); |
2143 | break; | 2151 | break; |
2144 | default: | 2152 | default: |
2145 | dev_err(vhost->dev, "Unknown crq message type: %d\n", crq->format); | 2153 | dev_err(vhost->dev, "Unknown crq message type: %d\n", crq->format); |
@@ -3357,8 +3365,6 @@ static void ibmvfc_npiv_login(struct ibmvfc_host *vhost) | |||
3357 | mad->buffer.va = vhost->login_buf_dma; | 3365 | mad->buffer.va = vhost->login_buf_dma; |
3358 | mad->buffer.len = sizeof(*vhost->login_buf); | 3366 | mad->buffer.len = sizeof(*vhost->login_buf); |
3359 | 3367 | ||
3360 | memset(vhost->async_crq.msgs, 0, PAGE_SIZE); | ||
3361 | vhost->async_crq.cur = 0; | ||
3362 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT_WAIT); | 3368 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_INIT_WAIT); |
3363 | 3369 | ||
3364 | if (!ibmvfc_send_event(evt, vhost, default_timeout)) | 3370 | if (!ibmvfc_send_event(evt, vhost, default_timeout)) |
@@ -3601,8 +3607,9 @@ static void ibmvfc_do_work(struct ibmvfc_host *vhost) | |||
3601 | } | 3607 | } |
3602 | } | 3608 | } |
3603 | 3609 | ||
3604 | if (vhost->reinit) { | 3610 | if (vhost->reinit && !ibmvfc_set_host_state(vhost, IBMVFC_INITIALIZING)) { |
3605 | vhost->reinit = 0; | 3611 | vhost->reinit = 0; |
3612 | scsi_block_requests(vhost->host); | ||
3606 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_QUERY); | 3613 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_QUERY); |
3607 | } else { | 3614 | } else { |
3608 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_NONE); | 3615 | ibmvfc_set_host_action(vhost, IBMVFC_HOST_ACTION_NONE); |
diff --git a/drivers/scsi/ibmvscsi/ibmvfc.h b/drivers/scsi/ibmvscsi/ibmvfc.h index 4bf6e374f076..fb3177ab6691 100644 --- a/drivers/scsi/ibmvscsi/ibmvfc.h +++ b/drivers/scsi/ibmvscsi/ibmvfc.h | |||
@@ -29,8 +29,8 @@ | |||
29 | #include "viosrp.h" | 29 | #include "viosrp.h" |
30 | 30 | ||
31 | #define IBMVFC_NAME "ibmvfc" | 31 | #define IBMVFC_NAME "ibmvfc" |
32 | #define IBMVFC_DRIVER_VERSION "1.0.1" | 32 | #define IBMVFC_DRIVER_VERSION "1.0.2" |
33 | #define IBMVFC_DRIVER_DATE "(July 11, 2008)" | 33 | #define IBMVFC_DRIVER_DATE "(August 14, 2008)" |
34 | 34 | ||
35 | #define IBMVFC_DEFAULT_TIMEOUT 15 | 35 | #define IBMVFC_DEFAULT_TIMEOUT 15 |
36 | #define IBMVFC_INIT_TIMEOUT 30 | 36 | #define IBMVFC_INIT_TIMEOUT 30 |
diff --git a/drivers/scsi/ibmvscsi/ibmvscsi.c b/drivers/scsi/ibmvscsi/ibmvscsi.c index 6b24b9cdb04c..7b1502c0ab6e 100644 --- a/drivers/scsi/ibmvscsi/ibmvscsi.c +++ b/drivers/scsi/ibmvscsi/ibmvscsi.c | |||
@@ -1636,7 +1636,7 @@ static unsigned long ibmvscsi_get_desired_dma(struct vio_dev *vdev) | |||
1636 | unsigned long desired_io = max_requests * sizeof(union viosrp_iu); | 1636 | unsigned long desired_io = max_requests * sizeof(union viosrp_iu); |
1637 | 1637 | ||
1638 | /* add io space for sg data */ | 1638 | /* add io space for sg data */ |
1639 | desired_io += (IBMVSCSI_MAX_SECTORS_DEFAULT * | 1639 | desired_io += (IBMVSCSI_MAX_SECTORS_DEFAULT * 512 * |
1640 | IBMVSCSI_CMDS_PER_LUN_DEFAULT); | 1640 | IBMVSCSI_CMDS_PER_LUN_DEFAULT); |
1641 | 1641 | ||
1642 | return desired_io; | 1642 | return desired_io; |
diff --git a/drivers/scsi/megaraid/megaraid_sas.c b/drivers/scsi/megaraid/megaraid_sas.c index fc7ac158476c..97b763378e7d 100644 --- a/drivers/scsi/megaraid/megaraid_sas.c +++ b/drivers/scsi/megaraid/megaraid_sas.c | |||
@@ -10,7 +10,7 @@ | |||
10 | * 2 of the License, or (at your option) any later version. | 10 | * 2 of the License, or (at your option) any later version. |
11 | * | 11 | * |
12 | * FILE : megaraid_sas.c | 12 | * FILE : megaraid_sas.c |
13 | * Version : v00.00.03.20-rc1 | 13 | * Version : v00.00.04.01-rc1 |
14 | * | 14 | * |
15 | * Authors: | 15 | * Authors: |
16 | * (email-id : megaraidlinux@lsi.com) | 16 | * (email-id : megaraidlinux@lsi.com) |
@@ -71,6 +71,10 @@ static struct pci_device_id megasas_pci_table[] = { | |||
71 | /* ppc IOP */ | 71 | /* ppc IOP */ |
72 | {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1078DE)}, | 72 | {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1078DE)}, |
73 | /* ppc IOP */ | 73 | /* ppc IOP */ |
74 | {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS1078GEN2)}, | ||
75 | /* gen2*/ | ||
76 | {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_SAS0079GEN2)}, | ||
77 | /* gen2*/ | ||
74 | {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VERDE_ZCR)}, | 78 | {PCI_DEVICE(PCI_VENDOR_ID_LSI_LOGIC, PCI_DEVICE_ID_LSI_VERDE_ZCR)}, |
75 | /* xscale IOP, vega */ | 79 | /* xscale IOP, vega */ |
76 | {PCI_DEVICE(PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_PERC5)}, | 80 | {PCI_DEVICE(PCI_VENDOR_ID_DELL, PCI_DEVICE_ID_DELL_PERC5)}, |
@@ -198,6 +202,9 @@ megasas_clear_intr_xscale(struct megasas_register_set __iomem * regs) | |||
198 | */ | 202 | */ |
199 | writel(status, ®s->outbound_intr_status); | 203 | writel(status, ®s->outbound_intr_status); |
200 | 204 | ||
205 | /* Dummy readl to force pci flush */ | ||
206 | readl(®s->outbound_intr_status); | ||
207 | |||
201 | return 0; | 208 | return 0; |
202 | } | 209 | } |
203 | 210 | ||
@@ -293,6 +300,9 @@ megasas_clear_intr_ppc(struct megasas_register_set __iomem * regs) | |||
293 | */ | 300 | */ |
294 | writel(status, ®s->outbound_doorbell_clear); | 301 | writel(status, ®s->outbound_doorbell_clear); |
295 | 302 | ||
303 | /* Dummy readl to force pci flush */ | ||
304 | readl(®s->outbound_doorbell_clear); | ||
305 | |||
296 | return 0; | 306 | return 0; |
297 | } | 307 | } |
298 | /** | 308 | /** |
@@ -318,6 +328,99 @@ static struct megasas_instance_template megasas_instance_template_ppc = { | |||
318 | }; | 328 | }; |
319 | 329 | ||
320 | /** | 330 | /** |
331 | * The following functions are defined for gen2 (deviceid : 0x78 0x79) | ||
332 | * controllers | ||
333 | */ | ||
334 | |||
335 | /** | ||
336 | * megasas_enable_intr_gen2 - Enables interrupts | ||
337 | * @regs: MFI register set | ||
338 | */ | ||
339 | static inline void | ||
340 | megasas_enable_intr_gen2(struct megasas_register_set __iomem *regs) | ||
341 | { | ||
342 | writel(0xFFFFFFFF, &(regs)->outbound_doorbell_clear); | ||
343 | |||
344 | /* write ~0x00000005 (4 & 1) to the intr mask*/ | ||
345 | writel(~MFI_GEN2_ENABLE_INTERRUPT_MASK, &(regs)->outbound_intr_mask); | ||
346 | |||
347 | /* Dummy readl to force pci flush */ | ||
348 | readl(®s->outbound_intr_mask); | ||
349 | } | ||
350 | |||
351 | /** | ||
352 | * megasas_disable_intr_gen2 - Disables interrupt | ||
353 | * @regs: MFI register set | ||
354 | */ | ||
355 | static inline void | ||
356 | megasas_disable_intr_gen2(struct megasas_register_set __iomem *regs) | ||
357 | { | ||
358 | u32 mask = 0xFFFFFFFF; | ||
359 | writel(mask, ®s->outbound_intr_mask); | ||
360 | /* Dummy readl to force pci flush */ | ||
361 | readl(®s->outbound_intr_mask); | ||
362 | } | ||
363 | |||
364 | /** | ||
365 | * megasas_read_fw_status_reg_gen2 - returns the current FW status value | ||
366 | * @regs: MFI register set | ||
367 | */ | ||
368 | static u32 | ||
369 | megasas_read_fw_status_reg_gen2(struct megasas_register_set __iomem *regs) | ||
370 | { | ||
371 | return readl(&(regs)->outbound_scratch_pad); | ||
372 | } | ||
373 | |||
374 | /** | ||
375 | * megasas_clear_interrupt_gen2 - Check & clear interrupt | ||
376 | * @regs: MFI register set | ||
377 | */ | ||
378 | static int | ||
379 | megasas_clear_intr_gen2(struct megasas_register_set __iomem *regs) | ||
380 | { | ||
381 | u32 status; | ||
382 | /* | ||
383 | * Check if it is our interrupt | ||
384 | */ | ||
385 | status = readl(®s->outbound_intr_status); | ||
386 | |||
387 | if (!(status & MFI_GEN2_ENABLE_INTERRUPT_MASK)) | ||
388 | return 1; | ||
389 | |||
390 | /* | ||
391 | * Clear the interrupt by writing back the same value | ||
392 | */ | ||
393 | writel(status, ®s->outbound_doorbell_clear); | ||
394 | |||
395 | /* Dummy readl to force pci flush */ | ||
396 | readl(®s->outbound_intr_status); | ||
397 | |||
398 | return 0; | ||
399 | } | ||
400 | /** | ||
401 | * megasas_fire_cmd_gen2 - Sends command to the FW | ||
402 | * @frame_phys_addr : Physical address of cmd | ||
403 | * @frame_count : Number of frames for the command | ||
404 | * @regs : MFI register set | ||
405 | */ | ||
406 | static inline void | ||
407 | megasas_fire_cmd_gen2(dma_addr_t frame_phys_addr, u32 frame_count, | ||
408 | struct megasas_register_set __iomem *regs) | ||
409 | { | ||
410 | writel((frame_phys_addr | (frame_count<<1))|1, | ||
411 | &(regs)->inbound_queue_port); | ||
412 | } | ||
413 | |||
414 | static struct megasas_instance_template megasas_instance_template_gen2 = { | ||
415 | |||
416 | .fire_cmd = megasas_fire_cmd_gen2, | ||
417 | .enable_intr = megasas_enable_intr_gen2, | ||
418 | .disable_intr = megasas_disable_intr_gen2, | ||
419 | .clear_intr = megasas_clear_intr_gen2, | ||
420 | .read_fw_status_reg = megasas_read_fw_status_reg_gen2, | ||
421 | }; | ||
422 | |||
423 | /** | ||
321 | * This is the end of set of functions & definitions | 424 | * This is the end of set of functions & definitions |
322 | * specific to ppc (deviceid : 0x60) controllers | 425 | * specific to ppc (deviceid : 0x60) controllers |
323 | */ | 426 | */ |
@@ -1976,7 +2079,12 @@ static int megasas_init_mfi(struct megasas_instance *instance) | |||
1976 | /* | 2079 | /* |
1977 | * Map the message registers | 2080 | * Map the message registers |
1978 | */ | 2081 | */ |
1979 | instance->base_addr = pci_resource_start(instance->pdev, 0); | 2082 | if ((instance->pdev->device == PCI_DEVICE_ID_LSI_SAS1078GEN2) || |
2083 | (instance->pdev->device == PCI_DEVICE_ID_LSI_SAS0079GEN2)) { | ||
2084 | instance->base_addr = pci_resource_start(instance->pdev, 1); | ||
2085 | } else { | ||
2086 | instance->base_addr = pci_resource_start(instance->pdev, 0); | ||
2087 | } | ||
1980 | 2088 | ||
1981 | if (pci_request_regions(instance->pdev, "megasas: LSI")) { | 2089 | if (pci_request_regions(instance->pdev, "megasas: LSI")) { |
1982 | printk(KERN_DEBUG "megasas: IO memory region busy!\n"); | 2090 | printk(KERN_DEBUG "megasas: IO memory region busy!\n"); |
@@ -1998,6 +2106,10 @@ static int megasas_init_mfi(struct megasas_instance *instance) | |||
1998 | case PCI_DEVICE_ID_LSI_SAS1078DE: | 2106 | case PCI_DEVICE_ID_LSI_SAS1078DE: |
1999 | instance->instancet = &megasas_instance_template_ppc; | 2107 | instance->instancet = &megasas_instance_template_ppc; |
2000 | break; | 2108 | break; |
2109 | case PCI_DEVICE_ID_LSI_SAS1078GEN2: | ||
2110 | case PCI_DEVICE_ID_LSI_SAS0079GEN2: | ||
2111 | instance->instancet = &megasas_instance_template_gen2; | ||
2112 | break; | ||
2001 | case PCI_DEVICE_ID_LSI_SAS1064R: | 2113 | case PCI_DEVICE_ID_LSI_SAS1064R: |
2002 | case PCI_DEVICE_ID_DELL_PERC5: | 2114 | case PCI_DEVICE_ID_DELL_PERC5: |
2003 | default: | 2115 | default: |
@@ -2857,6 +2969,7 @@ static void megasas_shutdown(struct pci_dev *pdev) | |||
2857 | { | 2969 | { |
2858 | struct megasas_instance *instance = pci_get_drvdata(pdev); | 2970 | struct megasas_instance *instance = pci_get_drvdata(pdev); |
2859 | megasas_flush_cache(instance); | 2971 | megasas_flush_cache(instance); |
2972 | megasas_shutdown_controller(instance, MR_DCMD_CTRL_SHUTDOWN); | ||
2860 | } | 2973 | } |
2861 | 2974 | ||
2862 | /** | 2975 | /** |
@@ -3292,7 +3405,7 @@ megasas_sysfs_set_dbg_lvl(struct device_driver *dd, const char *buf, size_t coun | |||
3292 | return retval; | 3405 | return retval; |
3293 | } | 3406 | } |
3294 | 3407 | ||
3295 | static DRIVER_ATTR(dbg_lvl, S_IRUGO|S_IWUGO, megasas_sysfs_show_dbg_lvl, | 3408 | static DRIVER_ATTR(dbg_lvl, S_IRUGO|S_IWUSR, megasas_sysfs_show_dbg_lvl, |
3296 | megasas_sysfs_set_dbg_lvl); | 3409 | megasas_sysfs_set_dbg_lvl); |
3297 | 3410 | ||
3298 | static ssize_t | 3411 | static ssize_t |
diff --git a/drivers/scsi/megaraid/megaraid_sas.h b/drivers/scsi/megaraid/megaraid_sas.h index b0c41e671702..0d033248fdf1 100644 --- a/drivers/scsi/megaraid/megaraid_sas.h +++ b/drivers/scsi/megaraid/megaraid_sas.h | |||
@@ -18,9 +18,9 @@ | |||
18 | /* | 18 | /* |
19 | * MegaRAID SAS Driver meta data | 19 | * MegaRAID SAS Driver meta data |
20 | */ | 20 | */ |
21 | #define MEGASAS_VERSION "00.00.03.20-rc1" | 21 | #define MEGASAS_VERSION "00.00.04.01" |
22 | #define MEGASAS_RELDATE "March 10, 2008" | 22 | #define MEGASAS_RELDATE "July 24, 2008" |
23 | #define MEGASAS_EXT_VERSION "Mon. March 10 11:02:31 PDT 2008" | 23 | #define MEGASAS_EXT_VERSION "Thu July 24 11:41:51 PST 2008" |
24 | 24 | ||
25 | /* | 25 | /* |
26 | * Device IDs | 26 | * Device IDs |
@@ -28,6 +28,8 @@ | |||
28 | #define PCI_DEVICE_ID_LSI_SAS1078R 0x0060 | 28 | #define PCI_DEVICE_ID_LSI_SAS1078R 0x0060 |
29 | #define PCI_DEVICE_ID_LSI_SAS1078DE 0x007C | 29 | #define PCI_DEVICE_ID_LSI_SAS1078DE 0x007C |
30 | #define PCI_DEVICE_ID_LSI_VERDE_ZCR 0x0413 | 30 | #define PCI_DEVICE_ID_LSI_VERDE_ZCR 0x0413 |
31 | #define PCI_DEVICE_ID_LSI_SAS1078GEN2 0x0078 | ||
32 | #define PCI_DEVICE_ID_LSI_SAS0079GEN2 0x0079 | ||
31 | 33 | ||
32 | /* | 34 | /* |
33 | * ===================================== | 35 | * ===================================== |
@@ -580,6 +582,8 @@ struct megasas_ctrl_info { | |||
580 | #define MEGASAS_COMPLETION_TIMER_INTERVAL (HZ/10) | 582 | #define MEGASAS_COMPLETION_TIMER_INTERVAL (HZ/10) |
581 | 583 | ||
582 | #define MFI_REPLY_1078_MESSAGE_INTERRUPT 0x80000000 | 584 | #define MFI_REPLY_1078_MESSAGE_INTERRUPT 0x80000000 |
585 | #define MFI_REPLY_GEN2_MESSAGE_INTERRUPT 0x00000001 | ||
586 | #define MFI_GEN2_ENABLE_INTERRUPT_MASK (0x00000001 | 0x00000004) | ||
583 | 587 | ||
584 | /* | 588 | /* |
585 | * register set for both 1068 and 1078 controllers | 589 | * register set for both 1068 and 1078 controllers |
diff --git a/drivers/scsi/qla2xxx/qla_attr.c b/drivers/scsi/qla2xxx/qla_attr.c index a319a20ed440..45e7dcb4b34d 100644 --- a/drivers/scsi/qla2xxx/qla_attr.c +++ b/drivers/scsi/qla2xxx/qla_attr.c | |||
@@ -993,6 +993,17 @@ qla2x00_terminate_rport_io(struct fc_rport *rport) | |||
993 | { | 993 | { |
994 | fc_port_t *fcport = *(fc_port_t **)rport->dd_data; | 994 | fc_port_t *fcport = *(fc_port_t **)rport->dd_data; |
995 | 995 | ||
996 | /* | ||
997 | * At this point all fcport's software-states are cleared. Perform any | ||
998 | * final cleanup of firmware resources (PCBs and XCBs). | ||
999 | */ | ||
1000 | if (fcport->loop_id != FC_NO_LOOP_ID) { | ||
1001 | fcport->ha->isp_ops->fabric_logout(fcport->ha, fcport->loop_id, | ||
1002 | fcport->d_id.b.domain, fcport->d_id.b.area, | ||
1003 | fcport->d_id.b.al_pa); | ||
1004 | fcport->loop_id = FC_NO_LOOP_ID; | ||
1005 | } | ||
1006 | |||
996 | qla2x00_abort_fcport_cmds(fcport); | 1007 | qla2x00_abort_fcport_cmds(fcport); |
997 | scsi_target_unblock(&rport->dev); | 1008 | scsi_target_unblock(&rport->dev); |
998 | } | 1009 | } |
diff --git a/drivers/scsi/qla2xxx/qla_def.h b/drivers/scsi/qla2xxx/qla_def.h index 6da31ba94404..94a720eabfd8 100644 --- a/drivers/scsi/qla2xxx/qla_def.h +++ b/drivers/scsi/qla2xxx/qla_def.h | |||
@@ -2237,6 +2237,7 @@ typedef struct scsi_qla_host { | |||
2237 | #define REGISTER_FDMI_NEEDED 26 | 2237 | #define REGISTER_FDMI_NEEDED 26 |
2238 | #define FCPORT_UPDATE_NEEDED 27 | 2238 | #define FCPORT_UPDATE_NEEDED 27 |
2239 | #define VP_DPC_NEEDED 28 /* wake up for VP dpc handling */ | 2239 | #define VP_DPC_NEEDED 28 /* wake up for VP dpc handling */ |
2240 | #define UNLOADING 29 | ||
2240 | 2241 | ||
2241 | uint32_t device_flags; | 2242 | uint32_t device_flags; |
2242 | #define DFLG_LOCAL_DEVICES BIT_0 | 2243 | #define DFLG_LOCAL_DEVICES BIT_0 |
diff --git a/drivers/scsi/qla2xxx/qla_init.c b/drivers/scsi/qla2xxx/qla_init.c index 601a6b29750c..ee89ddd64aae 100644 --- a/drivers/scsi/qla2xxx/qla_init.c +++ b/drivers/scsi/qla2xxx/qla_init.c | |||
@@ -976,8 +976,9 @@ qla2x00_setup_chip(scsi_qla_host_t *ha) | |||
976 | &ha->fw_attributes, &ha->fw_memory_size); | 976 | &ha->fw_attributes, &ha->fw_memory_size); |
977 | qla2x00_resize_request_q(ha); | 977 | qla2x00_resize_request_q(ha); |
978 | ha->flags.npiv_supported = 0; | 978 | ha->flags.npiv_supported = 0; |
979 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha)) && | 979 | if ((IS_QLA24XX(ha) || IS_QLA25XX(ha) || |
980 | (ha->fw_attributes & BIT_2)) { | 980 | IS_QLA84XX(ha)) && |
981 | (ha->fw_attributes & BIT_2)) { | ||
981 | ha->flags.npiv_supported = 1; | 982 | ha->flags.npiv_supported = 1; |
982 | if ((!ha->max_npiv_vports) || | 983 | if ((!ha->max_npiv_vports) || |
983 | ((ha->max_npiv_vports + 1) % | 984 | ((ha->max_npiv_vports + 1) % |
@@ -3251,6 +3252,7 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3251 | { | 3252 | { |
3252 | int rval; | 3253 | int rval; |
3253 | uint8_t status = 0; | 3254 | uint8_t status = 0; |
3255 | scsi_qla_host_t *vha; | ||
3254 | 3256 | ||
3255 | if (ha->flags.online) { | 3257 | if (ha->flags.online) { |
3256 | ha->flags.online = 0; | 3258 | ha->flags.online = 0; |
@@ -3265,6 +3267,8 @@ qla2x00_abort_isp(scsi_qla_host_t *ha) | |||
3265 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { | 3267 | if (atomic_read(&ha->loop_state) != LOOP_DOWN) { |
3266 | atomic_set(&ha->loop_state, LOOP_DOWN); | 3268 | atomic_set(&ha->loop_state, LOOP_DOWN); |
3267 | qla2x00_mark_all_devices_lost(ha, 0); | 3269 | qla2x00_mark_all_devices_lost(ha, 0); |
3270 | list_for_each_entry(vha, &ha->vp_list, vp_list) | ||
3271 | qla2x00_mark_all_devices_lost(vha, 0); | ||
3268 | } else { | 3272 | } else { |
3269 | if (!atomic_read(&ha->loop_down_timer)) | 3273 | if (!atomic_read(&ha->loop_down_timer)) |
3270 | atomic_set(&ha->loop_down_timer, | 3274 | atomic_set(&ha->loop_down_timer, |
diff --git a/drivers/scsi/qla2xxx/qla_isr.c b/drivers/scsi/qla2xxx/qla_isr.c index 874d802edb7d..45a3b93eed57 100644 --- a/drivers/scsi/qla2xxx/qla_isr.c +++ b/drivers/scsi/qla2xxx/qla_isr.c | |||
@@ -879,11 +879,12 @@ qla2x00_handle_sense(srb_t *sp, uint8_t *sense_data, uint32_t sense_len) | |||
879 | sp->request_sense_ptr += sense_len; | 879 | sp->request_sense_ptr += sense_len; |
880 | sp->request_sense_length -= sense_len; | 880 | sp->request_sense_length -= sense_len; |
881 | if (sp->request_sense_length != 0) | 881 | if (sp->request_sense_length != 0) |
882 | sp->ha->status_srb = sp; | 882 | sp->fcport->ha->status_srb = sp; |
883 | 883 | ||
884 | DEBUG5(printk("%s(): Check condition Sense data, scsi(%ld:%d:%d:%d) " | 884 | DEBUG5(printk("%s(): Check condition Sense data, scsi(%ld:%d:%d:%d) " |
885 | "cmd=%p pid=%ld\n", __func__, sp->ha->host_no, cp->device->channel, | 885 | "cmd=%p pid=%ld\n", __func__, sp->fcport->ha->host_no, |
886 | cp->device->id, cp->device->lun, cp, cp->serial_number)); | 886 | cp->device->channel, cp->device->id, cp->device->lun, cp, |
887 | cp->serial_number)); | ||
887 | if (sense_len) | 888 | if (sense_len) |
888 | DEBUG5(qla2x00_dump_buffer(cp->sense_buffer, | 889 | DEBUG5(qla2x00_dump_buffer(cp->sense_buffer, |
889 | CMD_ACTUAL_SNSLEN(cp))); | 890 | CMD_ACTUAL_SNSLEN(cp))); |
@@ -1184,9 +1185,8 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1184 | atomic_read(&fcport->state))); | 1185 | atomic_read(&fcport->state))); |
1185 | 1186 | ||
1186 | cp->result = DID_BUS_BUSY << 16; | 1187 | cp->result = DID_BUS_BUSY << 16; |
1187 | if (atomic_read(&fcport->state) == FCS_ONLINE) { | 1188 | if (atomic_read(&fcport->state) == FCS_ONLINE) |
1188 | qla2x00_mark_device_lost(ha, fcport, 1, 1); | 1189 | qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); |
1189 | } | ||
1190 | break; | 1190 | break; |
1191 | 1191 | ||
1192 | case CS_RESET: | 1192 | case CS_RESET: |
@@ -1229,7 +1229,7 @@ qla2x00_status_entry(scsi_qla_host_t *ha, void *pkt) | |||
1229 | 1229 | ||
1230 | /* Check to see if logout occurred. */ | 1230 | /* Check to see if logout occurred. */ |
1231 | if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) | 1231 | if ((le16_to_cpu(sts->status_flags) & SF_LOGOUT_SENT)) |
1232 | qla2x00_mark_device_lost(ha, fcport, 1, 1); | 1232 | qla2x00_mark_device_lost(fcport->ha, fcport, 1, 1); |
1233 | break; | 1233 | break; |
1234 | 1234 | ||
1235 | default: | 1235 | default: |
diff --git a/drivers/scsi/qla2xxx/qla_mbx.c b/drivers/scsi/qla2xxx/qla_mbx.c index bc90d6b8d0a0..813bc7784c0a 100644 --- a/drivers/scsi/qla2xxx/qla_mbx.c +++ b/drivers/scsi/qla2xxx/qla_mbx.c | |||
@@ -2686,7 +2686,7 @@ qla24xx_report_id_acquisition(scsi_qla_host_t *ha, | |||
2686 | set_bit(VP_IDX_ACQUIRED, &vha->vp_flags); | 2686 | set_bit(VP_IDX_ACQUIRED, &vha->vp_flags); |
2687 | set_bit(VP_DPC_NEEDED, &ha->dpc_flags); | 2687 | set_bit(VP_DPC_NEEDED, &ha->dpc_flags); |
2688 | 2688 | ||
2689 | wake_up_process(ha->dpc_thread); | 2689 | qla2xxx_wake_dpc(ha); |
2690 | } | 2690 | } |
2691 | } | 2691 | } |
2692 | 2692 | ||
diff --git a/drivers/scsi/qla2xxx/qla_os.c b/drivers/scsi/qla2xxx/qla_os.c index 7c8af7ed2a5d..26afe44265c7 100644 --- a/drivers/scsi/qla2xxx/qla_os.c +++ b/drivers/scsi/qla2xxx/qla_os.c | |||
@@ -780,7 +780,8 @@ qla2x00_eh_wait_for_pending_commands(scsi_qla_host_t *ha, unsigned int t, | |||
780 | sp = pha->outstanding_cmds[cnt]; | 780 | sp = pha->outstanding_cmds[cnt]; |
781 | if (!sp) | 781 | if (!sp) |
782 | continue; | 782 | continue; |
783 | if (ha->vp_idx != sp->ha->vp_idx) | 783 | |
784 | if (ha->vp_idx != sp->fcport->ha->vp_idx) | ||
784 | continue; | 785 | continue; |
785 | match = 0; | 786 | match = 0; |
786 | switch (type) { | 787 | switch (type) { |
@@ -1080,9 +1081,7 @@ qla2x00_abort_all_cmds(scsi_qla_host_t *ha, int res) | |||
1080 | sp = ha->outstanding_cmds[cnt]; | 1081 | sp = ha->outstanding_cmds[cnt]; |
1081 | if (sp) { | 1082 | if (sp) { |
1082 | ha->outstanding_cmds[cnt] = NULL; | 1083 | ha->outstanding_cmds[cnt] = NULL; |
1083 | sp->flags = 0; | ||
1084 | sp->cmd->result = res; | 1084 | sp->cmd->result = res; |
1085 | sp->cmd->host_scribble = (unsigned char *)NULL; | ||
1086 | qla2x00_sp_compl(ha, sp); | 1085 | qla2x00_sp_compl(ha, sp); |
1087 | } | 1086 | } |
1088 | } | 1087 | } |
@@ -1776,10 +1775,15 @@ probe_out: | |||
1776 | static void | 1775 | static void |
1777 | qla2x00_remove_one(struct pci_dev *pdev) | 1776 | qla2x00_remove_one(struct pci_dev *pdev) |
1778 | { | 1777 | { |
1779 | scsi_qla_host_t *ha; | 1778 | scsi_qla_host_t *ha, *vha, *temp; |
1780 | 1779 | ||
1781 | ha = pci_get_drvdata(pdev); | 1780 | ha = pci_get_drvdata(pdev); |
1782 | 1781 | ||
1782 | list_for_each_entry_safe(vha, temp, &ha->vp_list, vp_list) | ||
1783 | fc_vport_terminate(vha->fc_vport); | ||
1784 | |||
1785 | set_bit(UNLOADING, &ha->dpc_flags); | ||
1786 | |||
1783 | qla2x00_dfs_remove(ha); | 1787 | qla2x00_dfs_remove(ha); |
1784 | 1788 | ||
1785 | qla84xx_put_chip(ha); | 1789 | qla84xx_put_chip(ha); |
@@ -2451,8 +2455,10 @@ qla2x00_do_dpc(void *data) | |||
2451 | void | 2455 | void |
2452 | qla2xxx_wake_dpc(scsi_qla_host_t *ha) | 2456 | qla2xxx_wake_dpc(scsi_qla_host_t *ha) |
2453 | { | 2457 | { |
2454 | if (ha->dpc_thread) | 2458 | struct task_struct *t = ha->dpc_thread; |
2455 | wake_up_process(ha->dpc_thread); | 2459 | |
2460 | if (!test_bit(UNLOADING, &ha->dpc_flags) && t) | ||
2461 | wake_up_process(t); | ||
2456 | } | 2462 | } |
2457 | 2463 | ||
2458 | /* | 2464 | /* |
diff --git a/drivers/scsi/qla2xxx/qla_version.h b/drivers/scsi/qla2xxx/qla_version.h index 676c390db354..4160e4caa7b9 100644 --- a/drivers/scsi/qla2xxx/qla_version.h +++ b/drivers/scsi/qla2xxx/qla_version.h | |||
@@ -7,7 +7,7 @@ | |||
7 | /* | 7 | /* |
8 | * Driver version | 8 | * Driver version |
9 | */ | 9 | */ |
10 | #define QLA2XXX_VERSION "8.02.01-k6" | 10 | #define QLA2XXX_VERSION "8.02.01-k7" |
11 | 11 | ||
12 | #define QLA_DRIVER_MAJOR_VER 8 | 12 | #define QLA_DRIVER_MAJOR_VER 8 |
13 | #define QLA_DRIVER_MINOR_VER 2 | 13 | #define QLA_DRIVER_MINOR_VER 2 |
diff --git a/drivers/ssb/main.c b/drivers/ssb/main.c index d831a2beff39..87ab2443e66d 100644 --- a/drivers/ssb/main.c +++ b/drivers/ssb/main.c | |||
@@ -1165,15 +1165,19 @@ EXPORT_SYMBOL(ssb_dma_translation); | |||
1165 | 1165 | ||
1166 | int ssb_dma_set_mask(struct ssb_device *dev, u64 mask) | 1166 | int ssb_dma_set_mask(struct ssb_device *dev, u64 mask) |
1167 | { | 1167 | { |
1168 | #ifdef CONFIG_SSB_PCIHOST | ||
1168 | int err; | 1169 | int err; |
1170 | #endif | ||
1169 | 1171 | ||
1170 | switch (dev->bus->bustype) { | 1172 | switch (dev->bus->bustype) { |
1171 | case SSB_BUSTYPE_PCI: | 1173 | case SSB_BUSTYPE_PCI: |
1174 | #ifdef CONFIG_SSB_PCIHOST | ||
1172 | err = pci_set_dma_mask(dev->bus->host_pci, mask); | 1175 | err = pci_set_dma_mask(dev->bus->host_pci, mask); |
1173 | if (err) | 1176 | if (err) |
1174 | return err; | 1177 | return err; |
1175 | err = pci_set_consistent_dma_mask(dev->bus->host_pci, mask); | 1178 | err = pci_set_consistent_dma_mask(dev->bus->host_pci, mask); |
1176 | return err; | 1179 | return err; |
1180 | #endif | ||
1177 | case SSB_BUSTYPE_SSB: | 1181 | case SSB_BUSTYPE_SSB: |
1178 | return dma_set_mask(dev->dev, mask); | 1182 | return dma_set_mask(dev->dev, mask); |
1179 | default: | 1183 | default: |
@@ -1188,6 +1192,7 @@ void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size, | |||
1188 | { | 1192 | { |
1189 | switch (dev->bus->bustype) { | 1193 | switch (dev->bus->bustype) { |
1190 | case SSB_BUSTYPE_PCI: | 1194 | case SSB_BUSTYPE_PCI: |
1195 | #ifdef CONFIG_SSB_PCIHOST | ||
1191 | if (gfp_flags & GFP_DMA) { | 1196 | if (gfp_flags & GFP_DMA) { |
1192 | /* Workaround: The PCI API does not support passing | 1197 | /* Workaround: The PCI API does not support passing |
1193 | * a GFP flag. */ | 1198 | * a GFP flag. */ |
@@ -1195,6 +1200,7 @@ void * ssb_dma_alloc_consistent(struct ssb_device *dev, size_t size, | |||
1195 | size, dma_handle, gfp_flags); | 1200 | size, dma_handle, gfp_flags); |
1196 | } | 1201 | } |
1197 | return pci_alloc_consistent(dev->bus->host_pci, size, dma_handle); | 1202 | return pci_alloc_consistent(dev->bus->host_pci, size, dma_handle); |
1203 | #endif | ||
1198 | case SSB_BUSTYPE_SSB: | 1204 | case SSB_BUSTYPE_SSB: |
1199 | return dma_alloc_coherent(dev->dev, size, dma_handle, gfp_flags); | 1205 | return dma_alloc_coherent(dev->dev, size, dma_handle, gfp_flags); |
1200 | default: | 1206 | default: |
@@ -1210,6 +1216,7 @@ void ssb_dma_free_consistent(struct ssb_device *dev, size_t size, | |||
1210 | { | 1216 | { |
1211 | switch (dev->bus->bustype) { | 1217 | switch (dev->bus->bustype) { |
1212 | case SSB_BUSTYPE_PCI: | 1218 | case SSB_BUSTYPE_PCI: |
1219 | #ifdef CONFIG_SSB_PCIHOST | ||
1213 | if (gfp_flags & GFP_DMA) { | 1220 | if (gfp_flags & GFP_DMA) { |
1214 | /* Workaround: The PCI API does not support passing | 1221 | /* Workaround: The PCI API does not support passing |
1215 | * a GFP flag. */ | 1222 | * a GFP flag. */ |
@@ -1220,6 +1227,7 @@ void ssb_dma_free_consistent(struct ssb_device *dev, size_t size, | |||
1220 | pci_free_consistent(dev->bus->host_pci, size, | 1227 | pci_free_consistent(dev->bus->host_pci, size, |
1221 | vaddr, dma_handle); | 1228 | vaddr, dma_handle); |
1222 | return; | 1229 | return; |
1230 | #endif | ||
1223 | case SSB_BUSTYPE_SSB: | 1231 | case SSB_BUSTYPE_SSB: |
1224 | dma_free_coherent(dev->dev, size, vaddr, dma_handle); | 1232 | dma_free_coherent(dev->dev, size, vaddr, dma_handle); |
1225 | return; | 1233 | return; |
diff --git a/fs/fat/inode.c b/fs/fat/inode.c index 6d266d793e2c..80ff3381fa21 100644 --- a/fs/fat/inode.c +++ b/fs/fat/inode.c | |||
@@ -562,26 +562,23 @@ static int fat_write_inode(struct inode *inode, int wait) | |||
562 | struct buffer_head *bh; | 562 | struct buffer_head *bh; |
563 | struct msdos_dir_entry *raw_entry; | 563 | struct msdos_dir_entry *raw_entry; |
564 | loff_t i_pos; | 564 | loff_t i_pos; |
565 | int err = 0; | 565 | int err; |
566 | 566 | ||
567 | retry: | 567 | retry: |
568 | i_pos = MSDOS_I(inode)->i_pos; | 568 | i_pos = MSDOS_I(inode)->i_pos; |
569 | if (inode->i_ino == MSDOS_ROOT_INO || !i_pos) | 569 | if (inode->i_ino == MSDOS_ROOT_INO || !i_pos) |
570 | return 0; | 570 | return 0; |
571 | 571 | ||
572 | lock_super(sb); | ||
573 | bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits); | 572 | bh = sb_bread(sb, i_pos >> sbi->dir_per_block_bits); |
574 | if (!bh) { | 573 | if (!bh) { |
575 | printk(KERN_ERR "FAT: unable to read inode block " | 574 | printk(KERN_ERR "FAT: unable to read inode block " |
576 | "for updating (i_pos %lld)\n", i_pos); | 575 | "for updating (i_pos %lld)\n", i_pos); |
577 | err = -EIO; | 576 | return -EIO; |
578 | goto out; | ||
579 | } | 577 | } |
580 | spin_lock(&sbi->inode_hash_lock); | 578 | spin_lock(&sbi->inode_hash_lock); |
581 | if (i_pos != MSDOS_I(inode)->i_pos) { | 579 | if (i_pos != MSDOS_I(inode)->i_pos) { |
582 | spin_unlock(&sbi->inode_hash_lock); | 580 | spin_unlock(&sbi->inode_hash_lock); |
583 | brelse(bh); | 581 | brelse(bh); |
584 | unlock_super(sb); | ||
585 | goto retry; | 582 | goto retry; |
586 | } | 583 | } |
587 | 584 | ||
@@ -607,11 +604,10 @@ retry: | |||
607 | } | 604 | } |
608 | spin_unlock(&sbi->inode_hash_lock); | 605 | spin_unlock(&sbi->inode_hash_lock); |
609 | mark_buffer_dirty(bh); | 606 | mark_buffer_dirty(bh); |
607 | err = 0; | ||
610 | if (wait) | 608 | if (wait) |
611 | err = sync_dirty_buffer(bh); | 609 | err = sync_dirty_buffer(bh); |
612 | brelse(bh); | 610 | brelse(bh); |
613 | out: | ||
614 | unlock_super(sb); | ||
615 | return err; | 611 | return err; |
616 | } | 612 | } |
617 | 613 | ||
diff --git a/include/linux/ata.h b/include/linux/ata.h index 1c622e2b0504..1ce19c1ef0e9 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h | |||
@@ -46,18 +46,48 @@ enum { | |||
46 | ATA_MAX_SECTORS_TAPE = 65535, | 46 | ATA_MAX_SECTORS_TAPE = 65535, |
47 | 47 | ||
48 | ATA_ID_WORDS = 256, | 48 | ATA_ID_WORDS = 256, |
49 | ATA_ID_CONFIG = 0, | ||
50 | ATA_ID_CYLS = 1, | ||
51 | ATA_ID_HEADS = 3, | ||
52 | ATA_ID_SECTORS = 6, | ||
49 | ATA_ID_SERNO = 10, | 53 | ATA_ID_SERNO = 10, |
54 | ATA_ID_BUF_SIZE = 21, | ||
50 | ATA_ID_FW_REV = 23, | 55 | ATA_ID_FW_REV = 23, |
51 | ATA_ID_PROD = 27, | 56 | ATA_ID_PROD = 27, |
57 | ATA_ID_MAX_MULTSECT = 47, | ||
58 | ATA_ID_DWORD_IO = 48, | ||
59 | ATA_ID_CAPABILITY = 49, | ||
52 | ATA_ID_OLD_PIO_MODES = 51, | 60 | ATA_ID_OLD_PIO_MODES = 51, |
61 | ATA_ID_OLD_DMA_MODES = 52, | ||
53 | ATA_ID_FIELD_VALID = 53, | 62 | ATA_ID_FIELD_VALID = 53, |
63 | ATA_ID_CUR_CYLS = 54, | ||
64 | ATA_ID_CUR_HEADS = 55, | ||
65 | ATA_ID_CUR_SECTORS = 56, | ||
66 | ATA_ID_MULTSECT = 59, | ||
67 | ATA_ID_LBA_CAPACITY = 60, | ||
68 | ATA_ID_SWDMA_MODES = 62, | ||
54 | ATA_ID_MWDMA_MODES = 63, | 69 | ATA_ID_MWDMA_MODES = 63, |
55 | ATA_ID_PIO_MODES = 64, | 70 | ATA_ID_PIO_MODES = 64, |
56 | ATA_ID_EIDE_DMA_MIN = 65, | 71 | ATA_ID_EIDE_DMA_MIN = 65, |
72 | ATA_ID_EIDE_DMA_TIME = 66, | ||
57 | ATA_ID_EIDE_PIO = 67, | 73 | ATA_ID_EIDE_PIO = 67, |
58 | ATA_ID_EIDE_PIO_IORDY = 68, | 74 | ATA_ID_EIDE_PIO_IORDY = 68, |
59 | ATA_ID_UDMA_MODES = 88, | 75 | ATA_ID_QUEUE_DEPTH = 75, |
60 | ATA_ID_MAJOR_VER = 80, | 76 | ATA_ID_MAJOR_VER = 80, |
77 | ATA_ID_COMMAND_SET_1 = 82, | ||
78 | ATA_ID_COMMAND_SET_2 = 83, | ||
79 | ATA_ID_CFSSE = 84, | ||
80 | ATA_ID_CFS_ENABLE_1 = 85, | ||
81 | ATA_ID_CFS_ENABLE_2 = 86, | ||
82 | ATA_ID_CSF_DEFAULT = 87, | ||
83 | ATA_ID_UDMA_MODES = 88, | ||
84 | ATA_ID_HW_CONFIG = 93, | ||
85 | ATA_ID_SPG = 98, | ||
86 | ATA_ID_LBA_CAPACITY_2 = 100, | ||
87 | ATA_ID_LAST_LUN = 126, | ||
88 | ATA_ID_DLF = 128, | ||
89 | ATA_ID_CSFO = 129, | ||
90 | ATA_ID_CFA_POWER = 160, | ||
61 | ATA_ID_PIO4 = (1 << 1), | 91 | ATA_ID_PIO4 = (1 << 1), |
62 | 92 | ||
63 | ATA_ID_SERNO_LEN = 20, | 93 | ATA_ID_SERNO_LEN = 20, |
@@ -123,13 +153,26 @@ enum { | |||
123 | ATA_BUSY = (1 << 7), /* BSY status bit */ | 153 | ATA_BUSY = (1 << 7), /* BSY status bit */ |
124 | ATA_DRDY = (1 << 6), /* device ready */ | 154 | ATA_DRDY = (1 << 6), /* device ready */ |
125 | ATA_DF = (1 << 5), /* device fault */ | 155 | ATA_DF = (1 << 5), /* device fault */ |
156 | ATA_DSC = (1 << 4), /* drive seek complete */ | ||
126 | ATA_DRQ = (1 << 3), /* data request i/o */ | 157 | ATA_DRQ = (1 << 3), /* data request i/o */ |
158 | ATA_CORR = (1 << 2), /* corrected data error */ | ||
159 | ATA_IDX = (1 << 1), /* index */ | ||
127 | ATA_ERR = (1 << 0), /* have an error */ | 160 | ATA_ERR = (1 << 0), /* have an error */ |
128 | ATA_SRST = (1 << 2), /* software reset */ | 161 | ATA_SRST = (1 << 2), /* software reset */ |
129 | ATA_ICRC = (1 << 7), /* interface CRC error */ | 162 | ATA_ICRC = (1 << 7), /* interface CRC error */ |
163 | ATA_BBK = ATA_ICRC, /* pre-EIDE: block marked bad */ | ||
130 | ATA_UNC = (1 << 6), /* uncorrectable media error */ | 164 | ATA_UNC = (1 << 6), /* uncorrectable media error */ |
165 | ATA_MC = (1 << 5), /* media changed */ | ||
131 | ATA_IDNF = (1 << 4), /* ID not found */ | 166 | ATA_IDNF = (1 << 4), /* ID not found */ |
167 | ATA_MCR = (1 << 3), /* media change requested */ | ||
132 | ATA_ABORTED = (1 << 2), /* command aborted */ | 168 | ATA_ABORTED = (1 << 2), /* command aborted */ |
169 | ATA_TRK0NF = (1 << 1), /* track 0 not found */ | ||
170 | ATA_AMNF = (1 << 0), /* address mark not found */ | ||
171 | ATAPI_LFS = 0xF0, /* last failed sense */ | ||
172 | ATAPI_EOM = ATA_TRK0NF, /* end of media */ | ||
173 | ATAPI_ILI = ATA_AMNF, /* illegal length indication */ | ||
174 | ATAPI_IO = (1 << 1), | ||
175 | ATAPI_COD = (1 << 0), | ||
133 | 176 | ||
134 | /* ATA command block registers */ | 177 | /* ATA command block registers */ |
135 | ATA_REG_DATA = 0x00, | 178 | ATA_REG_DATA = 0x00, |
@@ -192,6 +235,13 @@ enum { | |||
192 | ATA_CMD_PMP_WRITE = 0xE8, | 235 | ATA_CMD_PMP_WRITE = 0xE8, |
193 | ATA_CMD_CONF_OVERLAY = 0xB1, | 236 | ATA_CMD_CONF_OVERLAY = 0xB1, |
194 | ATA_CMD_SEC_FREEZE_LOCK = 0xF5, | 237 | ATA_CMD_SEC_FREEZE_LOCK = 0xF5, |
238 | ATA_CMD_SMART = 0xB0, | ||
239 | ATA_CMD_MEDIA_LOCK = 0xDE, | ||
240 | ATA_CMD_MEDIA_UNLOCK = 0xDF, | ||
241 | /* marked obsolete in the ATA/ATAPI-7 spec */ | ||
242 | ATA_CMD_RESTORE = 0x10, | ||
243 | /* EXABYTE specific */ | ||
244 | ATA_EXABYTE_ENABLE_NEST = 0xF0, | ||
195 | 245 | ||
196 | /* READ_LOG_EXT pages */ | 246 | /* READ_LOG_EXT pages */ |
197 | ATA_LOG_SATA_NCQ = 0x10, | 247 | ATA_LOG_SATA_NCQ = 0x10, |
@@ -232,6 +282,10 @@ enum { | |||
232 | SETFEATURES_WC_ON = 0x02, /* Enable write cache */ | 282 | SETFEATURES_WC_ON = 0x02, /* Enable write cache */ |
233 | SETFEATURES_WC_OFF = 0x82, /* Disable write cache */ | 283 | SETFEATURES_WC_OFF = 0x82, /* Disable write cache */ |
234 | 284 | ||
285 | /* Enable/Disable Automatic Acoustic Management */ | ||
286 | SETFEATURES_AAM_ON = 0x42, | ||
287 | SETFEATURES_AAM_OFF = 0xC2, | ||
288 | |||
235 | SETFEATURES_SPINUP = 0x07, /* Spin-up drive */ | 289 | SETFEATURES_SPINUP = 0x07, /* Spin-up drive */ |
236 | 290 | ||
237 | SETFEATURES_SATA_ENABLE = 0x10, /* Enable use of SATA feature */ | 291 | SETFEATURES_SATA_ENABLE = 0x10, /* Enable use of SATA feature */ |
@@ -254,6 +308,15 @@ enum { | |||
254 | ATA_DCO_IDENTIFY = 0xC2, | 308 | ATA_DCO_IDENTIFY = 0xC2, |
255 | ATA_DCO_SET = 0xC3, | 309 | ATA_DCO_SET = 0xC3, |
256 | 310 | ||
311 | /* feature values for SMART */ | ||
312 | ATA_SMART_ENABLE = 0xD8, | ||
313 | ATA_SMART_READ_VALUES = 0xD0, | ||
314 | ATA_SMART_READ_THRESHOLDS = 0xD1, | ||
315 | |||
316 | /* password used in LBA Mid / LBA High for executing SMART commands */ | ||
317 | ATA_SMART_LBAM_PASS = 0x4F, | ||
318 | ATA_SMART_LBAH_PASS = 0xC2, | ||
319 | |||
257 | /* ATAPI stuff */ | 320 | /* ATAPI stuff */ |
258 | ATAPI_PKT_DMA = (1 << 0), | 321 | ATAPI_PKT_DMA = (1 << 0), |
259 | ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: | 322 | ATAPI_DMADIR = (1 << 2), /* ATAPI data dir: |
@@ -438,17 +501,17 @@ static inline int ata_is_data(u8 prot) | |||
438 | /* | 501 | /* |
439 | * id tests | 502 | * id tests |
440 | */ | 503 | */ |
441 | #define ata_id_is_ata(id) (((id)[0] & (1 << 15)) == 0) | 504 | #define ata_id_is_ata(id) (((id)[ATA_ID_CONFIG] & (1 << 15)) == 0) |
442 | #define ata_id_has_lba(id) ((id)[49] & (1 << 9)) | 505 | #define ata_id_has_lba(id) ((id)[ATA_ID_CAPABILITY] & (1 << 9)) |
443 | #define ata_id_has_dma(id) ((id)[49] & (1 << 8)) | 506 | #define ata_id_has_dma(id) ((id)[ATA_ID_CAPABILITY] & (1 << 8)) |
444 | #define ata_id_has_ncq(id) ((id)[76] & (1 << 8)) | 507 | #define ata_id_has_ncq(id) ((id)[76] & (1 << 8)) |
445 | #define ata_id_queue_depth(id) (((id)[75] & 0x1f) + 1) | 508 | #define ata_id_queue_depth(id) (((id)[ATA_ID_QUEUE_DEPTH] & 0x1f) + 1) |
446 | #define ata_id_removeable(id) ((id)[0] & (1 << 7)) | 509 | #define ata_id_removeable(id) ((id)[ATA_ID_CONFIG] & (1 << 7)) |
447 | #define ata_id_has_atapi_AN(id) \ | 510 | #define ata_id_has_atapi_AN(id) \ |
448 | ( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \ | 511 | ( (((id)[76] != 0x0000) && ((id)[76] != 0xffff)) && \ |
449 | ((id)[78] & (1 << 5)) ) | 512 | ((id)[78] & (1 << 5)) ) |
450 | #define ata_id_iordy_disable(id) ((id)[49] & (1 << 10)) | 513 | #define ata_id_iordy_disable(id) ((id)[ATA_ID_CAPABILITY] & (1 << 10)) |
451 | #define ata_id_has_iordy(id) ((id)[49] & (1 << 11)) | 514 | #define ata_id_has_iordy(id) ((id)[ATA_ID_CAPABILITY] & (1 << 11)) |
452 | #define ata_id_u32(id,n) \ | 515 | #define ata_id_u32(id,n) \ |
453 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) | 516 | (((u32) (id)[(n) + 1] << 16) | ((u32) (id)[(n)])) |
454 | #define ata_id_u64(id,n) \ | 517 | #define ata_id_u64(id,n) \ |
@@ -457,7 +520,7 @@ static inline int ata_is_data(u8 prot) | |||
457 | ((u64) (id)[(n) + 1] << 16) | \ | 520 | ((u64) (id)[(n) + 1] << 16) | \ |
458 | ((u64) (id)[(n) + 0]) ) | 521 | ((u64) (id)[(n) + 0]) ) |
459 | 522 | ||
460 | #define ata_id_cdb_intr(id) (((id)[0] & 0x60) == 0x20) | 523 | #define ata_id_cdb_intr(id) (((id)[ATA_ID_CONFIG] & 0x60) == 0x20) |
461 | 524 | ||
462 | static inline bool ata_id_has_hipm(const u16 *id) | 525 | static inline bool ata_id_has_hipm(const u16 *id) |
463 | { | 526 | { |
@@ -482,75 +545,75 @@ static inline bool ata_id_has_dipm(const u16 *id) | |||
482 | 545 | ||
483 | static inline int ata_id_has_fua(const u16 *id) | 546 | static inline int ata_id_has_fua(const u16 *id) |
484 | { | 547 | { |
485 | if ((id[84] & 0xC000) != 0x4000) | 548 | if ((id[ATA_ID_CFSSE] & 0xC000) != 0x4000) |
486 | return 0; | 549 | return 0; |
487 | return id[84] & (1 << 6); | 550 | return id[ATA_ID_CFSSE] & (1 << 6); |
488 | } | 551 | } |
489 | 552 | ||
490 | static inline int ata_id_has_flush(const u16 *id) | 553 | static inline int ata_id_has_flush(const u16 *id) |
491 | { | 554 | { |
492 | if ((id[83] & 0xC000) != 0x4000) | 555 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
493 | return 0; | 556 | return 0; |
494 | return id[83] & (1 << 12); | 557 | return id[ATA_ID_COMMAND_SET_2] & (1 << 12); |
495 | } | 558 | } |
496 | 559 | ||
497 | static inline int ata_id_has_flush_ext(const u16 *id) | 560 | static inline int ata_id_has_flush_ext(const u16 *id) |
498 | { | 561 | { |
499 | if ((id[83] & 0xC000) != 0x4000) | 562 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
500 | return 0; | 563 | return 0; |
501 | return id[83] & (1 << 13); | 564 | return id[ATA_ID_COMMAND_SET_2] & (1 << 13); |
502 | } | 565 | } |
503 | 566 | ||
504 | static inline int ata_id_has_lba48(const u16 *id) | 567 | static inline int ata_id_has_lba48(const u16 *id) |
505 | { | 568 | { |
506 | if ((id[83] & 0xC000) != 0x4000) | 569 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
507 | return 0; | 570 | return 0; |
508 | if (!ata_id_u64(id, 100)) | 571 | if (!ata_id_u64(id, ATA_ID_LBA_CAPACITY_2)) |
509 | return 0; | 572 | return 0; |
510 | return id[83] & (1 << 10); | 573 | return id[ATA_ID_COMMAND_SET_2] & (1 << 10); |
511 | } | 574 | } |
512 | 575 | ||
513 | static inline int ata_id_hpa_enabled(const u16 *id) | 576 | static inline int ata_id_hpa_enabled(const u16 *id) |
514 | { | 577 | { |
515 | /* Yes children, word 83 valid bits cover word 82 data */ | 578 | /* Yes children, word 83 valid bits cover word 82 data */ |
516 | if ((id[83] & 0xC000) != 0x4000) | 579 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
517 | return 0; | 580 | return 0; |
518 | /* And 87 covers 85-87 */ | 581 | /* And 87 covers 85-87 */ |
519 | if ((id[87] & 0xC000) != 0x4000) | 582 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
520 | return 0; | 583 | return 0; |
521 | /* Check command sets enabled as well as supported */ | 584 | /* Check command sets enabled as well as supported */ |
522 | if ((id[85] & ( 1 << 10)) == 0) | 585 | if ((id[ATA_ID_CFS_ENABLE_1] & (1 << 10)) == 0) |
523 | return 0; | 586 | return 0; |
524 | return id[82] & (1 << 10); | 587 | return id[ATA_ID_COMMAND_SET_1] & (1 << 10); |
525 | } | 588 | } |
526 | 589 | ||
527 | static inline int ata_id_has_wcache(const u16 *id) | 590 | static inline int ata_id_has_wcache(const u16 *id) |
528 | { | 591 | { |
529 | /* Yes children, word 83 valid bits cover word 82 data */ | 592 | /* Yes children, word 83 valid bits cover word 82 data */ |
530 | if ((id[83] & 0xC000) != 0x4000) | 593 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
531 | return 0; | 594 | return 0; |
532 | return id[82] & (1 << 5); | 595 | return id[ATA_ID_COMMAND_SET_1] & (1 << 5); |
533 | } | 596 | } |
534 | 597 | ||
535 | static inline int ata_id_has_pm(const u16 *id) | 598 | static inline int ata_id_has_pm(const u16 *id) |
536 | { | 599 | { |
537 | if ((id[83] & 0xC000) != 0x4000) | 600 | if ((id[ATA_ID_COMMAND_SET_2] & 0xC000) != 0x4000) |
538 | return 0; | 601 | return 0; |
539 | return id[82] & (1 << 3); | 602 | return id[ATA_ID_COMMAND_SET_1] & (1 << 3); |
540 | } | 603 | } |
541 | 604 | ||
542 | static inline int ata_id_rahead_enabled(const u16 *id) | 605 | static inline int ata_id_rahead_enabled(const u16 *id) |
543 | { | 606 | { |
544 | if ((id[87] & 0xC000) != 0x4000) | 607 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
545 | return 0; | 608 | return 0; |
546 | return id[85] & (1 << 6); | 609 | return id[ATA_ID_CFS_ENABLE_1] & (1 << 6); |
547 | } | 610 | } |
548 | 611 | ||
549 | static inline int ata_id_wcache_enabled(const u16 *id) | 612 | static inline int ata_id_wcache_enabled(const u16 *id) |
550 | { | 613 | { |
551 | if ((id[87] & 0xC000) != 0x4000) | 614 | if ((id[ATA_ID_CSF_DEFAULT] & 0xC000) != 0x4000) |
552 | return 0; | 615 | return 0; |
553 | return id[85] & (1 << 5); | 616 | return id[ATA_ID_CFS_ENABLE_1] & (1 << 5); |
554 | } | 617 | } |
555 | 618 | ||
556 | /** | 619 | /** |
@@ -581,7 +644,7 @@ static inline unsigned int ata_id_major_version(const u16 *id) | |||
581 | 644 | ||
582 | static inline int ata_id_is_sata(const u16 *id) | 645 | static inline int ata_id_is_sata(const u16 *id) |
583 | { | 646 | { |
584 | return ata_id_major_version(id) >= 5 && id[93] == 0; | 647 | return ata_id_major_version(id) >= 5 && id[ATA_ID_HW_CONFIG] == 0; |
585 | } | 648 | } |
586 | 649 | ||
587 | static inline int ata_id_has_tpm(const u16 *id) | 650 | static inline int ata_id_has_tpm(const u16 *id) |
@@ -599,7 +662,7 @@ static inline int ata_id_has_dword_io(const u16 *id) | |||
599 | /* ATA 8 reuses this flag for "trusted" computing */ | 662 | /* ATA 8 reuses this flag for "trusted" computing */ |
600 | if (ata_id_major_version(id) > 7) | 663 | if (ata_id_major_version(id) > 7) |
601 | return 0; | 664 | return 0; |
602 | if (id[48] & (1 << 0)) | 665 | if (id[ATA_ID_DWORD_IO] & (1 << 0)) |
603 | return 1; | 666 | return 1; |
604 | return 0; | 667 | return 0; |
605 | } | 668 | } |
@@ -608,22 +671,22 @@ static inline int ata_id_current_chs_valid(const u16 *id) | |||
608 | { | 671 | { |
609 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command | 672 | /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command |
610 | has not been issued to the device then the values of | 673 | has not been issued to the device then the values of |
611 | id[54] to id[56] are vendor specific. */ | 674 | id[ATA_ID_CUR_CYLS] to id[ATA_ID_CUR_SECTORS] are vendor specific. */ |
612 | return (id[53] & 0x01) && /* Current translation valid */ | 675 | return (id[ATA_ID_FIELD_VALID] & 1) && /* Current translation valid */ |
613 | id[54] && /* cylinders in current translation */ | 676 | id[ATA_ID_CUR_CYLS] && /* cylinders in current translation */ |
614 | id[55] && /* heads in current translation */ | 677 | id[ATA_ID_CUR_HEADS] && /* heads in current translation */ |
615 | id[55] <= 16 && | 678 | id[ATA_ID_CUR_HEADS] <= 16 && |
616 | id[56]; /* sectors in current translation */ | 679 | id[ATA_ID_CUR_SECTORS]; /* sectors in current translation */ |
617 | } | 680 | } |
618 | 681 | ||
619 | static inline int ata_id_is_cfa(const u16 *id) | 682 | static inline int ata_id_is_cfa(const u16 *id) |
620 | { | 683 | { |
621 | u16 v = id[0]; | 684 | if (id[ATA_ID_CONFIG] == 0x848A) /* Standard CF */ |
622 | if (v == 0x848A) /* Standard CF */ | ||
623 | return 1; | 685 | return 1; |
624 | /* Could be CF hiding as standard ATA */ | 686 | /* Could be CF hiding as standard ATA */ |
625 | if (ata_id_major_version(id) >= 3 && id[82] != 0xFFFF && | 687 | if (ata_id_major_version(id) >= 3 && |
626 | (id[82] & ( 1 << 2))) | 688 | id[ATA_ID_COMMAND_SET_1] != 0xFFFF && |
689 | (id[ATA_ID_COMMAND_SET_1] & (1 << 2))) | ||
627 | return 1; | 690 | return 1; |
628 | return 0; | 691 | return 0; |
629 | } | 692 | } |
@@ -632,21 +695,21 @@ static inline int ata_drive_40wire(const u16 *dev_id) | |||
632 | { | 695 | { |
633 | if (ata_id_is_sata(dev_id)) | 696 | if (ata_id_is_sata(dev_id)) |
634 | return 0; /* SATA */ | 697 | return 0; /* SATA */ |
635 | if ((dev_id[93] & 0xE000) == 0x6000) | 698 | if ((dev_id[ATA_ID_HW_CONFIG] & 0xE000) == 0x6000) |
636 | return 0; /* 80 wire */ | 699 | return 0; /* 80 wire */ |
637 | return 1; | 700 | return 1; |
638 | } | 701 | } |
639 | 702 | ||
640 | static inline int ata_drive_40wire_relaxed(const u16 *dev_id) | 703 | static inline int ata_drive_40wire_relaxed(const u16 *dev_id) |
641 | { | 704 | { |
642 | if ((dev_id[93] & 0x2000) == 0x2000) | 705 | if ((dev_id[ATA_ID_HW_CONFIG] & 0x2000) == 0x2000) |
643 | return 0; /* 80 wire */ | 706 | return 0; /* 80 wire */ |
644 | return 1; | 707 | return 1; |
645 | } | 708 | } |
646 | 709 | ||
647 | static inline int atapi_cdb_len(const u16 *dev_id) | 710 | static inline int atapi_cdb_len(const u16 *dev_id) |
648 | { | 711 | { |
649 | u16 tmp = dev_id[0] & 0x3; | 712 | u16 tmp = dev_id[ATA_ID_CONFIG] & 0x3; |
650 | switch (tmp) { | 713 | switch (tmp) { |
651 | case 0: return 12; | 714 | case 0: return 12; |
652 | case 1: return 16; | 715 | case 1: return 16; |
@@ -656,7 +719,7 @@ static inline int atapi_cdb_len(const u16 *dev_id) | |||
656 | 719 | ||
657 | static inline int atapi_command_packet_set(const u16 *dev_id) | 720 | static inline int atapi_command_packet_set(const u16 *dev_id) |
658 | { | 721 | { |
659 | return (dev_id[0] >> 8) & 0x1f; | 722 | return (dev_id[ATA_ID_CONFIG] >> 8) & 0x1f; |
660 | } | 723 | } |
661 | 724 | ||
662 | static inline int atapi_id_dmadir(const u16 *dev_id) | 725 | static inline int atapi_id_dmadir(const u16 *dev_id) |
diff --git a/include/linux/if_tun.h b/include/linux/if_tun.h index 4c6307ad9fdb..8529f57ba263 100644 --- a/include/linux/if_tun.h +++ b/include/linux/if_tun.h | |||
@@ -45,6 +45,7 @@ | |||
45 | #define TUNGETFEATURES _IOR('T', 207, unsigned int) | 45 | #define TUNGETFEATURES _IOR('T', 207, unsigned int) |
46 | #define TUNSETOFFLOAD _IOW('T', 208, unsigned int) | 46 | #define TUNSETOFFLOAD _IOW('T', 208, unsigned int) |
47 | #define TUNSETTXFILTER _IOW('T', 209, unsigned int) | 47 | #define TUNSETTXFILTER _IOW('T', 209, unsigned int) |
48 | #define TUNGETIFF _IOR('T', 210, unsigned int) | ||
48 | 49 | ||
49 | /* TUNSETIFF ifr flags */ | 50 | /* TUNSETIFF ifr flags */ |
50 | #define IFF_TUN 0x0001 | 51 | #define IFF_TUN 0x0001 |
diff --git a/include/linux/pci-acpi.h b/include/linux/pci-acpi.h index 3ba25065fa96..8837928fbf33 100644 --- a/include/linux/pci-acpi.h +++ b/include/linux/pci-acpi.h | |||
@@ -57,6 +57,15 @@ static inline acpi_status pcie_osc_support_set(u32 flags) | |||
57 | { | 57 | { |
58 | return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING); | 58 | return __pci_osc_support_set(flags, PCI_EXPRESS_ROOT_HID_STRING); |
59 | } | 59 | } |
60 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | ||
61 | { | ||
62 | /* Find root host bridge */ | ||
63 | while (pdev->bus->self) | ||
64 | pdev = pdev->bus->self; | ||
65 | |||
66 | return acpi_get_pci_rootbridge_handle(pci_domain_nr(pdev->bus), | ||
67 | pdev->bus->number); | ||
68 | } | ||
60 | #else | 69 | #else |
61 | #if !defined(AE_ERROR) | 70 | #if !defined(AE_ERROR) |
62 | typedef u32 acpi_status; | 71 | typedef u32 acpi_status; |
@@ -66,6 +75,8 @@ static inline acpi_status pci_osc_control_set(acpi_handle handle, u32 flags) | |||
66 | {return AE_ERROR;} | 75 | {return AE_ERROR;} |
67 | static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;} | 76 | static inline acpi_status pci_osc_support_set(u32 flags) {return AE_ERROR;} |
68 | static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;} | 77 | static inline acpi_status pcie_osc_support_set(u32 flags) {return AE_ERROR;} |
78 | static inline acpi_handle acpi_find_root_bridge_handle(struct pci_dev *pdev) | ||
79 | { return NULL; } | ||
69 | #endif | 80 | #endif |
70 | 81 | ||
71 | #endif /* _PCI_ACPI_H_ */ | 82 | #endif /* _PCI_ACPI_H_ */ |
diff --git a/include/linux/pci_ids.h b/include/linux/pci_ids.h index 9ec2bcce8e83..f1624b396754 100644 --- a/include/linux/pci_ids.h +++ b/include/linux/pci_ids.h | |||
@@ -2428,6 +2428,9 @@ | |||
2428 | #define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a | 2428 | #define PCI_DEVICE_ID_INTEL_ICH10_3 0x3a1a |
2429 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 | 2429 | #define PCI_DEVICE_ID_INTEL_ICH10_4 0x3a30 |
2430 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 | 2430 | #define PCI_DEVICE_ID_INTEL_ICH10_5 0x3a60 |
2431 | #define PCI_DEVICE_ID_INTEL_PCH_0 0x3b10 | ||
2432 | #define PCI_DEVICE_ID_INTEL_PCH_1 0x3b11 | ||
2433 | #define PCI_DEVICE_ID_INTEL_PCH_2 0x3b30 | ||
2431 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f | 2434 | #define PCI_DEVICE_ID_INTEL_IOAT_SNB 0x402f |
2432 | #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 | 2435 | #define PCI_DEVICE_ID_INTEL_5100_16 0x65f0 |
2433 | #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 | 2436 | #define PCI_DEVICE_ID_INTEL_5100_21 0x65f5 |
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h index 358661c9990e..909923717830 100644 --- a/include/linux/skbuff.h +++ b/include/linux/skbuff.h | |||
@@ -1452,6 +1452,10 @@ extern int skb_copy_datagram_iovec(const struct sk_buff *from, | |||
1452 | extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, | 1452 | extern int skb_copy_and_csum_datagram_iovec(struct sk_buff *skb, |
1453 | int hlen, | 1453 | int hlen, |
1454 | struct iovec *iov); | 1454 | struct iovec *iov); |
1455 | extern int skb_copy_datagram_from_iovec(struct sk_buff *skb, | ||
1456 | int offset, | ||
1457 | struct iovec *from, | ||
1458 | int len); | ||
1455 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); | 1459 | extern void skb_free_datagram(struct sock *sk, struct sk_buff *skb); |
1456 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, | 1460 | extern int skb_kill_datagram(struct sock *sk, struct sk_buff *skb, |
1457 | unsigned int flags); | 1461 | unsigned int flags); |
diff --git a/include/net/addrconf.h b/include/net/addrconf.h index 06b28142b3ab..c216de528b08 100644 --- a/include/net/addrconf.h +++ b/include/net/addrconf.h | |||
@@ -80,7 +80,8 @@ extern struct inet6_ifaddr *ipv6_get_ifaddr(struct net *net, | |||
80 | struct net_device *dev, | 80 | struct net_device *dev, |
81 | int strict); | 81 | int strict); |
82 | 82 | ||
83 | extern int ipv6_dev_get_saddr(struct net_device *dev, | 83 | extern int ipv6_dev_get_saddr(struct net *net, |
84 | struct net_device *dev, | ||
84 | const struct in6_addr *daddr, | 85 | const struct in6_addr *daddr, |
85 | unsigned int srcprefs, | 86 | unsigned int srcprefs, |
86 | struct in6_addr *saddr); | 87 | struct in6_addr *saddr); |
diff --git a/include/net/ip6_route.h b/include/net/ip6_route.h index bc391ba101e9..5f53db7e4e57 100644 --- a/include/net/ip6_route.h +++ b/include/net/ip6_route.h | |||
@@ -107,6 +107,7 @@ struct rt6_rtnl_dump_arg | |||
107 | { | 107 | { |
108 | struct sk_buff *skb; | 108 | struct sk_buff *skb; |
109 | struct netlink_callback *cb; | 109 | struct netlink_callback *cb; |
110 | struct net *net; | ||
110 | }; | 111 | }; |
111 | 112 | ||
112 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); | 113 | extern int rt6_dump_route(struct rt6_info *rt, void *p_arg); |
diff --git a/include/net/mac80211.h b/include/net/mac80211.h index b397e4d984c7..ff137fd7714f 100644 --- a/include/net/mac80211.h +++ b/include/net/mac80211.h | |||
@@ -708,10 +708,7 @@ enum ieee80211_tkip_key_type { | |||
708 | * rely on the host system for such buffering. This option is used | 708 | * rely on the host system for such buffering. This option is used |
709 | * to configure the IEEE 802.11 upper layer to buffer broadcast and | 709 | * to configure the IEEE 802.11 upper layer to buffer broadcast and |
710 | * multicast frames when there are power saving stations so that | 710 | * multicast frames when there are power saving stations so that |
711 | * the driver can fetch them with ieee80211_get_buffered_bc(). Note | 711 | * the driver can fetch them with ieee80211_get_buffered_bc(). |
712 | * that not setting this flag works properly only when the | ||
713 | * %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is also not set because | ||
714 | * otherwise the stack will not know when the DTIM beacon was sent. | ||
715 | * | 712 | * |
716 | * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE: | 713 | * @IEEE80211_HW_2GHZ_SHORT_SLOT_INCAPABLE: |
717 | * Hardware is not capable of short slot operation on the 2.4 GHz band. | 714 | * Hardware is not capable of short slot operation on the 2.4 GHz band. |
@@ -1099,10 +1096,8 @@ enum ieee80211_ampdu_mlme_action { | |||
1099 | * See the section "Frame filtering" for more information. | 1096 | * See the section "Frame filtering" for more information. |
1100 | * This callback must be implemented and atomic. | 1097 | * This callback must be implemented and atomic. |
1101 | * | 1098 | * |
1102 | * @set_tim: Set TIM bit. If the hardware/firmware takes care of beacon | 1099 | * @set_tim: Set TIM bit. mac80211 calls this function when a TIM bit |
1103 | * generation (that is, %IEEE80211_HW_HOST_GEN_BEACON_TEMPLATE is set) | 1100 | * must be set or cleared for a given AID. Must be atomic. |
1104 | * mac80211 calls this function when a TIM bit must be set or cleared | ||
1105 | * for a given AID. Must be atomic. | ||
1106 | * | 1101 | * |
1107 | * @set_key: See the section "Hardware crypto acceleration" | 1102 | * @set_key: See the section "Hardware crypto acceleration" |
1108 | * This callback can sleep, and is only called between add_interface | 1103 | * This callback can sleep, and is only called between add_interface |
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h index a7abfda3e447..84d25f2e6188 100644 --- a/include/net/sch_generic.h +++ b/include/net/sch_generic.h | |||
@@ -27,6 +27,7 @@ enum qdisc_state_t | |||
27 | { | 27 | { |
28 | __QDISC_STATE_RUNNING, | 28 | __QDISC_STATE_RUNNING, |
29 | __QDISC_STATE_SCHED, | 29 | __QDISC_STATE_SCHED, |
30 | __QDISC_STATE_DEACTIVATED, | ||
30 | }; | 31 | }; |
31 | 32 | ||
32 | struct qdisc_size_table { | 33 | struct qdisc_size_table { |
@@ -60,7 +61,6 @@ struct Qdisc | |||
60 | struct gnet_stats_basic bstats; | 61 | struct gnet_stats_basic bstats; |
61 | struct gnet_stats_queue qstats; | 62 | struct gnet_stats_queue qstats; |
62 | struct gnet_stats_rate_est rate_est; | 63 | struct gnet_stats_rate_est rate_est; |
63 | struct rcu_head q_rcu; | ||
64 | int (*reshape_fail)(struct sk_buff *skb, | 64 | int (*reshape_fail)(struct sk_buff *skb, |
65 | struct Qdisc *q); | 65 | struct Qdisc *q); |
66 | 66 | ||
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h index 291d56a19167..80b2e93c2936 100644 --- a/include/scsi/scsi_device.h +++ b/include/scsi/scsi_device.h | |||
@@ -6,6 +6,7 @@ | |||
6 | #include <linux/spinlock.h> | 6 | #include <linux/spinlock.h> |
7 | #include <linux/workqueue.h> | 7 | #include <linux/workqueue.h> |
8 | #include <linux/blkdev.h> | 8 | #include <linux/blkdev.h> |
9 | #include <scsi/scsi.h> | ||
9 | #include <asm/atomic.h> | 10 | #include <asm/atomic.h> |
10 | 11 | ||
11 | struct request_queue; | 12 | struct request_queue; |
@@ -426,7 +427,7 @@ static inline int scsi_device_enclosure(struct scsi_device *sdev) | |||
426 | 427 | ||
427 | static inline int scsi_device_protection(struct scsi_device *sdev) | 428 | static inline int scsi_device_protection(struct scsi_device *sdev) |
428 | { | 429 | { |
429 | return sdev->inquiry[5] & (1<<0); | 430 | return sdev->scsi_level > SCSI_2 && sdev->inquiry[5] & (1<<0); |
430 | } | 431 | } |
431 | 432 | ||
432 | #define MODULE_ALIAS_SCSI_DEVICE(type) \ | 433 | #define MODULE_ALIAS_SCSI_DEVICE(type) \ |
diff --git a/kernel/signal.c b/kernel/signal.c index c539f60c6f41..e661b01d340f 100644 --- a/kernel/signal.c +++ b/kernel/signal.c | |||
@@ -1338,6 +1338,7 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1338 | struct siginfo info; | 1338 | struct siginfo info; |
1339 | unsigned long flags; | 1339 | unsigned long flags; |
1340 | struct sighand_struct *psig; | 1340 | struct sighand_struct *psig; |
1341 | int ret = sig; | ||
1341 | 1342 | ||
1342 | BUG_ON(sig == -1); | 1343 | BUG_ON(sig == -1); |
1343 | 1344 | ||
@@ -1402,7 +1403,7 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1402 | * is implementation-defined: we do (if you don't want | 1403 | * is implementation-defined: we do (if you don't want |
1403 | * it, just use SIG_IGN instead). | 1404 | * it, just use SIG_IGN instead). |
1404 | */ | 1405 | */ |
1405 | tsk->exit_signal = -1; | 1406 | ret = tsk->exit_signal = -1; |
1406 | if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) | 1407 | if (psig->action[SIGCHLD-1].sa.sa_handler == SIG_IGN) |
1407 | sig = -1; | 1408 | sig = -1; |
1408 | } | 1409 | } |
@@ -1411,7 +1412,7 @@ int do_notify_parent(struct task_struct *tsk, int sig) | |||
1411 | __wake_up_parent(tsk, tsk->parent); | 1412 | __wake_up_parent(tsk, tsk->parent); |
1412 | spin_unlock_irqrestore(&psig->siglock, flags); | 1413 | spin_unlock_irqrestore(&psig->siglock, flags); |
1413 | 1414 | ||
1414 | return sig; | 1415 | return ret; |
1415 | } | 1416 | } |
1416 | 1417 | ||
1417 | static void do_notify_parent_cldstop(struct task_struct *tsk, int why) | 1418 | static void do_notify_parent_cldstop(struct task_struct *tsk, int why) |
diff --git a/net/bluetooth/af_bluetooth.c b/net/bluetooth/af_bluetooth.c index 4e59df5f8e05..1edfdf4c095b 100644 --- a/net/bluetooth/af_bluetooth.c +++ b/net/bluetooth/af_bluetooth.c | |||
@@ -456,7 +456,7 @@ static void __exit bt_exit(void) | |||
456 | subsys_initcall(bt_init); | 456 | subsys_initcall(bt_init); |
457 | module_exit(bt_exit); | 457 | module_exit(bt_exit); |
458 | 458 | ||
459 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 459 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
460 | MODULE_DESCRIPTION("Bluetooth Core ver " VERSION); | 460 | MODULE_DESCRIPTION("Bluetooth Core ver " VERSION); |
461 | MODULE_VERSION(VERSION); | 461 | MODULE_VERSION(VERSION); |
462 | MODULE_LICENSE("GPL"); | 462 | MODULE_LICENSE("GPL"); |
diff --git a/net/bluetooth/bnep/core.c b/net/bluetooth/bnep/core.c index 12bba6207a8d..80ba30cf4b68 100644 --- a/net/bluetooth/bnep/core.c +++ b/net/bluetooth/bnep/core.c | |||
@@ -736,7 +736,7 @@ MODULE_PARM_DESC(compress_src, "Compress sources headers"); | |||
736 | module_param(compress_dst, bool, 0644); | 736 | module_param(compress_dst, bool, 0644); |
737 | MODULE_PARM_DESC(compress_dst, "Compress destination headers"); | 737 | MODULE_PARM_DESC(compress_dst, "Compress destination headers"); |
738 | 738 | ||
739 | MODULE_AUTHOR("David Libault <david.libault@inventel.fr>, Maxim Krasnyansky <maxk@qualcomm.com>"); | 739 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
740 | MODULE_DESCRIPTION("Bluetooth BNEP ver " VERSION); | 740 | MODULE_DESCRIPTION("Bluetooth BNEP ver " VERSION); |
741 | MODULE_VERSION(VERSION); | 741 | MODULE_VERSION(VERSION); |
742 | MODULE_LICENSE("GPL"); | 742 | MODULE_LICENSE("GPL"); |
diff --git a/net/bluetooth/hci_sysfs.c b/net/bluetooth/hci_sysfs.c index c85bf8f678dc..f4f6615cad9f 100644 --- a/net/bluetooth/hci_sysfs.c +++ b/net/bluetooth/hci_sysfs.c | |||
@@ -3,8 +3,6 @@ | |||
3 | #include <linux/kernel.h> | 3 | #include <linux/kernel.h> |
4 | #include <linux/init.h> | 4 | #include <linux/init.h> |
5 | 5 | ||
6 | #include <linux/platform_device.h> | ||
7 | |||
8 | #include <net/bluetooth/bluetooth.h> | 6 | #include <net/bluetooth/bluetooth.h> |
9 | #include <net/bluetooth/hci_core.h> | 7 | #include <net/bluetooth/hci_core.h> |
10 | 8 | ||
@@ -12,10 +10,164 @@ | |||
12 | #undef BT_DBG | 10 | #undef BT_DBG |
13 | #define BT_DBG(D...) | 11 | #define BT_DBG(D...) |
14 | #endif | 12 | #endif |
13 | |||
14 | struct class *bt_class = NULL; | ||
15 | EXPORT_SYMBOL_GPL(bt_class); | ||
16 | |||
15 | static struct workqueue_struct *btaddconn; | 17 | static struct workqueue_struct *btaddconn; |
16 | static struct workqueue_struct *btdelconn; | 18 | static struct workqueue_struct *btdelconn; |
17 | 19 | ||
18 | static inline char *typetostr(int type) | 20 | static inline char *link_typetostr(int type) |
21 | { | ||
22 | switch (type) { | ||
23 | case ACL_LINK: | ||
24 | return "ACL"; | ||
25 | case SCO_LINK: | ||
26 | return "SCO"; | ||
27 | case ESCO_LINK: | ||
28 | return "eSCO"; | ||
29 | default: | ||
30 | return "UNKNOWN"; | ||
31 | } | ||
32 | } | ||
33 | |||
34 | static ssize_t show_link_type(struct device *dev, struct device_attribute *attr, char *buf) | ||
35 | { | ||
36 | struct hci_conn *conn = dev_get_drvdata(dev); | ||
37 | return sprintf(buf, "%s\n", link_typetostr(conn->type)); | ||
38 | } | ||
39 | |||
40 | static ssize_t show_link_address(struct device *dev, struct device_attribute *attr, char *buf) | ||
41 | { | ||
42 | struct hci_conn *conn = dev_get_drvdata(dev); | ||
43 | bdaddr_t bdaddr; | ||
44 | baswap(&bdaddr, &conn->dst); | ||
45 | return sprintf(buf, "%s\n", batostr(&bdaddr)); | ||
46 | } | ||
47 | |||
48 | static ssize_t show_link_features(struct device *dev, struct device_attribute *attr, char *buf) | ||
49 | { | ||
50 | struct hci_conn *conn = dev_get_drvdata(dev); | ||
51 | |||
52 | return sprintf(buf, "0x%02x%02x%02x%02x%02x%02x%02x%02x\n", | ||
53 | conn->features[0], conn->features[1], | ||
54 | conn->features[2], conn->features[3], | ||
55 | conn->features[4], conn->features[5], | ||
56 | conn->features[6], conn->features[7]); | ||
57 | } | ||
58 | |||
59 | #define LINK_ATTR(_name,_mode,_show,_store) \ | ||
60 | struct device_attribute link_attr_##_name = __ATTR(_name,_mode,_show,_store) | ||
61 | |||
62 | static LINK_ATTR(type, S_IRUGO, show_link_type, NULL); | ||
63 | static LINK_ATTR(address, S_IRUGO, show_link_address, NULL); | ||
64 | static LINK_ATTR(features, S_IRUGO, show_link_features, NULL); | ||
65 | |||
66 | static struct attribute *bt_link_attrs[] = { | ||
67 | &link_attr_type.attr, | ||
68 | &link_attr_address.attr, | ||
69 | &link_attr_features.attr, | ||
70 | NULL | ||
71 | }; | ||
72 | |||
73 | static struct attribute_group bt_link_group = { | ||
74 | .attrs = bt_link_attrs, | ||
75 | }; | ||
76 | |||
77 | static struct attribute_group *bt_link_groups[] = { | ||
78 | &bt_link_group, | ||
79 | NULL | ||
80 | }; | ||
81 | |||
82 | static void bt_link_release(struct device *dev) | ||
83 | { | ||
84 | void *data = dev_get_drvdata(dev); | ||
85 | kfree(data); | ||
86 | } | ||
87 | |||
88 | static struct device_type bt_link = { | ||
89 | .name = "link", | ||
90 | .groups = bt_link_groups, | ||
91 | .release = bt_link_release, | ||
92 | }; | ||
93 | |||
94 | static void add_conn(struct work_struct *work) | ||
95 | { | ||
96 | struct hci_conn *conn = container_of(work, struct hci_conn, work); | ||
97 | |||
98 | flush_workqueue(btdelconn); | ||
99 | |||
100 | if (device_add(&conn->dev) < 0) { | ||
101 | BT_ERR("Failed to register connection device"); | ||
102 | return; | ||
103 | } | ||
104 | } | ||
105 | |||
106 | void hci_conn_add_sysfs(struct hci_conn *conn) | ||
107 | { | ||
108 | struct hci_dev *hdev = conn->hdev; | ||
109 | |||
110 | BT_DBG("conn %p", conn); | ||
111 | |||
112 | conn->dev.type = &bt_link; | ||
113 | conn->dev.class = bt_class; | ||
114 | conn->dev.parent = &hdev->dev; | ||
115 | |||
116 | snprintf(conn->dev.bus_id, BUS_ID_SIZE, "%s:%d", | ||
117 | hdev->name, conn->handle); | ||
118 | |||
119 | dev_set_drvdata(&conn->dev, conn); | ||
120 | |||
121 | device_initialize(&conn->dev); | ||
122 | |||
123 | INIT_WORK(&conn->work, add_conn); | ||
124 | |||
125 | queue_work(btaddconn, &conn->work); | ||
126 | } | ||
127 | |||
128 | /* | ||
129 | * The rfcomm tty device will possibly retain even when conn | ||
130 | * is down, and sysfs doesn't support move zombie device, | ||
131 | * so we should move the device before conn device is destroyed. | ||
132 | */ | ||
133 | static int __match_tty(struct device *dev, void *data) | ||
134 | { | ||
135 | return !strncmp(dev->bus_id, "rfcomm", 6); | ||
136 | } | ||
137 | |||
138 | static void del_conn(struct work_struct *work) | ||
139 | { | ||
140 | struct hci_conn *conn = container_of(work, struct hci_conn, work); | ||
141 | struct hci_dev *hdev = conn->hdev; | ||
142 | |||
143 | while (1) { | ||
144 | struct device *dev; | ||
145 | |||
146 | dev = device_find_child(&conn->dev, NULL, __match_tty); | ||
147 | if (!dev) | ||
148 | break; | ||
149 | device_move(dev, NULL); | ||
150 | put_device(dev); | ||
151 | } | ||
152 | |||
153 | device_del(&conn->dev); | ||
154 | put_device(&conn->dev); | ||
155 | hci_dev_put(hdev); | ||
156 | } | ||
157 | |||
158 | void hci_conn_del_sysfs(struct hci_conn *conn) | ||
159 | { | ||
160 | BT_DBG("conn %p", conn); | ||
161 | |||
162 | if (!device_is_registered(&conn->dev)) | ||
163 | return; | ||
164 | |||
165 | INIT_WORK(&conn->work, del_conn); | ||
166 | |||
167 | queue_work(btdelconn, &conn->work); | ||
168 | } | ||
169 | |||
170 | static inline char *host_typetostr(int type) | ||
19 | { | 171 | { |
20 | switch (type) { | 172 | switch (type) { |
21 | case HCI_VIRTUAL: | 173 | case HCI_VIRTUAL: |
@@ -40,7 +192,7 @@ static inline char *typetostr(int type) | |||
40 | static ssize_t show_type(struct device *dev, struct device_attribute *attr, char *buf) | 192 | static ssize_t show_type(struct device *dev, struct device_attribute *attr, char *buf) |
41 | { | 193 | { |
42 | struct hci_dev *hdev = dev_get_drvdata(dev); | 194 | struct hci_dev *hdev = dev_get_drvdata(dev); |
43 | return sprintf(buf, "%s\n", typetostr(hdev->type)); | 195 | return sprintf(buf, "%s\n", host_typetostr(hdev->type)); |
44 | } | 196 | } |
45 | 197 | ||
46 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) | 198 | static ssize_t show_name(struct device *dev, struct device_attribute *attr, char *buf) |
@@ -221,183 +373,62 @@ static DEVICE_ATTR(sniff_max_interval, S_IRUGO | S_IWUSR, | |||
221 | static DEVICE_ATTR(sniff_min_interval, S_IRUGO | S_IWUSR, | 373 | static DEVICE_ATTR(sniff_min_interval, S_IRUGO | S_IWUSR, |
222 | show_sniff_min_interval, store_sniff_min_interval); | 374 | show_sniff_min_interval, store_sniff_min_interval); |
223 | 375 | ||
224 | static struct device_attribute *bt_attrs[] = { | 376 | static struct attribute *bt_host_attrs[] = { |
225 | &dev_attr_type, | 377 | &dev_attr_type.attr, |
226 | &dev_attr_name, | 378 | &dev_attr_name.attr, |
227 | &dev_attr_class, | 379 | &dev_attr_class.attr, |
228 | &dev_attr_address, | 380 | &dev_attr_address.attr, |
229 | &dev_attr_features, | 381 | &dev_attr_features.attr, |
230 | &dev_attr_manufacturer, | 382 | &dev_attr_manufacturer.attr, |
231 | &dev_attr_hci_version, | 383 | &dev_attr_hci_version.attr, |
232 | &dev_attr_hci_revision, | 384 | &dev_attr_hci_revision.attr, |
233 | &dev_attr_inquiry_cache, | 385 | &dev_attr_inquiry_cache.attr, |
234 | &dev_attr_idle_timeout, | 386 | &dev_attr_idle_timeout.attr, |
235 | &dev_attr_sniff_max_interval, | 387 | &dev_attr_sniff_max_interval.attr, |
236 | &dev_attr_sniff_min_interval, | 388 | &dev_attr_sniff_min_interval.attr, |
237 | NULL | 389 | NULL |
238 | }; | 390 | }; |
239 | 391 | ||
240 | static ssize_t show_conn_type(struct device *dev, struct device_attribute *attr, char *buf) | 392 | static struct attribute_group bt_host_group = { |
241 | { | 393 | .attrs = bt_host_attrs, |
242 | struct hci_conn *conn = dev_get_drvdata(dev); | ||
243 | return sprintf(buf, "%s\n", conn->type == ACL_LINK ? "ACL" : "SCO"); | ||
244 | } | ||
245 | |||
246 | static ssize_t show_conn_address(struct device *dev, struct device_attribute *attr, char *buf) | ||
247 | { | ||
248 | struct hci_conn *conn = dev_get_drvdata(dev); | ||
249 | bdaddr_t bdaddr; | ||
250 | baswap(&bdaddr, &conn->dst); | ||
251 | return sprintf(buf, "%s\n", batostr(&bdaddr)); | ||
252 | } | ||
253 | |||
254 | static ssize_t show_conn_features(struct device *dev, struct device_attribute *attr, char *buf) | ||
255 | { | ||
256 | struct hci_conn *conn = dev_get_drvdata(dev); | ||
257 | |||
258 | return sprintf(buf, "0x%02x%02x%02x%02x%02x%02x%02x%02x\n", | ||
259 | conn->features[0], conn->features[1], | ||
260 | conn->features[2], conn->features[3], | ||
261 | conn->features[4], conn->features[5], | ||
262 | conn->features[6], conn->features[7]); | ||
263 | } | ||
264 | |||
265 | #define CONN_ATTR(_name,_mode,_show,_store) \ | ||
266 | struct device_attribute conn_attr_##_name = __ATTR(_name,_mode,_show,_store) | ||
267 | |||
268 | static CONN_ATTR(type, S_IRUGO, show_conn_type, NULL); | ||
269 | static CONN_ATTR(address, S_IRUGO, show_conn_address, NULL); | ||
270 | static CONN_ATTR(features, S_IRUGO, show_conn_features, NULL); | ||
271 | |||
272 | static struct device_attribute *conn_attrs[] = { | ||
273 | &conn_attr_type, | ||
274 | &conn_attr_address, | ||
275 | &conn_attr_features, | ||
276 | NULL | ||
277 | }; | 394 | }; |
278 | 395 | ||
279 | struct class *bt_class = NULL; | 396 | static struct attribute_group *bt_host_groups[] = { |
280 | EXPORT_SYMBOL_GPL(bt_class); | 397 | &bt_host_group, |
281 | 398 | NULL | |
282 | static struct bus_type bt_bus = { | ||
283 | .name = "bluetooth", | ||
284 | }; | 399 | }; |
285 | 400 | ||
286 | static struct platform_device *bt_platform; | 401 | static void bt_host_release(struct device *dev) |
287 | |||
288 | static void bt_release(struct device *dev) | ||
289 | { | 402 | { |
290 | void *data = dev_get_drvdata(dev); | 403 | void *data = dev_get_drvdata(dev); |
291 | kfree(data); | 404 | kfree(data); |
292 | } | 405 | } |
293 | 406 | ||
294 | static void add_conn(struct work_struct *work) | 407 | static struct device_type bt_host = { |
295 | { | 408 | .name = "host", |
296 | struct hci_conn *conn = container_of(work, struct hci_conn, work); | 409 | .groups = bt_host_groups, |
297 | int i; | 410 | .release = bt_host_release, |
298 | 411 | }; | |
299 | flush_workqueue(btdelconn); | ||
300 | |||
301 | if (device_add(&conn->dev) < 0) { | ||
302 | BT_ERR("Failed to register connection device"); | ||
303 | return; | ||
304 | } | ||
305 | |||
306 | for (i = 0; conn_attrs[i]; i++) | ||
307 | if (device_create_file(&conn->dev, conn_attrs[i]) < 0) | ||
308 | BT_ERR("Failed to create connection attribute"); | ||
309 | } | ||
310 | |||
311 | void hci_conn_add_sysfs(struct hci_conn *conn) | ||
312 | { | ||
313 | struct hci_dev *hdev = conn->hdev; | ||
314 | |||
315 | BT_DBG("conn %p", conn); | ||
316 | |||
317 | conn->dev.bus = &bt_bus; | ||
318 | conn->dev.parent = &hdev->dev; | ||
319 | |||
320 | conn->dev.release = bt_release; | ||
321 | |||
322 | snprintf(conn->dev.bus_id, BUS_ID_SIZE, "%s:%d", | ||
323 | hdev->name, conn->handle); | ||
324 | |||
325 | dev_set_drvdata(&conn->dev, conn); | ||
326 | |||
327 | device_initialize(&conn->dev); | ||
328 | |||
329 | INIT_WORK(&conn->work, add_conn); | ||
330 | |||
331 | queue_work(btaddconn, &conn->work); | ||
332 | } | ||
333 | |||
334 | /* | ||
335 | * The rfcomm tty device will possibly retain even when conn | ||
336 | * is down, and sysfs doesn't support move zombie device, | ||
337 | * so we should move the device before conn device is destroyed. | ||
338 | */ | ||
339 | static int __match_tty(struct device *dev, void *data) | ||
340 | { | ||
341 | return !strncmp(dev->bus_id, "rfcomm", 6); | ||
342 | } | ||
343 | |||
344 | static void del_conn(struct work_struct *work) | ||
345 | { | ||
346 | struct hci_conn *conn = container_of(work, struct hci_conn, work); | ||
347 | struct hci_dev *hdev = conn->hdev; | ||
348 | |||
349 | while (1) { | ||
350 | struct device *dev; | ||
351 | |||
352 | dev = device_find_child(&conn->dev, NULL, __match_tty); | ||
353 | if (!dev) | ||
354 | break; | ||
355 | device_move(dev, NULL); | ||
356 | put_device(dev); | ||
357 | } | ||
358 | |||
359 | device_del(&conn->dev); | ||
360 | put_device(&conn->dev); | ||
361 | hci_dev_put(hdev); | ||
362 | } | ||
363 | |||
364 | void hci_conn_del_sysfs(struct hci_conn *conn) | ||
365 | { | ||
366 | BT_DBG("conn %p", conn); | ||
367 | |||
368 | if (!device_is_registered(&conn->dev)) | ||
369 | return; | ||
370 | |||
371 | INIT_WORK(&conn->work, del_conn); | ||
372 | |||
373 | queue_work(btdelconn, &conn->work); | ||
374 | } | ||
375 | 412 | ||
376 | int hci_register_sysfs(struct hci_dev *hdev) | 413 | int hci_register_sysfs(struct hci_dev *hdev) |
377 | { | 414 | { |
378 | struct device *dev = &hdev->dev; | 415 | struct device *dev = &hdev->dev; |
379 | unsigned int i; | ||
380 | int err; | 416 | int err; |
381 | 417 | ||
382 | BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); | 418 | BT_DBG("%p name %s type %d", hdev, hdev->name, hdev->type); |
383 | 419 | ||
384 | dev->bus = &bt_bus; | 420 | dev->type = &bt_host; |
421 | dev->class = bt_class; | ||
385 | dev->parent = hdev->parent; | 422 | dev->parent = hdev->parent; |
386 | 423 | ||
387 | strlcpy(dev->bus_id, hdev->name, BUS_ID_SIZE); | 424 | strlcpy(dev->bus_id, hdev->name, BUS_ID_SIZE); |
388 | 425 | ||
389 | dev->release = bt_release; | ||
390 | |||
391 | dev_set_drvdata(dev, hdev); | 426 | dev_set_drvdata(dev, hdev); |
392 | 427 | ||
393 | err = device_register(dev); | 428 | err = device_register(dev); |
394 | if (err < 0) | 429 | if (err < 0) |
395 | return err; | 430 | return err; |
396 | 431 | ||
397 | for (i = 0; bt_attrs[i]; i++) | ||
398 | if (device_create_file(dev, bt_attrs[i]) < 0) | ||
399 | BT_ERR("Failed to create device attribute"); | ||
400 | |||
401 | return 0; | 432 | return 0; |
402 | } | 433 | } |
403 | 434 | ||
@@ -410,59 +441,30 @@ void hci_unregister_sysfs(struct hci_dev *hdev) | |||
410 | 441 | ||
411 | int __init bt_sysfs_init(void) | 442 | int __init bt_sysfs_init(void) |
412 | { | 443 | { |
413 | int err; | ||
414 | |||
415 | btaddconn = create_singlethread_workqueue("btaddconn"); | 444 | btaddconn = create_singlethread_workqueue("btaddconn"); |
416 | if (!btaddconn) { | 445 | if (!btaddconn) |
417 | err = -ENOMEM; | 446 | return -ENOMEM; |
418 | goto out; | ||
419 | } | ||
420 | 447 | ||
421 | btdelconn = create_singlethread_workqueue("btdelconn"); | 448 | btdelconn = create_singlethread_workqueue("btdelconn"); |
422 | if (!btdelconn) { | 449 | if (!btdelconn) { |
423 | err = -ENOMEM; | 450 | destroy_workqueue(btaddconn); |
424 | goto out_del; | 451 | return -ENOMEM; |
425 | } | ||
426 | |||
427 | bt_platform = platform_device_register_simple("bluetooth", -1, NULL, 0); | ||
428 | if (IS_ERR(bt_platform)) { | ||
429 | err = PTR_ERR(bt_platform); | ||
430 | goto out_platform; | ||
431 | } | 452 | } |
432 | 453 | ||
433 | err = bus_register(&bt_bus); | ||
434 | if (err < 0) | ||
435 | goto out_bus; | ||
436 | |||
437 | bt_class = class_create(THIS_MODULE, "bluetooth"); | 454 | bt_class = class_create(THIS_MODULE, "bluetooth"); |
438 | if (IS_ERR(bt_class)) { | 455 | if (IS_ERR(bt_class)) { |
439 | err = PTR_ERR(bt_class); | 456 | destroy_workqueue(btdelconn); |
440 | goto out_class; | 457 | destroy_workqueue(btaddconn); |
458 | return PTR_ERR(bt_class); | ||
441 | } | 459 | } |
442 | 460 | ||
443 | return 0; | 461 | return 0; |
444 | |||
445 | out_class: | ||
446 | bus_unregister(&bt_bus); | ||
447 | out_bus: | ||
448 | platform_device_unregister(bt_platform); | ||
449 | out_platform: | ||
450 | destroy_workqueue(btdelconn); | ||
451 | out_del: | ||
452 | destroy_workqueue(btaddconn); | ||
453 | out: | ||
454 | return err; | ||
455 | } | 462 | } |
456 | 463 | ||
457 | void bt_sysfs_cleanup(void) | 464 | void bt_sysfs_cleanup(void) |
458 | { | 465 | { |
459 | destroy_workqueue(btaddconn); | 466 | destroy_workqueue(btaddconn); |
460 | |||
461 | destroy_workqueue(btdelconn); | 467 | destroy_workqueue(btdelconn); |
462 | 468 | ||
463 | class_destroy(bt_class); | 469 | class_destroy(bt_class); |
464 | |||
465 | bus_unregister(&bt_bus); | ||
466 | |||
467 | platform_device_unregister(bt_platform); | ||
468 | } | 470 | } |
diff --git a/net/bluetooth/l2cap.c b/net/bluetooth/l2cap.c index c1239852834a..3396d5bdef1c 100644 --- a/net/bluetooth/l2cap.c +++ b/net/bluetooth/l2cap.c | |||
@@ -2516,7 +2516,7 @@ EXPORT_SYMBOL(l2cap_load); | |||
2516 | module_init(l2cap_init); | 2516 | module_init(l2cap_init); |
2517 | module_exit(l2cap_exit); | 2517 | module_exit(l2cap_exit); |
2518 | 2518 | ||
2519 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 2519 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
2520 | MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION); | 2520 | MODULE_DESCRIPTION("Bluetooth L2CAP ver " VERSION); |
2521 | MODULE_VERSION(VERSION); | 2521 | MODULE_VERSION(VERSION); |
2522 | MODULE_LICENSE("GPL"); | 2522 | MODULE_LICENSE("GPL"); |
diff --git a/net/bluetooth/rfcomm/core.c b/net/bluetooth/rfcomm/core.c index 6cfc7ba611b3..ba537fae0a4c 100644 --- a/net/bluetooth/rfcomm/core.c +++ b/net/bluetooth/rfcomm/core.c | |||
@@ -2115,7 +2115,7 @@ MODULE_PARM_DESC(channel_mtu, "Default MTU for the RFCOMM channel"); | |||
2115 | module_param(l2cap_mtu, uint, 0644); | 2115 | module_param(l2cap_mtu, uint, 0644); |
2116 | MODULE_PARM_DESC(l2cap_mtu, "Default MTU for the L2CAP connection"); | 2116 | MODULE_PARM_DESC(l2cap_mtu, "Default MTU for the L2CAP connection"); |
2117 | 2117 | ||
2118 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 2118 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
2119 | MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION); | 2119 | MODULE_DESCRIPTION("Bluetooth RFCOMM ver " VERSION); |
2120 | MODULE_VERSION(VERSION); | 2120 | MODULE_VERSION(VERSION); |
2121 | MODULE_LICENSE("GPL"); | 2121 | MODULE_LICENSE("GPL"); |
diff --git a/net/bluetooth/sco.c b/net/bluetooth/sco.c index 8cda49874868..a16011fedc1d 100644 --- a/net/bluetooth/sco.c +++ b/net/bluetooth/sco.c | |||
@@ -1002,7 +1002,7 @@ module_exit(sco_exit); | |||
1002 | module_param(disable_esco, bool, 0644); | 1002 | module_param(disable_esco, bool, 0644); |
1003 | MODULE_PARM_DESC(disable_esco, "Disable eSCO connection creation"); | 1003 | MODULE_PARM_DESC(disable_esco, "Disable eSCO connection creation"); |
1004 | 1004 | ||
1005 | MODULE_AUTHOR("Maxim Krasnyansky <maxk@qualcomm.com>, Marcel Holtmann <marcel@holtmann.org>"); | 1005 | MODULE_AUTHOR("Marcel Holtmann <marcel@holtmann.org>"); |
1006 | MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION); | 1006 | MODULE_DESCRIPTION("Bluetooth SCO ver " VERSION); |
1007 | MODULE_VERSION(VERSION); | 1007 | MODULE_VERSION(VERSION); |
1008 | MODULE_LICENSE("GPL"); | 1008 | MODULE_LICENSE("GPL"); |
diff --git a/net/bridge/br_device.c b/net/bridge/br_device.c index 9b58d70b0e7d..4f52c3d50ebe 100644 --- a/net/bridge/br_device.c +++ b/net/bridge/br_device.c | |||
@@ -148,11 +148,16 @@ static int br_set_tx_csum(struct net_device *dev, u32 data) | |||
148 | } | 148 | } |
149 | 149 | ||
150 | static struct ethtool_ops br_ethtool_ops = { | 150 | static struct ethtool_ops br_ethtool_ops = { |
151 | .get_drvinfo = br_getinfo, | 151 | .get_drvinfo = br_getinfo, |
152 | .get_link = ethtool_op_get_link, | 152 | .get_link = ethtool_op_get_link, |
153 | .set_sg = br_set_sg, | 153 | .get_tx_csum = ethtool_op_get_tx_csum, |
154 | .set_tx_csum = br_set_tx_csum, | 154 | .set_tx_csum = br_set_tx_csum, |
155 | .set_tso = br_set_tso, | 155 | .get_sg = ethtool_op_get_sg, |
156 | .set_sg = br_set_sg, | ||
157 | .get_tso = ethtool_op_get_tso, | ||
158 | .set_tso = br_set_tso, | ||
159 | .get_ufo = ethtool_op_get_ufo, | ||
160 | .get_flags = ethtool_op_get_flags, | ||
156 | }; | 161 | }; |
157 | 162 | ||
158 | void br_dev_setup(struct net_device *dev) | 163 | void br_dev_setup(struct net_device *dev) |
diff --git a/net/core/datagram.c b/net/core/datagram.c index dd61dcad6019..52f577a0f544 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c | |||
@@ -339,6 +339,93 @@ fault: | |||
339 | return -EFAULT; | 339 | return -EFAULT; |
340 | } | 340 | } |
341 | 341 | ||
342 | /** | ||
343 | * skb_copy_datagram_from_iovec - Copy a datagram from an iovec. | ||
344 | * @skb: buffer to copy | ||
345 | * @offset: offset in the buffer to start copying to | ||
346 | * @from: io vector to copy to | ||
347 | * @len: amount of data to copy to buffer from iovec | ||
348 | * | ||
349 | * Returns 0 or -EFAULT. | ||
350 | * Note: the iovec is modified during the copy. | ||
351 | */ | ||
352 | int skb_copy_datagram_from_iovec(struct sk_buff *skb, int offset, | ||
353 | struct iovec *from, int len) | ||
354 | { | ||
355 | int start = skb_headlen(skb); | ||
356 | int i, copy = start - offset; | ||
357 | |||
358 | /* Copy header. */ | ||
359 | if (copy > 0) { | ||
360 | if (copy > len) | ||
361 | copy = len; | ||
362 | if (memcpy_fromiovec(skb->data + offset, from, copy)) | ||
363 | goto fault; | ||
364 | if ((len -= copy) == 0) | ||
365 | return 0; | ||
366 | offset += copy; | ||
367 | } | ||
368 | |||
369 | /* Copy paged appendix. Hmm... why does this look so complicated? */ | ||
370 | for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) { | ||
371 | int end; | ||
372 | |||
373 | WARN_ON(start > offset + len); | ||
374 | |||
375 | end = start + skb_shinfo(skb)->frags[i].size; | ||
376 | if ((copy = end - offset) > 0) { | ||
377 | int err; | ||
378 | u8 *vaddr; | ||
379 | skb_frag_t *frag = &skb_shinfo(skb)->frags[i]; | ||
380 | struct page *page = frag->page; | ||
381 | |||
382 | if (copy > len) | ||
383 | copy = len; | ||
384 | vaddr = kmap(page); | ||
385 | err = memcpy_fromiovec(vaddr + frag->page_offset + | ||
386 | offset - start, from, copy); | ||
387 | kunmap(page); | ||
388 | if (err) | ||
389 | goto fault; | ||
390 | |||
391 | if (!(len -= copy)) | ||
392 | return 0; | ||
393 | offset += copy; | ||
394 | } | ||
395 | start = end; | ||
396 | } | ||
397 | |||
398 | if (skb_shinfo(skb)->frag_list) { | ||
399 | struct sk_buff *list = skb_shinfo(skb)->frag_list; | ||
400 | |||
401 | for (; list; list = list->next) { | ||
402 | int end; | ||
403 | |||
404 | WARN_ON(start > offset + len); | ||
405 | |||
406 | end = start + list->len; | ||
407 | if ((copy = end - offset) > 0) { | ||
408 | if (copy > len) | ||
409 | copy = len; | ||
410 | if (skb_copy_datagram_from_iovec(list, | ||
411 | offset - start, | ||
412 | from, copy)) | ||
413 | goto fault; | ||
414 | if ((len -= copy) == 0) | ||
415 | return 0; | ||
416 | offset += copy; | ||
417 | } | ||
418 | start = end; | ||
419 | } | ||
420 | } | ||
421 | if (!len) | ||
422 | return 0; | ||
423 | |||
424 | fault: | ||
425 | return -EFAULT; | ||
426 | } | ||
427 | EXPORT_SYMBOL(skb_copy_datagram_from_iovec); | ||
428 | |||
342 | static int skb_copy_and_csum_datagram(const struct sk_buff *skb, int offset, | 429 | static int skb_copy_and_csum_datagram(const struct sk_buff *skb, int offset, |
343 | u8 __user *to, int len, | 430 | u8 __user *to, int len, |
344 | __wsum *csump) | 431 | __wsum *csump) |
diff --git a/net/core/dev.c b/net/core/dev.c index 600bb23c4c2e..60c51f765887 100644 --- a/net/core/dev.c +++ b/net/core/dev.c | |||
@@ -1339,19 +1339,23 @@ static void dev_queue_xmit_nit(struct sk_buff *skb, struct net_device *dev) | |||
1339 | } | 1339 | } |
1340 | 1340 | ||
1341 | 1341 | ||
1342 | void __netif_schedule(struct Qdisc *q) | 1342 | static inline void __netif_reschedule(struct Qdisc *q) |
1343 | { | 1343 | { |
1344 | if (!test_and_set_bit(__QDISC_STATE_SCHED, &q->state)) { | 1344 | struct softnet_data *sd; |
1345 | struct softnet_data *sd; | 1345 | unsigned long flags; |
1346 | unsigned long flags; | ||
1347 | 1346 | ||
1348 | local_irq_save(flags); | 1347 | local_irq_save(flags); |
1349 | sd = &__get_cpu_var(softnet_data); | 1348 | sd = &__get_cpu_var(softnet_data); |
1350 | q->next_sched = sd->output_queue; | 1349 | q->next_sched = sd->output_queue; |
1351 | sd->output_queue = q; | 1350 | sd->output_queue = q; |
1352 | raise_softirq_irqoff(NET_TX_SOFTIRQ); | 1351 | raise_softirq_irqoff(NET_TX_SOFTIRQ); |
1353 | local_irq_restore(flags); | 1352 | local_irq_restore(flags); |
1354 | } | 1353 | } |
1354 | |||
1355 | void __netif_schedule(struct Qdisc *q) | ||
1356 | { | ||
1357 | if (!test_and_set_bit(__QDISC_STATE_SCHED, &q->state)) | ||
1358 | __netif_reschedule(q); | ||
1355 | } | 1359 | } |
1356 | EXPORT_SYMBOL(__netif_schedule); | 1360 | EXPORT_SYMBOL(__netif_schedule); |
1357 | 1361 | ||
@@ -1800,9 +1804,13 @@ gso: | |||
1800 | 1804 | ||
1801 | spin_lock(root_lock); | 1805 | spin_lock(root_lock); |
1802 | 1806 | ||
1803 | rc = qdisc_enqueue_root(skb, q); | 1807 | if (unlikely(test_bit(__QDISC_STATE_DEACTIVATED, &q->state))) { |
1804 | qdisc_run(q); | 1808 | kfree_skb(skb); |
1805 | 1809 | rc = NET_XMIT_DROP; | |
1810 | } else { | ||
1811 | rc = qdisc_enqueue_root(skb, q); | ||
1812 | qdisc_run(q); | ||
1813 | } | ||
1806 | spin_unlock(root_lock); | 1814 | spin_unlock(root_lock); |
1807 | 1815 | ||
1808 | goto out; | 1816 | goto out; |
@@ -1974,15 +1982,17 @@ static void net_tx_action(struct softirq_action *h) | |||
1974 | 1982 | ||
1975 | head = head->next_sched; | 1983 | head = head->next_sched; |
1976 | 1984 | ||
1977 | smp_mb__before_clear_bit(); | ||
1978 | clear_bit(__QDISC_STATE_SCHED, &q->state); | ||
1979 | |||
1980 | root_lock = qdisc_lock(q); | 1985 | root_lock = qdisc_lock(q); |
1981 | if (spin_trylock(root_lock)) { | 1986 | if (spin_trylock(root_lock)) { |
1987 | smp_mb__before_clear_bit(); | ||
1988 | clear_bit(__QDISC_STATE_SCHED, | ||
1989 | &q->state); | ||
1982 | qdisc_run(q); | 1990 | qdisc_run(q); |
1983 | spin_unlock(root_lock); | 1991 | spin_unlock(root_lock); |
1984 | } else { | 1992 | } else { |
1985 | __netif_schedule(q); | 1993 | if (!test_bit(__QDISC_STATE_DEACTIVATED, |
1994 | &q->state)) | ||
1995 | __netif_reschedule(q); | ||
1986 | } | 1996 | } |
1987 | } | 1997 | } |
1988 | } | 1998 | } |
@@ -2084,7 +2094,8 @@ static int ing_filter(struct sk_buff *skb) | |||
2084 | q = rxq->qdisc; | 2094 | q = rxq->qdisc; |
2085 | if (q != &noop_qdisc) { | 2095 | if (q != &noop_qdisc) { |
2086 | spin_lock(qdisc_lock(q)); | 2096 | spin_lock(qdisc_lock(q)); |
2087 | result = qdisc_enqueue_root(skb, q); | 2097 | if (likely(!test_bit(__QDISC_STATE_DEACTIVATED, &q->state))) |
2098 | result = qdisc_enqueue_root(skb, q); | ||
2088 | spin_unlock(qdisc_lock(q)); | 2099 | spin_unlock(qdisc_lock(q)); |
2089 | } | 2100 | } |
2090 | 2101 | ||
diff --git a/net/core/gen_estimator.c b/net/core/gen_estimator.c index a89f32fa94f6..57abe8266be1 100644 --- a/net/core/gen_estimator.c +++ b/net/core/gen_estimator.c | |||
@@ -99,7 +99,7 @@ struct gen_estimator_head | |||
99 | 99 | ||
100 | static struct gen_estimator_head elist[EST_MAX_INTERVAL+1]; | 100 | static struct gen_estimator_head elist[EST_MAX_INTERVAL+1]; |
101 | 101 | ||
102 | /* Protects against NULL dereference and RCU write-side */ | 102 | /* Protects against NULL dereference */ |
103 | static DEFINE_RWLOCK(est_lock); | 103 | static DEFINE_RWLOCK(est_lock); |
104 | 104 | ||
105 | static void est_timer(unsigned long arg) | 105 | static void est_timer(unsigned long arg) |
@@ -185,7 +185,6 @@ int gen_new_estimator(struct gnet_stats_basic *bstats, | |||
185 | est->last_packets = bstats->packets; | 185 | est->last_packets = bstats->packets; |
186 | est->avpps = rate_est->pps<<10; | 186 | est->avpps = rate_est->pps<<10; |
187 | 187 | ||
188 | write_lock_bh(&est_lock); | ||
189 | if (!elist[idx].timer.function) { | 188 | if (!elist[idx].timer.function) { |
190 | INIT_LIST_HEAD(&elist[idx].list); | 189 | INIT_LIST_HEAD(&elist[idx].list); |
191 | setup_timer(&elist[idx].timer, est_timer, idx); | 190 | setup_timer(&elist[idx].timer, est_timer, idx); |
@@ -195,7 +194,6 @@ int gen_new_estimator(struct gnet_stats_basic *bstats, | |||
195 | mod_timer(&elist[idx].timer, jiffies + ((HZ/4) << idx)); | 194 | mod_timer(&elist[idx].timer, jiffies + ((HZ/4) << idx)); |
196 | 195 | ||
197 | list_add_rcu(&est->list, &elist[idx].list); | 196 | list_add_rcu(&est->list, &elist[idx].list); |
198 | write_unlock_bh(&est_lock); | ||
199 | return 0; | 197 | return 0; |
200 | } | 198 | } |
201 | 199 | ||
@@ -214,6 +212,7 @@ static void __gen_kill_estimator(struct rcu_head *head) | |||
214 | * Removes the rate estimator specified by &bstats and &rate_est | 212 | * Removes the rate estimator specified by &bstats and &rate_est |
215 | * and deletes the timer. | 213 | * and deletes the timer. |
216 | * | 214 | * |
215 | * NOTE: Called under rtnl_mutex | ||
217 | */ | 216 | */ |
218 | void gen_kill_estimator(struct gnet_stats_basic *bstats, | 217 | void gen_kill_estimator(struct gnet_stats_basic *bstats, |
219 | struct gnet_stats_rate_est *rate_est) | 218 | struct gnet_stats_rate_est *rate_est) |
@@ -227,17 +226,17 @@ void gen_kill_estimator(struct gnet_stats_basic *bstats, | |||
227 | if (!elist[idx].timer.function) | 226 | if (!elist[idx].timer.function) |
228 | continue; | 227 | continue; |
229 | 228 | ||
230 | write_lock_bh(&est_lock); | ||
231 | list_for_each_entry_safe(e, n, &elist[idx].list, list) { | 229 | list_for_each_entry_safe(e, n, &elist[idx].list, list) { |
232 | if (e->rate_est != rate_est || e->bstats != bstats) | 230 | if (e->rate_est != rate_est || e->bstats != bstats) |
233 | continue; | 231 | continue; |
234 | 232 | ||
233 | write_lock_bh(&est_lock); | ||
235 | e->bstats = NULL; | 234 | e->bstats = NULL; |
235 | write_unlock_bh(&est_lock); | ||
236 | 236 | ||
237 | list_del_rcu(&e->list); | 237 | list_del_rcu(&e->list); |
238 | call_rcu(&e->e_rcu, __gen_kill_estimator); | 238 | call_rcu(&e->e_rcu, __gen_kill_estimator); |
239 | } | 239 | } |
240 | write_unlock_bh(&est_lock); | ||
241 | } | 240 | } |
242 | } | 241 | } |
243 | 242 | ||
diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 84640172d65d..ca1ccdf1ef76 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c | |||
@@ -2256,14 +2256,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
2256 | segs = nskb; | 2256 | segs = nskb; |
2257 | tail = nskb; | 2257 | tail = nskb; |
2258 | 2258 | ||
2259 | nskb->dev = skb->dev; | 2259 | __copy_skb_header(nskb, skb); |
2260 | skb_copy_queue_mapping(nskb, skb); | ||
2261 | nskb->priority = skb->priority; | ||
2262 | nskb->protocol = skb->protocol; | ||
2263 | nskb->vlan_tci = skb->vlan_tci; | ||
2264 | nskb->dst = dst_clone(skb->dst); | ||
2265 | memcpy(nskb->cb, skb->cb, sizeof(skb->cb)); | ||
2266 | nskb->pkt_type = skb->pkt_type; | ||
2267 | nskb->mac_len = skb->mac_len; | 2260 | nskb->mac_len = skb->mac_len; |
2268 | 2261 | ||
2269 | skb_reserve(nskb, headroom); | 2262 | skb_reserve(nskb, headroom); |
@@ -2274,6 +2267,7 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
2274 | skb_copy_from_linear_data(skb, skb_put(nskb, doffset), | 2267 | skb_copy_from_linear_data(skb, skb_put(nskb, doffset), |
2275 | doffset); | 2268 | doffset); |
2276 | if (!sg) { | 2269 | if (!sg) { |
2270 | nskb->ip_summed = CHECKSUM_NONE; | ||
2277 | nskb->csum = skb_copy_and_csum_bits(skb, offset, | 2271 | nskb->csum = skb_copy_and_csum_bits(skb, offset, |
2278 | skb_put(nskb, len), | 2272 | skb_put(nskb, len), |
2279 | len, 0); | 2273 | len, 0); |
@@ -2283,8 +2277,6 @@ struct sk_buff *skb_segment(struct sk_buff *skb, int features) | |||
2283 | frag = skb_shinfo(nskb)->frags; | 2277 | frag = skb_shinfo(nskb)->frags; |
2284 | k = 0; | 2278 | k = 0; |
2285 | 2279 | ||
2286 | nskb->ip_summed = CHECKSUM_PARTIAL; | ||
2287 | nskb->csum = skb->csum; | ||
2288 | skb_copy_from_linear_data_offset(skb, offset, | 2280 | skb_copy_from_linear_data_offset(skb, offset, |
2289 | skb_put(nskb, hsize), hsize); | 2281 | skb_put(nskb, hsize), hsize); |
2290 | 2282 | ||
diff --git a/net/dccp/input.c b/net/dccp/input.c index df2f110df94a..803933ab396d 100644 --- a/net/dccp/input.c +++ b/net/dccp/input.c | |||
@@ -411,12 +411,6 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk, | |||
411 | struct dccp_sock *dp = dccp_sk(sk); | 411 | struct dccp_sock *dp = dccp_sk(sk); |
412 | long tstamp = dccp_timestamp(); | 412 | long tstamp = dccp_timestamp(); |
413 | 413 | ||
414 | /* Stop the REQUEST timer */ | ||
415 | inet_csk_clear_xmit_timer(sk, ICSK_TIME_RETRANS); | ||
416 | WARN_ON(sk->sk_send_head == NULL); | ||
417 | __kfree_skb(sk->sk_send_head); | ||
418 | sk->sk_send_head = NULL; | ||
419 | |||
420 | if (!between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, | 414 | if (!between48(DCCP_SKB_CB(skb)->dccpd_ack_seq, |
421 | dp->dccps_awl, dp->dccps_awh)) { | 415 | dp->dccps_awl, dp->dccps_awh)) { |
422 | dccp_pr_debug("invalid ackno: S.AWL=%llu, " | 416 | dccp_pr_debug("invalid ackno: S.AWL=%llu, " |
@@ -441,6 +435,12 @@ static int dccp_rcv_request_sent_state_process(struct sock *sk, | |||
441 | DCCP_ACKVEC_STATE_RECEIVED)) | 435 | DCCP_ACKVEC_STATE_RECEIVED)) |
442 | goto out_invalid_packet; /* FIXME: change error code */ | 436 | goto out_invalid_packet; /* FIXME: change error code */ |
443 | 437 | ||
438 | /* Stop the REQUEST timer */ | ||
439 | inet_csk_clear_xmit_timer(sk, ICSK_TIME_RETRANS); | ||
440 | WARN_ON(sk->sk_send_head == NULL); | ||
441 | kfree_skb(sk->sk_send_head); | ||
442 | sk->sk_send_head = NULL; | ||
443 | |||
444 | dp->dccps_isr = DCCP_SKB_CB(skb)->dccpd_seq; | 444 | dp->dccps_isr = DCCP_SKB_CB(skb)->dccpd_seq; |
445 | dccp_update_gsr(sk, dp->dccps_isr); | 445 | dccp_update_gsr(sk, dp->dccps_isr); |
446 | /* | 446 | /* |
diff --git a/net/ipv4/netfilter/ipt_addrtype.c b/net/ipv4/netfilter/ipt_addrtype.c index 49587a497229..462a22c97877 100644 --- a/net/ipv4/netfilter/ipt_addrtype.c +++ b/net/ipv4/netfilter/ipt_addrtype.c | |||
@@ -70,7 +70,7 @@ addrtype_mt_v1(const struct sk_buff *skb, const struct net_device *in, | |||
70 | (info->flags & IPT_ADDRTYPE_INVERT_SOURCE); | 70 | (info->flags & IPT_ADDRTYPE_INVERT_SOURCE); |
71 | if (ret && info->dest) | 71 | if (ret && info->dest) |
72 | ret &= match_type(dev, iph->daddr, info->dest) ^ | 72 | ret &= match_type(dev, iph->daddr, info->dest) ^ |
73 | (info->flags & IPT_ADDRTYPE_INVERT_DEST); | 73 | !!(info->flags & IPT_ADDRTYPE_INVERT_DEST); |
74 | return ret; | 74 | return ret; |
75 | } | 75 | } |
76 | 76 | ||
diff --git a/net/ipv4/netfilter/nf_nat_proto_common.c b/net/ipv4/netfilter/nf_nat_proto_common.c index 91537f11273f..6c4f11f51446 100644 --- a/net/ipv4/netfilter/nf_nat_proto_common.c +++ b/net/ipv4/netfilter/nf_nat_proto_common.c | |||
@@ -73,9 +73,13 @@ bool nf_nat_proto_unique_tuple(struct nf_conntrack_tuple *tuple, | |||
73 | range_size = ntohs(range->max.all) - min + 1; | 73 | range_size = ntohs(range->max.all) - min + 1; |
74 | } | 74 | } |
75 | 75 | ||
76 | off = *rover; | ||
77 | if (range->flags & IP_NAT_RANGE_PROTO_RANDOM) | 76 | if (range->flags & IP_NAT_RANGE_PROTO_RANDOM) |
78 | off = net_random(); | 77 | off = secure_ipv4_port_ephemeral(tuple->src.u3.ip, tuple->dst.u3.ip, |
78 | maniptype == IP_NAT_MANIP_SRC | ||
79 | ? tuple->dst.u.all | ||
80 | : tuple->src.u.all); | ||
81 | else | ||
82 | off = *rover; | ||
79 | 83 | ||
80 | for (i = 0; i < range_size; i++, off++) { | 84 | for (i = 0; i < range_size; i++, off++) { |
81 | *portptr = htons(min + off % range_size); | 85 | *portptr = htons(min + off % range_size); |
diff --git a/net/ipv4/route.c b/net/ipv4/route.c index 16fc6f454a31..cca921ea8550 100644 --- a/net/ipv4/route.c +++ b/net/ipv4/route.c | |||
@@ -2914,6 +2914,68 @@ static int ipv4_sysctl_rtcache_flush_strategy(ctl_table *table, | |||
2914 | return 0; | 2914 | return 0; |
2915 | } | 2915 | } |
2916 | 2916 | ||
2917 | static void rt_secret_reschedule(int old) | ||
2918 | { | ||
2919 | struct net *net; | ||
2920 | int new = ip_rt_secret_interval; | ||
2921 | int diff = new - old; | ||
2922 | |||
2923 | if (!diff) | ||
2924 | return; | ||
2925 | |||
2926 | rtnl_lock(); | ||
2927 | for_each_net(net) { | ||
2928 | int deleted = del_timer_sync(&net->ipv4.rt_secret_timer); | ||
2929 | |||
2930 | if (!new) | ||
2931 | continue; | ||
2932 | |||
2933 | if (deleted) { | ||
2934 | long time = net->ipv4.rt_secret_timer.expires - jiffies; | ||
2935 | |||
2936 | if (time <= 0 || (time += diff) <= 0) | ||
2937 | time = 0; | ||
2938 | |||
2939 | net->ipv4.rt_secret_timer.expires = time; | ||
2940 | } else | ||
2941 | net->ipv4.rt_secret_timer.expires = new; | ||
2942 | |||
2943 | net->ipv4.rt_secret_timer.expires += jiffies; | ||
2944 | add_timer(&net->ipv4.rt_secret_timer); | ||
2945 | } | ||
2946 | rtnl_unlock(); | ||
2947 | } | ||
2948 | |||
2949 | static int ipv4_sysctl_rt_secret_interval(ctl_table *ctl, int write, | ||
2950 | struct file *filp, | ||
2951 | void __user *buffer, size_t *lenp, | ||
2952 | loff_t *ppos) | ||
2953 | { | ||
2954 | int old = ip_rt_secret_interval; | ||
2955 | int ret = proc_dointvec_jiffies(ctl, write, filp, buffer, lenp, ppos); | ||
2956 | |||
2957 | rt_secret_reschedule(old); | ||
2958 | |||
2959 | return ret; | ||
2960 | } | ||
2961 | |||
2962 | static int ipv4_sysctl_rt_secret_interval_strategy(ctl_table *table, | ||
2963 | int __user *name, | ||
2964 | int nlen, | ||
2965 | void __user *oldval, | ||
2966 | size_t __user *oldlenp, | ||
2967 | void __user *newval, | ||
2968 | size_t newlen) | ||
2969 | { | ||
2970 | int old = ip_rt_secret_interval; | ||
2971 | int ret = sysctl_jiffies(table, name, nlen, oldval, oldlenp, newval, | ||
2972 | newlen); | ||
2973 | |||
2974 | rt_secret_reschedule(old); | ||
2975 | |||
2976 | return ret; | ||
2977 | } | ||
2978 | |||
2917 | static ctl_table ipv4_route_table[] = { | 2979 | static ctl_table ipv4_route_table[] = { |
2918 | { | 2980 | { |
2919 | .ctl_name = NET_IPV4_ROUTE_GC_THRESH, | 2981 | .ctl_name = NET_IPV4_ROUTE_GC_THRESH, |
@@ -3048,8 +3110,8 @@ static ctl_table ipv4_route_table[] = { | |||
3048 | .data = &ip_rt_secret_interval, | 3110 | .data = &ip_rt_secret_interval, |
3049 | .maxlen = sizeof(int), | 3111 | .maxlen = sizeof(int), |
3050 | .mode = 0644, | 3112 | .mode = 0644, |
3051 | .proc_handler = &proc_dointvec_jiffies, | 3113 | .proc_handler = &ipv4_sysctl_rt_secret_interval, |
3052 | .strategy = &sysctl_jiffies, | 3114 | .strategy = &ipv4_sysctl_rt_secret_interval_strategy, |
3053 | }, | 3115 | }, |
3054 | { .ctl_name = 0 } | 3116 | { .ctl_name = 0 } |
3055 | }; | 3117 | }; |
@@ -3126,10 +3188,12 @@ static __net_init int rt_secret_timer_init(struct net *net) | |||
3126 | net->ipv4.rt_secret_timer.data = (unsigned long)net; | 3188 | net->ipv4.rt_secret_timer.data = (unsigned long)net; |
3127 | init_timer_deferrable(&net->ipv4.rt_secret_timer); | 3189 | init_timer_deferrable(&net->ipv4.rt_secret_timer); |
3128 | 3190 | ||
3129 | net->ipv4.rt_secret_timer.expires = | 3191 | if (ip_rt_secret_interval) { |
3130 | jiffies + net_random() % ip_rt_secret_interval + | 3192 | net->ipv4.rt_secret_timer.expires = |
3131 | ip_rt_secret_interval; | 3193 | jiffies + net_random() % ip_rt_secret_interval + |
3132 | add_timer(&net->ipv4.rt_secret_timer); | 3194 | ip_rt_secret_interval; |
3195 | add_timer(&net->ipv4.rt_secret_timer); | ||
3196 | } | ||
3133 | return 0; | 3197 | return 0; |
3134 | } | 3198 | } |
3135 | 3199 | ||
diff --git a/net/ipv6/addrconf.c b/net/ipv6/addrconf.c index a7842c54f58a..e2d3b7580b76 100644 --- a/net/ipv6/addrconf.c +++ b/net/ipv6/addrconf.c | |||
@@ -1106,13 +1106,12 @@ out: | |||
1106 | return ret; | 1106 | return ret; |
1107 | } | 1107 | } |
1108 | 1108 | ||
1109 | int ipv6_dev_get_saddr(struct net_device *dst_dev, | 1109 | int ipv6_dev_get_saddr(struct net *net, struct net_device *dst_dev, |
1110 | const struct in6_addr *daddr, unsigned int prefs, | 1110 | const struct in6_addr *daddr, unsigned int prefs, |
1111 | struct in6_addr *saddr) | 1111 | struct in6_addr *saddr) |
1112 | { | 1112 | { |
1113 | struct ipv6_saddr_score scores[2], | 1113 | struct ipv6_saddr_score scores[2], |
1114 | *score = &scores[0], *hiscore = &scores[1]; | 1114 | *score = &scores[0], *hiscore = &scores[1]; |
1115 | struct net *net = dev_net(dst_dev); | ||
1116 | struct ipv6_saddr_dst dst; | 1115 | struct ipv6_saddr_dst dst; |
1117 | struct net_device *dev; | 1116 | struct net_device *dev; |
1118 | int dst_type; | 1117 | int dst_type; |
diff --git a/net/ipv6/fib6_rules.c b/net/ipv6/fib6_rules.c index 8d05527524e3..f5de3f9dc692 100644 --- a/net/ipv6/fib6_rules.c +++ b/net/ipv6/fib6_rules.c | |||
@@ -93,7 +93,8 @@ static int fib6_rule_action(struct fib_rule *rule, struct flowi *flp, | |||
93 | if (flags & RT6_LOOKUP_F_SRCPREF_COA) | 93 | if (flags & RT6_LOOKUP_F_SRCPREF_COA) |
94 | srcprefs |= IPV6_PREFER_SRC_COA; | 94 | srcprefs |= IPV6_PREFER_SRC_COA; |
95 | 95 | ||
96 | if (ipv6_dev_get_saddr(ip6_dst_idev(&rt->u.dst)->dev, | 96 | if (ipv6_dev_get_saddr(net, |
97 | ip6_dst_idev(&rt->u.dst)->dev, | ||
97 | &flp->fl6_dst, srcprefs, | 98 | &flp->fl6_dst, srcprefs, |
98 | &saddr)) | 99 | &saddr)) |
99 | goto again; | 100 | goto again; |
diff --git a/net/ipv6/ip6_fib.c b/net/ipv6/ip6_fib.c index 52dddc25d3e6..29c7c99e69f7 100644 --- a/net/ipv6/ip6_fib.c +++ b/net/ipv6/ip6_fib.c | |||
@@ -378,6 +378,7 @@ static int inet6_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) | |||
378 | 378 | ||
379 | arg.skb = skb; | 379 | arg.skb = skb; |
380 | arg.cb = cb; | 380 | arg.cb = cb; |
381 | arg.net = net; | ||
381 | w->args = &arg; | 382 | w->args = &arg; |
382 | 383 | ||
383 | for (h = s_h; h < FIB_TABLE_HASHSZ; h++, s_e = 0) { | 384 | for (h = s_h; h < FIB_TABLE_HASHSZ; h++, s_e = 0) { |
diff --git a/net/ipv6/ip6_output.c b/net/ipv6/ip6_output.c index a4402de425d9..0e844c2736a7 100644 --- a/net/ipv6/ip6_output.c +++ b/net/ipv6/ip6_output.c | |||
@@ -934,7 +934,7 @@ static int ip6_dst_lookup_tail(struct sock *sk, | |||
934 | goto out_err_release; | 934 | goto out_err_release; |
935 | 935 | ||
936 | if (ipv6_addr_any(&fl->fl6_src)) { | 936 | if (ipv6_addr_any(&fl->fl6_src)) { |
937 | err = ipv6_dev_get_saddr(ip6_dst_idev(*dst)->dev, | 937 | err = ipv6_dev_get_saddr(net, ip6_dst_idev(*dst)->dev, |
938 | &fl->fl6_dst, | 938 | &fl->fl6_dst, |
939 | sk ? inet6_sk(sk)->srcprefs : 0, | 939 | sk ? inet6_sk(sk)->srcprefs : 0, |
940 | &fl->fl6_src); | 940 | &fl->fl6_src); |
diff --git a/net/ipv6/ipv6_sockglue.c b/net/ipv6/ipv6_sockglue.c index 741cfcd96f88..4e5eac301f91 100644 --- a/net/ipv6/ipv6_sockglue.c +++ b/net/ipv6/ipv6_sockglue.c | |||
@@ -911,7 +911,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
911 | } else { | 911 | } else { |
912 | if (np->rxopt.bits.rxinfo) { | 912 | if (np->rxopt.bits.rxinfo) { |
913 | struct in6_pktinfo src_info; | 913 | struct in6_pktinfo src_info; |
914 | src_info.ipi6_ifindex = np->mcast_oif; | 914 | src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif : sk->sk_bound_dev_if; |
915 | ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr); | 915 | ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr); |
916 | put_cmsg(&msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); | 916 | put_cmsg(&msg, SOL_IPV6, IPV6_PKTINFO, sizeof(src_info), &src_info); |
917 | } | 917 | } |
@@ -921,7 +921,7 @@ static int do_ipv6_getsockopt(struct sock *sk, int level, int optname, | |||
921 | } | 921 | } |
922 | if (np->rxopt.bits.rxoinfo) { | 922 | if (np->rxopt.bits.rxoinfo) { |
923 | struct in6_pktinfo src_info; | 923 | struct in6_pktinfo src_info; |
924 | src_info.ipi6_ifindex = np->mcast_oif; | 924 | src_info.ipi6_ifindex = np->mcast_oif ? np->mcast_oif : sk->sk_bound_dev_if; |
925 | ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr); | 925 | ipv6_addr_copy(&src_info.ipi6_addr, &np->daddr); |
926 | put_cmsg(&msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); | 926 | put_cmsg(&msg, SOL_IPV6, IPV6_2292PKTINFO, sizeof(src_info), &src_info); |
927 | } | 927 | } |
diff --git a/net/ipv6/ndisc.c b/net/ipv6/ndisc.c index beb48e3f038a..f1c62ba0f56b 100644 --- a/net/ipv6/ndisc.c +++ b/net/ipv6/ndisc.c | |||
@@ -549,7 +549,7 @@ static void ndisc_send_na(struct net_device *dev, struct neighbour *neigh, | |||
549 | override = 0; | 549 | override = 0; |
550 | in6_ifa_put(ifp); | 550 | in6_ifa_put(ifp); |
551 | } else { | 551 | } else { |
552 | if (ipv6_dev_get_saddr(dev, daddr, | 552 | if (ipv6_dev_get_saddr(dev_net(dev), dev, daddr, |
553 | inet6_sk(dev_net(dev)->ipv6.ndisc_sk)->srcprefs, | 553 | inet6_sk(dev_net(dev)->ipv6.ndisc_sk)->srcprefs, |
554 | &tmpaddr)) | 554 | &tmpaddr)) |
555 | return; | 555 | return; |
diff --git a/net/ipv6/route.c b/net/ipv6/route.c index 41b165ffb369..9af6115f0f50 100644 --- a/net/ipv6/route.c +++ b/net/ipv6/route.c | |||
@@ -2106,7 +2106,8 @@ static inline size_t rt6_nlmsg_size(void) | |||
2106 | + nla_total_size(sizeof(struct rta_cacheinfo)); | 2106 | + nla_total_size(sizeof(struct rta_cacheinfo)); |
2107 | } | 2107 | } |
2108 | 2108 | ||
2109 | static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | 2109 | static int rt6_fill_node(struct net *net, |
2110 | struct sk_buff *skb, struct rt6_info *rt, | ||
2110 | struct in6_addr *dst, struct in6_addr *src, | 2111 | struct in6_addr *dst, struct in6_addr *src, |
2111 | int iif, int type, u32 pid, u32 seq, | 2112 | int iif, int type, u32 pid, u32 seq, |
2112 | int prefix, int nowait, unsigned int flags) | 2113 | int prefix, int nowait, unsigned int flags) |
@@ -2189,7 +2190,7 @@ static int rt6_fill_node(struct sk_buff *skb, struct rt6_info *rt, | |||
2189 | } else if (dst) { | 2190 | } else if (dst) { |
2190 | struct inet6_dev *idev = ip6_dst_idev(&rt->u.dst); | 2191 | struct inet6_dev *idev = ip6_dst_idev(&rt->u.dst); |
2191 | struct in6_addr saddr_buf; | 2192 | struct in6_addr saddr_buf; |
2192 | if (ipv6_dev_get_saddr(idev ? idev->dev : NULL, | 2193 | if (ipv6_dev_get_saddr(net, idev ? idev->dev : NULL, |
2193 | dst, 0, &saddr_buf) == 0) | 2194 | dst, 0, &saddr_buf) == 0) |
2194 | NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf); | 2195 | NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf); |
2195 | } | 2196 | } |
@@ -2234,7 +2235,8 @@ int rt6_dump_route(struct rt6_info *rt, void *p_arg) | |||
2234 | } else | 2235 | } else |
2235 | prefix = 0; | 2236 | prefix = 0; |
2236 | 2237 | ||
2237 | return rt6_fill_node(arg->skb, rt, NULL, NULL, 0, RTM_NEWROUTE, | 2238 | return rt6_fill_node(arg->net, |
2239 | arg->skb, rt, NULL, NULL, 0, RTM_NEWROUTE, | ||
2238 | NETLINK_CB(arg->cb->skb).pid, arg->cb->nlh->nlmsg_seq, | 2240 | NETLINK_CB(arg->cb->skb).pid, arg->cb->nlh->nlmsg_seq, |
2239 | prefix, 0, NLM_F_MULTI); | 2241 | prefix, 0, NLM_F_MULTI); |
2240 | } | 2242 | } |
@@ -2300,7 +2302,7 @@ static int inet6_rtm_getroute(struct sk_buff *in_skb, struct nlmsghdr* nlh, void | |||
2300 | rt = (struct rt6_info*) ip6_route_output(net, NULL, &fl); | 2302 | rt = (struct rt6_info*) ip6_route_output(net, NULL, &fl); |
2301 | skb->dst = &rt->u.dst; | 2303 | skb->dst = &rt->u.dst; |
2302 | 2304 | ||
2303 | err = rt6_fill_node(skb, rt, &fl.fl6_dst, &fl.fl6_src, iif, | 2305 | err = rt6_fill_node(net, skb, rt, &fl.fl6_dst, &fl.fl6_src, iif, |
2304 | RTM_NEWROUTE, NETLINK_CB(in_skb).pid, | 2306 | RTM_NEWROUTE, NETLINK_CB(in_skb).pid, |
2305 | nlh->nlmsg_seq, 0, 0, 0); | 2307 | nlh->nlmsg_seq, 0, 0, 0); |
2306 | if (err < 0) { | 2308 | if (err < 0) { |
@@ -2327,7 +2329,7 @@ void inet6_rt_notify(int event, struct rt6_info *rt, struct nl_info *info) | |||
2327 | if (skb == NULL) | 2329 | if (skb == NULL) |
2328 | goto errout; | 2330 | goto errout; |
2329 | 2331 | ||
2330 | err = rt6_fill_node(skb, rt, NULL, NULL, 0, | 2332 | err = rt6_fill_node(net, skb, rt, NULL, NULL, 0, |
2331 | event, info->pid, seq, 0, 0, 0); | 2333 | event, info->pid, seq, 0, 0, 0); |
2332 | if (err < 0) { | 2334 | if (err < 0) { |
2333 | /* -EMSGSIZE implies BUG in rt6_nlmsg_size() */ | 2335 | /* -EMSGSIZE implies BUG in rt6_nlmsg_size() */ |
diff --git a/net/ipv6/xfrm6_policy.c b/net/ipv6/xfrm6_policy.c index 8f1e0543b3c4..08e4cbbe3f04 100644 --- a/net/ipv6/xfrm6_policy.c +++ b/net/ipv6/xfrm6_policy.c | |||
@@ -52,12 +52,14 @@ static struct dst_entry *xfrm6_dst_lookup(int tos, xfrm_address_t *saddr, | |||
52 | static int xfrm6_get_saddr(xfrm_address_t *saddr, xfrm_address_t *daddr) | 52 | static int xfrm6_get_saddr(xfrm_address_t *saddr, xfrm_address_t *daddr) |
53 | { | 53 | { |
54 | struct dst_entry *dst; | 54 | struct dst_entry *dst; |
55 | struct net_device *dev; | ||
55 | 56 | ||
56 | dst = xfrm6_dst_lookup(0, NULL, daddr); | 57 | dst = xfrm6_dst_lookup(0, NULL, daddr); |
57 | if (IS_ERR(dst)) | 58 | if (IS_ERR(dst)) |
58 | return -EHOSTUNREACH; | 59 | return -EHOSTUNREACH; |
59 | 60 | ||
60 | ipv6_dev_get_saddr(ip6_dst_idev(dst)->dev, | 61 | dev = ip6_dst_idev(dst)->dev; |
62 | ipv6_dev_get_saddr(dev_net(dev), dev, | ||
61 | (struct in6_addr *)&daddr->a6, 0, | 63 | (struct in6_addr *)&daddr->a6, 0, |
62 | (struct in6_addr *)&saddr->a6); | 64 | (struct in6_addr *)&saddr->a6); |
63 | dst_release(dst); | 65 | dst_release(dst); |
diff --git a/net/mac80211/mlme.c b/net/mac80211/mlme.c index e1d11c9b6729..1e97fb9fb34b 100644 --- a/net/mac80211/mlme.c +++ b/net/mac80211/mlme.c | |||
@@ -2103,6 +2103,8 @@ static void ieee80211_rx_mgmt_assoc_resp(struct ieee80211_sub_if_data *sdata, | |||
2103 | rcu_read_unlock(); | 2103 | rcu_read_unlock(); |
2104 | return; | 2104 | return; |
2105 | } | 2105 | } |
2106 | /* update new sta with its last rx activity */ | ||
2107 | sta->last_rx = jiffies; | ||
2106 | } | 2108 | } |
2107 | 2109 | ||
2108 | /* | 2110 | /* |
diff --git a/net/netfilter/nf_conntrack_netlink.c b/net/netfilter/nf_conntrack_netlink.c index 105a616c5c78..a8752031adcb 100644 --- a/net/netfilter/nf_conntrack_netlink.c +++ b/net/netfilter/nf_conntrack_netlink.c | |||
@@ -968,7 +968,7 @@ ctnetlink_change_helper(struct nf_conn *ct, struct nlattr *cda[]) | |||
968 | /* need to zero data of old helper */ | 968 | /* need to zero data of old helper */ |
969 | memset(&help->help, 0, sizeof(help->help)); | 969 | memset(&help->help, 0, sizeof(help->help)); |
970 | } else { | 970 | } else { |
971 | help = nf_ct_helper_ext_add(ct, GFP_KERNEL); | 971 | help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); |
972 | if (help == NULL) | 972 | if (help == NULL) |
973 | return -ENOMEM; | 973 | return -ENOMEM; |
974 | } | 974 | } |
@@ -1136,16 +1136,33 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1136 | ct->timeout.expires = jiffies + ct->timeout.expires * HZ; | 1136 | ct->timeout.expires = jiffies + ct->timeout.expires * HZ; |
1137 | ct->status |= IPS_CONFIRMED; | 1137 | ct->status |= IPS_CONFIRMED; |
1138 | 1138 | ||
1139 | rcu_read_lock(); | ||
1140 | helper = __nf_ct_helper_find(rtuple); | ||
1141 | if (helper) { | ||
1142 | help = nf_ct_helper_ext_add(ct, GFP_ATOMIC); | ||
1143 | if (help == NULL) { | ||
1144 | rcu_read_unlock(); | ||
1145 | err = -ENOMEM; | ||
1146 | goto err; | ||
1147 | } | ||
1148 | /* not in hash table yet so not strictly necessary */ | ||
1149 | rcu_assign_pointer(help->helper, helper); | ||
1150 | } | ||
1151 | |||
1139 | if (cda[CTA_STATUS]) { | 1152 | if (cda[CTA_STATUS]) { |
1140 | err = ctnetlink_change_status(ct, cda); | 1153 | err = ctnetlink_change_status(ct, cda); |
1141 | if (err < 0) | 1154 | if (err < 0) { |
1155 | rcu_read_unlock(); | ||
1142 | goto err; | 1156 | goto err; |
1157 | } | ||
1143 | } | 1158 | } |
1144 | 1159 | ||
1145 | if (cda[CTA_PROTOINFO]) { | 1160 | if (cda[CTA_PROTOINFO]) { |
1146 | err = ctnetlink_change_protoinfo(ct, cda); | 1161 | err = ctnetlink_change_protoinfo(ct, cda); |
1147 | if (err < 0) | 1162 | if (err < 0) { |
1163 | rcu_read_unlock(); | ||
1148 | goto err; | 1164 | goto err; |
1165 | } | ||
1149 | } | 1166 | } |
1150 | 1167 | ||
1151 | nf_ct_acct_ext_add(ct, GFP_KERNEL); | 1168 | nf_ct_acct_ext_add(ct, GFP_KERNEL); |
@@ -1155,19 +1172,6 @@ ctnetlink_create_conntrack(struct nlattr *cda[], | |||
1155 | ct->mark = ntohl(nla_get_be32(cda[CTA_MARK])); | 1172 | ct->mark = ntohl(nla_get_be32(cda[CTA_MARK])); |
1156 | #endif | 1173 | #endif |
1157 | 1174 | ||
1158 | rcu_read_lock(); | ||
1159 | helper = __nf_ct_helper_find(rtuple); | ||
1160 | if (helper) { | ||
1161 | help = nf_ct_helper_ext_add(ct, GFP_KERNEL); | ||
1162 | if (help == NULL) { | ||
1163 | rcu_read_unlock(); | ||
1164 | err = -ENOMEM; | ||
1165 | goto err; | ||
1166 | } | ||
1167 | /* not in hash table yet so not strictly necessary */ | ||
1168 | rcu_assign_pointer(help->helper, helper); | ||
1169 | } | ||
1170 | |||
1171 | /* setup master conntrack: this is a confirmed expectation */ | 1175 | /* setup master conntrack: this is a confirmed expectation */ |
1172 | if (master_ct) { | 1176 | if (master_ct) { |
1173 | __set_bit(IPS_EXPECTED_BIT, &ct->status); | 1177 | __set_bit(IPS_EXPECTED_BIT, &ct->status); |
diff --git a/net/rfkill/rfkill.c b/net/rfkill/rfkill.c index d2d45655cd1a..35a9994e2339 100644 --- a/net/rfkill/rfkill.c +++ b/net/rfkill/rfkill.c | |||
@@ -150,6 +150,8 @@ static void update_rfkill_state(struct rfkill *rfkill) | |||
150 | * calls and handling all the red tape such as issuing notifications | 150 | * calls and handling all the red tape such as issuing notifications |
151 | * if the call is successful. | 151 | * if the call is successful. |
152 | * | 152 | * |
153 | * Suspended devices are not touched at all, and -EAGAIN is returned. | ||
154 | * | ||
153 | * Note that the @force parameter cannot override a (possibly cached) | 155 | * Note that the @force parameter cannot override a (possibly cached) |
154 | * state of RFKILL_STATE_HARD_BLOCKED. Any device making use of | 156 | * state of RFKILL_STATE_HARD_BLOCKED. Any device making use of |
155 | * RFKILL_STATE_HARD_BLOCKED implements either get_state() or | 157 | * RFKILL_STATE_HARD_BLOCKED implements either get_state() or |
@@ -168,6 +170,9 @@ static int rfkill_toggle_radio(struct rfkill *rfkill, | |||
168 | int retval = 0; | 170 | int retval = 0; |
169 | enum rfkill_state oldstate, newstate; | 171 | enum rfkill_state oldstate, newstate; |
170 | 172 | ||
173 | if (unlikely(rfkill->dev.power.power_state.event & PM_EVENT_SLEEP)) | ||
174 | return -EBUSY; | ||
175 | |||
171 | oldstate = rfkill->state; | 176 | oldstate = rfkill->state; |
172 | 177 | ||
173 | if (rfkill->get_state && !force && | 178 | if (rfkill->get_state && !force && |
@@ -214,7 +219,7 @@ static int rfkill_toggle_radio(struct rfkill *rfkill, | |||
214 | * | 219 | * |
215 | * This function toggles the state of all switches of given type, | 220 | * This function toggles the state of all switches of given type, |
216 | * unless a specific switch is claimed by userspace (in which case, | 221 | * unless a specific switch is claimed by userspace (in which case, |
217 | * that switch is left alone). | 222 | * that switch is left alone) or suspended. |
218 | */ | 223 | */ |
219 | void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state) | 224 | void rfkill_switch_all(enum rfkill_type type, enum rfkill_state state) |
220 | { | 225 | { |
@@ -239,8 +244,8 @@ EXPORT_SYMBOL(rfkill_switch_all); | |||
239 | /** | 244 | /** |
240 | * rfkill_epo - emergency power off all transmitters | 245 | * rfkill_epo - emergency power off all transmitters |
241 | * | 246 | * |
242 | * This kicks all rfkill devices to RFKILL_STATE_SOFT_BLOCKED, ignoring | 247 | * This kicks all non-suspended rfkill devices to RFKILL_STATE_SOFT_BLOCKED, |
243 | * everything in its path but rfkill_mutex and rfkill->mutex. | 248 | * ignoring everything in its path but rfkill_mutex and rfkill->mutex. |
244 | */ | 249 | */ |
245 | void rfkill_epo(void) | 250 | void rfkill_epo(void) |
246 | { | 251 | { |
@@ -458,13 +463,14 @@ static int rfkill_resume(struct device *dev) | |||
458 | if (dev->power.power_state.event != PM_EVENT_ON) { | 463 | if (dev->power.power_state.event != PM_EVENT_ON) { |
459 | mutex_lock(&rfkill->mutex); | 464 | mutex_lock(&rfkill->mutex); |
460 | 465 | ||
466 | dev->power.power_state.event = PM_EVENT_ON; | ||
467 | |||
461 | /* restore radio state AND notify everybody */ | 468 | /* restore radio state AND notify everybody */ |
462 | rfkill_toggle_radio(rfkill, rfkill->state, 1); | 469 | rfkill_toggle_radio(rfkill, rfkill->state, 1); |
463 | 470 | ||
464 | mutex_unlock(&rfkill->mutex); | 471 | mutex_unlock(&rfkill->mutex); |
465 | } | 472 | } |
466 | 473 | ||
467 | dev->power.power_state = PMSG_ON; | ||
468 | return 0; | 474 | return 0; |
469 | } | 475 | } |
470 | #else | 476 | #else |
diff --git a/net/sched/cls_api.c b/net/sched/cls_api.c index d2b6f54a6261..5cafdd4c8018 100644 --- a/net/sched/cls_api.c +++ b/net/sched/cls_api.c | |||
@@ -280,7 +280,7 @@ replay: | |||
280 | if (n->nlmsg_type == RTM_DELTFILTER && t->tcm_handle == 0) { | 280 | if (n->nlmsg_type == RTM_DELTFILTER && t->tcm_handle == 0) { |
281 | spin_lock_bh(root_lock); | 281 | spin_lock_bh(root_lock); |
282 | *back = tp->next; | 282 | *back = tp->next; |
283 | spin_lock_bh(root_lock); | 283 | spin_unlock_bh(root_lock); |
284 | 284 | ||
285 | tfilter_notify(skb, n, tp, fh, RTM_DELTFILTER); | 285 | tfilter_notify(skb, n, tp, fh, RTM_DELTFILTER); |
286 | tcf_destroy(tp); | 286 | tcf_destroy(tp); |
diff --git a/net/sched/sch_api.c b/net/sched/sch_api.c index c25465e5607a..ef0efeca6352 100644 --- a/net/sched/sch_api.c +++ b/net/sched/sch_api.c | |||
@@ -27,6 +27,7 @@ | |||
27 | #include <linux/kmod.h> | 27 | #include <linux/kmod.h> |
28 | #include <linux/list.h> | 28 | #include <linux/list.h> |
29 | #include <linux/hrtimer.h> | 29 | #include <linux/hrtimer.h> |
30 | #include <linux/lockdep.h> | ||
30 | 31 | ||
31 | #include <net/net_namespace.h> | 32 | #include <net/net_namespace.h> |
32 | #include <net/sock.h> | 33 | #include <net/sock.h> |
@@ -331,7 +332,7 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) | |||
331 | if (!s || tsize != s->tsize || (!tab && tsize > 0)) | 332 | if (!s || tsize != s->tsize || (!tab && tsize > 0)) |
332 | return ERR_PTR(-EINVAL); | 333 | return ERR_PTR(-EINVAL); |
333 | 334 | ||
334 | spin_lock_bh(&qdisc_stab_lock); | 335 | spin_lock(&qdisc_stab_lock); |
335 | 336 | ||
336 | list_for_each_entry(stab, &qdisc_stab_list, list) { | 337 | list_for_each_entry(stab, &qdisc_stab_list, list) { |
337 | if (memcmp(&stab->szopts, s, sizeof(*s))) | 338 | if (memcmp(&stab->szopts, s, sizeof(*s))) |
@@ -339,11 +340,11 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) | |||
339 | if (tsize > 0 && memcmp(stab->data, tab, tsize * sizeof(u16))) | 340 | if (tsize > 0 && memcmp(stab->data, tab, tsize * sizeof(u16))) |
340 | continue; | 341 | continue; |
341 | stab->refcnt++; | 342 | stab->refcnt++; |
342 | spin_unlock_bh(&qdisc_stab_lock); | 343 | spin_unlock(&qdisc_stab_lock); |
343 | return stab; | 344 | return stab; |
344 | } | 345 | } |
345 | 346 | ||
346 | spin_unlock_bh(&qdisc_stab_lock); | 347 | spin_unlock(&qdisc_stab_lock); |
347 | 348 | ||
348 | stab = kmalloc(sizeof(*stab) + tsize * sizeof(u16), GFP_KERNEL); | 349 | stab = kmalloc(sizeof(*stab) + tsize * sizeof(u16), GFP_KERNEL); |
349 | if (!stab) | 350 | if (!stab) |
@@ -354,9 +355,9 @@ static struct qdisc_size_table *qdisc_get_stab(struct nlattr *opt) | |||
354 | if (tsize > 0) | 355 | if (tsize > 0) |
355 | memcpy(stab->data, tab, tsize * sizeof(u16)); | 356 | memcpy(stab->data, tab, tsize * sizeof(u16)); |
356 | 357 | ||
357 | spin_lock_bh(&qdisc_stab_lock); | 358 | spin_lock(&qdisc_stab_lock); |
358 | list_add_tail(&stab->list, &qdisc_stab_list); | 359 | list_add_tail(&stab->list, &qdisc_stab_list); |
359 | spin_unlock_bh(&qdisc_stab_lock); | 360 | spin_unlock(&qdisc_stab_lock); |
360 | 361 | ||
361 | return stab; | 362 | return stab; |
362 | } | 363 | } |
@@ -366,14 +367,14 @@ void qdisc_put_stab(struct qdisc_size_table *tab) | |||
366 | if (!tab) | 367 | if (!tab) |
367 | return; | 368 | return; |
368 | 369 | ||
369 | spin_lock_bh(&qdisc_stab_lock); | 370 | spin_lock(&qdisc_stab_lock); |
370 | 371 | ||
371 | if (--tab->refcnt == 0) { | 372 | if (--tab->refcnt == 0) { |
372 | list_del(&tab->list); | 373 | list_del(&tab->list); |
373 | kfree(tab); | 374 | kfree(tab); |
374 | } | 375 | } |
375 | 376 | ||
376 | spin_unlock_bh(&qdisc_stab_lock); | 377 | spin_unlock(&qdisc_stab_lock); |
377 | } | 378 | } |
378 | EXPORT_SYMBOL(qdisc_put_stab); | 379 | EXPORT_SYMBOL(qdisc_put_stab); |
379 | 380 | ||
@@ -426,7 +427,7 @@ static enum hrtimer_restart qdisc_watchdog(struct hrtimer *timer) | |||
426 | 427 | ||
427 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; | 428 | wd->qdisc->flags &= ~TCQ_F_THROTTLED; |
428 | smp_wmb(); | 429 | smp_wmb(); |
429 | __netif_schedule(wd->qdisc); | 430 | __netif_schedule(qdisc_root(wd->qdisc)); |
430 | 431 | ||
431 | return HRTIMER_NORESTART; | 432 | return HRTIMER_NORESTART; |
432 | } | 433 | } |
@@ -637,11 +638,8 @@ static void notify_and_destroy(struct sk_buff *skb, struct nlmsghdr *n, u32 clid | |||
637 | if (new || old) | 638 | if (new || old) |
638 | qdisc_notify(skb, n, clid, old, new); | 639 | qdisc_notify(skb, n, clid, old, new); |
639 | 640 | ||
640 | if (old) { | 641 | if (old) |
641 | spin_lock_bh(&old->q.lock); | ||
642 | qdisc_destroy(old); | 642 | qdisc_destroy(old); |
643 | spin_unlock_bh(&old->q.lock); | ||
644 | } | ||
645 | } | 643 | } |
646 | 644 | ||
647 | /* Graft qdisc "new" to class "classid" of qdisc "parent" or | 645 | /* Graft qdisc "new" to class "classid" of qdisc "parent" or |
@@ -707,6 +705,10 @@ static int qdisc_graft(struct net_device *dev, struct Qdisc *parent, | |||
707 | return err; | 705 | return err; |
708 | } | 706 | } |
709 | 707 | ||
708 | /* lockdep annotation is needed for ingress; egress gets it only for name */ | ||
709 | static struct lock_class_key qdisc_tx_lock; | ||
710 | static struct lock_class_key qdisc_rx_lock; | ||
711 | |||
710 | /* | 712 | /* |
711 | Allocate and initialize new qdisc. | 713 | Allocate and initialize new qdisc. |
712 | 714 | ||
@@ -767,6 +769,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue, | |||
767 | if (handle == TC_H_INGRESS) { | 769 | if (handle == TC_H_INGRESS) { |
768 | sch->flags |= TCQ_F_INGRESS; | 770 | sch->flags |= TCQ_F_INGRESS; |
769 | handle = TC_H_MAKE(TC_H_INGRESS, 0); | 771 | handle = TC_H_MAKE(TC_H_INGRESS, 0); |
772 | lockdep_set_class(qdisc_lock(sch), &qdisc_rx_lock); | ||
770 | } else { | 773 | } else { |
771 | if (handle == 0) { | 774 | if (handle == 0) { |
772 | handle = qdisc_alloc_handle(dev); | 775 | handle = qdisc_alloc_handle(dev); |
@@ -774,6 +777,7 @@ qdisc_create(struct net_device *dev, struct netdev_queue *dev_queue, | |||
774 | if (handle == 0) | 777 | if (handle == 0) |
775 | goto err_out3; | 778 | goto err_out3; |
776 | } | 779 | } |
780 | lockdep_set_class(qdisc_lock(sch), &qdisc_tx_lock); | ||
777 | } | 781 | } |
778 | 782 | ||
779 | sch->handle = handle; | 783 | sch->handle = handle; |
@@ -1084,20 +1088,13 @@ create_n_graft: | |||
1084 | } | 1088 | } |
1085 | 1089 | ||
1086 | graft: | 1090 | graft: |
1087 | if (1) { | 1091 | err = qdisc_graft(dev, p, skb, n, clid, q, NULL); |
1088 | spinlock_t *root_lock; | 1092 | if (err) { |
1089 | 1093 | if (q) | |
1090 | err = qdisc_graft(dev, p, skb, n, clid, q, NULL); | 1094 | qdisc_destroy(q); |
1091 | if (err) { | 1095 | return err; |
1092 | if (q) { | ||
1093 | root_lock = qdisc_root_lock(q); | ||
1094 | spin_lock_bh(root_lock); | ||
1095 | qdisc_destroy(q); | ||
1096 | spin_unlock_bh(root_lock); | ||
1097 | } | ||
1098 | return err; | ||
1099 | } | ||
1100 | } | 1096 | } |
1097 | |||
1101 | return 0; | 1098 | return 0; |
1102 | } | 1099 | } |
1103 | 1100 | ||
diff --git a/net/sched/sch_cbq.c b/net/sched/sch_cbq.c index 4e261ce62f48..47ef492c4ff4 100644 --- a/net/sched/sch_cbq.c +++ b/net/sched/sch_cbq.c | |||
@@ -654,7 +654,7 @@ static enum hrtimer_restart cbq_undelay(struct hrtimer *timer) | |||
654 | } | 654 | } |
655 | 655 | ||
656 | sch->flags &= ~TCQ_F_THROTTLED; | 656 | sch->flags &= ~TCQ_F_THROTTLED; |
657 | __netif_schedule(sch); | 657 | __netif_schedule(qdisc_root(sch)); |
658 | return HRTIMER_NORESTART; | 658 | return HRTIMER_NORESTART; |
659 | } | 659 | } |
660 | 660 | ||
diff --git a/net/sched/sch_generic.c b/net/sched/sch_generic.c index 468574682caa..c3ed4d44fc14 100644 --- a/net/sched/sch_generic.c +++ b/net/sched/sch_generic.c | |||
@@ -518,14 +518,17 @@ void qdisc_reset(struct Qdisc *qdisc) | |||
518 | } | 518 | } |
519 | EXPORT_SYMBOL(qdisc_reset); | 519 | EXPORT_SYMBOL(qdisc_reset); |
520 | 520 | ||
521 | /* this is the rcu callback function to clean up a qdisc when there | 521 | void qdisc_destroy(struct Qdisc *qdisc) |
522 | * are no further references to it */ | ||
523 | |||
524 | static void __qdisc_destroy(struct rcu_head *head) | ||
525 | { | 522 | { |
526 | struct Qdisc *qdisc = container_of(head, struct Qdisc, q_rcu); | ||
527 | const struct Qdisc_ops *ops = qdisc->ops; | 523 | const struct Qdisc_ops *ops = qdisc->ops; |
528 | 524 | ||
525 | if (qdisc->flags & TCQ_F_BUILTIN || | ||
526 | !atomic_dec_and_test(&qdisc->refcnt)) | ||
527 | return; | ||
528 | |||
529 | if (qdisc->parent) | ||
530 | list_del(&qdisc->list); | ||
531 | |||
529 | #ifdef CONFIG_NET_SCHED | 532 | #ifdef CONFIG_NET_SCHED |
530 | qdisc_put_stab(qdisc->stab); | 533 | qdisc_put_stab(qdisc->stab); |
531 | #endif | 534 | #endif |
@@ -542,20 +545,6 @@ static void __qdisc_destroy(struct rcu_head *head) | |||
542 | 545 | ||
543 | kfree((char *) qdisc - qdisc->padded); | 546 | kfree((char *) qdisc - qdisc->padded); |
544 | } | 547 | } |
545 | |||
546 | /* Under qdisc_lock(qdisc) and BH! */ | ||
547 | |||
548 | void qdisc_destroy(struct Qdisc *qdisc) | ||
549 | { | ||
550 | if (qdisc->flags & TCQ_F_BUILTIN || | ||
551 | !atomic_dec_and_test(&qdisc->refcnt)) | ||
552 | return; | ||
553 | |||
554 | if (qdisc->parent) | ||
555 | list_del(&qdisc->list); | ||
556 | |||
557 | call_rcu(&qdisc->q_rcu, __qdisc_destroy); | ||
558 | } | ||
559 | EXPORT_SYMBOL(qdisc_destroy); | 548 | EXPORT_SYMBOL(qdisc_destroy); |
560 | 549 | ||
561 | static bool dev_all_qdisc_sleeping_noop(struct net_device *dev) | 550 | static bool dev_all_qdisc_sleeping_noop(struct net_device *dev) |
@@ -597,6 +586,9 @@ static void transition_one_qdisc(struct net_device *dev, | |||
597 | struct Qdisc *new_qdisc = dev_queue->qdisc_sleeping; | 586 | struct Qdisc *new_qdisc = dev_queue->qdisc_sleeping; |
598 | int *need_watchdog_p = _need_watchdog; | 587 | int *need_watchdog_p = _need_watchdog; |
599 | 588 | ||
589 | if (!(new_qdisc->flags & TCQ_F_BUILTIN)) | ||
590 | clear_bit(__QDISC_STATE_DEACTIVATED, &new_qdisc->state); | ||
591 | |||
600 | rcu_assign_pointer(dev_queue->qdisc, new_qdisc); | 592 | rcu_assign_pointer(dev_queue->qdisc, new_qdisc); |
601 | if (need_watchdog_p && new_qdisc != &noqueue_qdisc) | 593 | if (need_watchdog_p && new_qdisc != &noqueue_qdisc) |
602 | *need_watchdog_p = 1; | 594 | *need_watchdog_p = 1; |
@@ -640,6 +632,9 @@ static void dev_deactivate_queue(struct net_device *dev, | |||
640 | if (qdisc) { | 632 | if (qdisc) { |
641 | spin_lock_bh(qdisc_lock(qdisc)); | 633 | spin_lock_bh(qdisc_lock(qdisc)); |
642 | 634 | ||
635 | if (!(qdisc->flags & TCQ_F_BUILTIN)) | ||
636 | set_bit(__QDISC_STATE_DEACTIVATED, &qdisc->state); | ||
637 | |||
643 | dev_queue->qdisc = qdisc_default; | 638 | dev_queue->qdisc = qdisc_default; |
644 | qdisc_reset(qdisc); | 639 | qdisc_reset(qdisc); |
645 | 640 | ||
@@ -647,7 +642,7 @@ static void dev_deactivate_queue(struct net_device *dev, | |||
647 | } | 642 | } |
648 | } | 643 | } |
649 | 644 | ||
650 | static bool some_qdisc_is_busy(struct net_device *dev, int lock) | 645 | static bool some_qdisc_is_busy(struct net_device *dev) |
651 | { | 646 | { |
652 | unsigned int i; | 647 | unsigned int i; |
653 | 648 | ||
@@ -661,14 +656,12 @@ static bool some_qdisc_is_busy(struct net_device *dev, int lock) | |||
661 | q = dev_queue->qdisc_sleeping; | 656 | q = dev_queue->qdisc_sleeping; |
662 | root_lock = qdisc_lock(q); | 657 | root_lock = qdisc_lock(q); |
663 | 658 | ||
664 | if (lock) | 659 | spin_lock_bh(root_lock); |
665 | spin_lock_bh(root_lock); | ||
666 | 660 | ||
667 | val = (test_bit(__QDISC_STATE_RUNNING, &q->state) || | 661 | val = (test_bit(__QDISC_STATE_RUNNING, &q->state) || |
668 | test_bit(__QDISC_STATE_SCHED, &q->state)); | 662 | test_bit(__QDISC_STATE_SCHED, &q->state)); |
669 | 663 | ||
670 | if (lock) | 664 | spin_unlock_bh(root_lock); |
671 | spin_unlock_bh(root_lock); | ||
672 | 665 | ||
673 | if (val) | 666 | if (val) |
674 | return true; | 667 | return true; |
@@ -678,8 +671,6 @@ static bool some_qdisc_is_busy(struct net_device *dev, int lock) | |||
678 | 671 | ||
679 | void dev_deactivate(struct net_device *dev) | 672 | void dev_deactivate(struct net_device *dev) |
680 | { | 673 | { |
681 | bool running; | ||
682 | |||
683 | netdev_for_each_tx_queue(dev, dev_deactivate_queue, &noop_qdisc); | 674 | netdev_for_each_tx_queue(dev, dev_deactivate_queue, &noop_qdisc); |
684 | dev_deactivate_queue(dev, &dev->rx_queue, &noop_qdisc); | 675 | dev_deactivate_queue(dev, &dev->rx_queue, &noop_qdisc); |
685 | 676 | ||
@@ -689,25 +680,8 @@ void dev_deactivate(struct net_device *dev) | |||
689 | synchronize_rcu(); | 680 | synchronize_rcu(); |
690 | 681 | ||
691 | /* Wait for outstanding qdisc_run calls. */ | 682 | /* Wait for outstanding qdisc_run calls. */ |
692 | do { | 683 | while (some_qdisc_is_busy(dev)) |
693 | while (some_qdisc_is_busy(dev, 0)) | 684 | yield(); |
694 | yield(); | ||
695 | |||
696 | /* | ||
697 | * Double-check inside queue lock to ensure that all effects | ||
698 | * of the queue run are visible when we return. | ||
699 | */ | ||
700 | running = some_qdisc_is_busy(dev, 1); | ||
701 | |||
702 | /* | ||
703 | * The running flag should never be set at this point because | ||
704 | * we've already set dev->qdisc to noop_qdisc *inside* the same | ||
705 | * pair of spin locks. That is, if any qdisc_run starts after | ||
706 | * our initial test it should see the noop_qdisc and then | ||
707 | * clear the RUNNING bit before dropping the queue lock. So | ||
708 | * if it is set here then we've found a bug. | ||
709 | */ | ||
710 | } while (WARN_ON_ONCE(running)); | ||
711 | } | 685 | } |
712 | 686 | ||
713 | static void dev_init_scheduler_queue(struct net_device *dev, | 687 | static void dev_init_scheduler_queue(struct net_device *dev, |
@@ -736,14 +710,10 @@ static void shutdown_scheduler_queue(struct net_device *dev, | |||
736 | struct Qdisc *qdisc_default = _qdisc_default; | 710 | struct Qdisc *qdisc_default = _qdisc_default; |
737 | 711 | ||
738 | if (qdisc) { | 712 | if (qdisc) { |
739 | spinlock_t *root_lock = qdisc_lock(qdisc); | ||
740 | |||
741 | dev_queue->qdisc = qdisc_default; | 713 | dev_queue->qdisc = qdisc_default; |
742 | dev_queue->qdisc_sleeping = qdisc_default; | 714 | dev_queue->qdisc_sleeping = qdisc_default; |
743 | 715 | ||
744 | spin_lock_bh(root_lock); | ||
745 | qdisc_destroy(qdisc); | 716 | qdisc_destroy(qdisc); |
746 | spin_unlock_bh(root_lock); | ||
747 | } | 717 | } |
748 | } | 718 | } |
749 | 719 | ||
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c index 6febd245e62b..0df0df202ed0 100644 --- a/net/sched/sch_htb.c +++ b/net/sched/sch_htb.c | |||
@@ -577,7 +577,7 @@ static int htb_enqueue(struct sk_buff *skb, struct Qdisc *sch) | |||
577 | sch->qstats.drops++; | 577 | sch->qstats.drops++; |
578 | cl->qstats.drops++; | 578 | cl->qstats.drops++; |
579 | } | 579 | } |
580 | return NET_XMIT_DROP; | 580 | return ret; |
581 | } else { | 581 | } else { |
582 | cl->bstats.packets += | 582 | cl->bstats.packets += |
583 | skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1; | 583 | skb_is_gso(skb)?skb_shinfo(skb)->gso_segs:1; |
@@ -623,7 +623,7 @@ static int htb_requeue(struct sk_buff *skb, struct Qdisc *sch) | |||
623 | sch->qstats.drops++; | 623 | sch->qstats.drops++; |
624 | cl->qstats.drops++; | 624 | cl->qstats.drops++; |
625 | } | 625 | } |
626 | return NET_XMIT_DROP; | 626 | return ret; |
627 | } else | 627 | } else |
628 | htb_activate(q, cl); | 628 | htb_activate(q, cl); |
629 | 629 | ||
diff --git a/net/sched/sch_prio.c b/net/sched/sch_prio.c index eac197610edf..a6697c686c7f 100644 --- a/net/sched/sch_prio.c +++ b/net/sched/sch_prio.c | |||
@@ -113,11 +113,11 @@ prio_requeue(struct sk_buff *skb, struct Qdisc* sch) | |||
113 | if ((ret = qdisc->ops->requeue(skb, qdisc)) == NET_XMIT_SUCCESS) { | 113 | if ((ret = qdisc->ops->requeue(skb, qdisc)) == NET_XMIT_SUCCESS) { |
114 | sch->q.qlen++; | 114 | sch->q.qlen++; |
115 | sch->qstats.requeues++; | 115 | sch->qstats.requeues++; |
116 | return 0; | 116 | return NET_XMIT_SUCCESS; |
117 | } | 117 | } |
118 | if (net_xmit_drop_count(ret)) | 118 | if (net_xmit_drop_count(ret)) |
119 | sch->qstats.drops++; | 119 | sch->qstats.drops++; |
120 | return NET_XMIT_DROP; | 120 | return ret; |
121 | } | 121 | } |
122 | 122 | ||
123 | 123 | ||
diff --git a/net/sched/sch_tbf.c b/net/sched/sch_tbf.c index 7d3b7ff3bf07..94c61598b86a 100644 --- a/net/sched/sch_tbf.c +++ b/net/sched/sch_tbf.c | |||
@@ -123,15 +123,8 @@ static int tbf_enqueue(struct sk_buff *skb, struct Qdisc* sch) | |||
123 | struct tbf_sched_data *q = qdisc_priv(sch); | 123 | struct tbf_sched_data *q = qdisc_priv(sch); |
124 | int ret; | 124 | int ret; |
125 | 125 | ||
126 | if (qdisc_pkt_len(skb) > q->max_size) { | 126 | if (qdisc_pkt_len(skb) > q->max_size) |
127 | sch->qstats.drops++; | 127 | return qdisc_reshape_fail(skb, sch); |
128 | #ifdef CONFIG_NET_CLS_ACT | ||
129 | if (sch->reshape_fail == NULL || sch->reshape_fail(skb, sch)) | ||
130 | #endif | ||
131 | kfree_skb(skb); | ||
132 | |||
133 | return NET_XMIT_DROP; | ||
134 | } | ||
135 | 128 | ||
136 | ret = qdisc_enqueue(skb, q->qdisc); | 129 | ret = qdisc_enqueue(skb, q->qdisc); |
137 | if (ret != 0) { | 130 | if (ret != 0) { |
diff --git a/net/sctp/ipv6.c b/net/sctp/ipv6.c index 483a01d0740a..47f91afa0211 100644 --- a/net/sctp/ipv6.c +++ b/net/sctp/ipv6.c | |||
@@ -319,7 +319,8 @@ static void sctp_v6_get_saddr(struct sctp_sock *sk, | |||
319 | __func__, asoc, dst, NIP6(daddr->v6.sin6_addr)); | 319 | __func__, asoc, dst, NIP6(daddr->v6.sin6_addr)); |
320 | 320 | ||
321 | if (!asoc) { | 321 | if (!asoc) { |
322 | ipv6_dev_get_saddr(dst ? ip6_dst_idev(dst)->dev : NULL, | 322 | ipv6_dev_get_saddr(sock_net(sctp_opt2sk(sk)), |
323 | dst ? ip6_dst_idev(dst)->dev : NULL, | ||
323 | &daddr->v6.sin6_addr, | 324 | &daddr->v6.sin6_addr, |
324 | inet6_sk(&sk->inet.sk)->srcprefs, | 325 | inet6_sk(&sk->inet.sk)->srcprefs, |
325 | &saddr->v6.sin6_addr); | 326 | &saddr->v6.sin6_addr); |