Merge branch 'timers-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / net / qlge / qlge_mpi.c
index 3bd60a4..6685bd9 100644 (file)
@@ -141,7 +141,7 @@ end:
 /* We are being asked by firmware to accept
  * a change to the port.  This is only
  * a change to max frame sizes (Tx/Rx), pause
- * paramters, or loopback mode. We wake up a worker
+ * parameters, or loopback mode. We wake up a worker
  * to handler processing this since a mailbox command
  * will need to be sent to ACK the request.
  */
@@ -238,7 +238,7 @@ static void ql_link_up(struct ql_adapter *qdev, struct mbox_params *mbcp)
                                &qdev->mpi_port_cfg_work, 0);
        }
 
-       netif_carrier_on(qdev->ndev);
+       ql_link_on(qdev);
 }
 
 static void ql_link_down(struct ql_adapter *qdev, struct mbox_params *mbcp)
@@ -251,7 +251,7 @@ static void ql_link_down(struct ql_adapter *qdev, struct mbox_params *mbcp)
        if (status)
                QPRINTK(qdev, DRV, ERR, "Link down AEN broken!\n");
 
-       netif_carrier_off(qdev->ndev);
+       ql_link_off(qdev);
 }
 
 static int ql_sfp_in(struct ql_adapter *qdev, struct mbox_params *mbcp)
@@ -371,7 +371,7 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
        /* We are being asked by firmware to accept
         * a change to the port.  This is only
         * a change to max frame sizes (Tx/Rx), pause
-        * paramters, or loopback mode.
+        * parameters, or loopback mode.
         */
        case AEN_IDC_REQ:
                status = ql_idc_req_aen(qdev);
@@ -380,7 +380,7 @@ static int ql_mpi_handler(struct ql_adapter *qdev, struct mbox_params *mbcp)
        /* Process and inbound IDC event.
         * This will happen when we're trying to
         * change tx/rx max frame size, change pause
-        * paramters or loopback mode.
+        * parameters or loopback mode.
         */
        case AEN_IDC_CMPLT:
        case AEN_IDC_EXT:
@@ -547,6 +547,40 @@ end:
        return status;
 }
 
+
+/* Get MPI firmware version. This will be used for
+ * driver banner and for ethtool info.
+ * Returns zero on success.
+ */
+int ql_mb_about_fw(struct ql_adapter *qdev)
+{
+       struct mbox_params mbc;
+       struct mbox_params *mbcp = &mbc;
+       int status = 0;
+
+       memset(mbcp, 0, sizeof(struct mbox_params));
+
+       mbcp->in_count = 1;
+       mbcp->out_count = 3;
+
+       mbcp->mbox_in[0] = MB_CMD_ABOUT_FW;
+
+       status = ql_mailbox_command(qdev, mbcp);
+       if (status)
+               return status;
+
+       if (mbcp->mbox_out[0] != MB_CMD_STS_GOOD) {
+               QPRINTK(qdev, DRV, ERR,
+                       "Failed about firmware command\n");
+               status = -EIO;
+       }
+
+       /* Store the firmware version */
+       qdev->fw_rev_id = mbcp->mbox_out[1];
+
+       return status;
+}
+
 /* Get functional state for MPI firmware.
  * Returns zero on success.
  */
@@ -815,7 +849,7 @@ void ql_mpi_idc_work(struct work_struct *work)
        case MB_CMD_PORT_RESET:
        case MB_CMD_SET_PORT_CFG:
        case MB_CMD_STOP_FW:
-               netif_carrier_off(qdev->ndev);
+               ql_link_off(qdev);
                /* Signal the resulting link up AEN
                 * that the frame routing and mac addr
                 * needs to be set.