Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
cpqphp_ctrl.c File Reference
#include <linux/module.h>
#include <linux/kernel.h>
#include <linux/types.h>
#include <linux/slab.h>
#include <linux/workqueue.h>
#include <linux/interrupt.h>
#include <linux/delay.h>
#include <linux/wait.h>
#include <linux/pci.h>
#include <linux/pci_hotplug.h>
#include <linux/kthread.h>
#include "cpqphp.h"

Go to the source code of this file.

Macros

#define WRONG_BUS_FREQUENCY   0x07
 

Functions

int cpqhp_resource_sort_and_combine (struct pci_resource **head)
 
irqreturn_t cpqhp_ctrl_intr (int IRQ, void *data)
 
struct pci_funccpqhp_slot_create (u8 busnumber)
 
struct pci_funccpqhp_slot_find (u8 bus, u8 device, u8 index)
 
int cpqhp_event_start_thread (void)
 
void cpqhp_event_stop_thread (void)
 
void cpqhp_pushbutton_thread (unsigned long slot)
 
int cpqhp_process_SI (struct controller *ctrl, struct pci_func *func)
 
int cpqhp_process_SS (struct controller *ctrl, struct pci_func *func)
 
int cpqhp_hardware_test (struct controller *ctrl, int test_num)
 

Macro Definition Documentation

#define WRONG_BUS_FREQUENCY   0x07

Definition at line 66 of file cpqphp_ctrl.c.

Function Documentation

irqreturn_t cpqhp_ctrl_intr ( int  IRQ,
void data 
)

Definition at line 891 of file cpqphp_ctrl.c.

int cpqhp_event_start_thread ( void  )

Definition at line 1766 of file cpqphp_ctrl.c.

void cpqhp_event_stop_thread ( void  )

Definition at line 1778 of file cpqphp_ctrl.c.

int cpqhp_hardware_test ( struct controller ctrl,
int  test_num 
)

cpqhp_hardware_test - runs hardware tests : target controller : the number written to the "test" file in sysfs.

For hot plug ctrl folks to play with.

Definition at line 2188 of file cpqphp_ctrl.c.

int cpqhp_process_SI ( struct controller ctrl,
struct pci_func func 
)

Definition at line 1989 of file cpqphp_ctrl.c.

int cpqhp_process_SS ( struct controller ctrl,
struct pci_func func 
)

Definition at line 2084 of file cpqphp_ctrl.c.

void cpqhp_pushbutton_thread ( unsigned long  slot)

cpqhp_pushbutton_thread - handle pushbutton events : target slot (struct)

Scheduled procedure to handle blocking stuff for the pushbuttons. Handles all pending events and exits.

Definition at line 1925 of file cpqphp_ctrl.c.

int cpqhp_resource_sort_and_combine ( struct pci_resource **  head)

cpqhp_resource_sort_and_combine - sort nodes by base addresses and clean up : the list to sort and clean up

Description: Sorts all of the nodes in the list in ascending order by their base addresses. Also does garbage collection by combining adjacent nodes.

Returns %0 if success.

Definition at line 827 of file cpqphp_ctrl.c.

struct pci_func* cpqhp_slot_create ( u8  busnumber)
read

cpqhp_slot_create - Creates a node and adds it to the proper bus. : bus where new node is to be located

Returns pointer to the new node or NULL if unsuccessful.

Definition at line 969 of file cpqphp_ctrl.c.

struct pci_func* cpqhp_slot_find ( u8  bus,
u8  device,
u8  index 
)
read

cpqhp_slot_find - Looks for a node by bus, and device, multiple functions accessed : bus to find : device to find : is %0 for first function found, %1 for the second...

Returns pointer to the node if successful, NULL otherwise.

Definition at line 1082 of file cpqphp_ctrl.c.