Commit d73149f5 authored by Scott Feldman's avatar Scott Feldman Committed by David S. Miller

enic: changes to driver/firmware interface

Deprecate some old APIa; change arguments to stats dump all API; add new
interrupt assert API
Signed-off-by: default avatarScott Feldman <scofeldm@cisco.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 9f63a7c6
...@@ -560,6 +560,20 @@ void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr) ...@@ -560,6 +560,20 @@ void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr)
printk(KERN_ERR "Can't del addr [%pM], %d\n", addr, err); printk(KERN_ERR "Can't del addr [%pM], %d\n", addr, err);
} }
int vnic_dev_raise_intr(struct vnic_dev *vdev, u16 intr)
{
u64 a0 = intr, a1 = 0;
int wait = 1000;
int err;
err = vnic_dev_cmd(vdev, CMD_IAR, &a0, &a1, wait);
if (err)
printk(KERN_ERR "Failed to raise INTR[%d], err %d\n",
intr, err);
return err;
}
int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr) int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr)
{ {
u64 a0, a1; u64 a0, a1;
......
...@@ -106,6 +106,7 @@ void vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast, ...@@ -106,6 +106,7 @@ void vnic_dev_packet_filter(struct vnic_dev *vdev, int directed, int multicast,
void vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr); void vnic_dev_add_addr(struct vnic_dev *vdev, u8 *addr);
void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr); void vnic_dev_del_addr(struct vnic_dev *vdev, u8 *addr);
int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr); int vnic_dev_mac_addr(struct vnic_dev *vdev, u8 *mac_addr);
int vnic_dev_raise_intr(struct vnic_dev *vdev, u16 intr);
int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr); int vnic_dev_notify_set(struct vnic_dev *vdev, u16 intr);
void vnic_dev_notify_unset(struct vnic_dev *vdev); void vnic_dev_notify_unset(struct vnic_dev *vdev);
int vnic_dev_link_status(struct vnic_dev *vdev); int vnic_dev_link_status(struct vnic_dev *vdev);
......
...@@ -105,14 +105,6 @@ enum vnic_devcmd_cmd { ...@@ -105,14 +105,6 @@ enum vnic_devcmd_cmd {
CMD_MAC_ADDR = _CMDC(_CMD_DIR_READ, CMD_MAC_ADDR = _CMDC(_CMD_DIR_READ,
_CMD_VTYPE_ENET | _CMD_VTYPE_FC, 9), _CMD_VTYPE_ENET | _CMD_VTYPE_FC, 9),
/* disable/enable promisc mode: (u8)a0=0/1 */
/***** XXX DEPRECATED *****/
CMD_PROMISC_MODE = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 10),
/* disable/enable all-multi mode: (u8)a0=0/1 */
/***** XXX DEPRECATED *****/
CMD_ALLMULTI_MODE = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ENET, 11),
/* add addr from (u48)a0 */ /* add addr from (u48)a0 */
CMD_ADDR_ADD = _CMDCNW(_CMD_DIR_WRITE, CMD_ADDR_ADD = _CMDCNW(_CMD_DIR_WRITE,
_CMD_VTYPE_ENET | _CMD_VTYPE_FC, 12), _CMD_VTYPE_ENET | _CMD_VTYPE_FC, 12),
...@@ -182,7 +174,9 @@ enum vnic_devcmd_cmd { ...@@ -182,7 +174,9 @@ enum vnic_devcmd_cmd {
/* disable virtual link */ /* disable virtual link */
CMD_DISABLE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 29), CMD_DISABLE = _CMDC(_CMD_DIR_NONE, _CMD_VTYPE_ALL, 29),
/* stats dump all vnics on uplink in mem: (u64)a0=paddr (u32)a1=uif */ /* stats dump sum of all vnic stats on same uplink in mem:
* (u64)a0=paddr
* (u16)a1=sizeof stats area */
CMD_STATS_DUMP_ALL = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 30), CMD_STATS_DUMP_ALL = _CMDC(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 30),
/* init status: /* init status:
...@@ -211,7 +205,12 @@ enum vnic_devcmd_cmd { ...@@ -211,7 +205,12 @@ enum vnic_devcmd_cmd {
/* persistent binding info /* persistent binding info
* in: (u64)a0=paddr of arg * in: (u64)a0=paddr of arg
* (u32)a1=CMD_PERBI_XXX */ * (u32)a1=CMD_PERBI_XXX */
CMD_PERBI = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_FC, 37), CMD_PERBI = _CMDC(_CMD_DIR_RW, _CMD_VTYPE_FC, 37),
/* Interrupt Assert Register functionality
* in: (u16)a0=interrupt number to assert
*/
CMD_IAR = _CMDCNW(_CMD_DIR_WRITE, _CMD_VTYPE_ALL, 38),
}; };
/* flags for CMD_OPEN */ /* flags for CMD_OPEN */
...@@ -244,6 +243,7 @@ enum vnic_devcmd_error { ...@@ -244,6 +243,7 @@ enum vnic_devcmd_error {
ERR_ENOMEM = 7, ERR_ENOMEM = 7,
ERR_ETIMEDOUT = 8, ERR_ETIMEDOUT = 8,
ERR_ELINKDOWN = 9, ERR_ELINKDOWN = 9,
ERR_EMAXRES = 10,
}; };
struct vnic_devcmd_fw_info { struct vnic_devcmd_fw_info {
......
...@@ -60,3 +60,8 @@ void vnic_intr_clean(struct vnic_intr *intr) ...@@ -60,3 +60,8 @@ void vnic_intr_clean(struct vnic_intr *intr)
{ {
iowrite32(0, &intr->ctrl->int_credits); iowrite32(0, &intr->ctrl->int_credits);
} }
void vnic_intr_raise(struct vnic_intr *intr)
{
vnic_dev_raise_intr(intr->vdev, (u16)intr->index);
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment