Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
core-device.c File Reference
#include <linux/bug.h>
#include <linux/ctype.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/errno.h>
#include <linux/firewire.h>
#include <linux/firewire-constants.h>
#include <linux/idr.h>
#include <linux/jiffies.h>
#include <linux/kobject.h>
#include <linux/list.h>
#include <linux/mod_devicetable.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/random.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/workqueue.h>
#include <linux/atomic.h>
#include <asm/byteorder.h>
#include "core.h"

Go to the source code of this file.

Data Structures

struct  config_rom_attribute
 

Macros

#define IMMEDIATE_ATTR(name, key)   { __ATTR(name, S_IRUGO, show_immediate, NULL), key }
 
#define TEXT_LEAF_ATTR(name, key)   { __ATTR(name, S_IRUGO, show_text_leaf, NULL), key }
 
#define MAX_CONFIG_ROM_SIZE   256
 
#define MAX_RETRIES   10
 
#define RETRY_DELAY   (3 * HZ)
 
#define INITIAL_DELAY   (HZ / 2)
 
#define SHUTDOWN_DELAY   (2 * HZ)
 

Enumerations

enum  { BC_UNKNOWN = 0, BC_UNIMPLEMENTED, BC_IMPLEMENTED }
 

Functions

void fw_csr_iterator_init (struct fw_csr_iterator *ci, const u32 *p)
 
 EXPORT_SYMBOL (fw_csr_iterator_init)
 
int fw_csr_iterator_next (struct fw_csr_iterator *ci, int *key, int *value)
 
 EXPORT_SYMBOL (fw_csr_iterator_next)
 
int fw_csr_string (const u32 *directory, int key, char *buf, size_t size)
 
 EXPORT_SYMBOL (fw_csr_string)
 
 EXPORT_SYMBOL (fw_bus_type)
 
int fw_device_enable_phys_dma (struct fw_device *device)
 
 EXPORT_SYMBOL (fw_device_enable_phys_dma)
 
 DECLARE_RWSEM (fw_device_rwsem)
 
 DEFINE_IDR (fw_device_idr)
 
struct fw_devicefw_device_get_by_devt (dev_t devt)
 
 EXPORT_SYMBOL (fw_workqueue)
 
int fw_device_set_broadcast_channel (struct device *dev, void *gen)
 
void fw_node_event (struct fw_card *card, struct fw_node *node, int event)
 

Variables

struct bus_type fw_bus_type
 
int fw_cdev_major
 
struct workqueue_structfw_workqueue
 

Macro Definition Documentation

#define IMMEDIATE_ATTR (   name,
  key 
)    { __ATTR(name, S_IRUGO, show_immediate, NULL), key }

Definition at line 266 of file core-device.c.

#define INITIAL_DELAY   (HZ / 2)

Definition at line 777 of file core-device.c.

#define MAX_CONFIG_ROM_SIZE   256

Definition at line 486 of file core-device.c.

#define MAX_RETRIES   10

Definition at line 775 of file core-device.c.

#define RETRY_DELAY   (3 * HZ)

Definition at line 776 of file core-device.c.

#define SHUTDOWN_DELAY   (2 * HZ)

Definition at line 778 of file core-device.c.

#define TEXT_LEAF_ATTR (   name,
  key 
)    { __ATTR(name, S_IRUGO, show_text_leaf, NULL), key }

Definition at line 308 of file core-device.c.

Enumeration Type Documentation

anonymous enum
Enumerator:
BC_UNKNOWN 
BC_UNIMPLEMENTED 
BC_IMPLEMENTED 

Definition at line 915 of file core-device.c.

Function Documentation

DECLARE_RWSEM ( fw_device_rwsem  )
DEFINE_IDR ( fw_device_idr  )
EXPORT_SYMBOL ( fw_csr_iterator_init  )
EXPORT_SYMBOL ( fw_csr_iterator_next  )
EXPORT_SYMBOL ( fw_csr_string  )
EXPORT_SYMBOL ( fw_bus_type  )
EXPORT_SYMBOL ( fw_device_enable_phys_dma  )
EXPORT_SYMBOL ( fw_workqueue  )
void fw_csr_iterator_init ( struct fw_csr_iterator ci,
const u32 p 
)

Definition at line 47 of file core-device.c.

int fw_csr_iterator_next ( struct fw_csr_iterator ci,
int key,
int value 
)

Definition at line 54 of file core-device.c.

int fw_csr_string ( const u32 directory,
int  key,
char buf,
size_t  size 
)

fw_csr_string() - reads a string from the configuration ROM : e.g. root directory or unit directory : the key of the preceding directory entry : where to put the string : size of , in bytes

The string is taken from a minimal ASCII text descriptor leaf after the immediate entry with . The string is zero-terminated. Returns strlen(buf) or a negative error code.

Definition at line 120 of file core-device.c.

int fw_device_enable_phys_dma ( struct fw_device device)

Definition at line 219 of file core-device.c.

struct fw_device* fw_device_get_by_devt ( dev_t  devt)
read

Definition at line 742 of file core-device.c.

int fw_device_set_broadcast_channel ( struct device dev,
void gen 
)

Definition at line 967 of file core-device.c.

void fw_node_event ( struct fw_card card,
struct fw_node node,
int  event 
)

Definition at line 1188 of file core-device.c.

Variable Documentation

struct bus_type fw_bus_type
Initial value:
= {
.name = "firewire",
.match = fw_unit_match,
}

Definition at line 213 of file core-device.c.

int fw_cdev_major

Definition at line 740 of file core-device.c.

struct workqueue_struct* fw_workqueue

Definition at line 755 of file core-device.c.