|
@@ -926,6 +926,35 @@ static void qlcnic_83xx_process_aen(struct qlcnic_adapter *adapter)
|
|
|
spin_unlock_irqrestore(&ahw->mbx_lock, flags);
|
|
|
}
|
|
|
|
|
|
+static void qlcnic_83xx_mbx_poll_work(struct work_struct *work)
|
|
|
+{
|
|
|
+ struct qlcnic_adapter *adapter;
|
|
|
+
|
|
|
+ adapter = container_of(work, struct qlcnic_adapter, mbx_poll_work.work);
|
|
|
+
|
|
|
+ if (!test_bit(__QLCNIC_MBX_POLL_ENABLE, &adapter->state))
|
|
|
+ return;
|
|
|
+
|
|
|
+ qlcnic_83xx_process_aen(adapter);
|
|
|
+ queue_delayed_work(adapter->qlcnic_wq, &adapter->mbx_poll_work,
|
|
|
+ (HZ / 10));
|
|
|
+}
|
|
|
+
|
|
|
+void qlcnic_83xx_enable_mbx_poll(struct qlcnic_adapter *adapter)
|
|
|
+{
|
|
|
+ if (test_and_set_bit(__QLCNIC_MBX_POLL_ENABLE, &adapter->state))
|
|
|
+ return;
|
|
|
+
|
|
|
+ INIT_DELAYED_WORK(&adapter->mbx_poll_work, qlcnic_83xx_mbx_poll_work);
|
|
|
+}
|
|
|
+
|
|
|
+void qlcnic_83xx_disable_mbx_poll(struct qlcnic_adapter *adapter)
|
|
|
+{
|
|
|
+ if (!test_and_clear_bit(__QLCNIC_MBX_POLL_ENABLE, &adapter->state))
|
|
|
+ return;
|
|
|
+ cancel_delayed_work_sync(&adapter->mbx_poll_work);
|
|
|
+}
|
|
|
+
|
|
|
static int qlcnic_83xx_add_rings(struct qlcnic_adapter *adapter)
|
|
|
{
|
|
|
int index, i, err, sds_mbx_size;
|