Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
qset.c File Reference
#include <linux/kernel.h>
#include <linux/dma-mapping.h>
#include <linux/slab.h>
#include <linux/uwb/umc.h>
#include <linux/usb.h>
#include "../../wusbcore/wusbhc.h"
#include "whcd.h"

Go to the source code of this file.

Functions

struct whc_qsetqset_alloc (struct whc *whc, gfp_t mem_flags)
 
void qset_clear (struct whc *whc, struct whc_qset *qset)
 
void qset_reset (struct whc *whc, struct whc_qset *qset)
 
struct whc_qsetget_qset (struct whc *whc, struct urb *urb, gfp_t mem_flags)
 
void qset_remove_complete (struct whc *whc, struct whc_qset *qset)
 
enum whc_update qset_add_qtds (struct whc *whc, struct whc_qset *qset)
 
void qset_free_std (struct whc *whc, struct whc_std *std)
 
int qset_add_urb (struct whc *whc, struct whc_qset *qset, struct urb *urb, gfp_t mem_flags)
 
void qset_remove_urb (struct whc *whc, struct whc_qset *qset, struct urb *urb, int status)
 
void process_inactive_qtd (struct whc *whc, struct whc_qset *qset, struct whc_qtd *qtd)
 
void process_halted_qtd (struct whc *whc, struct whc_qset *qset, struct whc_qtd *qtd)
 
void qset_free (struct whc *whc, struct whc_qset *qset)
 
void qset_delete (struct whc *whc, struct whc_qset *qset)
 

Function Documentation

struct whc_qset* get_qset ( struct whc whc,
struct urb urb,
gfp_t  mem_flags 
)
read

get_qset - get the qset for an async endpoint

A new qset is created if one does not already exist.

Definition at line 158 of file qset.c.

void process_halted_qtd ( struct whc whc,
struct whc_qset qset,
struct whc_qtd qtd 
)

process_halted_qtd - process a qset with a halted qtd

Remove all the qTDs for the failed URB and return the failed URB to the USB subsystem. Then remove all other qTDs so the qset can be removed.

FIXME: this is the point where rate adaptation can be done. If a transfer failed because it exceeded the maximum number of retries then it could be reactivated with a slower rate without having to remove the qset.

Definition at line 801 of file qset.c.

void process_inactive_qtd ( struct whc whc,
struct whc_qset qset,
struct whc_qtd qtd 
)

process_inactive_qtd - process an inactive (but not halted) qTD.

Update the urb with the transfer bytes from the qTD, if the urb is completely transferred or (in the case of an IN only) the LPF is set, then the transfer is complete and the urb should be returned to the system.

Definition at line 749 of file qset.c.

enum whc_update qset_add_qtds ( struct whc whc,
struct whc_qset qset 
)

qset_add_qtds - add qTDs for an URB to a qset

Returns true if the list (ASL/PZL) must be updated because (for a WHCI 0.95 controller) an activated qTD was pointed to be iCur.

Definition at line 189 of file qset.c.

int qset_add_urb ( struct whc whc,
struct whc_qset qset,
struct urb urb,
gfp_t  mem_flags 
)

qset_add_urb - add an urb to the qset's queue.

The URB is chopped into sTDs, one for each qTD that will required. At least one qTD (and sTD) is required even if the transfer has no data (e.g., for some control transfers).

Definition at line 635 of file qset.c.

struct whc_qset* qset_alloc ( struct whc whc,
gfp_t  mem_flags 
)
read

Definition at line 28 of file qset.c.

void qset_clear ( struct whc whc,
struct whc_qset qset 
)

qset_clear - clear fields in a qset so it may be reinserted into a schedule.

The sequence number and current window are not cleared (see qset_reset()).

Definition at line 123 of file qset.c.

void qset_delete ( struct whc whc,
struct whc_qset qset 
)

qset_delete - wait for a qset to be unused, then free it.

Definition at line 831 of file qset.c.

void qset_free ( struct whc whc,
struct whc_qset qset 
)

Definition at line 823 of file qset.c.

void qset_free_std ( struct whc whc,
struct whc_std std 
)

qset_free_std - remove an sTD and free it. : the WHCI host controller : the sTD to remove and free.

Definition at line 299 of file qset.c.

void qset_remove_complete ( struct whc whc,
struct whc_qset qset 
)

Definition at line 176 of file qset.c.

void qset_remove_urb ( struct whc whc,
struct whc_qset qset,
struct urb urb,
int  status 
)

qset_remove_urb - remove an URB from the urb queue.

The URB is returned to the USB subsystem.

Definition at line 703 of file qset.c.

void qset_reset ( struct whc whc,
struct whc_qset qset 
)

qset_reset - reset endpoint state in a qset.

Clears the sequence number and current window. This qset must not be in the ASL or PZL.

Definition at line 145 of file qset.c.