diff options
author | Taku Izumi <izumi.taku@jp.fujitsu.com> | 2015-08-21 17:29:23 +0900 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-08-24 14:06:34 -0700 |
commit | e5d486dcaa45dd365970c09395ae24df5a0e3f77 (patch) | |
tree | 237e68516fdbf7e3276c2524508397f9b0dbc31a /drivers/net/fjes/fjes_hw.h | |
parent | 7950e6c5da55715debef9fa06b5ac87fb3eb4355 (diff) | |
download | op-kernel-dev-e5d486dcaa45dd365970c09395ae24df5a0e3f77.zip op-kernel-dev-e5d486dcaa45dd365970c09395ae24df5a0e3f77.tar.gz |
fjes: net_device_ops.ndo_open and .ndo_stop
This patch adds net_device_ops.ndo_open and .ndo_stop
callback. These function is called when network device
activation and deactivation.
Signed-off-by: Taku Izumi <izumi.taku@jp.fujitsu.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/fjes/fjes_hw.h')
-rw-r--r-- | drivers/net/fjes/fjes_hw.h | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/drivers/net/fjes/fjes_hw.h b/drivers/net/fjes/fjes_hw.h index 2e750e9..9b8df55 100644 --- a/drivers/net/fjes/fjes_hw.h +++ b/drivers/net/fjes/fjes_hw.h @@ -36,6 +36,7 @@ struct fjes_hw; #define FJES_DEVICE_RESET_TIMEOUT ((17 + 1) * 3) /* sec */ #define FJES_COMMAND_REQ_TIMEOUT (5 + 1) /* sec */ #define FJES_COMMAND_REQ_BUFF_TIMEOUT (8 * 3) /* sec */ +#define FJES_COMMAND_EPSTOP_WAIT_TIMEOUT (1) /* sec */ #define FJES_CMD_REQ_ERR_INFO_PARAM (0x0001) #define FJES_CMD_REQ_ERR_INFO_STATUS (0x0002) @@ -43,6 +44,17 @@ struct fjes_hw; #define FJES_CMD_REQ_RES_CODE_NORMAL (0) #define FJES_CMD_REQ_RES_CODE_BUSY (1) +#define FJES_ZONING_STATUS_DISABLE (0x00) +#define FJES_ZONING_STATUS_ENABLE (0x01) +#define FJES_ZONING_STATUS_INVALID (0xFF) + +#define FJES_ZONING_ZONE_TYPE_NONE (0xFF) + +#define FJES_RX_STOP_REQ_NONE (0x0) +#define FJES_RX_STOP_REQ_DONE (0x1) +#define FJES_RX_STOP_REQ_REQUEST (0x2) +#define FJES_RX_POLL_WORK (0x4) + #define EP_BUFFER_SIZE \ (((sizeof(union ep_buffer_info) + (128 * (64 * 1024))) \ / EP_BUFFER_INFO_SIZE) * EP_BUFFER_INFO_SIZE) @@ -77,6 +89,15 @@ struct esmem_frame { u8 frame_data[]; }; +/* EP partner status */ +enum ep_partner_status { + EP_PARTNER_UNSHARE, + EP_PARTNER_SHARED, + EP_PARTNER_WAITING, + EP_PARTNER_COMPLETE, + EP_PARTNER_STATUS_MAX, +}; + /* shared status region */ struct fjes_device_shared_info { int epnum; @@ -278,6 +299,15 @@ int fjes_hw_unregister_buff_addr(struct fjes_hw *, int); void fjes_hw_init_command_registers(struct fjes_hw *, struct fjes_device_command_param *); void fjes_hw_setup_epbuf(struct epbuf_handler *, u8 *, u32); +int fjes_hw_raise_interrupt(struct fjes_hw *, int, enum REG_ICTL_MASK); void fjes_hw_set_irqmask(struct fjes_hw *, enum REG_ICTL_MASK, bool); +u32 fjes_hw_capture_interrupt_status(struct fjes_hw *); +void fjes_hw_raise_epstop(struct fjes_hw *); +int fjes_hw_wait_epstop(struct fjes_hw *); +enum ep_partner_status + fjes_hw_get_partner_ep_status(struct fjes_hw *, int); + +bool fjes_hw_epid_is_same_zone(struct fjes_hw *, int); +int fjes_hw_epid_is_shared(struct fjes_device_shared_info *, int); #endif /* FJES_HW_H_ */ |