sparc64: expand LDC interface
Add the following LDC APIs which are planned to be used by LDC clients in the future: - ldc_set_state: Sets given LDC channel to given state - ldc_mode: Returns the mode of given LDC channel - ldc_print: Prints info about given LDC channel - ldc_rx_reset: Reset the RX queue of given LDC channel Signed-off-by: Jagannathan Raman <jag.raman@oracle.com> Reviewed-by: Aaron Young <aaron.young@oracle.com> Reviewed-by: Alexandre Chartre <alexandre.chartre@oracle.com> Reviewed-by: Bijan Mottahedeh <bijan.mottahedeh@oracle.com> Reviewed-by: Liam Merwick <liam.merwick@oracle.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:

committed by
David S. Miller

parent
95c4629d92
commit
85762a65c1
@@ -48,6 +48,8 @@ struct ldc_channel_config {
|
||||
#define LDC_STATE_READY 0x03
|
||||
#define LDC_STATE_CONNECTED 0x04
|
||||
|
||||
#define LDC_PACKET_SIZE 64
|
||||
|
||||
struct ldc_channel;
|
||||
|
||||
/* Allocate state for a channel. */
|
||||
@@ -72,6 +74,12 @@ int ldc_connect(struct ldc_channel *lp);
|
||||
int ldc_disconnect(struct ldc_channel *lp);
|
||||
|
||||
int ldc_state(struct ldc_channel *lp);
|
||||
void ldc_set_state(struct ldc_channel *lp, u8 state);
|
||||
int ldc_mode(struct ldc_channel *lp);
|
||||
void __ldc_print(struct ldc_channel *lp, const char *caller);
|
||||
int ldc_rx_reset(struct ldc_channel *lp);
|
||||
|
||||
#define ldc_print(chan) __ldc_print(chan, __func__)
|
||||
|
||||
/* Read and write operations. Only valid when the link is up. */
|
||||
int ldc_write(struct ldc_channel *lp, const void *buf,
|
||||
|
Reference in New Issue
Block a user