Merge branch 'timers/clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/x86/linux-2.6-tip
This commit is contained in:
commit
66fdc95172
178 changed files with 4943 additions and 9654 deletions
|
@ -190,16 +190,20 @@ X!Ekernel/module.c
|
|||
!Edrivers/pci/pci.c
|
||||
!Edrivers/pci/pci-driver.c
|
||||
!Edrivers/pci/remove.c
|
||||
!Edrivers/pci/pci-acpi.c
|
||||
!Edrivers/pci/search.c
|
||||
!Edrivers/pci/msi.c
|
||||
!Edrivers/pci/bus.c
|
||||
!Edrivers/pci/access.c
|
||||
!Edrivers/pci/irq.c
|
||||
!Edrivers/pci/htirq.c
|
||||
<!-- FIXME: Removed for now since no structured comments in source
|
||||
X!Edrivers/pci/hotplug.c
|
||||
-->
|
||||
!Edrivers/pci/probe.c
|
||||
!Edrivers/pci/slot.c
|
||||
!Edrivers/pci/rom.c
|
||||
!Edrivers/pci/iov.c
|
||||
!Idrivers/pci/pci-sysfs.c
|
||||
</sect1>
|
||||
<sect1><title>PCI Hotplug Support Library</title>
|
||||
!Edrivers/pci/hotplug/pci_hotplug_core.c
|
||||
|
|
|
@ -2,8 +2,14 @@
|
|||
- this file (info on ISDN implementation for Linux)
|
||||
CREDITS
|
||||
- list of the kind folks that brought you this stuff.
|
||||
HiSax.cert
|
||||
- information about the ITU approval certification of the HiSax driver.
|
||||
INTERFACE
|
||||
- description of Linklevel and Hardwarelevel ISDN interface.
|
||||
- description of isdn4linux Link Level and Hardware Level interfaces.
|
||||
INTERFACE.fax
|
||||
- description of the fax subinterface of isdn4linux.
|
||||
INTERFACE.CAPI
|
||||
- description of kernel CAPI Link Level to Hardware Level interface.
|
||||
README
|
||||
- general info on what you need and what to do for Linux ISDN.
|
||||
README.FAQ
|
||||
|
@ -12,6 +18,8 @@ README.audio
|
|||
- info for running audio over ISDN.
|
||||
README.fax
|
||||
- info for using Fax over ISDN.
|
||||
README.gigaset
|
||||
- info on the drivers for Siemens Gigaset ISDN adapters.
|
||||
README.icn
|
||||
- info on the ICN-ISDN-card and its driver.
|
||||
README.HiSax
|
||||
|
@ -37,7 +45,8 @@ README.diversion
|
|||
README.sc
|
||||
- info on driver for Spellcaster cards.
|
||||
README.x25
|
||||
_ info for running X.25 over ISDN.
|
||||
- info for running X.25 over ISDN.
|
||||
README.hysdn
|
||||
- info on driver for Hypercope active HYSDN cards
|
||||
|
||||
- info on driver for Hypercope active HYSDN cards
|
||||
README.mISDN
|
||||
- info on the Modular ISDN subsystem (mISDN).
|
||||
|
|
213
Documentation/isdn/INTERFACE.CAPI
Normal file
213
Documentation/isdn/INTERFACE.CAPI
Normal file
|
@ -0,0 +1,213 @@
|
|||
Kernel CAPI Interface to Hardware Drivers
|
||||
-----------------------------------------
|
||||
|
||||
1. Overview
|
||||
|
||||
From the CAPI 2.0 specification:
|
||||
COMMON-ISDN-API (CAPI) is an application programming interface standard used
|
||||
to access ISDN equipment connected to basic rate interfaces (BRI) and primary
|
||||
rate interfaces (PRI).
|
||||
|
||||
Kernel CAPI operates as a dispatching layer between CAPI applications and CAPI
|
||||
hardware drivers. Hardware drivers register ISDN devices (controllers, in CAPI
|
||||
lingo) with Kernel CAPI to indicate their readiness to provide their service
|
||||
to CAPI applications. CAPI applications also register with Kernel CAPI,
|
||||
requesting association with a CAPI device. Kernel CAPI then dispatches the
|
||||
application registration to an available device, forwarding it to the
|
||||
corresponding hardware driver. Kernel CAPI then forwards CAPI messages in both
|
||||
directions between the application and the hardware driver.
|
||||
|
||||
Format and semantics of CAPI messages are specified in the CAPI 2.0 standard.
|
||||
This standard is freely available from http://www.capi.org.
|
||||
|
||||
|
||||
2. Driver and Device Registration
|
||||
|
||||
CAPI drivers optionally register themselves with Kernel CAPI by calling the
|
||||
Kernel CAPI function register_capi_driver() with a pointer to a struct
|
||||
capi_driver. This structure must be filled with the name and revision of the
|
||||
driver, and optionally a pointer to a callback function, add_card(). The
|
||||
registration can be revoked by calling the function unregister_capi_driver()
|
||||
with a pointer to the same struct capi_driver.
|
||||
|
||||
CAPI drivers must register each of the ISDN devices they control with Kernel
|
||||
CAPI by calling the Kernel CAPI function attach_capi_ctr() with a pointer to a
|
||||
struct capi_ctr before they can be used. This structure must be filled with
|
||||
the names of the driver and controller, and a number of callback function
|
||||
pointers which are subsequently used by Kernel CAPI for communicating with the
|
||||
driver. The registration can be revoked by calling the function
|
||||
detach_capi_ctr() with a pointer to the same struct capi_ctr.
|
||||
|
||||
Before the device can be actually used, the driver must fill in the device
|
||||
information fields 'manu', 'version', 'profile' and 'serial' in the capi_ctr
|
||||
structure of the device, and signal its readiness by calling capi_ctr_ready().
|
||||
From then on, Kernel CAPI may call the registered callback functions for the
|
||||
device.
|
||||
|
||||
If the device becomes unusable for any reason (shutdown, disconnect ...), the
|
||||
driver has to call capi_ctr_reseted(). This will prevent further calls to the
|
||||
callback functions by Kernel CAPI.
|
||||
|
||||
|
||||
3. Application Registration and Communication
|
||||
|
||||
Kernel CAPI forwards registration requests from applications (calls to CAPI
|
||||
operation CAPI_REGISTER) to an appropriate hardware driver by calling its
|
||||
register_appl() callback function. A unique Application ID (ApplID, u16) is
|
||||
allocated by Kernel CAPI and passed to register_appl() along with the
|
||||
parameter structure provided by the application. This is analogous to the
|
||||
open() operation on regular files or character devices.
|
||||
|
||||
After a successful return from register_appl(), CAPI messages from the
|
||||
application may be passed to the driver for the device via calls to the
|
||||
send_message() callback function. The CAPI message to send is stored in the
|
||||
data portion of an skb. Conversely, the driver may call Kernel CAPI's
|
||||
capi_ctr_handle_message() function to pass a received CAPI message to Kernel
|
||||
CAPI for forwarding to an application, specifying its ApplID.
|
||||
|
||||
Deregistration requests (CAPI operation CAPI_RELEASE) from applications are
|
||||
forwarded as calls to the release_appl() callback function, passing the same
|
||||
ApplID as with register_appl(). After return from release_appl(), no CAPI
|
||||
messages for that application may be passed to or from the device anymore.
|
||||
|
||||
|
||||
4. Data Structures
|
||||
|
||||
4.1 struct capi_driver
|
||||
|
||||
This structure describes a Kernel CAPI driver itself. It is used in the
|
||||
register_capi_driver() and unregister_capi_driver() functions, and contains
|
||||
the following non-private fields, all to be set by the driver before calling
|
||||
register_capi_driver():
|
||||
|
||||
char name[32]
|
||||
the name of the driver, as a zero-terminated ASCII string
|
||||
char revision[32]
|
||||
the revision number of the driver, as a zero-terminated ASCII string
|
||||
int (*add_card)(struct capi_driver *driver, capicardparams *data)
|
||||
a callback function pointer (may be NULL)
|
||||
|
||||
|
||||
4.2 struct capi_ctr
|
||||
|
||||
This structure describes an ISDN device (controller) handled by a Kernel CAPI
|
||||
driver. After registration via the attach_capi_ctr() function it is passed to
|
||||
all controller specific lower layer interface and callback functions to
|
||||
identify the controller to operate on.
|
||||
|
||||
It contains the following non-private fields:
|
||||
|
||||
- to be set by the driver before calling attach_capi_ctr():
|
||||
|
||||
struct module *owner
|
||||
pointer to the driver module owning the device
|
||||
|
||||
void *driverdata
|
||||
an opaque pointer to driver specific data, not touched by Kernel CAPI
|
||||
|
||||
char name[32]
|
||||
the name of the controller, as a zero-terminated ASCII string
|
||||
|
||||
char *driver_name
|
||||
the name of the driver, as a zero-terminated ASCII string
|
||||
|
||||
int (*load_firmware)(struct capi_ctr *ctrlr, capiloaddata *ldata)
|
||||
(optional) pointer to a callback function for sending firmware and
|
||||
configuration data to the device
|
||||
|
||||
void (*reset_ctr)(struct capi_ctr *ctrlr)
|
||||
pointer to a callback function for performing a reset on the device,
|
||||
releasing all registered applications
|
||||
|
||||
void (*register_appl)(struct capi_ctr *ctrlr, u16 applid,
|
||||
capi_register_params *rparam)
|
||||
void (*release_appl)(struct capi_ctr *ctrlr, u16 applid)
|
||||
pointers to callback functions for registration and deregistration of
|
||||
applications with the device
|
||||
|
||||
u16 (*send_message)(struct capi_ctr *ctrlr, struct sk_buff *skb)
|
||||
pointer to a callback function for sending a CAPI message to the
|
||||
device
|
||||
|
||||
char *(*procinfo)(struct capi_ctr *ctrlr)
|
||||
pointer to a callback function returning the entry for the device in
|
||||
the CAPI controller info table, /proc/capi/controller
|
||||
|
||||
read_proc_t *ctr_read_proc
|
||||
pointer to the read_proc callback function for the device's proc file
|
||||
system entry, /proc/capi/controllers/<n>; will be called with a
|
||||
pointer to the device's capi_ctr structure as the last (data) argument
|
||||
|
||||
- to be filled in before calling capi_ctr_ready():
|
||||
|
||||
u8 manu[CAPI_MANUFACTURER_LEN]
|
||||
value to return for CAPI_GET_MANUFACTURER
|
||||
|
||||
capi_version version
|
||||
value to return for CAPI_GET_VERSION
|
||||
|
||||
capi_profile profile
|
||||
value to return for CAPI_GET_PROFILE
|
||||
|
||||
u8 serial[CAPI_SERIAL_LEN]
|
||||
value to return for CAPI_GET_SERIAL
|
||||
|
||||
|
||||
5. Lower Layer Interface Functions
|
||||
|
||||
(declared in <linux/isdn/capilli.h>)
|
||||
|
||||
void register_capi_driver(struct capi_driver *drvr)
|
||||
void unregister_capi_driver(struct capi_driver *drvr)
|
||||
register/unregister a driver with Kernel CAPI
|
||||
|
||||
int attach_capi_ctr(struct capi_ctr *ctrlr)
|
||||
int detach_capi_ctr(struct capi_ctr *ctrlr)
|
||||
register/unregister a device (controller) with Kernel CAPI
|
||||
|
||||
void capi_ctr_ready(struct capi_ctr *ctrlr)
|
||||
void capi_ctr_reseted(struct capi_ctr *ctrlr)
|
||||
signal controller ready/not ready
|
||||
|
||||
void capi_ctr_suspend_output(struct capi_ctr *ctrlr)
|
||||
void capi_ctr_resume_output(struct capi_ctr *ctrlr)
|
||||
signal suspend/resume
|
||||
|
||||
void capi_ctr_handle_message(struct capi_ctr * ctrlr, u16 applid,
|
||||
struct sk_buff *skb)
|
||||
pass a received CAPI message to Kernel CAPI
|
||||
for forwarding to the specified application
|
||||
|
||||
|
||||
6. Helper Functions and Macros
|
||||
|
||||
Library functions (from <linux/isdn/capilli.h>):
|
||||
|
||||
void capilib_new_ncci(struct list_head *head, u16 applid,
|
||||
u32 ncci, u32 winsize)
|
||||
void capilib_free_ncci(struct list_head *head, u16 applid, u32 ncci)
|
||||
void capilib_release_appl(struct list_head *head, u16 applid)
|
||||
void capilib_release(struct list_head *head)
|
||||
void capilib_data_b3_conf(struct list_head *head, u16 applid,
|
||||
u32 ncci, u16 msgid)
|
||||
u16 capilib_data_b3_req(struct list_head *head, u16 applid,
|
||||
u32 ncci, u16 msgid)
|
||||
|
||||
|
||||
Macros to extract/set element values from/in a CAPI message header
|
||||
(from <linux/isdn/capiutil.h>):
|
||||
|
||||
Get Macro Set Macro Element (Type)
|
||||
|
||||
CAPIMSG_LEN(m) CAPIMSG_SETLEN(m, len) Total Length (u16)
|
||||
CAPIMSG_APPID(m) CAPIMSG_SETAPPID(m, applid) ApplID (u16)
|
||||
CAPIMSG_COMMAND(m) CAPIMSG_SETCOMMAND(m,cmd) Command (u8)
|
||||
CAPIMSG_SUBCOMMAND(m) CAPIMSG_SETSUBCOMMAND(m, cmd) Subcommand (u8)
|
||||
CAPIMSG_CMD(m) - Command*256
|
||||
+ Subcommand (u16)
|
||||
CAPIMSG_MSGID(m) CAPIMSG_SETMSGID(m, msgid) Message Number (u16)
|
||||
|
||||
CAPIMSG_CONTROL(m) CAPIMSG_SETCONTROL(m, contr) Controller/PLCI/NCCI
|
||||
(u32)
|
||||
CAPIMSG_DATALEN(m) CAPIMSG_SETDATALEN(m, len) Data Length (u16)
|
||||
|
|
@ -1620,6 +1620,8 @@ and is between 256 and 4096 characters. It is defined in the file
|
|||
|
||||
nowb [ARM]
|
||||
|
||||
nox2apic [X86-64,APIC] Do not enable x2APIC mode.
|
||||
|
||||
nptcg= [IA64] Override max number of concurrent global TLB
|
||||
purges which is reported from either PAL_VM_SUMMARY or
|
||||
SAL PALO.
|
||||
|
|
BIN
Documentation/logo.gif
Normal file
BIN
Documentation/logo.gif
Normal file
Binary file not shown.
After Width: | Height: | Size: 16 KiB |
File diff suppressed because one or more lines are too long
Before Width: | Height: | Size: 303 KiB |
|
@ -1,4 +1,13 @@
|
|||
Tux is taking a three month sabbatical to work as a barber, so Tuz is
|
||||
standing in. He's taken pains to ensure you'll hardly notice.
|
||||
This is the full-colour version of the currently unofficial Linux logo
|
||||
("currently unofficial" just means that there has been no paperwork and
|
||||
that I have not really announced it yet). It was created by Larry Ewing,
|
||||
and is freely usable as long as you acknowledge Larry as the original
|
||||
artist.
|
||||
|
||||
Note that there are black-and-white versions of this available that
|
||||
scale down to smaller sizes and are better for letterheads or whatever
|
||||
you want to use it for: for the full range of logos take a look at
|
||||
Larry's web-page:
|
||||
|
||||
http://www.isc.tamu.edu/~lewing/linux/
|
||||
|
||||
Image by Andrew McGown and Josh Bush. Image is licensed CC BY-SA.
|
||||
|
|
|
@ -3448,7 +3448,7 @@ P: Matt Porter
|
|||
M: mporter@kernel.crashing.org
|
||||
W: http://www.penguinppc.org/
|
||||
L: linuxppc-dev@ozlabs.org
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc.git
|
||||
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jwboyer/powerpc-4xx.git
|
||||
S: Maintained
|
||||
|
||||
LINUX FOR POWERPC EMBEDDED XILINX VIRTEX
|
||||
|
|
4
Makefile
4
Makefile
|
@ -1,8 +1,8 @@
|
|||
VERSION = 2
|
||||
PATCHLEVEL = 6
|
||||
SUBLEVEL = 30
|
||||
EXTRAVERSION = -rc3
|
||||
NAME = Temporary Tasmanian Devil
|
||||
EXTRAVERSION = -rc4
|
||||
NAME = Vindictive Armadillo
|
||||
|
||||
# *DOCUMENTATION*
|
||||
# To see a list of typical targets execute "make help"
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
*
|
||||
* This is the "shell" of the ARMv6 processor support.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
|
@ -132,7 +133,7 @@ cpu_v6_name:
|
|||
.asciz "ARMv6-compatible processor"
|
||||
.align
|
||||
|
||||
.section ".text.init", #alloc, #execinstr
|
||||
__INIT
|
||||
|
||||
/*
|
||||
* __v6_setup
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
*
|
||||
* This is the "shell" of the ARMv7 processor support.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/assembler.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
|
@ -153,7 +154,7 @@ cpu_v7_name:
|
|||
.ascii "ARMv7 Processor"
|
||||
.align
|
||||
|
||||
.section ".text.init", #alloc, #execinstr
|
||||
__INIT
|
||||
|
||||
/*
|
||||
* __v7_setup
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* ARM architecture version 6 TLB handling functions.
|
||||
* These assume a split I/D TLB.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -87,7 +88,7 @@ ENTRY(v6wbi_flush_kern_tlb_range)
|
|||
mcr p15, 0, r2, c7, c5, 4 @ prefetch flush
|
||||
mov pc, lr
|
||||
|
||||
.section ".text.init", #alloc, #execinstr
|
||||
__INIT
|
||||
|
||||
.type v6wbi_tlb_fns, #object
|
||||
ENTRY(v6wbi_tlb_fns)
|
||||
|
|
|
@ -11,6 +11,7 @@
|
|||
* ARM architecture version 6 TLB handling functions.
|
||||
* These assume a split I/D TLB.
|
||||
*/
|
||||
#include <linux/init.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/asm-offsets.h>
|
||||
#include <asm/page.h>
|
||||
|
@ -80,7 +81,7 @@ ENTRY(v7wbi_flush_kern_tlb_range)
|
|||
mov pc, lr
|
||||
ENDPROC(v7wbi_flush_kern_tlb_range)
|
||||
|
||||
.section ".text.init", #alloc, #execinstr
|
||||
__INIT
|
||||
|
||||
.type v7wbi_tlb_fns, #object
|
||||
ENTRY(v7wbi_tlb_fns)
|
||||
|
|
|
@ -30,7 +30,7 @@ extern void __debug_bug_printk(const char *file, unsigned line);
|
|||
do { \
|
||||
__debug_bug_trap(signr); \
|
||||
asm volatile("nop"); \
|
||||
} while(0)
|
||||
} while(1)
|
||||
|
||||
#define HAVE_ARCH_BUG
|
||||
#define BUG() \
|
||||
|
@ -46,7 +46,8 @@ do { \
|
|||
#define HAVE_ARCH_KGDB_BAD_PAGE
|
||||
#define kgdb_bad_page(page) do { kgdb_raise(SIGABRT); } while(0)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_BUG */
|
||||
|
||||
#include <asm-generic/bug.h>
|
||||
|
||||
|
|
|
@ -1,12 +0,0 @@
|
|||
#ifndef _ASM_INIT_H
|
||||
#define _ASM_INIT_H
|
||||
|
||||
#define __init __attribute__ ((__section__ (".text.init")))
|
||||
#define __initdata __attribute__ ((__section__ (".data.init")))
|
||||
/* For assembly routines */
|
||||
#define __INIT .section ".text.init",#alloc,#execinstr
|
||||
#define __FINIT .previous
|
||||
#define __INITDATA .section ".data.init",#alloc,#write
|
||||
|
||||
#endif
|
||||
|
|
@ -339,10 +339,12 @@
|
|||
#define __NR_dup3 330
|
||||
#define __NR_pipe2 331
|
||||
#define __NR_inotify_init1 332
|
||||
#define __NR_preadv 333
|
||||
#define __NR_pwritev 334
|
||||
|
||||
#ifdef __KERNEL__
|
||||
|
||||
#define NR_syscalls 333
|
||||
#define NR_syscalls 335
|
||||
|
||||
#define __ARCH_WANT_IPC_PARSE_VERSION
|
||||
/* #define __ARCH_WANT_OLD_READDIR */
|
||||
|
|
|
@ -1525,5 +1525,7 @@ sys_call_table:
|
|||
.long sys_dup3 /* 330 */
|
||||
.long sys_pipe2
|
||||
.long sys_inotify_init1
|
||||
.long sys_preadv
|
||||
.long sys_pwritev
|
||||
|
||||
syscall_table_size = (. - sys_call_table)
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
@ -31,7 +32,7 @@
|
|||
#define __400_LCR 0xfe000100
|
||||
#define __400_LSBR 0xfe000c00
|
||||
|
||||
.section .text.init,"ax"
|
||||
__INIT
|
||||
.balign 4
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
@ -30,7 +31,7 @@
|
|||
#define __400_LCR 0xfe000100
|
||||
#define __400_LSBR 0xfe000c00
|
||||
|
||||
.section .text.init,"ax"
|
||||
__INIT
|
||||
.balign 4
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
@ -30,7 +31,7 @@
|
|||
#define __400_LCR 0xfe000100
|
||||
#define __400_LSBR 0xfe000c00
|
||||
|
||||
.section .text.init,"ax"
|
||||
__INIT
|
||||
.balign 4
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
* 2 of the License, or (at your option) any later version.
|
||||
*/
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/threads.h>
|
||||
#include <linux/linkage.h>
|
||||
#include <asm/ptrace.h>
|
||||
|
@ -29,7 +30,7 @@
|
|||
#define __551_LCR 0xfeff1100
|
||||
#define __551_LSBR 0xfeff1c00
|
||||
|
||||
.section .text.init,"ax"
|
||||
__INIT
|
||||
.balign 4
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#include <linux/linkage.h>
|
||||
#include <linux/init.h>
|
||||
|
||||
#include <asm/entry.h>
|
||||
#include <asm/page.h>
|
||||
|
|
|
@ -158,6 +158,46 @@ void ibm440spe_fixup_memsize(void)
|
|||
|
||||
#define DDR_GET_VAL(val, mask, shift) (((val) >> (shift)) & (mask))
|
||||
|
||||
/*
|
||||
* Some U-Boot versions set the number of chipselects to two
|
||||
* for Sequoia/Rainier boards while they only have one chipselect
|
||||
* hardwired. Hardcode the number of chipselects to one
|
||||
* for sequioa/rainer board models or read the actual value
|
||||
* from the memory controller register DDR0_10 otherwise.
|
||||
*/
|
||||
static inline u32 ibm4xx_denali_get_cs(void)
|
||||
{
|
||||
void *devp;
|
||||
char model[64];
|
||||
u32 val, cs;
|
||||
|
||||
devp = finddevice("/");
|
||||
if (!devp)
|
||||
goto read_cs;
|
||||
|
||||
if (getprop(devp, "model", model, sizeof(model)) <= 0)
|
||||
goto read_cs;
|
||||
|
||||
model[sizeof(model)-1] = 0;
|
||||
|
||||
if (!strcmp(model, "amcc,sequoia") ||
|
||||
!strcmp(model, "amcc,rainier"))
|
||||
return 1;
|
||||
|
||||
read_cs:
|
||||
/* get CS value */
|
||||
val = SDRAM0_READ(DDR0_10);
|
||||
|
||||
val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
|
||||
cs = 0;
|
||||
while (val) {
|
||||
if (val & 0x1)
|
||||
cs++;
|
||||
val = val >> 1;
|
||||
}
|
||||
return cs;
|
||||
}
|
||||
|
||||
void ibm4xx_denali_fixup_memsize(void)
|
||||
{
|
||||
u32 val, max_cs, max_col, max_row;
|
||||
|
@ -173,17 +213,7 @@ void ibm4xx_denali_fixup_memsize(void)
|
|||
max_col = DDR_GET_VAL(val, DDR_MAX_COL_REG, DDR_MAX_COL_REG_SHIFT);
|
||||
max_row = DDR_GET_VAL(val, DDR_MAX_ROW_REG, DDR_MAX_ROW_REG_SHIFT);
|
||||
|
||||
/* get CS value */
|
||||
val = SDRAM0_READ(DDR0_10);
|
||||
|
||||
val = DDR_GET_VAL(val, DDR_CS_MAP, DDR_CS_MAP_SHIFT);
|
||||
cs = 0;
|
||||
while (val) {
|
||||
if (val & 0x1)
|
||||
cs++;
|
||||
val = val >> 1;
|
||||
}
|
||||
|
||||
cs = ibm4xx_denali_get_cs();
|
||||
if (!cs)
|
||||
fatal("No memory installed\n");
|
||||
if (cs > max_cs)
|
||||
|
@ -193,9 +223,9 @@ void ibm4xx_denali_fixup_memsize(void)
|
|||
val = SDRAM0_READ(DDR0_14);
|
||||
|
||||
if (DDR_GET_VAL(val, DDR_REDUC, DDR_REDUC_SHIFT))
|
||||
dpath = 8; /* 64 bits */
|
||||
else
|
||||
dpath = 4; /* 32 bits */
|
||||
else
|
||||
dpath = 8; /* 64 bits */
|
||||
|
||||
/* get address pins (rows) */
|
||||
val = SDRAM0_READ(DDR0_42);
|
||||
|
|
|
@ -161,6 +161,7 @@
|
|||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
#interrupt-cells = <2>;
|
||||
device_type = "soc";
|
||||
compatible = "fsl,mpc8641-soc", "simple-bus";
|
||||
ranges = <0x0 0xfef00000 0x00100000>;
|
||||
reg = <0xfef00000 0x100000>; // CCSRBAR 1M
|
||||
|
|
|
@ -260,6 +260,7 @@ do { \
|
|||
#else
|
||||
# define SET_PERSONALITY(ex) \
|
||||
set_personality(PER_LINUX | (current->personality & (~PER_MASK)))
|
||||
# define elf_read_implies_exec(ex, exec_stk) (exec_stk != EXSTACK_DISABLE_X)
|
||||
#endif /* __powerpc64__ */
|
||||
|
||||
extern int dcache_bsize;
|
||||
|
|
|
@ -52,12 +52,6 @@
|
|||
*/
|
||||
#define MMU_FTR_NEED_DTLB_SW_LRU ASM_CONST(0x00200000)
|
||||
|
||||
/* This indicates that the processor uses the wrong opcode for tlbilx
|
||||
* instructions. During the ISA 2.06 development the opcode for tlbilx
|
||||
* changed and some early implementations used to old opcode
|
||||
*/
|
||||
#define MMU_FTR_TLBILX_EARLY_OPCODE ASM_CONST(0x00400000)
|
||||
|
||||
#ifndef __ASSEMBLY__
|
||||
#include <asm/cputable.h>
|
||||
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#define PPC_INST_STSWI 0x7c0005aa
|
||||
#define PPC_INST_STSWX 0x7c00052a
|
||||
#define PPC_INST_TLBILX 0x7c000024
|
||||
#define PPC_INST_TLBILX_EARLY 0x7c000626
|
||||
#define PPC_INST_WAIT 0x7c00007c
|
||||
|
||||
/* macros to insert fields into opcodes */
|
||||
|
@ -64,18 +63,10 @@
|
|||
#define PPC_RFDI stringify_in_c(.long PPC_INST_RFDI)
|
||||
#define PPC_RFMCI stringify_in_c(.long PPC_INST_RFMCI)
|
||||
#define PPC_TLBILX(t, a, b) stringify_in_c(.long PPC_INST_TLBILX | \
|
||||
__PPC_T_TLB(t) | \
|
||||
__PPC_RA(a) | __PPC_RB(b))
|
||||
__PPC_T_TLB(t) | __PPC_RA(a) | __PPC_RB(b))
|
||||
#define PPC_TLBILX_ALL(a, b) PPC_TLBILX(0, a, b)
|
||||
#define PPC_TLBILX_PID(a, b) PPC_TLBILX(1, a, b)
|
||||
#define PPC_TLBILX_VA(a, b) PPC_TLBILX(3, a, b)
|
||||
|
||||
#define PPC_TLBILX_EARLY(t, a, b) stringify_in_c(.long PPC_INST_TLBILX_EARLY | \
|
||||
__PPC_T_TLB(t) | \
|
||||
__PPC_RA(a) | __PPC_RB(b))
|
||||
#define PPC_TLBILX_ALL_EARLY(a, b) PPC_TLBILX_EARLY(0, a, b)
|
||||
#define PPC_TLBILX_PID_EARLY(a, b) PPC_TLBILX_EARLY(1, a, b)
|
||||
#define PPC_TLBILX_VA_EARLY(a, b) PPC_TLBILX_EARLY(3, a, b)
|
||||
#define PPC_WAIT(w) stringify_in_c(.long PPC_INST_WAIT | \
|
||||
__PPC_WC(w))
|
||||
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
#ifndef _ASM_POWERPC_PPC_ASM_H
|
||||
#define _ASM_POWERPC_PPC_ASM_H
|
||||
|
||||
#include <linux/init.h>
|
||||
#include <linux/stringify.h>
|
||||
#include <asm/asm-compat.h>
|
||||
#include <asm/processor.h>
|
||||
|
@ -189,7 +190,7 @@ name: \
|
|||
GLUE(.,name):
|
||||
|
||||
#define _INIT_GLOBAL(name) \
|
||||
.section ".text.init.refok"; \
|
||||
__REF; \
|
||||
.align 2 ; \
|
||||
.globl name; \
|
||||
.globl GLUE(.,name); \
|
||||
|
@ -229,7 +230,7 @@ name: \
|
|||
GLUE(.,name):
|
||||
|
||||
#define _INIT_STATIC(name) \
|
||||
.section ".text.init.refok"; \
|
||||
__REF; \
|
||||
.align 2 ; \
|
||||
.section ".opd","aw"; \
|
||||
name: \
|
||||
|
|
|
@ -1766,7 +1766,7 @@ static struct cpu_spec __initdata cpu_specs[] = {
|
|||
.cpu_features = CPU_FTRS_E500MC,
|
||||
.cpu_user_features = COMMON_USER_BOOKE | PPC_FEATURE_HAS_FPU,
|
||||
.mmu_features = MMU_FTR_TYPE_FSL_E | MMU_FTR_BIG_PHYS |
|
||||
MMU_FTR_USE_TLBILX | MMU_FTR_TLBILX_EARLY_OPCODE,
|
||||
MMU_FTR_USE_TLBILX,
|
||||
.icache_bsize = 64,
|
||||
.dcache_bsize = 64,
|
||||
.num_pmcs = 4,
|
||||
|
|
|
@ -54,7 +54,8 @@ SECTIONS
|
|||
ALIGN_FUNCTION();
|
||||
HEAD_TEXT
|
||||
_text = .;
|
||||
*(.text .fixup .text.init.refok .exit.text.refok __ftr_alt_*)
|
||||
/* careful! __ftr_alt_* sections need to be close to .text */
|
||||
*(.text .fixup __ftr_alt_* .ref.text)
|
||||
SCHED_TEXT
|
||||
LOCK_TEXT
|
||||
KPROBES_TEXT
|
||||
|
|
|
@ -138,11 +138,7 @@ BEGIN_MMU_FTR_SECTION
|
|||
andi. r3,r3,MMUCSR0_TLBFI@l
|
||||
bne 1b
|
||||
MMU_FTR_SECTION_ELSE
|
||||
BEGIN_MMU_FTR_SECTION_NESTED(96)
|
||||
PPC_TLBILX_ALL(0,r3)
|
||||
MMU_FTR_SECTION_ELSE_NESTED(96)
|
||||
PPC_TLBILX_ALL_EARLY(0,r3)
|
||||
ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_TLBILX_EARLY_OPCODE, 96)
|
||||
PPC_TLBILX_ALL(0,0)
|
||||
ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX)
|
||||
msync
|
||||
isync
|
||||
|
@ -155,11 +151,7 @@ BEGIN_MMU_FTR_SECTION
|
|||
wrteei 0
|
||||
mfspr r4,SPRN_MAS6 /* save MAS6 */
|
||||
mtspr SPRN_MAS6,r3
|
||||
BEGIN_MMU_FTR_SECTION_NESTED(96)
|
||||
PPC_TLBILX_PID(0,0)
|
||||
MMU_FTR_SECTION_ELSE_NESTED(96)
|
||||
PPC_TLBILX_PID_EARLY(0,0)
|
||||
ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_TLBILX_EARLY_OPCODE, 96)
|
||||
mtspr SPRN_MAS6,r4 /* restore MAS6 */
|
||||
wrtee r10
|
||||
MMU_FTR_SECTION_ELSE
|
||||
|
@ -193,16 +185,12 @@ BEGIN_MMU_FTR_SECTION
|
|||
mtspr SPRN_MAS1,r4
|
||||
tlbwe
|
||||
MMU_FTR_SECTION_ELSE
|
||||
BEGIN_MMU_FTR_SECTION_NESTED(96)
|
||||
PPC_TLBILX_VA(0,r3)
|
||||
MMU_FTR_SECTION_ELSE_NESTED(96)
|
||||
PPC_TLBILX_VA_EARLY(0,r3)
|
||||
ALT_MMU_FTR_SECTION_END_NESTED_IFCLR(MMU_FTR_TLBILX_EARLY_OPCODE, 96)
|
||||
ALT_MMU_FTR_SECTION_END_IFCLR(MMU_FTR_USE_TLBILX)
|
||||
msync
|
||||
isync
|
||||
1: wrtee r10
|
||||
blr
|
||||
#elif
|
||||
#else
|
||||
#error Unsupported processor type !
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,6 @@ config PPC_CELL_COMMON
|
|||
config PPC_CELL_NATIVE
|
||||
bool
|
||||
select PPC_CELL_COMMON
|
||||
select PPC_OF_PLATFORM_PCI
|
||||
select MPIC
|
||||
select IBM_NEW_EMAC_EMAC4
|
||||
select IBM_NEW_EMAC_RGMII
|
||||
|
@ -25,6 +24,8 @@ config PPC_IBM_CELL_BLADE
|
|||
bool "IBM Cell Blade"
|
||||
depends on PPC64 && PPC_BOOK3S
|
||||
select PPC_CELL_NATIVE
|
||||
select PPC_OF_PLATFORM_PCI
|
||||
select PCI
|
||||
select MMIO_NVRAM
|
||||
select PPC_UDBG_16550
|
||||
select UDBG_RTAS_CONSOLE
|
||||
|
@ -33,6 +34,8 @@ config PPC_CELLEB
|
|||
bool "Toshiba's Cell Reference Set 'Celleb' Architecture"
|
||||
depends on PPC64 && PPC_BOOK3S
|
||||
select PPC_CELL_NATIVE
|
||||
select PPC_OF_PLATFORM_PCI
|
||||
select PCI
|
||||
select HAS_TXX9_SERIAL
|
||||
select PPC_UDBG_BEAT
|
||||
select USB_OHCI_BIG_ENDIAN_MMIO
|
||||
|
|
|
@ -45,10 +45,6 @@
|
|||
DEFINE_MUTEX(ps3_gpu_mutex);
|
||||
EXPORT_SYMBOL_GPL(ps3_gpu_mutex);
|
||||
|
||||
#if !defined(CONFIG_SMP)
|
||||
static void smp_send_stop(void) {}
|
||||
#endif
|
||||
|
||||
static union ps3_firmware_version ps3_firmware_version;
|
||||
|
||||
void ps3_get_firmware_version(union ps3_firmware_version *v)
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
struct pt_regs {
|
||||
unsigned long long pc;
|
||||
unsigned long long sr;
|
||||
unsigned long long syscall_nr;
|
||||
long long syscall_nr;
|
||||
unsigned long long regs[63];
|
||||
unsigned long long tregs[8];
|
||||
unsigned long long pad[2];
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
* for more details.
|
||||
*/
|
||||
#include <linux/errno.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/sys.h>
|
||||
#include <cpu/registers.h>
|
||||
#include <asm/processor.h>
|
||||
|
@ -2058,10 +2059,10 @@ asm_uaccess_end:
|
|||
|
||||
|
||||
/*
|
||||
* --- .text.init Section
|
||||
* --- .init.text Section
|
||||
*/
|
||||
|
||||
.section .text.init, "ax"
|
||||
__INIT
|
||||
|
||||
/*
|
||||
* void trap_init (void)
|
||||
|
|
|
@ -735,7 +735,7 @@ go_to_highmem:
|
|||
nop
|
||||
|
||||
/* The code above should be at beginning and we have to take care about
|
||||
* short jumps, as branching to .text.init section from .text is usually
|
||||
* short jumps, as branching to .init.text section from .text is usually
|
||||
* impossible */
|
||||
__INIT
|
||||
/* Acquire boot time privileged register values, this will help debugging.
|
||||
|
|
|
@ -467,7 +467,7 @@ jump_to_sun4u_init:
|
|||
jmpl %g2 + %g0, %g0
|
||||
nop
|
||||
|
||||
.section .text.init.refok
|
||||
__REF
|
||||
sun4u_init:
|
||||
BRANCH_IF_SUN4V(g1, sun4v_init)
|
||||
|
||||
|
|
|
@ -277,6 +277,7 @@ config SPARSE_IRQ
|
|||
config NUMA_MIGRATE_IRQ_DESC
|
||||
bool "Move irq desc when changing irq smp_affinity"
|
||||
depends on SPARSE_IRQ && NUMA
|
||||
depends on BROKEN
|
||||
default n
|
||||
---help---
|
||||
This enables moving irq_desc to cpu/node that irq will use handled.
|
||||
|
@ -664,6 +665,7 @@ config MAXSMP
|
|||
|
||||
config NR_CPUS
|
||||
int "Maximum number of CPUs" if SMP && !MAXSMP
|
||||
range 2 8 if SMP && X86_32 && !X86_BIGSMP
|
||||
range 2 512 if SMP && !MAXSMP
|
||||
default "1" if !SMP
|
||||
default "4096" if MAXSMP
|
||||
|
|
|
@ -153,7 +153,7 @@ endif
|
|||
|
||||
boot := arch/x86/boot
|
||||
|
||||
BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage install
|
||||
BOOT_TARGETS = bzlilo bzdisk fdimage fdimage144 fdimage288 isoimage
|
||||
|
||||
PHONY += bzImage $(BOOT_TARGETS)
|
||||
|
||||
|
@ -171,6 +171,10 @@ bzImage: vmlinux
|
|||
$(BOOT_TARGETS): vmlinux
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
PHONY += install
|
||||
install:
|
||||
$(Q)$(MAKE) $(build)=$(boot) $@
|
||||
|
||||
PHONY += vdso_install
|
||||
vdso_install:
|
||||
$(Q)$(MAKE) $(build)=arch/x86/vdso $@
|
||||
|
|
|
@ -200,7 +200,7 @@ static inline void arch_fix_phys_package_id(int num, u32 slot)
|
|||
}
|
||||
|
||||
struct pci_bus;
|
||||
void set_pci_bus_resources_arch_default(struct pci_bus *b);
|
||||
void x86_pci_root_bus_res_quirks(struct pci_bus *b);
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
#define mc_capable() (cpumask_weight(cpu_core_mask(0)) != nr_cpu_ids)
|
||||
|
|
|
@ -3670,12 +3670,14 @@ int arch_setup_hpet_msi(unsigned int irq)
|
|||
{
|
||||
int ret;
|
||||
struct msi_msg msg;
|
||||
struct irq_desc *desc = irq_to_desc(irq);
|
||||
|
||||
ret = msi_compose_msg(NULL, irq, &msg);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
hpet_msi_write(irq, &msg);
|
||||
desc->status |= IRQ_MOVE_PCNTXT;
|
||||
set_irq_chip_and_handler_name(irq, &hpet_msi_type, handle_edge_irq,
|
||||
"edge");
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ int __init check_nmi_watchdog(void)
|
|||
if (!prev_nmi_count)
|
||||
goto error;
|
||||
|
||||
alloc_cpumask_var(&backtrace_mask, GFP_KERNEL);
|
||||
alloc_cpumask_var(&backtrace_mask, GFP_KERNEL|__GFP_ZERO);
|
||||
printk(KERN_INFO "Testing NMI watchdog ... ");
|
||||
|
||||
#ifdef CONFIG_SMP
|
||||
|
@ -414,7 +414,8 @@ nmi_watchdog_tick(struct pt_regs *regs, unsigned reason)
|
|||
touched = 1;
|
||||
}
|
||||
|
||||
if (cpumask_test_cpu(cpu, backtrace_mask)) {
|
||||
/* We can be called before check_nmi_watchdog, hence NULL check. */
|
||||
if (backtrace_mask != NULL && cpumask_test_cpu(cpu, backtrace_mask)) {
|
||||
static DEFINE_SPINLOCK(lock); /* Serialise the printks */
|
||||
|
||||
spin_lock(&lock);
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
#include <linux/timer.h>
|
||||
#include <linux/cpu.h>
|
||||
#include <linux/init.h>
|
||||
#include <linux/io.h>
|
||||
|
||||
#include <asm/uv/uv_mmrs.h>
|
||||
#include <asm/uv/uv_hub.h>
|
||||
|
@ -34,6 +35,17 @@ DEFINE_PER_CPU(int, x2apic_extra_bits);
|
|||
|
||||
static enum uv_system_type uv_system_type;
|
||||
|
||||
static int early_get_nodeid(void)
|
||||
{
|
||||
union uvh_node_id_u node_id;
|
||||
unsigned long *mmr;
|
||||
|
||||
mmr = early_ioremap(UV_LOCAL_MMR_BASE | UVH_NODE_ID, sizeof(*mmr));
|
||||
node_id.v = *mmr;
|
||||
early_iounmap(mmr, sizeof(*mmr));
|
||||
return node_id.s.node_id;
|
||||
}
|
||||
|
||||
static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
|
||||
{
|
||||
if (!strcmp(oem_id, "SGI")) {
|
||||
|
@ -42,6 +54,8 @@ static int uv_acpi_madt_oem_check(char *oem_id, char *oem_table_id)
|
|||
else if (!strcmp(oem_table_id, "UVX"))
|
||||
uv_system_type = UV_X2APIC;
|
||||
else if (!strcmp(oem_table_id, "UVH")) {
|
||||
__get_cpu_var(x2apic_extra_bits) =
|
||||
early_get_nodeid() << (UV_APIC_PNODE_SHIFT - 1);
|
||||
uv_system_type = UV_NON_UNIQUE_APIC;
|
||||
return 1;
|
||||
}
|
||||
|
@ -638,6 +652,7 @@ void __init uv_system_init(void)
|
|||
if (uv_node_to_blade[nid] >= 0)
|
||||
continue;
|
||||
paddr = node_start_pfn(nid) << PAGE_SHIFT;
|
||||
paddr = uv_soc_phys_ram_to_gpa(paddr);
|
||||
pnode = (paddr >> m_val) & pnode_mask;
|
||||
blade = boot_pnode_to_blade(pnode);
|
||||
uv_node_to_blade[nid] = blade;
|
||||
|
|
|
@ -1410,7 +1410,10 @@ ENTRY(paranoid_exit)
|
|||
paranoid_swapgs:
|
||||
TRACE_IRQS_IRETQ 0
|
||||
SWAPGS_UNSAFE_STACK
|
||||
RESTORE_ALL 8
|
||||
jmp irq_return
|
||||
paranoid_restore:
|
||||
TRACE_IRQS_IRETQ 0
|
||||
RESTORE_ALL 8
|
||||
jmp irq_return
|
||||
paranoid_userspace:
|
||||
|
|
|
@ -236,6 +236,10 @@ static void hpet_stop_counter(void)
|
|||
unsigned long cfg = hpet_readl(HPET_CFG);
|
||||
cfg &= ~HPET_CFG_ENABLE;
|
||||
hpet_writel(cfg, HPET_CFG);
|
||||
}
|
||||
|
||||
static void hpet_reset_counter(void)
|
||||
{
|
||||
hpet_writel(0, HPET_COUNTER);
|
||||
hpet_writel(0, HPET_COUNTER + 4);
|
||||
}
|
||||
|
@ -250,6 +254,7 @@ static void hpet_start_counter(void)
|
|||
static void hpet_restart_counter(void)
|
||||
{
|
||||
hpet_stop_counter();
|
||||
hpet_reset_counter();
|
||||
hpet_start_counter();
|
||||
}
|
||||
|
||||
|
@ -309,7 +314,7 @@ static int hpet_setup_msi_irq(unsigned int irq);
|
|||
static void hpet_set_mode(enum clock_event_mode mode,
|
||||
struct clock_event_device *evt, int timer)
|
||||
{
|
||||
unsigned long cfg;
|
||||
unsigned long cfg, cmp, now;
|
||||
uint64_t delta;
|
||||
|
||||
switch (mode) {
|
||||
|
@ -317,12 +322,23 @@ static void hpet_set_mode(enum clock_event_mode mode,
|
|||
hpet_stop_counter();
|
||||
delta = ((uint64_t)(NSEC_PER_SEC/HZ)) * evt->mult;
|
||||
delta >>= evt->shift;
|
||||
now = hpet_readl(HPET_COUNTER);
|
||||
cmp = now + (unsigned long) delta;
|
||||
cfg = hpet_readl(HPET_Tn_CFG(timer));
|
||||
/* Make sure we use edge triggered interrupts */
|
||||
cfg &= ~HPET_TN_LEVEL;
|
||||
cfg |= HPET_TN_ENABLE | HPET_TN_PERIODIC |
|
||||
HPET_TN_SETVAL | HPET_TN_32BIT;
|
||||
hpet_writel(cfg, HPET_Tn_CFG(timer));
|
||||
hpet_writel(cmp, HPET_Tn_CMP(timer));
|
||||
udelay(1);
|
||||
/*
|
||||
* HPET on AMD 81xx needs a second write (with HPET_TN_SETVAL
|
||||
* cleared) to T0_CMP to set the period. The HPET_TN_SETVAL
|
||||
* bit is automatically cleared after the first write.
|
||||
* (See AMD-8111 HyperTransport I/O Hub Data Sheet,
|
||||
* Publication # 24674)
|
||||
*/
|
||||
hpet_writel((unsigned long) delta, HPET_Tn_CMP(timer));
|
||||
hpet_start_counter();
|
||||
hpet_print_config();
|
||||
|
|
|
@ -261,8 +261,6 @@ static void old_ich_force_enable_hpet_user(struct pci_dev *dev)
|
|||
{
|
||||
if (hpet_force_user)
|
||||
old_ich_force_enable_hpet(dev);
|
||||
else
|
||||
hpet_print_force_info();
|
||||
}
|
||||
|
||||
DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, PCI_DEVICE_ID_INTEL_ESB_1,
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
|
||||
#define RTC_NAME "sgi_rtc"
|
||||
|
||||
static cycle_t uv_read_rtc(void);
|
||||
static cycle_t uv_read_rtc(struct clocksource *cs);
|
||||
static int uv_rtc_next_event(unsigned long, struct clock_event_device *);
|
||||
static void uv_rtc_timer_setup(enum clock_event_mode,
|
||||
struct clock_event_device *);
|
||||
|
@ -123,7 +123,7 @@ static int uv_setup_intr(int cpu, u64 expires)
|
|||
/* Initialize comparator value */
|
||||
uv_write_global_mmr64(pnode, UVH_INT_CMPB, expires);
|
||||
|
||||
return (expires < uv_read_rtc() && !uv_intr_pending(pnode));
|
||||
return (expires < uv_read_rtc(NULL) && !uv_intr_pending(pnode));
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -256,7 +256,7 @@ static int uv_rtc_unset_timer(int cpu)
|
|||
|
||||
spin_lock_irqsave(&head->lock, flags);
|
||||
|
||||
if (head->next_cpu == bcpu && uv_read_rtc() >= *t)
|
||||
if (head->next_cpu == bcpu && uv_read_rtc(NULL) >= *t)
|
||||
rc = 1;
|
||||
|
||||
*t = ULLONG_MAX;
|
||||
|
@ -278,7 +278,7 @@ static int uv_rtc_unset_timer(int cpu)
|
|||
/*
|
||||
* Read the RTC.
|
||||
*/
|
||||
static cycle_t uv_read_rtc(void)
|
||||
static cycle_t uv_read_rtc(struct clocksource *cs)
|
||||
{
|
||||
return (cycle_t)uv_read_local_mmr(UVH_RTC);
|
||||
}
|
||||
|
@ -291,7 +291,7 @@ static int uv_rtc_next_event(unsigned long delta,
|
|||
{
|
||||
int ced_cpu = cpumask_first(ced->cpumask);
|
||||
|
||||
return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc());
|
||||
return uv_rtc_set_timer(ced_cpu, delta + uv_read_rtc(NULL));
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -89,7 +89,7 @@ int save_i387_xstate(void __user *buf)
|
|||
|
||||
if (!used_math())
|
||||
return 0;
|
||||
clear_used_math(); /* trigger finit */
|
||||
|
||||
if (task_thread_info(tsk)->status & TS_USEDFPU) {
|
||||
/*
|
||||
* Start with clearing the user buffer. This will present a
|
||||
|
@ -114,6 +114,8 @@ int save_i387_xstate(void __user *buf)
|
|||
return -1;
|
||||
}
|
||||
|
||||
clear_used_math(); /* trigger finit */
|
||||
|
||||
if (task_thread_info(tsk)->status & TS_XSAVE) {
|
||||
struct _fpstate __user *fx = buf;
|
||||
struct _xstate __user *x = buf;
|
||||
|
|
|
@ -257,7 +257,7 @@ void resume_map_numa_kva(pgd_t *pgd_base)
|
|||
}
|
||||
#endif
|
||||
|
||||
static unsigned long calculate_numa_remap_pages(void)
|
||||
static __init unsigned long calculate_numa_remap_pages(void)
|
||||
{
|
||||
int nid;
|
||||
unsigned long size, reserve_pages = 0;
|
||||
|
|
|
@ -188,6 +188,9 @@ void __init setup_node_bootmem(int nodeid, unsigned long start,
|
|||
const int pgdat_size = roundup(sizeof(pg_data_t), PAGE_SIZE);
|
||||
int nid;
|
||||
|
||||
if (!end)
|
||||
return;
|
||||
|
||||
start = roundup(start, ZONE_ALIGN);
|
||||
|
||||
printk(KERN_INFO "Bootmem setup node %d %016lx-%016lx\n", nodeid,
|
||||
|
|
|
@ -28,6 +28,7 @@ int acpi_numa __initdata;
|
|||
static struct acpi_table_slit *acpi_slit;
|
||||
|
||||
static nodemask_t nodes_parsed __initdata;
|
||||
static nodemask_t cpu_nodes_parsed __initdata;
|
||||
static struct bootnode nodes[MAX_NUMNODES] __initdata;
|
||||
static struct bootnode nodes_add[MAX_NUMNODES];
|
||||
static int found_add_area __initdata;
|
||||
|
@ -141,6 +142,7 @@ acpi_numa_x2apic_affinity_init(struct acpi_srat_x2apic_cpu_affinity *pa)
|
|||
|
||||
apic_id = pa->apic_id;
|
||||
apicid_to_node[apic_id] = node;
|
||||
node_set(node, cpu_nodes_parsed);
|
||||
acpi_numa = 1;
|
||||
printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
|
||||
pxm, apic_id, node);
|
||||
|
@ -174,6 +176,7 @@ acpi_numa_processor_affinity_init(struct acpi_srat_cpu_affinity *pa)
|
|||
else
|
||||
apic_id = pa->apic_id;
|
||||
apicid_to_node[apic_id] = node;
|
||||
node_set(node, cpu_nodes_parsed);
|
||||
acpi_numa = 1;
|
||||
printk(KERN_INFO "SRAT: PXM %u -> APIC %u -> Node %u\n",
|
||||
pxm, apic_id, node);
|
||||
|
@ -402,7 +405,8 @@ int __init acpi_scan_nodes(unsigned long start, unsigned long end)
|
|||
return -1;
|
||||
}
|
||||
|
||||
node_possible_map = nodes_parsed;
|
||||
/* Account for nodes with cpus and no memory */
|
||||
nodes_or(node_possible_map, nodes_parsed, cpu_nodes_parsed);
|
||||
|
||||
/* Finally register nodes */
|
||||
for_each_node_mask(i, node_possible_map)
|
||||
|
|
|
@ -94,12 +94,16 @@ struct pci_root_info {
|
|||
static int pci_root_num;
|
||||
static struct pci_root_info pci_root_info[PCI_ROOT_NR];
|
||||
|
||||
void set_pci_bus_resources_arch_default(struct pci_bus *b)
|
||||
void x86_pci_root_bus_res_quirks(struct pci_bus *b)
|
||||
{
|
||||
int i;
|
||||
int j;
|
||||
struct pci_root_info *info;
|
||||
|
||||
/* don't go for it if _CRS is used */
|
||||
if (pci_probe & PCI_USE__CRS)
|
||||
return;
|
||||
|
||||
/* if only one root bus, don't need to anything */
|
||||
if (pci_root_num < 2)
|
||||
return;
|
||||
|
|
|
@ -147,10 +147,13 @@ static void __devinit pcibios_fixup_device_resources(struct pci_dev *dev)
|
|||
* are examined.
|
||||
*/
|
||||
|
||||
void __devinit pcibios_fixup_bus(struct pci_bus *b)
|
||||
void __devinit pcibios_fixup_bus(struct pci_bus *b)
|
||||
{
|
||||
struct pci_dev *dev;
|
||||
|
||||
/* root bus? */
|
||||
if (!b->parent)
|
||||
x86_pci_root_bus_res_quirks(b);
|
||||
pci_read_bridge_bases(b);
|
||||
list_for_each_entry(dev, &b->devices, bus_list)
|
||||
pcibios_fixup_device_resources(dev);
|
||||
|
|
|
@ -238,6 +238,10 @@ void __init pcibios_resource_survey(void)
|
|||
*/
|
||||
fs_initcall(pcibios_assign_resources);
|
||||
|
||||
void __weak x86_pci_root_bus_res_quirks(struct pci_bus *b)
|
||||
{
|
||||
}
|
||||
|
||||
/*
|
||||
* If we set up a device for bus mastering, we need to check the latency
|
||||
* timer as certain crappy BIOSes forget to set it properly.
|
||||
|
|
|
@ -375,7 +375,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res,
|
|||
if (!fixmem32)
|
||||
return AE_OK;
|
||||
if ((mcfg_res->start >= fixmem32->address) &&
|
||||
(mcfg_res->end < (fixmem32->address +
|
||||
(mcfg_res->end <= (fixmem32->address +
|
||||
fixmem32->address_length))) {
|
||||
mcfg_res->flags = 1;
|
||||
return AE_CTRL_TERMINATE;
|
||||
|
@ -392,7 +392,7 @@ static acpi_status __init check_mcfg_resource(struct acpi_resource *res,
|
|||
return AE_OK;
|
||||
|
||||
if ((mcfg_res->start >= address.minimum) &&
|
||||
(mcfg_res->end < (address.minimum + address.address_length))) {
|
||||
(mcfg_res->end <= (address.minimum + address.address_length))) {
|
||||
mcfg_res->flags = 1;
|
||||
return AE_CTRL_TERMINATE;
|
||||
}
|
||||
|
@ -439,7 +439,7 @@ static int __init is_mmconf_reserved(check_reserved_t is_reserved,
|
|||
u64 old_size = size;
|
||||
int valid = 0;
|
||||
|
||||
while (!is_reserved(addr, addr + size - 1, E820_RESERVED)) {
|
||||
while (!is_reserved(addr, addr + size, E820_RESERVED)) {
|
||||
size >>= 1;
|
||||
if (size < (16UL<<20))
|
||||
break;
|
||||
|
|
|
@ -36,7 +36,7 @@ obj-$(CONFIG_FB_INTEL) += video/intelfb/
|
|||
|
||||
obj-y += serial/
|
||||
obj-$(CONFIG_PARPORT) += parport/
|
||||
obj-y += base/ block/ misc/ mfd/ media/
|
||||
obj-y += base/ block/ misc/ mfd/
|
||||
obj-$(CONFIG_NUBUS) += nubus/
|
||||
obj-y += macintosh/
|
||||
obj-$(CONFIG_IDE) += ide/
|
||||
|
@ -71,7 +71,7 @@ obj-$(CONFIG_GAMEPORT) += input/gameport/
|
|||
obj-$(CONFIG_INPUT) += input/
|
||||
obj-$(CONFIG_I2O) += message/
|
||||
obj-$(CONFIG_RTC_LIB) += rtc/
|
||||
obj-y += i2c/
|
||||
obj-y += i2c/ media/
|
||||
obj-$(CONFIG_W1) += w1/
|
||||
obj-$(CONFIG_POWER_SUPPLY) += power/
|
||||
obj-$(CONFIG_HWMON) += hwmon/
|
||||
|
|
|
@ -2296,7 +2296,7 @@ static int __init acpi_video_init(void)
|
|||
return acpi_video_register();
|
||||
}
|
||||
|
||||
static void __exit acpi_video_exit(void)
|
||||
void __exit acpi_video_exit(void)
|
||||
{
|
||||
|
||||
acpi_bus_unregister_driver(&acpi_video_bus);
|
||||
|
@ -2305,6 +2305,7 @@ static void __exit acpi_video_exit(void)
|
|||
|
||||
return;
|
||||
}
|
||||
EXPORT_SYMBOL(acpi_video_exit);
|
||||
|
||||
module_init(acpi_video_init);
|
||||
module_exit(acpi_video_exit);
|
||||
|
|
|
@ -509,7 +509,6 @@ ok_to_write:
|
|||
if (i > 0) {
|
||||
SET_HANDLER(&write_intr);
|
||||
outsw(HD_DATA, req->buffer, 256);
|
||||
local_irq_enable();
|
||||
} else {
|
||||
#if (HD_DELAY > 0)
|
||||
last_req = read_timer();
|
||||
|
@ -541,8 +540,7 @@ static void hd_times_out(unsigned long dummy)
|
|||
if (!CURRENT)
|
||||
return;
|
||||
|
||||
disable_irq(HD_IRQ);
|
||||
local_irq_enable();
|
||||
spin_lock_irq(hd_queue->queue_lock);
|
||||
reset = 1;
|
||||
name = CURRENT->rq_disk->disk_name;
|
||||
printk("%s: timeout\n", name);
|
||||
|
@ -552,9 +550,8 @@ static void hd_times_out(unsigned long dummy)
|
|||
#endif
|
||||
end_request(CURRENT, 0);
|
||||
}
|
||||
local_irq_disable();
|
||||
hd_request();
|
||||
enable_irq(HD_IRQ);
|
||||
spin_unlock_irq(hd_queue->queue_lock);
|
||||
}
|
||||
|
||||
static int do_special_op(struct hd_i_struct *disk, struct request *req)
|
||||
|
@ -592,7 +589,6 @@ static void hd_request(void)
|
|||
return;
|
||||
repeat:
|
||||
del_timer(&device_timer);
|
||||
local_irq_enable();
|
||||
|
||||
req = CURRENT;
|
||||
if (!req) {
|
||||
|
@ -601,7 +597,6 @@ repeat:
|
|||
}
|
||||
|
||||
if (reset) {
|
||||
local_irq_disable();
|
||||
reset_hd();
|
||||
return;
|
||||
}
|
||||
|
@ -660,9 +655,7 @@ repeat:
|
|||
|
||||
static void do_hd_request(struct request_queue *q)
|
||||
{
|
||||
disable_irq(HD_IRQ);
|
||||
hd_request();
|
||||
enable_irq(HD_IRQ);
|
||||
}
|
||||
|
||||
static int hd_getgeo(struct block_device *bdev, struct hd_geometry *geo)
|
||||
|
@ -684,12 +677,16 @@ static irqreturn_t hd_interrupt(int irq, void *dev_id)
|
|||
{
|
||||
void (*handler)(void) = do_hd;
|
||||
|
||||
spin_lock(hd_queue->queue_lock);
|
||||
|
||||
do_hd = NULL;
|
||||
del_timer(&device_timer);
|
||||
if (!handler)
|
||||
handler = unexpected_hd_interrupt;
|
||||
handler();
|
||||
local_irq_enable();
|
||||
|
||||
spin_unlock(hd_queue->queue_lock);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ static void mg_dump_status(const char *msg, unsigned int stat,
|
|||
if (host->breq) {
|
||||
req = elv_next_request(host->breq);
|
||||
if (req)
|
||||
printk(", sector=%ld", req->sector);
|
||||
printk(", sector=%u", (u32)req->sector);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -160,11 +160,16 @@ static irqreturn_t mg_irq(int irq, void *dev_id)
|
|||
struct mg_host *host = dev_id;
|
||||
void (*handler)(struct mg_host *) = host->mg_do_intr;
|
||||
|
||||
host->mg_do_intr = 0;
|
||||
spin_lock(&host->lock);
|
||||
|
||||
host->mg_do_intr = NULL;
|
||||
del_timer(&host->timer);
|
||||
if (!handler)
|
||||
handler = mg_unexpected_intr;
|
||||
handler(host);
|
||||
|
||||
spin_unlock(&host->lock);
|
||||
|
||||
return IRQ_HANDLED;
|
||||
}
|
||||
|
||||
|
@ -319,7 +324,7 @@ static void mg_read(struct request *req)
|
|||
|
||||
remains = req->nr_sectors;
|
||||
|
||||
if (mg_out(host, req->sector, req->nr_sectors, MG_CMD_RD, 0) !=
|
||||
if (mg_out(host, req->sector, req->nr_sectors, MG_CMD_RD, NULL) !=
|
||||
MG_ERR_NONE)
|
||||
mg_bad_rw_intr(host);
|
||||
|
||||
|
@ -363,7 +368,7 @@ static void mg_write(struct request *req)
|
|||
|
||||
remains = req->nr_sectors;
|
||||
|
||||
if (mg_out(host, req->sector, req->nr_sectors, MG_CMD_WR, 0) !=
|
||||
if (mg_out(host, req->sector, req->nr_sectors, MG_CMD_WR, NULL) !=
|
||||
MG_ERR_NONE) {
|
||||
mg_bad_rw_intr(host);
|
||||
return;
|
||||
|
@ -521,9 +526,11 @@ void mg_times_out(unsigned long data)
|
|||
char *name;
|
||||
struct request *req;
|
||||
|
||||
spin_lock_irq(&host->lock);
|
||||
|
||||
req = elv_next_request(host->breq);
|
||||
if (!req)
|
||||
return;
|
||||
goto out_unlock;
|
||||
|
||||
host->mg_do_intr = NULL;
|
||||
|
||||
|
@ -534,6 +541,8 @@ void mg_times_out(unsigned long data)
|
|||
mg_bad_rw_intr(host);
|
||||
|
||||
mg_request(host->breq);
|
||||
out_unlock:
|
||||
spin_unlock_irq(&host->lock);
|
||||
}
|
||||
|
||||
static void mg_request_poll(struct request_queue *q)
|
||||
|
|
|
@ -713,18 +713,18 @@ static int i915_cmdbuffer(struct drm_device *dev, void *data,
|
|||
mutex_unlock(&dev->struct_mutex);
|
||||
if (ret) {
|
||||
DRM_ERROR("i915_dispatch_cmdbuffer failed\n");
|
||||
goto fail_batch_free;
|
||||
goto fail_clip_free;
|
||||
}
|
||||
|
||||
if (sarea_priv)
|
||||
sarea_priv->last_dispatch = READ_BREADCRUMB(dev_priv);
|
||||
|
||||
fail_batch_free:
|
||||
drm_free(batch_data, cmdbuf->sz, DRM_MEM_DRIVER);
|
||||
fail_clip_free:
|
||||
drm_free(cliprects,
|
||||
cmdbuf->num_cliprects * sizeof(struct drm_clip_rect),
|
||||
DRM_MEM_DRIVER);
|
||||
fail_batch_free:
|
||||
drm_free(batch_data, cmdbuf->sz, DRM_MEM_DRIVER);
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
@ -1232,7 +1232,7 @@ int i915_driver_unload(struct drm_device *dev)
|
|||
if (dev_priv->regs != NULL)
|
||||
iounmap(dev_priv->regs);
|
||||
|
||||
intel_opregion_free(dev);
|
||||
intel_opregion_free(dev, 0);
|
||||
|
||||
if (drm_core_check_feature(dev, DRIVER_MODESET)) {
|
||||
intel_modeset_cleanup(dev);
|
||||
|
|
|
@ -77,7 +77,7 @@ static int i915_suspend(struct drm_device *dev, pm_message_t state)
|
|||
drm_irq_uninstall(dev);
|
||||
}
|
||||
|
||||
intel_opregion_free(dev);
|
||||
intel_opregion_free(dev, 1);
|
||||
|
||||
if (state.event == PM_EVENT_SUSPEND) {
|
||||
/* Shut down the device */
|
||||
|
|
|
@ -674,12 +674,12 @@ extern int i915_restore_state(struct drm_device *dev);
|
|||
#ifdef CONFIG_ACPI
|
||||
/* i915_opregion.c */
|
||||
extern int intel_opregion_init(struct drm_device *dev, int resume);
|
||||
extern void intel_opregion_free(struct drm_device *dev);
|
||||
extern void intel_opregion_free(struct drm_device *dev, int suspend);
|
||||
extern void opregion_asle_intr(struct drm_device *dev);
|
||||
extern void opregion_enable_asle(struct drm_device *dev);
|
||||
#else
|
||||
static inline int intel_opregion_init(struct drm_device *dev, int resume) { return 0; }
|
||||
static inline void intel_opregion_free(struct drm_device *dev) { return; }
|
||||
static inline void intel_opregion_free(struct drm_device *dev, int suspend) { return; }
|
||||
static inline void opregion_asle_intr(struct drm_device *dev) { return; }
|
||||
static inline void opregion_enable_asle(struct drm_device *dev) { return; }
|
||||
#endif
|
||||
|
@ -787,7 +787,8 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
|
|||
(dev)->pci_device == 0x2A42 || \
|
||||
(dev)->pci_device == 0x2E02 || \
|
||||
(dev)->pci_device == 0x2E12 || \
|
||||
(dev)->pci_device == 0x2E22)
|
||||
(dev)->pci_device == 0x2E22 || \
|
||||
(dev)->pci_device == 0x2E32)
|
||||
|
||||
#define IS_I965GM(dev) ((dev)->pci_device == 0x2A02)
|
||||
|
||||
|
@ -796,6 +797,7 @@ extern int i915_wait_ring(struct drm_device * dev, int n, const char *caller);
|
|||
#define IS_G4X(dev) ((dev)->pci_device == 0x2E02 || \
|
||||
(dev)->pci_device == 0x2E12 || \
|
||||
(dev)->pci_device == 0x2E22 || \
|
||||
(dev)->pci_device == 0x2E32 || \
|
||||
IS_GM45(dev))
|
||||
|
||||
#define IS_IGDG(dev) ((dev)->pci_device == 0xa001)
|
||||
|
|
|
@ -4087,8 +4087,10 @@ i915_gem_entervt_ioctl(struct drm_device *dev, void *data,
|
|||
dev_priv->mm.suspended = 0;
|
||||
|
||||
ret = i915_gem_init_ringbuffer(dev);
|
||||
if (ret != 0)
|
||||
if (ret != 0) {
|
||||
mutex_unlock(&dev->struct_mutex);
|
||||
return ret;
|
||||
}
|
||||
|
||||
spin_lock(&dev_priv->mm.active_list_lock);
|
||||
BUG_ON(!list_empty(&dev_priv->mm.active_list));
|
||||
|
|
|
@ -283,7 +283,6 @@ i915_gem_set_tiling(struct drm_device *dev, void *data,
|
|||
mutex_lock(&dev->struct_mutex);
|
||||
|
||||
if (args->tiling_mode == I915_TILING_NONE) {
|
||||
obj_priv->tiling_mode = I915_TILING_NONE;
|
||||
args->swizzle_mode = I915_BIT_6_SWIZZLE_NONE;
|
||||
} else {
|
||||
if (args->tiling_mode == I915_TILING_X)
|
||||
|
|
|
@ -406,7 +406,7 @@ int i915_irq_emit(struct drm_device *dev, void *data,
|
|||
drm_i915_irq_emit_t *emit = data;
|
||||
int result;
|
||||
|
||||
if (!dev_priv) {
|
||||
if (!dev_priv || !dev_priv->ring.virtual_start) {
|
||||
DRM_ERROR("called with no initialization\n");
|
||||
return -EINVAL;
|
||||
}
|
||||
|
|
|
@ -386,6 +386,7 @@ int intel_opregion_init(struct drm_device *dev, int resume)
|
|||
if (mboxes & MBOX_ASLE) {
|
||||
DRM_DEBUG("ASLE supported\n");
|
||||
opregion->asle = base + OPREGION_ASLE_OFFSET;
|
||||
opregion_enable_asle(dev);
|
||||
}
|
||||
|
||||
if (!resume)
|
||||
|
@ -409,7 +410,7 @@ err_out:
|
|||
return err;
|
||||
}
|
||||
|
||||
void intel_opregion_free(struct drm_device *dev)
|
||||
void intel_opregion_free(struct drm_device *dev, int suspend)
|
||||
{
|
||||
struct drm_i915_private *dev_priv = dev->dev_private;
|
||||
struct intel_opregion *opregion = &dev_priv->opregion;
|
||||
|
@ -417,6 +418,9 @@ void intel_opregion_free(struct drm_device *dev)
|
|||
if (!opregion->enabled)
|
||||
return;
|
||||
|
||||
if (!suspend)
|
||||
acpi_video_exit();
|
||||
|
||||
opregion->acpi->drdy = 0;
|
||||
|
||||
system_opregion = NULL;
|
||||
|
|
|
@ -1446,6 +1446,7 @@
|
|||
#define DISPPLANE_NO_LINE_DOUBLE 0
|
||||
#define DISPPLANE_STEREO_POLARITY_FIRST 0
|
||||
#define DISPPLANE_STEREO_POLARITY_SECOND (1<<18)
|
||||
#define DISPPLANE_TILED (1<<10)
|
||||
#define DSPAADDR 0x70184
|
||||
#define DSPASTRIDE 0x70188
|
||||
#define DSPAPOS 0x7018C /* reserved */
|
||||
|
|
|
@ -657,6 +657,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
|
|||
int dspbase = (pipe == 0 ? DSPAADDR : DSPBADDR);
|
||||
int dspsurf = (pipe == 0 ? DSPASURF : DSPBSURF);
|
||||
int dspstride = (pipe == 0) ? DSPASTRIDE : DSPBSTRIDE;
|
||||
int dsptileoff = (pipe == 0 ? DSPATILEOFF : DSPBTILEOFF);
|
||||
int dspcntr_reg = (pipe == 0) ? DSPACNTR : DSPBCNTR;
|
||||
u32 dspcntr, alignment;
|
||||
int ret;
|
||||
|
@ -733,6 +734,13 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
|
|||
mutex_unlock(&dev->struct_mutex);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (IS_I965G(dev)) {
|
||||
if (obj_priv->tiling_mode != I915_TILING_NONE)
|
||||
dspcntr |= DISPPLANE_TILED;
|
||||
else
|
||||
dspcntr &= ~DISPPLANE_TILED;
|
||||
}
|
||||
|
||||
I915_WRITE(dspcntr_reg, dspcntr);
|
||||
|
||||
Start = obj_priv->gtt_offset;
|
||||
|
@ -745,6 +753,7 @@ intel_pipe_set_base(struct drm_crtc *crtc, int x, int y,
|
|||
I915_READ(dspbase);
|
||||
I915_WRITE(dspsurf, Start);
|
||||
I915_READ(dspsurf);
|
||||
I915_WRITE(dsptileoff, (y << 16) | x);
|
||||
} else {
|
||||
I915_WRITE(dspbase, Start + Offset);
|
||||
I915_READ(dspbase);
|
||||
|
|
|
@ -1830,6 +1830,10 @@ int iwch_accept_cr(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
ep->com.rpl_err = 0;
|
||||
ep->ird = conn_param->ird;
|
||||
ep->ord = conn_param->ord;
|
||||
|
||||
if (peer2peer && ep->ird == 0)
|
||||
ep->ird = 1;
|
||||
|
||||
PDBG("%s %d ird %d ord %d\n", __func__, __LINE__, ep->ird, ep->ord);
|
||||
|
||||
get_ep(&ep->com);
|
||||
|
@ -1915,6 +1919,10 @@ int iwch_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
conn_param->private_data, ep->plen);
|
||||
ep->ird = conn_param->ird;
|
||||
ep->ord = conn_param->ord;
|
||||
|
||||
if (peer2peer && ep->ord == 0)
|
||||
ep->ord = 1;
|
||||
|
||||
ep->com.tdev = h->rdev.t3cdev_p;
|
||||
|
||||
cm_id->add_ref(cm_id);
|
||||
|
|
|
@ -1069,7 +1069,6 @@ int iwch_modify_qp(struct iwch_dev *rhp, struct iwch_qp *qhp,
|
|||
goto out;
|
||||
}
|
||||
qhp->attr.state = IWCH_QP_STATE_IDLE;
|
||||
memset(&qhp->attr, 0, sizeof(qhp->attr));
|
||||
break;
|
||||
case IWCH_QP_STATE_TERMINATE:
|
||||
if (!internal) {
|
||||
|
|
|
@ -157,13 +157,15 @@ enum {
|
|||
enum {
|
||||
CMD_TIME_CLASS_A = (HZ + 999) / 1000 + 1,
|
||||
CMD_TIME_CLASS_B = (HZ + 99) / 100 + 1,
|
||||
CMD_TIME_CLASS_C = (HZ + 9) / 10 + 1
|
||||
CMD_TIME_CLASS_C = (HZ + 9) / 10 + 1,
|
||||
CMD_TIME_CLASS_D = 60 * HZ
|
||||
};
|
||||
#else
|
||||
enum {
|
||||
CMD_TIME_CLASS_A = 60 * HZ,
|
||||
CMD_TIME_CLASS_B = 60 * HZ,
|
||||
CMD_TIME_CLASS_C = 60 * HZ
|
||||
CMD_TIME_CLASS_C = 60 * HZ,
|
||||
CMD_TIME_CLASS_D = 60 * HZ
|
||||
};
|
||||
#endif
|
||||
|
||||
|
@ -598,7 +600,7 @@ int mthca_SYS_EN(struct mthca_dev *dev, u8 *status)
|
|||
u64 out;
|
||||
int ret;
|
||||
|
||||
ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, HZ, status);
|
||||
ret = mthca_cmd_imm(dev, 0, &out, 0, 0, CMD_SYS_EN, CMD_TIME_CLASS_D, status);
|
||||
|
||||
if (*status == MTHCA_CMD_STAT_DDR_MEM_ERR)
|
||||
mthca_warn(dev, "SYS_EN DDR error: syn=%x, sock=%d, "
|
||||
|
@ -611,7 +613,7 @@ int mthca_SYS_EN(struct mthca_dev *dev, u8 *status)
|
|||
|
||||
int mthca_SYS_DIS(struct mthca_dev *dev, u8 *status)
|
||||
{
|
||||
return mthca_cmd(dev, 0, 0, 0, CMD_SYS_DIS, HZ, status);
|
||||
return mthca_cmd(dev, 0, 0, 0, CMD_SYS_DIS, CMD_TIME_CLASS_C, status);
|
||||
}
|
||||
|
||||
static int mthca_map_cmd(struct mthca_dev *dev, u16 op, struct mthca_icm *icm,
|
||||
|
@ -1390,7 +1392,7 @@ int mthca_INIT_HCA(struct mthca_dev *dev,
|
|||
MTHCA_PUT(inbox, param->uarc_base, INIT_HCA_UAR_CTX_BASE_OFFSET);
|
||||
}
|
||||
|
||||
err = mthca_cmd(dev, mailbox->dma, 0, 0, CMD_INIT_HCA, HZ, status);
|
||||
err = mthca_cmd(dev, mailbox->dma, 0, 0, CMD_INIT_HCA, CMD_TIME_CLASS_D, status);
|
||||
|
||||
mthca_free_mailbox(dev, mailbox);
|
||||
return err;
|
||||
|
@ -1450,12 +1452,12 @@ int mthca_INIT_IB(struct mthca_dev *dev,
|
|||
|
||||
int mthca_CLOSE_IB(struct mthca_dev *dev, int port, u8 *status)
|
||||
{
|
||||
return mthca_cmd(dev, 0, port, 0, CMD_CLOSE_IB, HZ, status);
|
||||
return mthca_cmd(dev, 0, port, 0, CMD_CLOSE_IB, CMD_TIME_CLASS_A, status);
|
||||
}
|
||||
|
||||
int mthca_CLOSE_HCA(struct mthca_dev *dev, int panic, u8 *status)
|
||||
{
|
||||
return mthca_cmd(dev, 0, 0, panic, CMD_CLOSE_HCA, HZ, status);
|
||||
return mthca_cmd(dev, 0, 0, panic, CMD_CLOSE_HCA, CMD_TIME_CLASS_C, status);
|
||||
}
|
||||
|
||||
int mthca_SET_IB(struct mthca_dev *dev, struct mthca_set_ib_param *param,
|
||||
|
|
|
@ -56,10 +56,8 @@
|
|||
|
||||
#define QUEUE_DISCONNECTS
|
||||
|
||||
#define DRV_BUILD "1"
|
||||
|
||||
#define DRV_NAME "iw_nes"
|
||||
#define DRV_VERSION "1.0 KO Build " DRV_BUILD
|
||||
#define DRV_VERSION "1.5.0.0"
|
||||
#define PFX DRV_NAME ": "
|
||||
|
||||
/*
|
||||
|
|
|
@ -56,6 +56,7 @@
|
|||
#include <net/neighbour.h>
|
||||
#include <net/route.h>
|
||||
#include <net/ip_fib.h>
|
||||
#include <net/tcp.h>
|
||||
|
||||
#include "nes.h"
|
||||
|
||||
|
@ -540,6 +541,7 @@ static void nes_cm_timer_tick(unsigned long pass)
|
|||
struct list_head *list_node;
|
||||
struct nes_cm_core *cm_core = g_cm_core;
|
||||
u32 settimer = 0;
|
||||
unsigned long timetosend;
|
||||
int ret = NETDEV_TX_OK;
|
||||
|
||||
struct list_head timer_list;
|
||||
|
@ -644,8 +646,11 @@ static void nes_cm_timer_tick(unsigned long pass)
|
|||
send_entry->retrycount);
|
||||
if (send_entry->send_retrans) {
|
||||
send_entry->retranscount--;
|
||||
timetosend = (NES_RETRY_TIMEOUT <<
|
||||
(NES_DEFAULT_RETRANS - send_entry->retranscount));
|
||||
|
||||
send_entry->timetosend = jiffies +
|
||||
NES_RETRY_TIMEOUT;
|
||||
min(timetosend, NES_MAX_TIMEOUT);
|
||||
if (nexttimeout > send_entry->timetosend ||
|
||||
!settimer) {
|
||||
nexttimeout = send_entry->timetosend;
|
||||
|
@ -854,7 +859,6 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core,
|
|||
{
|
||||
unsigned long flags;
|
||||
struct nes_cm_listener *listen_node;
|
||||
__be32 tmp_addr = cpu_to_be32(dst_addr);
|
||||
|
||||
/* walk list and find cm_node associated with this session ID */
|
||||
spin_lock_irqsave(&cm_core->listen_list_lock, flags);
|
||||
|
@ -871,9 +875,6 @@ static struct nes_cm_listener *find_listener(struct nes_cm_core *cm_core,
|
|||
}
|
||||
spin_unlock_irqrestore(&cm_core->listen_list_lock, flags);
|
||||
|
||||
nes_debug(NES_DBG_CM, "Unable to find listener for %pI4:%x\n",
|
||||
&tmp_addr, dst_port);
|
||||
|
||||
/* no listener */
|
||||
return NULL;
|
||||
}
|
||||
|
@ -1325,18 +1326,20 @@ static void handle_fin_pkt(struct nes_cm_node *cm_node)
|
|||
nes_debug(NES_DBG_CM, "Received FIN, cm_node = %p, state = %u. "
|
||||
"refcnt=%d\n", cm_node, cm_node->state,
|
||||
atomic_read(&cm_node->ref_count));
|
||||
cm_node->tcp_cntxt.rcv_nxt++;
|
||||
cleanup_retrans_entry(cm_node);
|
||||
switch (cm_node->state) {
|
||||
case NES_CM_STATE_SYN_RCVD:
|
||||
case NES_CM_STATE_SYN_SENT:
|
||||
case NES_CM_STATE_ESTABLISHED:
|
||||
case NES_CM_STATE_MPAREQ_SENT:
|
||||
case NES_CM_STATE_MPAREJ_RCVD:
|
||||
cm_node->tcp_cntxt.rcv_nxt++;
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->state = NES_CM_STATE_LAST_ACK;
|
||||
send_fin(cm_node, NULL);
|
||||
break;
|
||||
case NES_CM_STATE_FIN_WAIT1:
|
||||
cm_node->tcp_cntxt.rcv_nxt++;
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->state = NES_CM_STATE_CLOSING;
|
||||
send_ack(cm_node, NULL);
|
||||
/* Wait for ACK as this is simultanous close..
|
||||
|
@ -1344,11 +1347,15 @@ static void handle_fin_pkt(struct nes_cm_node *cm_node)
|
|||
* Just rm the node.. Done.. */
|
||||
break;
|
||||
case NES_CM_STATE_FIN_WAIT2:
|
||||
cm_node->tcp_cntxt.rcv_nxt++;
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->state = NES_CM_STATE_TIME_WAIT;
|
||||
send_ack(cm_node, NULL);
|
||||
schedule_nes_timer(cm_node, NULL, NES_TIMER_TYPE_CLOSE, 1, 0);
|
||||
break;
|
||||
case NES_CM_STATE_TIME_WAIT:
|
||||
cm_node->tcp_cntxt.rcv_nxt++;
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->state = NES_CM_STATE_CLOSED;
|
||||
rem_ref_cm_node(cm_node->cm_core, cm_node);
|
||||
break;
|
||||
|
@ -1384,7 +1391,6 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
passive_state = atomic_add_return(1, &cm_node->passive_state);
|
||||
if (passive_state == NES_SEND_RESET_EVENT)
|
||||
create_event(cm_node, NES_CM_EVENT_RESET);
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->state = NES_CM_STATE_CLOSED;
|
||||
dev_kfree_skb_any(skb);
|
||||
break;
|
||||
|
@ -1398,17 +1404,16 @@ static void handle_rst_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
active_open_err(cm_node, skb, reset);
|
||||
break;
|
||||
case NES_CM_STATE_CLOSED:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
drop_packet(skb);
|
||||
break;
|
||||
case NES_CM_STATE_LAST_ACK:
|
||||
cm_node->cm_id->rem_ref(cm_node->cm_id);
|
||||
case NES_CM_STATE_TIME_WAIT:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->state = NES_CM_STATE_CLOSED;
|
||||
rem_ref_cm_node(cm_node->cm_core, cm_node);
|
||||
drop_packet(skb);
|
||||
break;
|
||||
case NES_CM_STATE_FIN_WAIT1:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
nes_debug(NES_DBG_CM, "Bad state %s[%u]\n", __func__, __LINE__);
|
||||
default:
|
||||
drop_packet(skb);
|
||||
|
@ -1455,6 +1460,7 @@ static void handle_rcv_mpa(struct nes_cm_node *cm_node, struct sk_buff *skb)
|
|||
NES_PASSIVE_STATE_INDICATED);
|
||||
break;
|
||||
case NES_CM_STATE_MPAREQ_SENT:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
if (res_type == NES_MPA_REQUEST_REJECT) {
|
||||
type = NES_CM_EVENT_MPA_REJECT;
|
||||
cm_node->state = NES_CM_STATE_MPAREJ_RCVD;
|
||||
|
@ -1518,7 +1524,7 @@ static int check_seq(struct nes_cm_node *cm_node, struct tcphdr *tcph,
|
|||
rcv_wnd = cm_node->tcp_cntxt.rcv_wnd;
|
||||
if (ack_seq != loc_seq_num)
|
||||
err = 1;
|
||||
else if ((seq + rcv_wnd) < rcv_nxt)
|
||||
else if (!between(seq, rcv_nxt, (rcv_nxt+rcv_wnd)))
|
||||
err = 1;
|
||||
if (err) {
|
||||
nes_debug(NES_DBG_CM, "%s[%u] create abort for cm_node=%p "
|
||||
|
@ -1652,49 +1658,39 @@ static void handle_synack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
}
|
||||
}
|
||||
|
||||
static void handle_ack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
||||
static int handle_ack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
||||
struct tcphdr *tcph)
|
||||
{
|
||||
int datasize = 0;
|
||||
u32 inc_sequence;
|
||||
u32 rem_seq_ack;
|
||||
u32 rem_seq;
|
||||
int ret;
|
||||
int ret = 0;
|
||||
int optionsize;
|
||||
optionsize = (tcph->doff << 2) - sizeof(struct tcphdr);
|
||||
|
||||
if (check_seq(cm_node, tcph, skb))
|
||||
return;
|
||||
return -EINVAL;
|
||||
|
||||
skb_pull(skb, tcph->doff << 2);
|
||||
inc_sequence = ntohl(tcph->seq);
|
||||
rem_seq = ntohl(tcph->seq);
|
||||
rem_seq_ack = ntohl(tcph->ack_seq);
|
||||
datasize = skb->len;
|
||||
cleanup_retrans_entry(cm_node);
|
||||
switch (cm_node->state) {
|
||||
case NES_CM_STATE_SYN_RCVD:
|
||||
/* Passive OPEN */
|
||||
cleanup_retrans_entry(cm_node);
|
||||
ret = handle_tcp_options(cm_node, tcph, skb, optionsize, 1);
|
||||
if (ret)
|
||||
break;
|
||||
cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq);
|
||||
if (cm_node->tcp_cntxt.rem_ack_num !=
|
||||
cm_node->tcp_cntxt.loc_seq_num) {
|
||||
nes_debug(NES_DBG_CM, "rem_ack_num != loc_seq_num\n");
|
||||
cleanup_retrans_entry(cm_node);
|
||||
send_reset(cm_node, skb);
|
||||
return;
|
||||
}
|
||||
cm_node->state = NES_CM_STATE_ESTABLISHED;
|
||||
cleanup_retrans_entry(cm_node);
|
||||
if (datasize) {
|
||||
cm_node->tcp_cntxt.rcv_nxt = inc_sequence + datasize;
|
||||
handle_rcv_mpa(cm_node, skb);
|
||||
} else { /* rcvd ACK only */
|
||||
} else /* rcvd ACK only */
|
||||
dev_kfree_skb_any(skb);
|
||||
cleanup_retrans_entry(cm_node);
|
||||
}
|
||||
break;
|
||||
case NES_CM_STATE_ESTABLISHED:
|
||||
/* Passive OPEN */
|
||||
|
@ -1706,15 +1702,12 @@ static void handle_ack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
drop_packet(skb);
|
||||
break;
|
||||
case NES_CM_STATE_MPAREQ_SENT:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->tcp_cntxt.rem_ack_num = ntohl(tcph->ack_seq);
|
||||
if (datasize) {
|
||||
cm_node->tcp_cntxt.rcv_nxt = inc_sequence + datasize;
|
||||
handle_rcv_mpa(cm_node, skb);
|
||||
} else { /* Could be just an ack pkt.. */
|
||||
cleanup_retrans_entry(cm_node);
|
||||
} else /* Could be just an ack pkt.. */
|
||||
dev_kfree_skb_any(skb);
|
||||
}
|
||||
break;
|
||||
case NES_CM_STATE_LISTENING:
|
||||
case NES_CM_STATE_CLOSED:
|
||||
|
@ -1722,11 +1715,10 @@ static void handle_ack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
send_reset(cm_node, skb);
|
||||
break;
|
||||
case NES_CM_STATE_LAST_ACK:
|
||||
case NES_CM_STATE_CLOSING:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
cm_node->state = NES_CM_STATE_CLOSED;
|
||||
cm_node->cm_id->rem_ref(cm_node->cm_id);
|
||||
case NES_CM_STATE_CLOSING:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
rem_ref_cm_node(cm_node->cm_core, cm_node);
|
||||
drop_packet(skb);
|
||||
break;
|
||||
|
@ -1741,9 +1733,11 @@ static void handle_ack_pkt(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
case NES_CM_STATE_MPAREQ_RCVD:
|
||||
case NES_CM_STATE_UNKNOWN:
|
||||
default:
|
||||
cleanup_retrans_entry(cm_node);
|
||||
drop_packet(skb);
|
||||
break;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
@ -1849,6 +1843,7 @@ static void process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
enum nes_tcpip_pkt_type pkt_type = NES_PKT_TYPE_UNKNOWN;
|
||||
struct tcphdr *tcph = tcp_hdr(skb);
|
||||
u32 fin_set = 0;
|
||||
int ret = 0;
|
||||
skb_pull(skb, ip_hdr(skb)->ihl << 2);
|
||||
|
||||
nes_debug(NES_DBG_CM, "process_packet: cm_node=%p state =%d syn=%d "
|
||||
|
@ -1874,17 +1869,17 @@ static void process_packet(struct nes_cm_node *cm_node, struct sk_buff *skb,
|
|||
handle_synack_pkt(cm_node, skb, tcph);
|
||||
break;
|
||||
case NES_PKT_TYPE_ACK:
|
||||
handle_ack_pkt(cm_node, skb, tcph);
|
||||
if (fin_set)
|
||||
ret = handle_ack_pkt(cm_node, skb, tcph);
|
||||
if (fin_set && !ret)
|
||||
handle_fin_pkt(cm_node);
|
||||
break;
|
||||
case NES_PKT_TYPE_RST:
|
||||
handle_rst_pkt(cm_node, skb, tcph);
|
||||
break;
|
||||
default:
|
||||
drop_packet(skb);
|
||||
if (fin_set)
|
||||
if ((fin_set) && (!check_seq(cm_node, tcph, skb)))
|
||||
handle_fin_pkt(cm_node);
|
||||
drop_packet(skb);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -2710,7 +2705,6 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
/* associate the node with the QP */
|
||||
nesqp->cm_node = (void *)cm_node;
|
||||
cm_node->nesqp = nesqp;
|
||||
nes_add_ref(&nesqp->ibqp);
|
||||
|
||||
nes_debug(NES_DBG_CM, "QP%u, cm_node=%p, jiffies = %lu listener = %p\n",
|
||||
nesqp->hwqp.qp_id, cm_node, jiffies, cm_node->listener);
|
||||
|
@ -2763,6 +2757,9 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
nes_debug(NES_DBG_CM, "Unable to register memory region"
|
||||
"for lSMM for cm_node = %p \n",
|
||||
cm_node);
|
||||
pci_free_consistent(nesdev->pcidev,
|
||||
nesqp->private_data_len+sizeof(struct ietf_mpa_frame),
|
||||
nesqp->ietf_frame, nesqp->ietf_frame_pbase);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
||||
|
@ -2879,6 +2876,7 @@ int nes_accept(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
|
||||
/* notify OF layer that accept event was successful */
|
||||
cm_id->add_ref(cm_id);
|
||||
nes_add_ref(&nesqp->ibqp);
|
||||
|
||||
cm_event.event = IW_CM_EVENT_ESTABLISHED;
|
||||
cm_event.status = IW_CM_EVENT_STATUS_ACCEPTED;
|
||||
|
@ -2959,6 +2957,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
struct nes_device *nesdev;
|
||||
struct nes_cm_node *cm_node;
|
||||
struct nes_cm_info cm_info;
|
||||
int apbvt_set = 0;
|
||||
|
||||
ibqp = nes_get_qp(cm_id->device, conn_param->qpn);
|
||||
if (!ibqp)
|
||||
|
@ -2996,9 +2995,11 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
conn_param->private_data_len);
|
||||
|
||||
if (cm_id->local_addr.sin_addr.s_addr !=
|
||||
cm_id->remote_addr.sin_addr.s_addr)
|
||||
cm_id->remote_addr.sin_addr.s_addr) {
|
||||
nes_manage_apbvt(nesvnic, ntohs(cm_id->local_addr.sin_port),
|
||||
PCI_FUNC(nesdev->pcidev->devfn), NES_MANAGE_APBVT_ADD);
|
||||
apbvt_set = 1;
|
||||
}
|
||||
|
||||
/* set up the connection params for the node */
|
||||
cm_info.loc_addr = htonl(cm_id->local_addr.sin_addr.s_addr);
|
||||
|
@ -3015,8 +3016,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
conn_param->private_data_len, (void *)conn_param->private_data,
|
||||
&cm_info);
|
||||
if (!cm_node) {
|
||||
if (cm_id->local_addr.sin_addr.s_addr !=
|
||||
cm_id->remote_addr.sin_addr.s_addr)
|
||||
if (apbvt_set)
|
||||
nes_manage_apbvt(nesvnic, ntohs(cm_id->local_addr.sin_port),
|
||||
PCI_FUNC(nesdev->pcidev->devfn),
|
||||
NES_MANAGE_APBVT_DEL);
|
||||
|
@ -3025,7 +3025,7 @@ int nes_connect(struct iw_cm_id *cm_id, struct iw_cm_conn_param *conn_param)
|
|||
return -ENOMEM;
|
||||
}
|
||||
|
||||
cm_node->apbvt_set = 1;
|
||||
cm_node->apbvt_set = apbvt_set;
|
||||
nesqp->cm_node = cm_node;
|
||||
cm_node->nesqp = nesqp;
|
||||
nes_add_ref(&nesqp->ibqp);
|
||||
|
|
|
@ -149,6 +149,7 @@ struct nes_timer_entry {
|
|||
#endif
|
||||
#define NES_SHORT_TIME (10)
|
||||
#define NES_LONG_TIME (2000*HZ/1000)
|
||||
#define NES_MAX_TIMEOUT ((unsigned long) (12*HZ))
|
||||
|
||||
#define NES_CM_HASHTABLE_SIZE 1024
|
||||
#define NES_CM_TCP_TIMER_INTERVAL 3000
|
||||
|
|
|
@ -550,11 +550,8 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
|
|||
msleep(1);
|
||||
}
|
||||
if (int_cnt > 1) {
|
||||
u32 sds;
|
||||
spin_lock_irqsave(&nesadapter->phy_lock, flags);
|
||||
sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1);
|
||||
sds |= 0x00000040;
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds);
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, 0x0000F0C8);
|
||||
mh_detected++;
|
||||
reset_value = nes_read32(nesdev->regs+NES_SOFTWARE_RESET);
|
||||
reset_value |= 0x0000003d;
|
||||
|
@ -579,7 +576,7 @@ struct nes_adapter *nes_init_adapter(struct nes_device *nesdev, u8 hw_rev) {
|
|||
if (++ext_cnt > int_cnt) {
|
||||
spin_lock_irqsave(&nesadapter->phy_lock, flags);
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1,
|
||||
0x0000F0C8);
|
||||
0x0000F088);
|
||||
mh_detected++;
|
||||
reset_value = nes_read32(nesdev->regs+NES_SOFTWARE_RESET);
|
||||
reset_value |= 0x0000003d;
|
||||
|
@ -764,6 +761,9 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
|
|||
return 0;
|
||||
|
||||
/* init serdes 1 */
|
||||
if (!(OneG_Mode && (nesadapter->phy_type[1] != NES_PHY_TYPE_PUMA_1G)))
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000000FF);
|
||||
|
||||
switch (nesadapter->phy_type[1]) {
|
||||
case NES_PHY_TYPE_ARGUS:
|
||||
case NES_PHY_TYPE_SFP_D:
|
||||
|
@ -771,21 +771,20 @@ static int nes_init_serdes(struct nes_device *nesdev, u8 hw_rev, u8 port_count,
|
|||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_EMP1, 0x00000000);
|
||||
break;
|
||||
case NES_PHY_TYPE_CX4:
|
||||
sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1);
|
||||
sds &= 0xFFFFFFBF;
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds);
|
||||
if (wide_ppm_offset)
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000FFFAA);
|
||||
else
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_CDR_CONTROL1, 0x000000FF);
|
||||
break;
|
||||
case NES_PHY_TYPE_PUMA_1G:
|
||||
sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1);
|
||||
sds |= 0x000000100;
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds);
|
||||
}
|
||||
if (!OneG_Mode)
|
||||
if (!OneG_Mode) {
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_TX_HIGHZ_LANE_MODE1, 0x11110000);
|
||||
sds = nes_read_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1);
|
||||
sds &= 0xFFFFFFBF;
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL1, sds);
|
||||
}
|
||||
} else {
|
||||
/* init serdes 0 */
|
||||
nes_write_indexed(nesdev, NES_IDX_ETH_SERDES_COMMON_CONTROL0, 0x00000008);
|
||||
|
@ -913,6 +912,12 @@ static void nes_init_csr_ne020(struct nes_device *nesdev, u8 hw_rev, u8 port_cou
|
|||
u32temp &= 0x7fffffff;
|
||||
u32temp |= 0x7fff0010;
|
||||
nes_write_indexed(nesdev, 0x000021f8, u32temp);
|
||||
if (port_count > 1) {
|
||||
u32temp = nes_read_indexed(nesdev, 0x000023f8);
|
||||
u32temp &= 0x7fffffff;
|
||||
u32temp |= 0x7fff0010;
|
||||
nes_write_indexed(nesdev, 0x000023f8, u32temp);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1366,13 +1371,14 @@ int nes_init_phy(struct nes_device *nesdev)
|
|||
if (phy_type == NES_PHY_TYPE_ARGUS) {
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc302, 0x000C);
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc319, 0x0008);
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x3, 0x0027, 0x0001);
|
||||
} else {
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc302, 0x0004);
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc319, 0x0038);
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x3, 0x0027, 0x0013);
|
||||
}
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xc31a, 0x0098);
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x3, 0x0026, 0x0E00);
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x3, 0x0027, 0x0001);
|
||||
|
||||
/* setup LEDs */
|
||||
nes_write_10G_phy_reg(nesdev, phy_index, 0x1, 0xd006, 0x0007);
|
||||
|
|
|
@ -1627,6 +1627,7 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
|
|||
nescq->hw_cq.cq_number = nes_ucontext->mcrqf & 0xffff;
|
||||
else
|
||||
nescq->hw_cq.cq_number = nesvnic->mcrq_qp_id + nes_ucontext->mcrqf-1;
|
||||
nescq->mcrqf = nes_ucontext->mcrqf;
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
|
||||
}
|
||||
nes_debug(NES_DBG_CQ, "CQ Virtual Address = %08lX, size = %u.\n",
|
||||
|
@ -1682,6 +1683,12 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
|
|||
if (!context)
|
||||
pci_free_consistent(nesdev->pcidev, nescq->cq_mem_size, mem,
|
||||
nescq->hw_cq.cq_pbase);
|
||||
else {
|
||||
pci_free_consistent(nesdev->pcidev, nespbl->pbl_size,
|
||||
nespbl->pbl_vbase, nespbl->pbl_pbase);
|
||||
kfree(nespbl);
|
||||
}
|
||||
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
|
||||
kfree(nescq);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -1705,6 +1712,11 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
|
|||
if (!context)
|
||||
pci_free_consistent(nesdev->pcidev, nescq->cq_mem_size, mem,
|
||||
nescq->hw_cq.cq_pbase);
|
||||
else {
|
||||
pci_free_consistent(nesdev->pcidev, nespbl->pbl_size,
|
||||
nespbl->pbl_vbase, nespbl->pbl_pbase);
|
||||
kfree(nespbl);
|
||||
}
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
|
||||
kfree(nescq);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -1722,6 +1734,11 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
|
|||
if (!context)
|
||||
pci_free_consistent(nesdev->pcidev, nescq->cq_mem_size, mem,
|
||||
nescq->hw_cq.cq_pbase);
|
||||
else {
|
||||
pci_free_consistent(nesdev->pcidev, nespbl->pbl_size,
|
||||
nespbl->pbl_vbase, nespbl->pbl_pbase);
|
||||
kfree(nespbl);
|
||||
}
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
|
||||
kfree(nescq);
|
||||
return ERR_PTR(-ENOMEM);
|
||||
|
@ -1774,6 +1791,11 @@ static struct ib_cq *nes_create_cq(struct ib_device *ibdev, int entries,
|
|||
if (!context)
|
||||
pci_free_consistent(nesdev->pcidev, nescq->cq_mem_size, mem,
|
||||
nescq->hw_cq.cq_pbase);
|
||||
else {
|
||||
pci_free_consistent(nesdev->pcidev, nespbl->pbl_size,
|
||||
nespbl->pbl_vbase, nespbl->pbl_pbase);
|
||||
kfree(nespbl);
|
||||
}
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_cqs, cq_num);
|
||||
kfree(nescq);
|
||||
return ERR_PTR(-EIO);
|
||||
|
@ -1855,7 +1877,9 @@ static int nes_destroy_cq(struct ib_cq *ib_cq)
|
|||
set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_WQE_OPCODE_IDX, opcode);
|
||||
set_wqe_32bit_value(cqp_wqe->wqe_words, NES_CQP_WQE_ID_IDX,
|
||||
(nescq->hw_cq.cq_number | ((u32)PCI_FUNC(nesdev->pcidev->devfn) << 16)));
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_cqs, nescq->hw_cq.cq_number);
|
||||
if (!nescq->mcrqf)
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_cqs, nescq->hw_cq.cq_number);
|
||||
|
||||
atomic_set(&cqp_request->refcount, 2);
|
||||
nes_post_cqp_request(nesdev, cqp_request);
|
||||
|
||||
|
@ -1895,8 +1919,7 @@ static int nes_destroy_cq(struct ib_cq *ib_cq)
|
|||
static u32 root_256(struct nes_device *nesdev,
|
||||
struct nes_root_vpbl *root_vpbl,
|
||||
struct nes_root_vpbl *new_root,
|
||||
u16 pbl_count_4k,
|
||||
u16 pbl_count_256)
|
||||
u16 pbl_count_4k)
|
||||
{
|
||||
u64 leaf_pbl;
|
||||
int i, j, k;
|
||||
|
@ -1952,7 +1975,7 @@ static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd,
|
|||
int ret;
|
||||
struct nes_adapter *nesadapter = nesdev->nesadapter;
|
||||
uint pg_cnt = 0;
|
||||
u16 pbl_count_256;
|
||||
u16 pbl_count_256 = 0;
|
||||
u16 pbl_count = 0;
|
||||
u8 use_256_pbls = 0;
|
||||
u8 use_4k_pbls = 0;
|
||||
|
@ -2012,7 +2035,7 @@ static int nes_reg_mr(struct nes_device *nesdev, struct nes_pd *nespd,
|
|||
}
|
||||
|
||||
if (use_256_pbls && use_two_level) {
|
||||
if (root_256(nesdev, root_vpbl, &new_root, pbl_count_4k, pbl_count_256) == 1) {
|
||||
if (root_256(nesdev, root_vpbl, &new_root, pbl_count_4k) == 1) {
|
||||
if (new_root.pbl_pbase != 0)
|
||||
root_vpbl = &new_root;
|
||||
} else {
|
||||
|
@ -2122,6 +2145,7 @@ static struct ib_mr *nes_reg_phys_mr(struct ib_pd *ib_pd,
|
|||
struct nes_root_vpbl root_vpbl;
|
||||
u32 stag;
|
||||
u32 i;
|
||||
unsigned long mask;
|
||||
u32 stag_index = 0;
|
||||
u32 next_stag_index = 0;
|
||||
u32 driver_key = 0;
|
||||
|
@ -2150,6 +2174,9 @@ static struct ib_mr *nes_reg_phys_mr(struct ib_pd *ib_pd,
|
|||
return ERR_PTR(-E2BIG);
|
||||
}
|
||||
|
||||
if ((buffer_list[0].addr ^ *iova_start) & ~PAGE_MASK)
|
||||
return ERR_PTR(-EINVAL);
|
||||
|
||||
err = nes_alloc_resource(nesadapter, nesadapter->allocated_mrs, nesadapter->max_mr,
|
||||
&stag_index, &next_stag_index);
|
||||
if (err) {
|
||||
|
@ -2215,19 +2242,16 @@ static struct ib_mr *nes_reg_phys_mr(struct ib_pd *ib_pd,
|
|||
root_pbl_index++;
|
||||
cur_pbl_index = 0;
|
||||
}
|
||||
if (buffer_list[i].addr & ~PAGE_MASK) {
|
||||
/* TODO: Unwind allocated buffers */
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_mrs, stag_index);
|
||||
nes_debug(NES_DBG_MR, "Unaligned Memory Buffer: 0x%x\n",
|
||||
(unsigned int) buffer_list[i].addr);
|
||||
ibmr = ERR_PTR(-EINVAL);
|
||||
kfree(nesmr);
|
||||
goto reg_phys_err;
|
||||
}
|
||||
|
||||
if (!buffer_list[i].size) {
|
||||
mask = !buffer_list[i].size;
|
||||
if (i != 0)
|
||||
mask |= buffer_list[i].addr;
|
||||
if (i != num_phys_buf - 1)
|
||||
mask |= buffer_list[i].addr + buffer_list[i].size;
|
||||
|
||||
if (mask & ~PAGE_MASK) {
|
||||
nes_free_resource(nesadapter, nesadapter->allocated_mrs, stag_index);
|
||||
nes_debug(NES_DBG_MR, "Invalid Buffer Size\n");
|
||||
nes_debug(NES_DBG_MR, "Invalid buffer addr or size\n");
|
||||
ibmr = ERR_PTR(-EINVAL);
|
||||
kfree(nesmr);
|
||||
goto reg_phys_err;
|
||||
|
@ -2238,7 +2262,7 @@ static struct ib_mr *nes_reg_phys_mr(struct ib_pd *ib_pd,
|
|||
if ((buffer_list[i-1].addr+PAGE_SIZE) != buffer_list[i].addr)
|
||||
single_page = 0;
|
||||
}
|
||||
vpbl.pbl_vbase[cur_pbl_index].pa_low = cpu_to_le32((u32)buffer_list[i].addr);
|
||||
vpbl.pbl_vbase[cur_pbl_index].pa_low = cpu_to_le32((u32)buffer_list[i].addr & PAGE_MASK);
|
||||
vpbl.pbl_vbase[cur_pbl_index++].pa_high =
|
||||
cpu_to_le32((u32)((((u64)buffer_list[i].addr) >> 32)));
|
||||
}
|
||||
|
@ -2251,8 +2275,6 @@ static struct ib_mr *nes_reg_phys_mr(struct ib_pd *ib_pd,
|
|||
" length = 0x%016lX, index = 0x%08X\n",
|
||||
stag, (unsigned long)*iova_start, (unsigned long)region_length, stag_index);
|
||||
|
||||
region_length -= (*iova_start)&PAGE_MASK;
|
||||
|
||||
/* Make the leaf PBL the root if only one PBL */
|
||||
if (root_pbl_index == 1) {
|
||||
root_vpbl.pbl_pbase = vpbl.pbl_pbase;
|
||||
|
@ -2786,10 +2808,9 @@ static ssize_t show_fw_ver(struct device *dev, struct device_attribute *attr,
|
|||
struct nes_vnic *nesvnic = nesibdev->nesvnic;
|
||||
|
||||
nes_debug(NES_DBG_INIT, "\n");
|
||||
return sprintf(buf, "%x.%x.%x\n",
|
||||
(int)(nesvnic->nesdev->nesadapter->fw_ver >> 32),
|
||||
(int)(nesvnic->nesdev->nesadapter->fw_ver >> 16) & 0xffff,
|
||||
(int)(nesvnic->nesdev->nesadapter->fw_ver & 0xffff));
|
||||
return sprintf(buf, "%u.%u\n",
|
||||
(nesvnic->nesdev->nesadapter->firmware_version >> 16),
|
||||
(nesvnic->nesdev->nesadapter->firmware_version & 0x000000ff));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -112,6 +112,7 @@ struct nes_cq {
|
|||
spinlock_t lock;
|
||||
u8 virtual_cq;
|
||||
u8 pad[3];
|
||||
u32 mcrqf;
|
||||
};
|
||||
|
||||
struct nes_wq {
|
||||
|
|
|
@ -685,7 +685,8 @@ int ipoib_ib_dev_open(struct net_device *dev)
|
|||
queue_delayed_work(ipoib_workqueue, &priv->ah_reap_task,
|
||||
round_jiffies_relative(HZ));
|
||||
|
||||
set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags);
|
||||
if (!test_and_set_bit(IPOIB_FLAG_INITIALIZED, &priv->flags))
|
||||
napi_enable(&priv->napi);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -804,7 +805,8 @@ int ipoib_ib_dev_stop(struct net_device *dev, int flush)
|
|||
struct ipoib_tx_buf *tx_req;
|
||||
int i;
|
||||
|
||||
clear_bit(IPOIB_FLAG_INITIALIZED, &priv->flags);
|
||||
if (test_and_clear_bit(IPOIB_FLAG_INITIALIZED, &priv->flags))
|
||||
napi_disable(&priv->napi);
|
||||
|
||||
ipoib_cm_dev_stop(dev);
|
||||
|
||||
|
|
|
@ -106,8 +106,7 @@ int ipoib_open(struct net_device *dev)
|
|||
|
||||
ipoib_dbg(priv, "bringing up interface\n");
|
||||
|
||||
if (!test_and_set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags))
|
||||
napi_enable(&priv->napi);
|
||||
set_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
|
||||
|
||||
if (ipoib_pkey_dev_delay_open(dev))
|
||||
return 0;
|
||||
|
@ -143,7 +142,6 @@ err_stop:
|
|||
ipoib_ib_dev_stop(dev, 1);
|
||||
|
||||
err_disable:
|
||||
napi_disable(&priv->napi);
|
||||
clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
|
||||
|
||||
return -EINVAL;
|
||||
|
@ -156,7 +154,6 @@ static int ipoib_stop(struct net_device *dev)
|
|||
ipoib_dbg(priv, "stopping interface\n");
|
||||
|
||||
clear_bit(IPOIB_FLAG_ADMIN_UP, &priv->flags);
|
||||
napi_disable(&priv->napi);
|
||||
|
||||
netif_stop_queue(dev);
|
||||
|
||||
|
|
|
@ -270,6 +270,15 @@ static void recv_handler(struct work_struct *work)
|
|||
mutex_unlock(&ap->recv_mtx);
|
||||
}
|
||||
|
||||
/**
|
||||
* capi_ctr_handle_message() - handle incoming CAPI message
|
||||
* @card: controller descriptor structure.
|
||||
* @appl: application ID.
|
||||
* @skb: message.
|
||||
*
|
||||
* Called by hardware driver to pass a CAPI message to the application.
|
||||
*/
|
||||
|
||||
void capi_ctr_handle_message(struct capi_ctr * card, u16 appl, struct sk_buff *skb)
|
||||
{
|
||||
struct capi20_appl *ap;
|
||||
|
@ -348,6 +357,13 @@ error:
|
|||
|
||||
EXPORT_SYMBOL(capi_ctr_handle_message);
|
||||
|
||||
/**
|
||||
* capi_ctr_ready() - signal CAPI controller ready
|
||||
* @card: controller descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to signal that the controller is up and running.
|
||||
*/
|
||||
|
||||
void capi_ctr_ready(struct capi_ctr * card)
|
||||
{
|
||||
card->cardstate = CARD_RUNNING;
|
||||
|
@ -360,6 +376,14 @@ void capi_ctr_ready(struct capi_ctr * card)
|
|||
|
||||
EXPORT_SYMBOL(capi_ctr_ready);
|
||||
|
||||
/**
|
||||
* capi_ctr_reseted() - signal CAPI controller reset
|
||||
* @card: controller descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to signal that the controller is down and
|
||||
* unavailable for use.
|
||||
*/
|
||||
|
||||
void capi_ctr_reseted(struct capi_ctr * card)
|
||||
{
|
||||
u16 appl;
|
||||
|
@ -391,6 +415,13 @@ void capi_ctr_reseted(struct capi_ctr * card)
|
|||
|
||||
EXPORT_SYMBOL(capi_ctr_reseted);
|
||||
|
||||
/**
|
||||
* capi_ctr_suspend_output() - suspend controller
|
||||
* @card: controller descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to stop data flow.
|
||||
*/
|
||||
|
||||
void capi_ctr_suspend_output(struct capi_ctr *card)
|
||||
{
|
||||
if (!card->blocked) {
|
||||
|
@ -401,6 +432,13 @@ void capi_ctr_suspend_output(struct capi_ctr *card)
|
|||
|
||||
EXPORT_SYMBOL(capi_ctr_suspend_output);
|
||||
|
||||
/**
|
||||
* capi_ctr_resume_output() - resume controller
|
||||
* @card: controller descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to resume data flow.
|
||||
*/
|
||||
|
||||
void capi_ctr_resume_output(struct capi_ctr *card)
|
||||
{
|
||||
if (card->blocked) {
|
||||
|
@ -413,6 +451,14 @@ EXPORT_SYMBOL(capi_ctr_resume_output);
|
|||
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* attach_capi_ctr() - register CAPI controller
|
||||
* @card: controller descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to register a controller with the CAPI subsystem.
|
||||
* Return value: 0 on success, error code < 0 on error
|
||||
*/
|
||||
|
||||
int
|
||||
attach_capi_ctr(struct capi_ctr *card)
|
||||
{
|
||||
|
@ -459,6 +505,15 @@ attach_capi_ctr(struct capi_ctr *card)
|
|||
|
||||
EXPORT_SYMBOL(attach_capi_ctr);
|
||||
|
||||
/**
|
||||
* detach_capi_ctr() - unregister CAPI controller
|
||||
* @card: controller descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to remove the registration of a controller
|
||||
* with the CAPI subsystem.
|
||||
* Return value: 0 on success, error code < 0 on error
|
||||
*/
|
||||
|
||||
int detach_capi_ctr(struct capi_ctr *card)
|
||||
{
|
||||
if (card->cardstate != CARD_DETECTED)
|
||||
|
@ -479,6 +534,13 @@ int detach_capi_ctr(struct capi_ctr *card)
|
|||
|
||||
EXPORT_SYMBOL(detach_capi_ctr);
|
||||
|
||||
/**
|
||||
* register_capi_driver() - register CAPI driver
|
||||
* @driver: driver descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to register itself with the CAPI subsystem.
|
||||
*/
|
||||
|
||||
void register_capi_driver(struct capi_driver *driver)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
@ -490,6 +552,13 @@ void register_capi_driver(struct capi_driver *driver)
|
|||
|
||||
EXPORT_SYMBOL(register_capi_driver);
|
||||
|
||||
/**
|
||||
* unregister_capi_driver() - unregister CAPI driver
|
||||
* @driver: driver descriptor structure.
|
||||
*
|
||||
* Called by hardware driver to unregister itself from the CAPI subsystem.
|
||||
*/
|
||||
|
||||
void unregister_capi_driver(struct capi_driver *driver)
|
||||
{
|
||||
unsigned long flags;
|
||||
|
@ -505,6 +574,13 @@ EXPORT_SYMBOL(unregister_capi_driver);
|
|||
/* -------- CAPI2.0 Interface ---------------------------------- */
|
||||
/* ------------------------------------------------------------- */
|
||||
|
||||
/**
|
||||
* capi20_isinstalled() - CAPI 2.0 operation CAPI_INSTALLED
|
||||
*
|
||||
* Return value: CAPI result code (CAPI_NOERROR if at least one ISDN controller
|
||||
* is ready for use, CAPI_REGNOTINSTALLED otherwise)
|
||||
*/
|
||||
|
||||
u16 capi20_isinstalled(void)
|
||||
{
|
||||
int i;
|
||||
|
@ -517,6 +593,18 @@ u16 capi20_isinstalled(void)
|
|||
|
||||
EXPORT_SYMBOL(capi20_isinstalled);
|
||||
|
||||
/**
|
||||
* capi20_register() - CAPI 2.0 operation CAPI_REGISTER
|
||||
* @ap: CAPI application descriptor structure.
|
||||
*
|
||||
* Register an application's presence with CAPI.
|
||||
* A unique application ID is assigned and stored in @ap->applid.
|
||||
* After this function returns successfully, the message receive
|
||||
* callback function @ap->recv_message() may be called at any time
|
||||
* until capi20_release() has been called for the same @ap.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_register(struct capi20_appl *ap)
|
||||
{
|
||||
int i;
|
||||
|
@ -571,6 +659,16 @@ u16 capi20_register(struct capi20_appl *ap)
|
|||
|
||||
EXPORT_SYMBOL(capi20_register);
|
||||
|
||||
/**
|
||||
* capi20_release() - CAPI 2.0 operation CAPI_RELEASE
|
||||
* @ap: CAPI application descriptor structure.
|
||||
*
|
||||
* Terminate an application's registration with CAPI.
|
||||
* After this function returns successfully, the message receive
|
||||
* callback function @ap->recv_message() will no longer be called.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_release(struct capi20_appl *ap)
|
||||
{
|
||||
int i;
|
||||
|
@ -603,6 +701,15 @@ u16 capi20_release(struct capi20_appl *ap)
|
|||
|
||||
EXPORT_SYMBOL(capi20_release);
|
||||
|
||||
/**
|
||||
* capi20_put_message() - CAPI 2.0 operation CAPI_PUT_MESSAGE
|
||||
* @ap: CAPI application descriptor structure.
|
||||
* @skb: CAPI message.
|
||||
*
|
||||
* Transfer a single message to CAPI.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)
|
||||
{
|
||||
struct capi_ctr *card;
|
||||
|
@ -668,6 +775,16 @@ u16 capi20_put_message(struct capi20_appl *ap, struct sk_buff *skb)
|
|||
|
||||
EXPORT_SYMBOL(capi20_put_message);
|
||||
|
||||
/**
|
||||
* capi20_get_manufacturer() - CAPI 2.0 operation CAPI_GET_MANUFACTURER
|
||||
* @contr: controller number.
|
||||
* @buf: result buffer (64 bytes).
|
||||
*
|
||||
* Retrieve information about the manufacturer of the specified ISDN controller
|
||||
* or (for @contr == 0) the driver itself.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_get_manufacturer(u32 contr, u8 *buf)
|
||||
{
|
||||
struct capi_ctr *card;
|
||||
|
@ -685,6 +802,16 @@ u16 capi20_get_manufacturer(u32 contr, u8 *buf)
|
|||
|
||||
EXPORT_SYMBOL(capi20_get_manufacturer);
|
||||
|
||||
/**
|
||||
* capi20_get_version() - CAPI 2.0 operation CAPI_GET_VERSION
|
||||
* @contr: controller number.
|
||||
* @verp: result structure.
|
||||
*
|
||||
* Retrieve version information for the specified ISDN controller
|
||||
* or (for @contr == 0) the driver itself.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_get_version(u32 contr, struct capi_version *verp)
|
||||
{
|
||||
struct capi_ctr *card;
|
||||
|
@ -703,6 +830,16 @@ u16 capi20_get_version(u32 contr, struct capi_version *verp)
|
|||
|
||||
EXPORT_SYMBOL(capi20_get_version);
|
||||
|
||||
/**
|
||||
* capi20_get_serial() - CAPI 2.0 operation CAPI_GET_SERIAL_NUMBER
|
||||
* @contr: controller number.
|
||||
* @serial: result buffer (8 bytes).
|
||||
*
|
||||
* Retrieve the serial number of the specified ISDN controller
|
||||
* or (for @contr == 0) the driver itself.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_get_serial(u32 contr, u8 *serial)
|
||||
{
|
||||
struct capi_ctr *card;
|
||||
|
@ -721,6 +858,16 @@ u16 capi20_get_serial(u32 contr, u8 *serial)
|
|||
|
||||
EXPORT_SYMBOL(capi20_get_serial);
|
||||
|
||||
/**
|
||||
* capi20_get_profile() - CAPI 2.0 operation CAPI_GET_PROFILE
|
||||
* @contr: controller number.
|
||||
* @profp: result structure.
|
||||
*
|
||||
* Retrieve capability information for the specified ISDN controller
|
||||
* or (for @contr == 0) the number of installed controllers.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
u16 capi20_get_profile(u32 contr, struct capi_profile *profp)
|
||||
{
|
||||
struct capi_ctr *card;
|
||||
|
@ -903,6 +1050,15 @@ static int old_capi_manufacturer(unsigned int cmd, void __user *data)
|
|||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
* capi20_manufacturer() - CAPI 2.0 operation CAPI_MANUFACTURER
|
||||
* @cmd: command.
|
||||
* @data: parameter.
|
||||
*
|
||||
* Perform manufacturer specific command.
|
||||
* Return value: CAPI result code
|
||||
*/
|
||||
|
||||
int capi20_manufacturer(unsigned int cmd, void __user *data)
|
||||
{
|
||||
struct capi_ctr *card;
|
||||
|
@ -981,6 +1137,21 @@ int capi20_manufacturer(unsigned int cmd, void __user *data)
|
|||
EXPORT_SYMBOL(capi20_manufacturer);
|
||||
|
||||
/* temporary hack */
|
||||
|
||||
/**
|
||||
* capi20_set_callback() - set CAPI application notification callback function
|
||||
* @ap: CAPI application descriptor structure.
|
||||
* @callback: callback function (NULL to remove).
|
||||
*
|
||||
* If not NULL, the callback function will be called to notify the
|
||||
* application of the addition or removal of a controller.
|
||||
* The first argument (cmd) will tell whether the controller was added
|
||||
* (KCI_CONTRUP) or removed (KCI_CONTRDOWN).
|
||||
* The second argument (contr) will be the controller number.
|
||||
* For cmd==KCI_CONTRUP the third argument (data) will be a pointer to the
|
||||
* new controller's capability profile structure.
|
||||
*/
|
||||
|
||||
void capi20_set_callback(struct capi20_appl *ap,
|
||||
void (*callback) (unsigned int cmd, __u32 contr, void *data))
|
||||
{
|
||||
|
|
|
@ -192,8 +192,6 @@ static int au0828_usb_probe(struct usb_interface *interface,
|
|||
dev->usbdev = usbdev;
|
||||
dev->boardnr = id->driver_info;
|
||||
|
||||
usb_set_intfdata(interface, dev);
|
||||
|
||||
/* Create the v4l2_device */
|
||||
retval = v4l2_device_register(&interface->dev, &dev->v4l2_dev);
|
||||
if (retval) {
|
||||
|
@ -222,6 +220,10 @@ static int au0828_usb_probe(struct usb_interface *interface,
|
|||
/* Digital TV */
|
||||
au0828_dvb_register(dev);
|
||||
|
||||
/* Store the pointer to the au0828_dev so it can be accessed in
|
||||
au0828_usb_disconnect */
|
||||
usb_set_intfdata(interface, dev);
|
||||
|
||||
printk(KERN_INFO "Registered device AU0828 [%s]\n",
|
||||
dev->board.name == NULL ? "Unset" : dev->board.name);
|
||||
|
||||
|
|
|
@ -44,7 +44,7 @@ int cx18_audio_set_io(struct cx18 *cx)
|
|||
|
||||
/* handle muxer chips */
|
||||
v4l2_subdev_call(cx->sd_extmux, audio, s_routing,
|
||||
in->audio_input, 0, 0);
|
||||
(u32) in->muxer_input, 0, 0);
|
||||
|
||||
err = cx18_call_hw_err(cx, cx->card->hw_audio_ctrl,
|
||||
audio, s_routing, in->audio_input, 0, 0);
|
||||
|
|
|
@ -211,7 +211,7 @@ static struct i2c_algo_bit_data cx18_i2c_algo_template = {
|
|||
/* init + register i2c algo-bit adapter */
|
||||
int init_cx18_i2c(struct cx18 *cx)
|
||||
{
|
||||
int i;
|
||||
int i, err;
|
||||
CX18_DEBUG_I2C("i2c init\n");
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
|
@ -268,8 +268,18 @@ int init_cx18_i2c(struct cx18 *cx)
|
|||
cx18_call_hw(cx, CX18_HW_GPIO_RESET_CTRL,
|
||||
core, reset, (u32) CX18_GPIO_RESET_I2C);
|
||||
|
||||
return i2c_bit_add_bus(&cx->i2c_adap[0]) ||
|
||||
i2c_bit_add_bus(&cx->i2c_adap[1]);
|
||||
err = i2c_bit_add_bus(&cx->i2c_adap[0]);
|
||||
if (err)
|
||||
goto err;
|
||||
err = i2c_bit_add_bus(&cx->i2c_adap[1]);
|
||||
if (err)
|
||||
goto err_del_bus_0;
|
||||
return 0;
|
||||
|
||||
err_del_bus_0:
|
||||
i2c_del_adapter(&cx->i2c_adap[0]);
|
||||
err:
|
||||
return err;
|
||||
}
|
||||
|
||||
void exit_cx18_i2c(struct cx18 *cx)
|
||||
|
|
|
@ -1,12 +1,11 @@
|
|||
config VIDEO_CX231XX
|
||||
tristate "Conexant cx231xx USB video capture support"
|
||||
depends on VIDEO_DEV && I2C && INPUT
|
||||
select VIDEO_TUNER
|
||||
select VIDEO_TVEEPROM
|
||||
select VIDEO_IR
|
||||
select VIDEOBUF_VMALLOC
|
||||
select VIDEO_CX25840
|
||||
select VIDEO_CX231XX_ALSA
|
||||
tristate "Conexant cx231xx USB video capture support"
|
||||
depends on VIDEO_DEV && I2C && INPUT
|
||||
select VIDEO_TUNER
|
||||
select VIDEO_TVEEPROM
|
||||
select VIDEO_IR
|
||||
select VIDEOBUF_VMALLOC
|
||||
select VIDEO_CX25840
|
||||
|
||||
---help---
|
||||
This is a video4linux driver for Conexant 231xx USB based TV cards.
|
||||
|
@ -15,21 +14,22 @@ config VIDEO_CX231XX
|
|||
module will be called cx231xx
|
||||
|
||||
config VIDEO_CX231XX_ALSA
|
||||
tristate "Conexant Cx231xx ALSA audio module"
|
||||
depends on VIDEO_CX231XX && SND
|
||||
select SND_PCM
|
||||
tristate "Conexant Cx231xx ALSA audio module"
|
||||
depends on VIDEO_CX231XX && SND
|
||||
select SND_PCM
|
||||
|
||||
---help---
|
||||
This is an ALSA driver for Cx231xx USB based TV cards.
|
||||
---help---
|
||||
This is an ALSA driver for Cx231xx USB based TV cards.
|
||||
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called cx231xx-alsa
|
||||
To compile this driver as a module, choose M here: the
|
||||
module will be called cx231xx-alsa
|
||||
|
||||
config VIDEO_CX231XX_DVB
|
||||
tristate "DVB/ATSC Support for Cx231xx based TV cards"
|
||||
depends on VIDEO_CX231XX && DVB_CORE
|
||||
select VIDEOBUF_DVB
|
||||
select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE
|
||||
---help---
|
||||
This adds support for DVB cards based on the
|
||||
Conexant cx231xx chips.
|
||||
tristate "DVB/ATSC Support for Cx231xx based TV cards"
|
||||
depends on VIDEO_CX231XX && DVB_CORE
|
||||
select VIDEOBUF_DVB
|
||||
select MEDIA_TUNER_XC5000 if !DVB_FE_CUSTOMISE
|
||||
|
||||
---help---
|
||||
This adds support for DVB cards based on the
|
||||
Conexant cx231xx chips.
|
||||
|
|
|
@ -441,9 +441,9 @@ int cx23885_tuner_callback(void *priv, int component, int command, int arg)
|
|||
case CX23885_BOARD_DVICO_FUSIONHDTV_DVB_T_DUAL_EXP:
|
||||
/* Two identical tuners on two different i2c buses,
|
||||
* we need to reset the correct gpio. */
|
||||
if (port->nr == 0)
|
||||
if (port->nr == 1)
|
||||
bitmask = 0x01;
|
||||
else if (port->nr == 1)
|
||||
else if (port->nr == 2)
|
||||
bitmask = 0x04;
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -314,6 +314,7 @@ static struct zl10353_config dvico_fusionhdtv_xc3028 = {
|
|||
.demod_address = 0x0f,
|
||||
.if2 = 45600,
|
||||
.no_tuner = 1,
|
||||
.disable_i2c_gate_ctrl = 1,
|
||||
};
|
||||
|
||||
static struct stv0900_config netup_stv0900_config = {
|
||||
|
|
|
@ -1063,10 +1063,6 @@ static struct soc_camera_host_ops mx3_soc_camera_host_ops = {
|
|||
.owner = THIS_MODULE,
|
||||
.add = mx3_camera_add_device,
|
||||
.remove = mx3_camera_remove_device,
|
||||
#ifdef CONFIG_PM
|
||||
.suspend = mx3_camera_suspend,
|
||||
.resume = mx3_camera_resume,
|
||||
#endif
|
||||
.set_crop = mx3_camera_set_crop,
|
||||
.set_fmt = mx3_camera_set_fmt,
|
||||
.try_fmt = mx3_camera_try_fmt,
|
||||
|
|
|
@ -1237,6 +1237,7 @@ static int s2255_set_mode(struct s2255_dev *dev, unsigned long chn,
|
|||
buffer[1] = (u32) chn_rev;
|
||||
buffer[2] = CMD_SET_MODE;
|
||||
memcpy(&buffer[3], &dev->mode[chn], sizeof(struct s2255_mode));
|
||||
dev->setmode_ready[chn] = 0;
|
||||
res = s2255_write_config(dev->udev, (unsigned char *)buffer, 512);
|
||||
if (debug)
|
||||
dump_verify_mode(dev, mode);
|
||||
|
@ -1245,7 +1246,6 @@ static int s2255_set_mode(struct s2255_dev *dev, unsigned long chn,
|
|||
|
||||
/* wait at least 3 frames before continuing */
|
||||
if (mode->restart) {
|
||||
dev->setmode_ready[chn] = 0;
|
||||
wait_event_timeout(dev->wait_setmode[chn],
|
||||
(dev->setmode_ready[chn] != 0),
|
||||
msecs_to_jiffies(S2255_SETMODE_TIMEOUT));
|
||||
|
|
|
@ -1092,9 +1092,8 @@ static int saa5246a_probe(struct i2c_client *client,
|
|||
/* Register it */
|
||||
err = video_register_device(t->vdev, VFL_TYPE_VTX, -1);
|
||||
if (err < 0) {
|
||||
kfree(t);
|
||||
video_device_release(t->vdev);
|
||||
t->vdev = NULL;
|
||||
kfree(t);
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -598,6 +598,7 @@ static int saa5249_probe(struct i2c_client *client,
|
|||
/* Now create a video4linux device */
|
||||
t->vdev = video_device_alloc();
|
||||
if (t->vdev == NULL) {
|
||||
kfree(t);
|
||||
kfree(client);
|
||||
return -ENOMEM;
|
||||
}
|
||||
|
@ -617,9 +618,8 @@ static int saa5249_probe(struct i2c_client *client,
|
|||
/* Register it */
|
||||
err = video_register_device(t->vdev, VFL_TYPE_VTX, -1);
|
||||
if (err < 0) {
|
||||
kfree(t);
|
||||
video_device_release(t->vdev);
|
||||
t->vdev = NULL;
|
||||
kfree(t);
|
||||
return err;
|
||||
}
|
||||
return 0;
|
||||
|
|
|
@ -2728,7 +2728,7 @@ static void __devexit e100_remove(struct pci_dev *pdev)
|
|||
#define E100_82552_SMARTSPEED 0x14 /* SmartSpeed Ctrl register */
|
||||
#define E100_82552_REV_ANEG 0x0200 /* Reverse auto-negotiation */
|
||||
#define E100_82552_ANEG_NOW 0x0400 /* Auto-negotiate now */
|
||||
static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
static void __e100_shutdown(struct pci_dev *pdev, bool *enable_wake)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
struct nic *nic = netdev_priv(netdev);
|
||||
|
@ -2749,19 +2749,32 @@ static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
|
|||
E100_82552_SMARTSPEED, smartspeed |
|
||||
E100_82552_REV_ANEG | E100_82552_ANEG_NOW);
|
||||
}
|
||||
if (pci_enable_wake(pdev, PCI_D3cold, true))
|
||||
pci_enable_wake(pdev, PCI_D3hot, true);
|
||||
*enable_wake = true;
|
||||
} else {
|
||||
pci_enable_wake(pdev, PCI_D3hot, false);
|
||||
*enable_wake = false;
|
||||
}
|
||||
|
||||
pci_disable_device(pdev);
|
||||
pci_set_power_state(pdev, PCI_D3hot);
|
||||
}
|
||||
|
||||
return 0;
|
||||
static int __e100_power_off(struct pci_dev *pdev, bool wake)
|
||||
{
|
||||
if (wake) {
|
||||
return pci_prepare_to_sleep(pdev);
|
||||
} else {
|
||||
pci_wake_from_d3(pdev, false);
|
||||
return pci_set_power_state(pdev, PCI_D3hot);
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef CONFIG_PM
|
||||
static int e100_suspend(struct pci_dev *pdev, pm_message_t state)
|
||||
{
|
||||
bool wake;
|
||||
__e100_shutdown(pdev, &wake);
|
||||
return __e100_power_off(pdev, wake);
|
||||
}
|
||||
|
||||
static int e100_resume(struct pci_dev *pdev)
|
||||
{
|
||||
struct net_device *netdev = pci_get_drvdata(pdev);
|
||||
|
@ -2792,7 +2805,10 @@ static int e100_resume(struct pci_dev *pdev)
|
|||
|
||||
static void e100_shutdown(struct pci_dev *pdev)
|
||||
{
|
||||
e100_suspend(pdev, PMSG_SUSPEND);
|
||||
bool wake;
|
||||
__e100_shutdown(pdev, &wake);
|
||||
if (system_state == SYSTEM_POWER_OFF)
|
||||
__e100_power_off(pdev, wake);
|
||||
}
|
||||
|
||||
/* ------------------ PCI Error Recovery infrastructure -------------- */
|
||||
|
|
|
@ -1880,6 +1880,7 @@ static void nv_init_tx(struct net_device *dev)
|
|||
np->tx_pkts_in_progress = 0;
|
||||
np->tx_change_owner = NULL;
|
||||
np->tx_end_flip = NULL;
|
||||
np->tx_stop = 0;
|
||||
|
||||
for (i = 0; i < np->tx_ring_size; i++) {
|
||||
if (!nv_optimized(np)) {
|
||||
|
@ -2530,6 +2531,8 @@ static void nv_tx_timeout(struct net_device *dev)
|
|||
struct fe_priv *np = netdev_priv(dev);
|
||||
u8 __iomem *base = get_hwbase(dev);
|
||||
u32 status;
|
||||
union ring_type put_tx;
|
||||
int saved_tx_limit;
|
||||
|
||||
if (np->msi_flags & NV_MSI_X_ENABLED)
|
||||
status = readl(base + NvRegMSIXIrqStatus) & NVREG_IRQSTAT_MASK;
|
||||
|
@ -2589,24 +2592,32 @@ static void nv_tx_timeout(struct net_device *dev)
|
|||
/* 1) stop tx engine */
|
||||
nv_stop_tx(dev);
|
||||
|
||||
/* 2) check that the packets were not sent already: */
|
||||
/* 2) complete any outstanding tx and do not give HW any limited tx pkts */
|
||||
saved_tx_limit = np->tx_limit;
|
||||
np->tx_limit = 0; /* prevent giving HW any limited pkts */
|
||||
np->tx_stop = 0; /* prevent waking tx queue */
|
||||
if (!nv_optimized(np))
|
||||
nv_tx_done(dev, np->tx_ring_size);
|
||||
else
|
||||
nv_tx_done_optimized(dev, np->tx_ring_size);
|
||||
|
||||
/* 3) if there are dead entries: clear everything */
|
||||
if (np->get_tx_ctx != np->put_tx_ctx) {
|
||||
printk(KERN_DEBUG "%s: tx_timeout: dead entries!\n", dev->name);
|
||||
nv_drain_tx(dev);
|
||||
nv_init_tx(dev);
|
||||
setup_hw_rings(dev, NV_SETUP_TX_RING);
|
||||
}
|
||||
/* save current HW postion */
|
||||
if (np->tx_change_owner)
|
||||
put_tx.ex = np->tx_change_owner->first_tx_desc;
|
||||
else
|
||||
put_tx = np->put_tx;
|
||||
|
||||
netif_wake_queue(dev);
|
||||
/* 3) clear all tx state */
|
||||
nv_drain_tx(dev);
|
||||
nv_init_tx(dev);
|
||||
|
||||
/* 4) restart tx engine */
|
||||
/* 4) restore state to current HW position */
|
||||
np->get_tx = np->put_tx = put_tx;
|
||||
np->tx_limit = saved_tx_limit;
|
||||
|
||||
/* 5) restart tx engine */
|
||||
nv_start_tx(dev);
|
||||
netif_wake_queue(dev);
|
||||
spin_unlock_irq(&np->lock);
|
||||
}
|
||||
|
||||
|
|
|
@ -50,7 +50,6 @@ static u16 ixgbe_calc_eeprom_checksum(struct ixgbe_hw *hw);
|
|||
static void ixgbe_enable_rar(struct ixgbe_hw *hw, u32 index);
|
||||
static void ixgbe_disable_rar(struct ixgbe_hw *hw, u32 index);
|
||||
static s32 ixgbe_mta_vector(struct ixgbe_hw *hw, u8 *mc_addr);
|
||||
static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr);
|
||||
static void ixgbe_add_uc_addr(struct ixgbe_hw *hw, u8 *addr, u32 vmdq);
|
||||
|
||||
/**
|
||||
|
@ -1377,8 +1376,7 @@ s32 ixgbe_update_uc_addr_list_generic(struct ixgbe_hw *hw, u8 *addr_list,
|
|||
* Clear accounting of old secondary address list,
|
||||
* don't count RAR[0]
|
||||
*/
|
||||
uc_addr_in_use = hw->addr_ctrl.rar_used_count -
|
||||
hw->addr_ctrl.mc_addr_in_rar_count - 1;
|
||||
uc_addr_in_use = hw->addr_ctrl.rar_used_count - 1;
|
||||
hw->addr_ctrl.rar_used_count -= uc_addr_in_use;
|
||||
hw->addr_ctrl.overflow_promisc = 0;
|
||||
|
||||
|
@ -1492,40 +1490,6 @@ static void ixgbe_set_mta(struct ixgbe_hw *hw, u8 *mc_addr)
|
|||
IXGBE_WRITE_REG(hw, IXGBE_MTA(vector_reg), mta_reg);
|
||||
}
|
||||
|
||||
/**
|
||||
* ixgbe_add_mc_addr - Adds a multicast address.
|
||||
* @hw: pointer to hardware structure
|
||||
* @mc_addr: new multicast address
|
||||
*
|
||||
* Adds it to unused receive address register or to the multicast table.
|
||||
**/
|
||||
static void ixgbe_add_mc_addr(struct ixgbe_hw *hw, u8 *mc_addr)
|
||||
{
|
||||
u32 rar_entries = hw->mac.num_rar_entries;
|
||||
u32 rar;
|
||||
|
||||
hw_dbg(hw, " MC Addr =%.2X %.2X %.2X %.2X %.2X %.2X\n",
|
||||
mc_addr[0], mc_addr[1], mc_addr[2],
|
||||
mc_addr[3], mc_addr[4], mc_addr[5]);
|
||||
|
||||
/*
|
||||
* Place this multicast address in the RAR if there is room,
|
||||
* else put it in the MTA
|
||||
*/
|
||||
if (hw->addr_ctrl.rar_used_count < rar_entries) {
|
||||
/* use RAR from the end up for multicast */
|
||||
rar = rar_entries - hw->addr_ctrl.mc_addr_in_rar_count - 1;
|
||||
hw->mac.ops.set_rar(hw, rar, mc_addr, 0, IXGBE_RAH_AV);
|
||||
hw_dbg(hw, "Added a multicast address to RAR[%d]\n", rar);
|
||||
hw->addr_ctrl.rar_used_count++;
|
||||
hw->addr_ctrl.mc_addr_in_rar_count++;
|
||||
} else {
|
||||
ixgbe_set_mta(hw, mc_addr);
|
||||
}
|
||||
|
||||
hw_dbg(hw, "ixgbe_add_mc_addr Complete\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* ixgbe_update_mc_addr_list_generic - Updates MAC list of multicast addresses
|
||||
* @hw: pointer to hardware structure
|
||||
|
@ -1542,7 +1506,6 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
|
|||
u32 mc_addr_count, ixgbe_mc_addr_itr next)
|
||||
{
|
||||
u32 i;
|
||||
u32 rar_entries = hw->mac.num_rar_entries;
|
||||
u32 vmdq;
|
||||
|
||||
/*
|
||||
|
@ -1550,18 +1513,8 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
|
|||
* use.
|
||||
*/
|
||||
hw->addr_ctrl.num_mc_addrs = mc_addr_count;
|
||||
hw->addr_ctrl.rar_used_count -= hw->addr_ctrl.mc_addr_in_rar_count;
|
||||
hw->addr_ctrl.mc_addr_in_rar_count = 0;
|
||||
hw->addr_ctrl.mta_in_use = 0;
|
||||
|
||||
/* Zero out the other receive addresses. */
|
||||
hw_dbg(hw, "Clearing RAR[%d-%d]\n", hw->addr_ctrl.rar_used_count,
|
||||
rar_entries - 1);
|
||||
for (i = hw->addr_ctrl.rar_used_count; i < rar_entries; i++) {
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAL(i), 0);
|
||||
IXGBE_WRITE_REG(hw, IXGBE_RAH(i), 0);
|
||||
}
|
||||
|
||||
/* Clear the MTA */
|
||||
hw_dbg(hw, " Clearing MTA\n");
|
||||
for (i = 0; i < hw->mac.mcft_size; i++)
|
||||
|
@ -1570,7 +1523,7 @@ s32 ixgbe_update_mc_addr_list_generic(struct ixgbe_hw *hw, u8 *mc_addr_list,
|
|||
/* Add the new addresses */
|
||||
for (i = 0; i < mc_addr_count; i++) {
|
||||
hw_dbg(hw, " Adding the multicast addresses:\n");
|
||||
ixgbe_add_mc_addr(hw, next(hw, &mc_addr_list, &vmdq));
|
||||
ixgbe_set_mta(hw, next(hw, &mc_addr_list, &vmdq));
|
||||
}
|
||||
|
||||
/* Enable mta */
|
||||
|
|
|
@ -3646,6 +3646,8 @@ static int ixgbe_resume(struct pci_dev *pdev)
|
|||
|
||||
ixgbe_reset(adapter);
|
||||
|
||||
IXGBE_WRITE_REG(&adapter->hw, IXGBE_WUS, ~0);
|
||||
|
||||
if (netif_running(netdev)) {
|
||||
err = ixgbe_open(adapter->netdev);
|
||||
if (err)
|
||||
|
@ -4575,7 +4577,6 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
|||
const struct ixgbe_info *ii = ixgbe_info_tbl[ent->driver_data];
|
||||
static int cards_found;
|
||||
int i, err, pci_using_dac;
|
||||
u16 pm_value = 0;
|
||||
u32 part_num, eec;
|
||||
|
||||
err = pci_enable_device(pdev);
|
||||
|
@ -4763,11 +4764,8 @@ static int __devinit ixgbe_probe(struct pci_dev *pdev,
|
|||
|
||||
switch (pdev->device) {
|
||||
case IXGBE_DEV_ID_82599_KX4:
|
||||
#define IXGBE_PCIE_PMCSR 0x44
|
||||
adapter->wol = IXGBE_WUFC_MAG;
|
||||
pci_read_config_word(pdev, IXGBE_PCIE_PMCSR, &pm_value);
|
||||
pci_write_config_word(pdev, IXGBE_PCIE_PMCSR,
|
||||
(pm_value | (1 << 8)));
|
||||
adapter->wol = (IXGBE_WUFC_MAG | IXGBE_WUFC_EX |
|
||||
IXGBE_WUFC_MC | IXGBE_WUFC_BC);
|
||||
break;
|
||||
default:
|
||||
adapter->wol = 0;
|
||||
|
|
|
@ -583,7 +583,7 @@ int mlx4_en_start_port(struct net_device *dev)
|
|||
err = mlx4_en_activate_cq(priv, cq);
|
||||
if (err) {
|
||||
mlx4_err(mdev, "Failed activating Rx CQ\n");
|
||||
goto rx_err;
|
||||
goto cq_err;
|
||||
}
|
||||
for (j = 0; j < cq->size; j++)
|
||||
cq->buf[j].owner_sr_opcode = MLX4_CQE_OWNER_MASK;
|
||||
|
|
|
@ -610,6 +610,10 @@ static struct sk_buff *mlx4_en_rx_skb(struct mlx4_en_priv *priv,
|
|||
used_frags = mlx4_en_complete_rx_desc(priv, rx_desc, skb_frags,
|
||||
skb_shinfo(skb)->frags,
|
||||
page_alloc, length);
|
||||
if (unlikely(!used_frags)) {
|
||||
kfree_skb(skb);
|
||||
return NULL;
|
||||
}
|
||||
skb_shinfo(skb)->nr_frags = used_frags;
|
||||
|
||||
/* Copy headers into the skb linear buffer */
|
||||
|
|
|
@ -976,7 +976,7 @@ static void mlx4_enable_msi_x(struct mlx4_dev *dev)
|
|||
nreq = err;
|
||||
goto retry;
|
||||
}
|
||||
|
||||
kfree(entries);
|
||||
goto no_msi;
|
||||
}
|
||||
|
||||
|
|
|
@ -210,14 +210,11 @@ rx_drop:
|
|||
|
||||
static struct net_device_stats *veth_get_stats(struct net_device *dev)
|
||||
{
|
||||
struct veth_priv *priv;
|
||||
struct net_device_stats *dev_stats;
|
||||
int cpu;
|
||||
struct veth_priv *priv = netdev_priv(dev);
|
||||
struct net_device_stats *dev_stats = &dev->stats;
|
||||
unsigned int cpu;
|
||||
struct veth_net_stats *stats;
|
||||
|
||||
priv = netdev_priv(dev);
|
||||
dev_stats = &dev->stats;
|
||||
|
||||
dev_stats->rx_packets = 0;
|
||||
dev_stats->tx_packets = 0;
|
||||
dev_stats->rx_bytes = 0;
|
||||
|
@ -225,16 +222,17 @@ static struct net_device_stats *veth_get_stats(struct net_device *dev)
|
|||
dev_stats->tx_dropped = 0;
|
||||
dev_stats->rx_dropped = 0;
|
||||
|
||||
for_each_online_cpu(cpu) {
|
||||
stats = per_cpu_ptr(priv->stats, cpu);
|
||||
if (priv->stats)
|
||||
for_each_online_cpu(cpu) {
|
||||
stats = per_cpu_ptr(priv->stats, cpu);
|
||||
|
||||
dev_stats->rx_packets += stats->rx_packets;
|
||||
dev_stats->tx_packets += stats->tx_packets;
|
||||
dev_stats->rx_bytes += stats->rx_bytes;
|
||||
dev_stats->tx_bytes += stats->tx_bytes;
|
||||
dev_stats->tx_dropped += stats->tx_dropped;
|
||||
dev_stats->rx_dropped += stats->rx_dropped;
|
||||
}
|
||||
dev_stats->rx_packets += stats->rx_packets;
|
||||
dev_stats->tx_packets += stats->tx_packets;
|
||||
dev_stats->rx_bytes += stats->rx_bytes;
|
||||
dev_stats->tx_bytes += stats->tx_bytes;
|
||||
dev_stats->tx_dropped += stats->tx_dropped;
|
||||
dev_stats->rx_dropped += stats->rx_dropped;
|
||||
}
|
||||
|
||||
return dev_stats;
|
||||
}
|
||||
|
@ -261,6 +259,8 @@ static int veth_close(struct net_device *dev)
|
|||
netif_carrier_off(dev);
|
||||
netif_carrier_off(priv->peer);
|
||||
|
||||
free_percpu(priv->stats);
|
||||
priv->stats = NULL;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -291,15 +291,6 @@ static int veth_dev_init(struct net_device *dev)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static void veth_dev_free(struct net_device *dev)
|
||||
{
|
||||
struct veth_priv *priv;
|
||||
|
||||
priv = netdev_priv(dev);
|
||||
free_percpu(priv->stats);
|
||||
free_netdev(dev);
|
||||
}
|
||||
|
||||
static const struct net_device_ops veth_netdev_ops = {
|
||||
.ndo_init = veth_dev_init,
|
||||
.ndo_open = veth_open,
|
||||
|
@ -317,7 +308,7 @@ static void veth_setup(struct net_device *dev)
|
|||
dev->netdev_ops = &veth_netdev_ops;
|
||||
dev->ethtool_ops = &veth_ethtool_ops;
|
||||
dev->features |= NETIF_F_LLTX;
|
||||
dev->destructor = veth_dev_free;
|
||||
dev->destructor = free_netdev;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -87,8 +87,8 @@ EXPORT_SYMBOL(pci_read_vpd);
|
|||
* pci_write_vpd - Write entry to Vital Product Data
|
||||
* @dev: pci device struct
|
||||
* @pos: offset in vpd space
|
||||
* @count: number of bytes to read
|
||||
* @val: value to write
|
||||
* @count: number of bytes to write
|
||||
* @buf: buffer containing write data
|
||||
*
|
||||
*/
|
||||
ssize_t pci_write_vpd(struct pci_dev *dev, loff_t pos, size_t count, const void *buf)
|
||||
|
|
|
@ -158,6 +158,7 @@ int ht_create_irq(struct pci_dev *dev, int idx)
|
|||
|
||||
/**
|
||||
* ht_destroy_irq - destroy an irq created with ht_create_irq
|
||||
* @irq: irq to be destroyed
|
||||
*
|
||||
* This reverses ht_create_irq removing the specified irq from
|
||||
* existence. The irq should be free before this happens.
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue