Linux Kernel
3.7.1
|
#include <linux/bitops.h>
#include <linux/bug.h>
#include <linux/compiler.h>
#include <linux/delay.h>
#include <linux/device.h>
#include <linux/dma-mapping.h>
#include <linux/firewire.h>
#include <linux/firewire-constants.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/list.h>
#include <linux/mm.h>
#include <linux/module.h>
#include <linux/moduleparam.h>
#include <linux/mutex.h>
#include <linux/pci.h>
#include <linux/pci_ids.h>
#include <linux/slab.h>
#include <linux/spinlock.h>
#include <linux/string.h>
#include <linux/time.h>
#include <linux/vmalloc.h>
#include <linux/workqueue.h>
#include <asm/byteorder.h>
#include <asm/page.h>
#include "core.h"
#include "ohci.h"
Go to the source code of this file.
Data Structures | |
struct | descriptor |
struct | ar_context |
struct | descriptor_buffer |
struct | context |
struct | iso_context |
struct | fw_ohci |
struct | driver_data |
Typedefs | |
typedef int(* | descriptor_callback_t )(struct context *ctx, struct descriptor *d, struct descriptor *last) |
Functions | |
struct descriptor | __attribute__ ((aligned(16))) |
module_param_named (quirks, param_quirks, int, 0644) | |
MODULE_PARM_DESC (quirks,"Chip quirks (default = 0"", nonatomic cycle timer = "__stringify(QUIRK_CYCLE_TIMER)", reset packet generation = "__stringify(QUIRK_RESET_PACKET)", AR/selfID endianess = "__stringify(QUIRK_BE_HEADERS)", no 1394a enhancements = "__stringify(QUIRK_NO_1394A)", disable MSI = "__stringify(QUIRK_NO_MSI)", TI SLLZ059 erratum = "__stringify(QUIRK_TI_SLLZ059)")") | |
module_param_named (debug, param_debug, int, 0644) | |
MODULE_PARM_DESC (debug,"Verbose logging (default = 0"", AT/AR events = "__stringify(OHCI_PARAM_DEBUG_AT_AR)", self-IDs = "__stringify(OHCI_PARAM_DEBUG_SELFIDS)", IRQs = "__stringify(OHCI_PARAM_DEBUG_IRQS)", busReset events = "__stringify(OHCI_PARAM_DEBUG_BUSRESETS)", or a combination, or all = -1)") | |
MODULE_DEVICE_TABLE (pci, pci_table) | |
module_pci_driver (fw_ohci_pci_driver) | |
MODULE_AUTHOR ("Kristian Hoegsberg <[email protected]>") | |
MODULE_DESCRIPTION ("Driver for PCI OHCI IEEE1394 controllers") | |
MODULE_LICENSE ("GPL") | |
MODULE_ALIAS ("ohci1394") | |
Variables | |
__le16 | req_count |
__le16 | control |
__le32 | data_address |
__le32 | branch_address |
__le16 | res_count |
__le16 | transfer_status |
struct ar_context | __attribute__ |
: pointer to a string for the name of this class. | |
class_create - create a struct class structure : pointer to the module that is to "own" this struct class : the lock_class_key for this class; used by mutex lock debugging This is used to create a struct class pointer that can then be used in calls to device_create(). Returns &struct class pointer on success, or ERR_PTR() on error. Note, the pointer created here is to be destroyed when finished by making a call to class_destroy(). |
#define AR_BUFFERS (AR_BUFFERS_MIN >= 2 ? AR_BUFFERS_MIN : 2) |
#define AR_BUFFERS_MIN DIV_ROUND_UP(AR_BUFFER_SIZE, PAGE_SIZE) |
#define AR_WRAPAROUND_PAGES DIV_ROUND_UP(MAX_AR_PACKET_SIZE, PAGE_SIZE) |
#define cond_le32_to_cpu | ( | v | ) | le32_to_cpu(v) |
#define MAX_AR_PACKET_SIZE (16 + MAX_ASYNC_PAYLOAD + 4) |
typedef int(* descriptor_callback_t)(struct context *ctx, struct descriptor *d, struct descriptor *last) |
struct descriptor __attribute__ | ( | (aligned(16)) | ) |
MODULE_ALIAS | ( | "ohci1394" | ) |
MODULE_AUTHOR | ( | "Kristian Hoegsberg <[email protected]>" | ) |
MODULE_DEVICE_TABLE | ( | pci | , |
pci_table | |||
) |
MODULE_LICENSE | ( | "GPL" | ) |
module_param_named | ( | quirks | , |
param_quirks | , | ||
int | , | ||
0644 | |||
) |
MODULE_PARM_DESC | ( | quirks | , |
"Chip quirks (default = 0"", nonatomic cycle timer = "__stringify(QUIRK_CYCLE_TIMER)", reset packet generation = "__stringify(QUIRK_RESET_PACKET)", AR/selfID endianess = "__stringify(QUIRK_BE_HEADERS)", no 1394a enhancements = "__stringify(QUIRK_NO_1394A)", disable MSI = "__stringify(QUIRK_NO_MSI)", TI SLLZ059 erratum = "__stringify(QUIRK_TI_SLLZ059)")" | |||
) |
MODULE_PARM_DESC | ( | debug | , |
"Verbose logging (default = 0"", AT/AR events = "__stringify(OHCI_PARAM_DEBUG_AT_AR)", self-IDs = "__stringify(OHCI_PARAM_DEBUG_SELFIDS)", IRQs = "__stringify(OHCI_PARAM_DEBUG_IRQS)", busReset events = "__stringify(OHCI_PARAM_DEBUG_BUSRESETS)", or a combination, or all = -1)" | |||
) |
module_pci_driver | ( | fw_ohci_pci_driver | ) |
for_each_padev - Iterate over all devices in the tree
: Data to pass to the called function.
This performs a depth-first traversal of the tree, calling the function passed for each node. It calls the function for parents before children.
attribute_container_add_device - see if any container is interested in dev
: device to add attributes to
This function allocates storage for the class device(s) to be attached to dev (one for each matching attribute_container). If no fn is provided, the code will simply register the class device via device_add. If a function is provided, it is expected to add the class device at the appropriate time. One of the things that might be necessary is to allocate and initialise the classdev and then add it a later time. To do this, call this routine for allocation and initialisation and then use attribute_container_device_trigger() to call device_add() on it. Note: after this, the class device contains a reference to dev which is not relinquished until the release of the classdev.
attribute_container_remove_device - make device eligible for removal.
: The generic device
This routine triggers device removal. If fn is NULL, then it is simply done via device_unregister (note that if something still has a reference to the classdev, then the memory occupied will not be freed until the classdev is released). If you want a two phase release: remove from visibility and then delete the device, then you should use this routine with a fn that calls device_del() and then use attribute_container_device_trigger() to do the final put on the classdev.
bus_for_each_dev - device iterator. : bus type. : device to start iterating from. : data for the callback.
Iterate over 's list of devices, and call
Iterate over
device_for_each_child - device child iterator. : parent struct device. : data for the callback.
Iterate over 's child devices, and call
driver_for_each_device - Iterator for devices bound to a driver. : Driver we're iterating. : Device to begin with : Data to pass to the callback.
Iterate over the 's list of devices calling
dpm_for_each_dev - device iterator. : data for the callback.
Iterate over devices in dpm_list, and call
passing it .
starget_for_each_device - helper to walk all devices of a target : target whose devices we want to iterate over. : Opaque passed to each function call.
This traverses over each device of . The devices have a reference that must be released by scsi_host_put when breaking out of the loop.
This traverses over each device of . It does not take a reference on the scsi_device, so the whole loop must be protected by shost->host_lock.
Note: The only reason why drivers would want to use this is because they need to access the device list in irq context. Otherwise you really want to use starget_for_each_device instead.