int vnic_dev_hang_reset_done(struct vnic_dev *vdev, int *done) { u64 a0 = 0, a1 = 0; int wait = 1000; int err; *done = 0; err = vnic_dev_cmd(vdev, CMD_HANG_RESET_STATUS, &a0, &a1, wait); if (err) { if (err == ERR_ECMDUNKNOWN) return vnic_dev_soft_reset_done(vdev, done); return err; } *done = (a0 == 0); return 0; }
int vnic_dev_hang_reset_done(struct vnic_dev *vdev, int *done) { u64 a0 = 0, a1 = 0; int wait = 1000; int err; *done = 0; if (vnic_dev_capable(vdev, CMD_HANG_RESET_STATUS)) { err = vnic_dev_cmd(vdev, CMD_HANG_RESET_STATUS, &a0, &a1, wait); if (err) return err; } else { return vnic_dev_soft_reset_done(vdev, done); } *done = (a0 == 0); return 0; }