mirror of
https://github.com/opnsense/src.git
synced 2026-02-20 00:11:07 -05:00
Cleanup unused USB enums.
MFC after: 1 week Sponsored by: NVIDIA Networking
This commit is contained in:
parent
f83f5d5839
commit
65788dae31
1 changed files with 7 additions and 110 deletions
|
|
@ -30,119 +30,16 @@
|
|||
#define _USB_TRANSFER_H_
|
||||
|
||||
/*
|
||||
* Definition of internal USB transfer states:
|
||||
* ===========================================
|
||||
* A few words about USB transfer states:
|
||||
* ======================================
|
||||
*
|
||||
* The main reason there are many USB states is that we are allowed to
|
||||
* cancel USB transfers, then start the USB transfer again and that
|
||||
* this state transaction cannot always be done in a single atomic
|
||||
* operation without blocking the calling thread. One reason for this
|
||||
* is that the USB hardware sometimes needs to wait for DMA
|
||||
* controllers to finish which is done asynchronously and grows the
|
||||
* statemachine.
|
||||
*
|
||||
* When extending the following statemachine there are basically two
|
||||
* things you should think about: Which states should be executed or
|
||||
* modified in case of USB transfer stop and which states should be
|
||||
* executed or modified in case of USB transfer start. Also respect
|
||||
* the "can_cancel_immed" flag which basically tells if you can go
|
||||
* directly from a wait state to the cancelling states.
|
||||
* USB transfers can have multiple states, because they can be
|
||||
* cancelled and started again and this cannot always be done
|
||||
* atomically under a mutex. One reason for this is that the USB
|
||||
* hardware sometimes needs to wait for DMA controllers to finish
|
||||
* which is done asynchronously and grows the statemachine.
|
||||
*/
|
||||
|
||||
enum {
|
||||
/* XFER start execute state */
|
||||
|
||||
/* USB_ST_SETUP = 0 (already defined) */
|
||||
|
||||
/* XFER transferred execute state */
|
||||
|
||||
/* USB_ST_TRANSFERRED = 1 (already defined) */
|
||||
|
||||
/* XFER error execute state */
|
||||
|
||||
/* USB_ST_ERROR = 2 (already defined) */
|
||||
|
||||
/* XFER restart after error execute state */
|
||||
|
||||
USB_ST_RESTART = 8,
|
||||
|
||||
/* XFER transfer idle state */
|
||||
|
||||
USB_ST_WAIT_SETUP,
|
||||
|
||||
/* Other XFER execute states */
|
||||
|
||||
USB_ST_PIPE_OPEN = 16,
|
||||
USB_ST_PIPE_OPEN_ERROR,
|
||||
USB_ST_PIPE_OPEN_RESTART,
|
||||
|
||||
USB_ST_BDMA_LOAD,
|
||||
USB_ST_BDMA_LOAD_ERROR,
|
||||
USB_ST_BDMA_LOAD_RESTART,
|
||||
|
||||
USB_ST_IVAL_DLY,
|
||||
USB_ST_IVAL_DLY_ERROR,
|
||||
USB_ST_IVAL_DLY_RESTART,
|
||||
|
||||
USB_ST_PIPE_STALL,
|
||||
USB_ST_PIPE_STALL_ERROR,
|
||||
USB_ST_PIPE_STALL_RESTART,
|
||||
|
||||
USB_ST_ENTER,
|
||||
USB_ST_ENTER_ERROR,
|
||||
USB_ST_ENTER_RESTART,
|
||||
|
||||
USB_ST_START,
|
||||
USB_ST_START_ERROR,
|
||||
USB_ST_START_RESTART,
|
||||
|
||||
USB_ST_PIPE_CLOSE,
|
||||
USB_ST_PIPE_CLOSE_ERROR,
|
||||
USB_ST_PIPE_CLOSE_RESTART,
|
||||
|
||||
USB_ST_BDMA_DLY,
|
||||
USB_ST_BDMA_DLY_ERROR,
|
||||
USB_ST_BDMA_DLY_RESTART,
|
||||
|
||||
/* XFER transfer wait states */
|
||||
|
||||
USB_ST_WAIT_PIPE_OPEN = 64,
|
||||
USB_ST_WAIT_PIPE_OPEN_ERROR,
|
||||
USB_ST_WAIT_PIPE_OPEN_RESTART,
|
||||
|
||||
USB_ST_WAIT_BDMA_LOAD,
|
||||
USB_ST_WAIT_BDMA_LOAD_ERROR,
|
||||
USB_ST_WAIT_BDMA_LOAD_RESTART,
|
||||
|
||||
USB_ST_WAIT_IVAL_DLY,
|
||||
USB_ST_WAIT_IVAL_DLY_ERROR,
|
||||
USB_ST_WAIT_IVAL_DLY_RESTART,
|
||||
|
||||
USB_ST_WAIT_PIPE_STALL,
|
||||
USB_ST_WAIT_PIPE_STALL_ERROR,
|
||||
USB_ST_WAIT_PIPE_STALL_RESTART,
|
||||
|
||||
USB_ST_WAIT_ENTER,
|
||||
USB_ST_WAIT_ENTER_ERROR,
|
||||
USB_ST_WAIT_ENTER_RESTART,
|
||||
|
||||
USB_ST_WAIT_START,
|
||||
USB_ST_WAIT_START_ERROR,
|
||||
USB_ST_WAIT_START_RESTART,
|
||||
|
||||
USB_ST_WAIT_PIPE_CLOSE,
|
||||
USB_ST_WAIT_PIPE_CLOSE_ERROR,
|
||||
USB_ST_WAIT_PIPE_CLOSE_RESTART,
|
||||
|
||||
USB_ST_WAIT_BDMA_DLY,
|
||||
USB_ST_WAIT_BDMA_DLY_ERROR,
|
||||
USB_ST_WAIT_BDMA_DLY_RESTART,
|
||||
|
||||
USB_ST_WAIT_TRANSFERRED,
|
||||
USB_ST_WAIT_TRANSFERRED_ERROR,
|
||||
USB_ST_WAIT_TRANSFERRED_RESTART,
|
||||
};
|
||||
|
||||
/*
|
||||
* The following structure defines the messages that is used to signal
|
||||
* the "done_p" USB process.
|
||||
|
|
|
|||
Loading…
Reference in a new issue