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.h File Reference
#include <linux/compiler.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/fs.h>
#include <linux/list.h>
#include <linux/idr.h>
#include <linux/mm_types.h>
#include <linux/rwsem.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <linux/atomic.h>

Go to the source code of this file.

Data Structures

struct  fw_card_driver
 
struct  fw_node
 

Macros

#define PHY_LINK_ACTIVE   0x80
 
#define PHY_CONTENDER   0x40
 
#define PHY_BUS_RESET   0x40
 
#define PHY_EXTENDED_REGISTERS   0xe0
 
#define PHY_BUS_SHORT_RESET   0x40
 
#define PHY_INT_STATUS_BITS   0x3c
 
#define PHY_ENABLE_ACCEL   0x02
 
#define PHY_ENABLE_MULTI   0x01
 
#define PHY_PAGE_SELECT   0xe0
 
#define BANDWIDTH_AVAILABLE_INITIAL   4915
 
#define BROADCAST_CHANNEL_INITIAL   (1 << 31 | 31)
 
#define BROADCAST_CHANNEL_VALID   (1 << 30)
 
#define CSR_STATE_BIT_CMSTR   (1 << 8)
 
#define CSR_STATE_BIT_ABDICATE   (1 << 10)
 
#define TCODE_LINK_INTERNAL   0xe
 
#define TCODE_IS_READ_REQUEST(tcode)   (((tcode) & ~1) == 4)
 
#define TCODE_IS_BLOCK_PACKET(tcode)   (((tcode) & 1) != 0)
 
#define TCODE_IS_LINK_INTERNAL(tcode)   ((tcode) == TCODE_LINK_INTERNAL)
 
#define TCODE_IS_REQUEST(tcode)   (((tcode) & 2) == 0)
 
#define TCODE_IS_RESPONSE(tcode)   (((tcode) & 2) != 0)
 
#define TCODE_HAS_REQUEST_DATA(tcode)   (((tcode) & 12) != 4)
 
#define TCODE_HAS_RESPONSE_DATA(tcode)   (((tcode) & 12) != 0)
 
#define LOCAL_BUS   0xffc0
 
#define FW_PHY_CONFIG_NO_NODE_ID   -1
 
#define FW_PHY_CONFIG_CURRENT_GAP_COUNT   -1
 

Enumerations

enum  {
  FW_NODE_CREATED, FW_NODE_UPDATED, FW_NODE_DESTROYED, FW_NODE_LINK_ON,
  FW_NODE_LINK_OFF, FW_NODE_INITIATED_RESET
}
 

Functions

void fw_card_initialize (struct fw_card *card, const struct fw_card_driver *driver, struct device *device)
 
int fw_card_add (struct fw_card *card, u32 max_receive, u32 link_speed, u64 guid)
 
void fw_core_remove_card (struct fw_card *card)
 
int fw_compute_block_crc (__be32 *block)
 
void fw_schedule_bus_reset (struct fw_card *card, bool delayed, bool short_reset)
 
void fw_schedule_bm_work (struct fw_card *card, unsigned long delay)
 
void fw_device_cdev_update (struct fw_device *device)
 
void fw_device_cdev_remove (struct fw_device *device)
 
void fw_cdev_handle_phy_packet (struct fw_card *card, struct fw_packet *p)
 
struct fw_devicefw_device_get_by_devt (dev_t devt)
 
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)
 
int fw_iso_buffer_alloc (struct fw_iso_buffer *buffer, int page_count)
 
int fw_iso_buffer_map_dma (struct fw_iso_buffer *buffer, struct fw_card *card, enum dma_data_direction direction)
 
int fw_iso_buffer_map_vma (struct fw_iso_buffer *buffer, struct vm_area_struct *vma)
 
void fw_core_handle_bus_reset (struct fw_card *card, int node_id, int generation, int self_id_count, u32 *self_ids, bool bm_abdicate)
 
void fw_destroy_nodes (struct fw_card *card)
 
void fw_core_handle_request (struct fw_card *card, struct fw_packet *request)
 
void fw_core_handle_response (struct fw_card *card, struct fw_packet *packet)
 
int fw_get_response_length (struct fw_request *request)
 
void fw_fill_response (struct fw_packet *response, u32 *request_header, int rcode, void *payload, size_t length)
 
void fw_send_phy_config (struct fw_card *card, int node_id, int generation, int gap_count)
 
: Name of the class.

struct class - device classes

: The module owner. : Default attributes of this class. : Default attributes of the devices belong to the class. : Default binary attributes of the devices belong to the class. : The kobject that represents this class and links it into the hierarchy. : Called when a device is added, removed from this class, or a few other things that generate uevents to add the environment variables. : Callback to provide the devtmpfs. : Called to release this class. : Called to release the device. : Used to put the device to sleep mode, usually to a low power state. : Used to bring the device from the sleep mode. : Callbacks so sysfs can detemine namespaces.

 __printf (2, 3) void fw_err(const struct fw_card *card { return 0
 

Variables

const charfmt
 
struct file_operations fw_device_ops
 
struct rw_semaphore fw_device_rwsem
 
struct idr fw_device_idr
 
int fw_cdev_major
 

Macro Definition Documentation

#define BANDWIDTH_AVAILABLE_INITIAL   4915

Definition at line 45 of file core.h.

#define BROADCAST_CHANNEL_INITIAL   (1 << 31 | 31)

Definition at line 46 of file core.h.

#define BROADCAST_CHANNEL_VALID   (1 << 30)

Definition at line 47 of file core.h.

#define CSR_STATE_BIT_ABDICATE   (1 << 10)

Definition at line 50 of file core.h.

#define CSR_STATE_BIT_CMSTR   (1 << 8)

Definition at line 49 of file core.h.

#define FW_PHY_CONFIG_CURRENT_GAP_COUNT   -1

Definition at line 247 of file core.h.

#define FW_PHY_CONFIG_NO_NODE_ID   -1

Definition at line 246 of file core.h.

#define LOCAL_BUS   0xffc0

Definition at line 238 of file core.h.

#define PHY_BUS_RESET   0x40

Definition at line 37 of file core.h.

#define PHY_BUS_SHORT_RESET   0x40

Definition at line 39 of file core.h.

#define PHY_CONTENDER   0x40

Definition at line 36 of file core.h.

#define PHY_ENABLE_ACCEL   0x02

Definition at line 41 of file core.h.

#define PHY_ENABLE_MULTI   0x01

Definition at line 42 of file core.h.

#define PHY_EXTENDED_REGISTERS   0xe0

Definition at line 38 of file core.h.

#define PHY_INT_STATUS_BITS   0x3c

Definition at line 40 of file core.h.

#define PHY_LINK_ACTIVE   0x80

Definition at line 35 of file core.h.

#define PHY_PAGE_SELECT   0xe0

Definition at line 43 of file core.h.

#define TCODE_HAS_REQUEST_DATA (   tcode)    (((tcode) & 12) != 4)

Definition at line 235 of file core.h.

#define TCODE_HAS_RESPONSE_DATA (   tcode)    (((tcode) & 12) != 0)

Definition at line 236 of file core.h.

#define TCODE_IS_BLOCK_PACKET (   tcode)    (((tcode) & 1) != 0)

Definition at line 231 of file core.h.

#define TCODE_IS_LINK_INTERNAL (   tcode)    ((tcode) == TCODE_LINK_INTERNAL)

Definition at line 232 of file core.h.

#define TCODE_IS_READ_REQUEST (   tcode)    (((tcode) & ~1) == 4)

Definition at line 230 of file core.h.

#define TCODE_IS_REQUEST (   tcode)    (((tcode) & 2) == 0)

Definition at line 233 of file core.h.

#define TCODE_IS_RESPONSE (   tcode)    (((tcode) & 2) != 0)

Definition at line 234 of file core.h.

#define TCODE_LINK_INTERNAL   0xe

Definition at line 228 of file core.h.

Enumeration Type Documentation

anonymous enum
Enumerator:
FW_NODE_CREATED 
FW_NODE_UPDATED 
FW_NODE_DESTROYED 
FW_NODE_LINK_ON 
FW_NODE_LINK_OFF 
FW_NODE_INITIATED_RESET 

Definition at line 167 of file core.h.

Function Documentation

struct net_device const char const char const char const char const char const char const char __printf ( ,
 
) const { return 0
inline

Definition at line 273 of file st5481_d.c.

int fw_card_add ( struct fw_card card,
u32  max_receive,
u32  link_speed,
u64  guid 
)

Definition at line 559 of file core-card.c.

void fw_card_initialize ( struct fw_card card,
const struct fw_card_driver driver,
struct device device 
)

Definition at line 527 of file core-card.c.

void fw_cdev_handle_phy_packet ( struct fw_card card,
struct fw_packet p 
)

Definition at line 1574 of file core-cdev.c.

int fw_compute_block_crc ( __be32 block)

Definition at line 56 of file core-card.c.

void fw_core_handle_bus_reset ( struct fw_card card,
int  node_id,
int  generation,
int  self_id_count,
u32 self_ids,
bool  bm_abdicate 
)

Definition at line 519 of file core-topology.c.

void fw_core_handle_request ( struct fw_card card,
struct fw_packet request 
)

Definition at line 909 of file core-transaction.c.

void fw_core_handle_response ( struct fw_card card,
struct fw_packet packet 
)

Definition at line 939 of file core-transaction.c.

void fw_core_remove_card ( struct fw_card card)

Definition at line 681 of file core-card.c.

void fw_destroy_nodes ( struct fw_card card)

Definition at line 390 of file core-topology.c.

void fw_device_cdev_remove ( struct fw_device device)

Definition at line 417 of file core-cdev.c.

void fw_device_cdev_update ( struct fw_device device)

Definition at line 407 of file core-cdev.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_fill_response ( struct fw_packet response,
u32 request_header,
int  rcode,
void payload,
size_t  length 
)

Definition at line 674 of file core-transaction.c.

int fw_get_response_length ( struct fw_request request)

Definition at line 639 of file core-transaction.c.

int fw_iso_buffer_alloc ( struct fw_iso_buffer buffer,
int  page_count 
)

Definition at line 42 of file core-iso.c.

int fw_iso_buffer_map_dma ( struct fw_iso_buffer buffer,
struct fw_card card,
enum dma_data_direction  direction 
)

Definition at line 67 of file core-iso.c.

int fw_iso_buffer_map_vma ( struct fw_iso_buffer buffer,
struct vm_area_struct vma 
)

Definition at line 107 of file core-iso.c.

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

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

void fw_schedule_bm_work ( struct fw_card card,
unsigned long  delay 
)

Definition at line 293 of file core-card.c.

void fw_schedule_bus_reset ( struct fw_card card,
bool  delayed,
bool  short_reset 
)

Definition at line 240 of file core-card.c.

void fw_send_phy_config ( struct fw_card card,
int  node_id,
int  generation,
int  gap_count 
)

Definition at line 455 of file core-transaction.c.

Variable Documentation

Definition at line 30 of file core.h.

int fw_cdev_major

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

struct idr fw_device_idr
struct file_operations fw_device_ops

Definition at line 1808 of file core-cdev.c.

struct rw_semaphore fw_device_rwsem