Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Functions
reset.c File Reference
#include <linux/kernel.h>
#include <linux/err.h>
#include <linux/slab.h>
#include <linux/delay.h>
#include <linux/export.h>
#include "uwb-internal.h"

Go to the source code of this file.

Data Structures

struct  uwb_rc_cmd_done_params
 

Functions

const charuwb_rc_strerror (unsigned code)
 
int uwb_rc_cmd_async (struct uwb_rc *rc, const char *cmd_name, struct uwb_rccb *cmd, size_t cmd_size, u8 expected_type, u16 expected_event, uwb_rc_cmd_cb_f cb, void *arg)
 
 EXPORT_SYMBOL_GPL (uwb_rc_cmd_async)
 
ssize_t uwb_rc_cmd (struct uwb_rc *rc, const char *cmd_name, struct uwb_rccb *cmd, size_t cmd_size, struct uwb_rceb *reply, size_t reply_size)
 
 EXPORT_SYMBOL_GPL (uwb_rc_cmd)
 
ssize_t uwb_rc_vcmd (struct uwb_rc *rc, const char *cmd_name, struct uwb_rccb *cmd, size_t cmd_size, u8 expected_type, u16 expected_event, struct uwb_rceb **preply)
 
 EXPORT_SYMBOL_GPL (uwb_rc_vcmd)
 
int uwb_rc_reset (struct uwb_rc *rc)
 
int uwbd_msg_handle_reset (struct uwb_event *evt)
 
void uwb_rc_reset_all (struct uwb_rc *rc)
 
 EXPORT_SYMBOL_GPL (uwb_rc_reset_all)
 
void uwb_rc_pre_reset (struct uwb_rc *rc)
 
 EXPORT_SYMBOL_GPL (uwb_rc_pre_reset)
 
int uwb_rc_post_reset (struct uwb_rc *rc)
 
 EXPORT_SYMBOL_GPL (uwb_rc_post_reset)
 

Function Documentation

EXPORT_SYMBOL_GPL ( uwb_rc_cmd_async  )
EXPORT_SYMBOL_GPL ( uwb_rc_cmd  )
EXPORT_SYMBOL_GPL ( uwb_rc_vcmd  )
EXPORT_SYMBOL_GPL ( uwb_rc_reset_all  )
EXPORT_SYMBOL_GPL ( uwb_rc_pre_reset  )
EXPORT_SYMBOL_GPL ( uwb_rc_post_reset  )
ssize_t uwb_rc_cmd ( struct uwb_rc rc,
const char cmd_name,
struct uwb_rccb cmd,
size_t  cmd_size,
struct uwb_rceb reply,
size_t  reply_size 
)

Generic function for issuing commands to the Radio Control Interface

: UWB Radio Control descriptor : Name of the command being issued (for error messages) : Pointer to rccb structure containing the command; normally you embed this structure as the first member of the full command structure. : Size of the whole command buffer pointed to by . : Pointer to the beginning of the confirmation event buffer. Normally bigger than an 'struct hwarc_rceb'. You need to fill out reply->bEventType and reply->wEvent (in cpu order) as the function will use them to verify the confirmation event. : Size of the reply buffer

The function checks that the length returned in the reply is at least as big as ; if not, it will be deemed an error and -EIO returned.

needs to be referenced

Definition at line 226 of file reset.c.

int uwb_rc_cmd_async ( struct uwb_rc rc,
const char cmd_name,
struct uwb_rccb cmd,
size_t  cmd_size,
u8  expected_type,
u16  expected_event,
uwb_rc_cmd_cb_f  cb,
void arg 
)

Definition at line 71 of file reset.c.

int uwb_rc_post_reset ( struct uwb_rc rc)

Definition at line 376 of file reset.c.

void uwb_rc_pre_reset ( struct uwb_rc rc)

Definition at line 366 of file reset.c.

int uwb_rc_reset ( struct uwb_rc rc)

Reset a UWB Host Controller (and all radio settings)

: Host Controller descriptor

Returns
: 0 if ok, < 0 errno code on error

We put the command on kmalloc'ed memory as some arches cannot do USB from the stack. The reply event is copied from an stage buffer, so it can be in the stack. See WUSB1.0[8.6.2.4] for more details.

Definition at line 290 of file reset.c.

void uwb_rc_reset_all ( struct uwb_rc rc)

uwb_rc_reset_all - request a reset of the radio controller and PALs : the radio controller of the hardware device to be reset.

The full hardware reset of the radio controller and all the PALs will be scheduled.

Definition at line 349 of file reset.c.

const char* uwb_rc_strerror ( unsigned  code)

Return a string matching the given error code

Definition at line 62 of file reset.c.

ssize_t uwb_rc_vcmd ( struct uwb_rc rc,
const char cmd_name,
struct uwb_rccb cmd,
size_t  cmd_size,
u8  expected_type,
u16  expected_event,
struct uwb_rceb **  preply 
)

Generic function for issuing commands to the Radio Control Interface that return an unknown amount of data

: UWB Radio Control descriptor : Name of the command being issued (for error messages) : Pointer to rccb structure containing the command; normally you embed this structure as the first member of the full command structure. : Size of the whole command buffer pointed to by . : Expected type in the return event : Expected event code in the return event : Here a pointer to where the event data is received will be stored. Once done with the data, free with kfree().

The function checks that the length returned in the reply is at least as big as a 'struct uwb_rceb *'; if not, it will be deemed an error and -EIO returned.

needs to be referenced

Definition at line 269 of file reset.c.

int uwbd_msg_handle_reset ( struct uwb_event evt)

Definition at line 322 of file reset.c.