Commit fdb1e28e authored by Xinming Hu's avatar Xinming Hu Committed by Kalle Valo

mwifiex: fix missing debug messages

Some critical messages are missed until "adapter->dev"
gets initialized in mwifiex_register_dev().
We will use pr_* print message instead of mwifiex_dbg at
those places to resolve the problem.
Signed-off-by: default avatarXinming Hu <huxm@marvell.com>
Signed-off-by: default avatarAmitkumar Karwar <akarwar@marvell.com>
Signed-off-by: default avatarKalle Valo <kvalo@codeaurora.org>
parent 50f85e22
...@@ -2473,49 +2473,43 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter) ...@@ -2473,49 +2473,43 @@ static int mwifiex_pcie_init(struct mwifiex_adapter *adapter)
pci_set_master(pdev); pci_set_master(pdev);
mwifiex_dbg(adapter, INFO, pr_notice("try set_consistent_dma_mask(32)\n");
"try set_consistent_dma_mask(32)\n");
ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32)); ret = pci_set_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) { if (ret) {
mwifiex_dbg(adapter, ERROR, pr_err("set_dma_mask(32) failed\n");
"set_dma_mask(32) failed\n");
goto err_set_dma_mask; goto err_set_dma_mask;
} }
ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32)); ret = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
if (ret) { if (ret) {
mwifiex_dbg(adapter, ERROR, pr_err("set_consistent_dma_mask(64) failed\n");
"set_consistent_dma_mask(64) failed\n");
goto err_set_dma_mask; goto err_set_dma_mask;
} }
ret = pci_request_region(pdev, 0, DRV_NAME); ret = pci_request_region(pdev, 0, DRV_NAME);
if (ret) { if (ret) {
mwifiex_dbg(adapter, ERROR, pr_err("req_reg(0) error\n");
"req_reg(0) error\n");
goto err_req_region0; goto err_req_region0;
} }
card->pci_mmap = pci_iomap(pdev, 0, 0); card->pci_mmap = pci_iomap(pdev, 0, 0);
if (!card->pci_mmap) { if (!card->pci_mmap) {
mwifiex_dbg(adapter, ERROR, "iomap(0) error\n"); pr_err("iomap(0) error\n");
ret = -EIO; ret = -EIO;
goto err_iomap0; goto err_iomap0;
} }
ret = pci_request_region(pdev, 2, DRV_NAME); ret = pci_request_region(pdev, 2, DRV_NAME);
if (ret) { if (ret) {
mwifiex_dbg(adapter, ERROR, "req_reg(2) error\n"); pr_err("req_reg(2) error\n");
goto err_req_region2; goto err_req_region2;
} }
card->pci_mmap1 = pci_iomap(pdev, 2, 0); card->pci_mmap1 = pci_iomap(pdev, 2, 0);
if (!card->pci_mmap1) { if (!card->pci_mmap1) {
mwifiex_dbg(adapter, ERROR, pr_err("iomap(2) error\n");
"iomap(2) error\n");
ret = -EIO; ret = -EIO;
goto err_iomap2; goto err_iomap2;
} }
mwifiex_dbg(adapter, INFO, pr_notice("PCI memory map Virt0: %p PCI memory map Virt2: %p\n",
"PCI memory map Virt0: %p PCI memory map Virt2: %p\n",
card->pci_mmap, card->pci_mmap1); card->pci_mmap, card->pci_mmap1);
card->cmdrsp_buf = NULL; card->cmdrsp_buf = NULL;
...@@ -2635,11 +2629,11 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter) ...@@ -2635,11 +2629,11 @@ static int mwifiex_register_dev(struct mwifiex_adapter *adapter)
/* save adapter pointer in card */ /* save adapter pointer in card */
card->adapter = adapter; card->adapter = adapter;
adapter->dev = &pdev->dev;
if (mwifiex_pcie_request_irq(adapter)) if (mwifiex_pcie_request_irq(adapter))
return -1; return -1;
adapter->dev = &pdev->dev;
adapter->tx_buf_size = card->pcie.tx_buf_size; adapter->tx_buf_size = card->pcie.tx_buf_size;
adapter->mem_type_mapping_tbl = mem_type_mapping_tbl; adapter->mem_type_mapping_tbl = mem_type_mapping_tbl;
adapter->num_mem_types = ARRAY_SIZE(mem_type_mapping_tbl); adapter->num_mem_types = ARRAY_SIZE(mem_type_mapping_tbl);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment