Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db98812f authored by Ron Mercer's avatar Ron Mercer Committed by David S. Miller
Browse files

qlge: Move reset logic into asic_reset_worker func.



Get rid of extraneous ql_cycle_adapter.  It's only called from the one
place.

Signed-off-by: default avatarRon Mercer <ron.mercer@qlogic.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1a77733c
Loading
Loading
Loading
Loading
+18 −23
Original line number Diff line number Diff line
@@ -3263,28 +3263,6 @@ static int ql_adapter_up(struct ql_adapter *qdev)
	return err;
}

static int ql_cycle_adapter(struct ql_adapter *qdev)
{
	int status;

	status = ql_adapter_down(qdev);
	if (status)
		goto error;

	status = ql_adapter_up(qdev);
	if (status)
		goto error;

	return status;
error:
	QPRINTK(qdev, IFUP, ALERT,
		"Driver up/down cycle failed, closing device\n");
	rtnl_lock();
	dev_close(qdev->ndev);
	rtnl_unlock();
	return status;
}

static void ql_release_adapter_resources(struct ql_adapter *qdev)
{
	ql_free_mem_resources(qdev);
@@ -3617,7 +3595,24 @@ static void ql_asic_reset_work(struct work_struct *work)
{
	struct ql_adapter *qdev =
	    container_of(work, struct ql_adapter, asic_reset_work.work);
	ql_cycle_adapter(qdev);
	int status;

	status = ql_adapter_down(qdev);
	if (status)
		goto error;

	status = ql_adapter_up(qdev);
	if (status)
		goto error;

	return;
error:
	QPRINTK(qdev, IFUP, ALERT,
		"Driver up/down cycle failed, closing device\n");
	rtnl_lock();
	set_bit(QL_ADAPTER_UP, &qdev->flags);
	dev_close(qdev->ndev);
	rtnl_unlock();
}

static struct nic_operations qla8012_nic_ops = {