Example #1
0
static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp)
{
	int status;
	mbcp->out_count = 2;

	status = ql_get_mb_sts(qdev, mbcp);
	if (status) {
		QPRINTK(qdev, DRV, ERR,
			"%s: Could not get mailbox status.\n", __func__);
		return;
	}

	qdev->link_status = mbcp->mbox_out[1];
	QPRINTK(qdev, DRV, ERR, "Link Up.\n");

	/* If we're coming back from an IDC event
	 * then set up the CAM and frame routing.
	 */
	if (test_bit(QL_CAM_RT_SET, &qdev->flags)) {
		status = ql_cam_route_initialize(qdev);
		if (status) {
			QPRINTK(qdev, IFUP, ERR,
			"Failed to init CAM/Routing tables.\n");
			return;
		} else
			clear_bit(QL_CAM_RT_SET, &qdev->flags);
	}

	/* Queue up a worker to check the frame
	 * size information, and fix it if it's not
	 * to our liking.
	 */
	if (!test_bit(QL_PORT_CFG, &qdev->flags)) {
		QPRINTK(qdev, DRV, ERR, "Queue Port Config Worker!\n");
		set_bit(QL_PORT_CFG, &qdev->flags);
		/* Begin polled mode early so
		 * we don't get another interrupt
		 * when we leave mpi_worker dpc.
		 */
		ql_write32(qdev, INTR_MASK, (INTR_MASK_PI << 16));
		queue_delayed_work(qdev->workqueue,
				&qdev->mpi_port_cfg_work, 0);
	}

	ql_link_on(qdev);
}
Example #2
0
static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp)
{
	int status;

	mbcp->out_count = 2;

	status = ql_get_mb_sts(qdev, mbcp);
	if (status) {
		QPRINTK(qdev, DRV, ERR, "Firmware did not initialize!\n");
	} else {
		QPRINTK(qdev, DRV, ERR, "Firmware Revision  = 0x%.08x.\n",
			mbcp->mbox_out[1]);
		status = ql_cam_route_initialize(qdev);
		if (status)
			QPRINTK(qdev, IFUP, ERR,
				"Failed to init CAM/Routing tables.\n");
	}
}
static void ql_init_fw_done(struct ql_adapter *qdev, struct mbox_params *mbcp)
{
    int status;

    mbcp->out_count = 2;

    status = ql_get_mb_sts(qdev, mbcp);
    if (status) {
        netif_err(qdev, drv, qdev->ndev, "Firmware did not initialize!\n");
    } else {
        netif_err(qdev, drv, qdev->ndev, "Firmware Revision  = 0x%.08x.\n",
                  mbcp->mbox_out[1]);
        qdev->fw_rev_id = mbcp->mbox_out[1];
        status = ql_cam_route_initialize(qdev);
        if (status)
            netif_err(qdev, ifup, qdev->ndev,
                      "Failed to init CAM/Routing tables.\n");
    }
}