diff options
author | Lennert Buytenhek <buytenh@wantstofly.org> | 2009-07-16 06:44:45 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-08-20 11:38:06 -0400 |
commit | d4b7057052236e81ab0788cc8df306dc02b0e7be (patch) | |
tree | d5d25af33be54cafd251d56d7262f12bcce159f6 /drivers/net/wireless/mwl8k.c | |
parent | 76266b2ad38c33fb2c1475cfeb35ed070adaba2b (diff) |
mwl8k: don't touch 'command done' interrupt during firmware load
Since firmware load commands don't generate 'command done' interrupts
like normal commands do, polling for command done interrupts just
unnecessarily slows down the firmware load process. Removing this bit
of code speeds up loading a typical firmware image from 840 msec to
180 msec.
Signed-off-by: Lennert Buytenhek <buytenh@marvell.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers/net/wireless/mwl8k.c')
-rw-r--r-- | drivers/net/wireless/mwl8k.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/drivers/net/wireless/mwl8k.c b/drivers/net/wireless/mwl8k.c index 5aa80420c0d1..cc0aa80ca877 100644 --- a/drivers/net/wireless/mwl8k.c +++ b/drivers/net/wireless/mwl8k.c | |||
@@ -411,7 +411,6 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
411 | { | 411 | { |
412 | void __iomem *regs = priv->regs; | 412 | void __iomem *regs = priv->regs; |
413 | dma_addr_t dma_addr; | 413 | dma_addr_t dma_addr; |
414 | int rc; | ||
415 | int loops; | 414 | int loops; |
416 | 415 | ||
417 | dma_addr = pci_map_single(priv->pdev, data, length, PCI_DMA_TODEVICE); | 416 | dma_addr = pci_map_single(priv->pdev, data, length, PCI_DMA_TODEVICE); |
@@ -425,7 +424,6 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
425 | iowrite32(MWL8K_H2A_INT_DUMMY, | 424 | iowrite32(MWL8K_H2A_INT_DUMMY, |
426 | regs + MWL8K_HIU_H2A_INTERRUPT_EVENTS); | 425 | regs + MWL8K_HIU_H2A_INTERRUPT_EVENTS); |
427 | 426 | ||
428 | rc = -ETIMEDOUT; | ||
429 | loops = 1000; | 427 | loops = 1000; |
430 | do { | 428 | do { |
431 | u32 int_code; | 429 | u32 int_code; |
@@ -433,7 +431,6 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
433 | int_code = ioread32(regs + MWL8K_HIU_INT_CODE); | 431 | int_code = ioread32(regs + MWL8K_HIU_INT_CODE); |
434 | if (int_code == MWL8K_INT_CODE_CMD_FINISHED) { | 432 | if (int_code == MWL8K_INT_CODE_CMD_FINISHED) { |
435 | iowrite32(0, regs + MWL8K_HIU_INT_CODE); | 433 | iowrite32(0, regs + MWL8K_HIU_INT_CODE); |
436 | rc = 0; | ||
437 | break; | 434 | break; |
438 | } | 435 | } |
439 | 436 | ||
@@ -442,26 +439,7 @@ mwl8k_send_fw_load_cmd(struct mwl8k_priv *priv, void *data, int length) | |||
442 | 439 | ||
443 | pci_unmap_single(priv->pdev, dma_addr, length, PCI_DMA_TODEVICE); | 440 | pci_unmap_single(priv->pdev, dma_addr, length, PCI_DMA_TODEVICE); |
444 | 441 | ||
445 | /* | 442 | return loops ? 0 : -ETIMEDOUT; |
446 | * Clear 'command done' interrupt bit. | ||
447 | */ | ||
448 | loops = 1000; | ||
449 | do { | ||
450 | u32 status; | ||
451 | |||
452 | status = ioread32(priv->regs + | ||
453 | MWL8K_HIU_A2H_INTERRUPT_STATUS); | ||
454 | if (status & MWL8K_A2H_INT_OPC_DONE) { | ||
455 | iowrite32(~MWL8K_A2H_INT_OPC_DONE, | ||
456 | priv->regs + MWL8K_HIU_A2H_INTERRUPT_STATUS); | ||
457 | ioread32(priv->regs + MWL8K_HIU_A2H_INTERRUPT_STATUS); | ||
458 | break; | ||
459 | } | ||
460 | |||
461 | udelay(1); | ||
462 | } while (--loops); | ||
463 | |||
464 | return rc; | ||
465 | } | 443 | } |
466 | 444 | ||
467 | static int mwl8k_load_fw_image(struct mwl8k_priv *priv, | 445 | static int mwl8k_load_fw_image(struct mwl8k_priv *priv, |