@@ -871,6 +871,32 @@ static int rsi_init_sdio_interface(struct rsi_hw *adapter,
return status;
}
+static int rsi_sdio_reinit_device(struct rsi_hw *adapter)
+{
+ struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
+ struct sdio_func *pfunction = sdev->pfunction;
+ int ii;
+
+ for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
+ skb_queue_purge(&adapter->priv->tx_queue[ii]);
+
+ /* Initialize device again */
+ sdio_claim_host(pfunction);
+
+ sdio_release_irq(pfunction);
+ rsi_reset_card(pfunction);
+
+ sdio_enable_func(pfunction);
+ rsi_setupcard(adapter);
+ rsi_init_sdio_slave_regs(adapter);
+ sdio_claim_irq(pfunction, rsi_handle_interrupt);
+ rsi_hal_device_init(adapter);
+
+ sdio_release_host(pfunction);
+
+ return 0;
+}
+
static struct rsi_host_intf_ops sdio_host_intf_ops = {
.write_pkt = rsi_sdio_host_intf_write_pkt,
.read_pkt = rsi_sdio_host_intf_read_pkt,
@@ -1281,32 +1307,6 @@ static void rsi_shutdown(struct device *dev)
rsi_dbg(INFO_ZONE, "***** RSI module shut down *****\n");
}
-int rsi_sdio_reinit_device(struct rsi_hw *adapter)
-{
- struct rsi_91x_sdiodev *sdev = adapter->rsi_dev;
- struct sdio_func *pfunction = sdev->pfunction;
- int ii;
-
- for (ii = 0; ii < NUM_SOFT_QUEUES; ii++)
- skb_queue_purge(&adapter->priv->tx_queue[ii]);
-
- /* Initialize device again */
- sdio_claim_host(pfunction);
-
- sdio_release_irq(pfunction);
- rsi_reset_card(pfunction);
-
- sdio_enable_func(pfunction);
- rsi_setupcard(adapter);
- rsi_init_sdio_slave_regs(adapter);
- sdio_claim_irq(pfunction, rsi_handle_interrupt);
- rsi_hal_device_init(adapter);
-
- sdio_release_host(pfunction);
-
- return 0;
-}
-
static int rsi_restore(struct device *dev)
{
struct sdio_func *pfunction = dev_to_sdio_func(dev);
@@ -131,5 +131,4 @@ int rsi_sdio_master_access_msword(struct rsi_hw *adapter, u16 ms_word);
void rsi_sdio_ack_intr(struct rsi_hw *adapter, u8 int_bit);
int rsi_sdio_determine_event_timeout(struct rsi_hw *adapter);
int rsi_sdio_check_buffer_status(struct rsi_hw *adapter, u8 q_num);
-int rsi_sdio_reinit_device(struct rsi_hw *adapter);
#endif