Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/ntb/ntb.h
Context not available. | |||||
*/ | */ | ||||
void ntb_db_event(device_t ntb, uint32_t vec); | void ntb_db_event(device_t ntb, uint32_t vec); | ||||
/** | |||||
* ntb_port_number() - get the local port number | |||||
* @ntb: NTB device context. | |||||
* | |||||
* Hardware driver returns local port number in compliance with topology. | |||||
* | |||||
* Return: the local port number | |||||
*/ | |||||
int ntb_port_number(device_t ntb); | |||||
/** | |||||
* ntb_port_count() - get the number of peer device ports | |||||
* @ntb: NTB device context. | |||||
* | |||||
* By default hardware driver supports just one peer device. | |||||
* | |||||
* Return: the number of peer ports | |||||
*/ | |||||
int ntb_peer_port_count(device_t ntb); | |||||
/** | |||||
* ntb_peer_port_number() - get the peer port by given index | |||||
* @ntb: NTB device context. | |||||
* @idx: Peer port index (should be zero for now). | |||||
* | |||||
* By default hardware driver supports just one peer device, so this method | |||||
* shall return the corresponding value. | |||||
* | |||||
* Return: the peer device port or an error number | |||||
*/ | |||||
int ntb_peer_port_number(device_t ntb, int pidx); | |||||
/* | |||||
* ntb_peer_port_idx() - get the peer device port index by given port | |||||
* number | |||||
* @ntb: NTB device context. | |||||
* @port: Peer port number | |||||
* | |||||
* By default hardware driver supports just one peer device, so given a | |||||
* valid peer port number, the return value shall be zero. | |||||
* | |||||
* Return: the peer port index or an error number | |||||
*/ | |||||
int ntb_peer_port_idx(device_t ntb, int port); | |||||
mav: I know Linux added those methods, but is there real usage for them? If we add them, we'll need… | |||||
Done Inline Actionsntb_tool (D18819) uses this. That's the reason its been added. Yes I agree that we need default handlers for other hardware drivers. But they need to be implemented in the respective hardware drivers right (or) is there any other approach we can use, as in Linux? rajeshasp: ntb_tool (D18819) uses this. That's the reason its been added. Yes I agree that we need… | |||||
/* | /* | ||||
* ntb_link_is_up() - get the current ntb link state | * ntb_link_is_up() - get the current ntb link state | ||||
* @ntb: NTB device context | * @ntb: NTB device context | ||||
Context not available. |
I know Linux added those methods, but is there real usage for them? If we add them, we'll need either implement them for Intel and PLX or add default handlers, so that callers won't crash.