Commit 35832c50 authored by David Kilroy's avatar David Kilroy Committed by John W. Linville

orinoco: make firmware download less verbose

The firmware download code has been in a couple of releases, without any
significant issues reported in this code.

Convert to use pr_debug, so the messages can be recoverred by defining
DEBUG.
Signed-off-by: default avatarDavid Kilroy <kilroyd@googlemail.com>
Signed-off-by: default avatarJohn W. Linville <linville@tuxdriver.com>
parent ea60a6aa
...@@ -309,7 +309,7 @@ int hermes_read_pda(hermes_t *hw, ...@@ -309,7 +309,7 @@ int hermes_read_pda(hermes_t *hw,
/* Open auxiliary port */ /* Open auxiliary port */
ret = hermes_aux_control(hw, 1); ret = hermes_aux_control(hw, 1);
printk(KERN_DEBUG PFX "AUX enable returned %d\n", ret); pr_debug(PFX "AUX enable returned %d\n", ret);
if (ret) if (ret)
return ret; return ret;
...@@ -319,11 +319,11 @@ int hermes_read_pda(hermes_t *hw, ...@@ -319,11 +319,11 @@ int hermes_read_pda(hermes_t *hw,
/* Close aux port */ /* Close aux port */
ret = hermes_aux_control(hw, 0); ret = hermes_aux_control(hw, 0);
printk(KERN_DEBUG PFX "AUX disable returned %d\n", ret); pr_debug(PFX "AUX disable returned %d\n", ret);
/* Check PDA length */ /* Check PDA length */
pda_size = le16_to_cpu(pda[0]); pda_size = le16_to_cpu(pda[0]);
printk(KERN_DEBUG PFX "Actual PDA length %d, Max allowed %d\n", pr_debug(PFX "Actual PDA length %d, Max allowed %d\n",
pda_size, pda_len); pda_size, pda_len);
if (pda_size > pda_len) if (pda_size > pda_len)
return -EINVAL; return -EINVAL;
...@@ -422,20 +422,19 @@ int hermesi_program_init(hermes_t *hw, u32 offset) ...@@ -422,20 +422,19 @@ int hermesi_program_init(hermes_t *hw, u32 offset)
return err; return err;
err = hermes_aux_control(hw, 1); err = hermes_aux_control(hw, 1);
printk(KERN_DEBUG PFX "AUX enable returned %d\n", err); pr_debug(PFX "AUX enable returned %d\n", err);
if (err) if (err)
return err; return err;
printk(KERN_DEBUG PFX "Enabling volatile, EP 0x%08x\n", offset); pr_debug(KERN_DEBUG PFX "Enabling volatile, EP 0x%08x\n", offset);
err = hermes_doicmd_wait(hw, err = hermes_doicmd_wait(hw,
HERMES_PROGRAM_ENABLE_VOLATILE, HERMES_PROGRAM_ENABLE_VOLATILE,
offset & 0xFFFFu, offset & 0xFFFFu,
offset >> 16, offset >> 16,
0, 0,
NULL); NULL);
printk(KERN_DEBUG PFX "PROGRAM_ENABLE returned %d\n", pr_debug(PFX "PROGRAM_ENABLE returned %d\n", err);
err);
return err; return err;
} }
...@@ -454,7 +453,7 @@ int hermesi_program_end(hermes_t *hw) ...@@ -454,7 +453,7 @@ int hermesi_program_end(hermes_t *hw)
rc = hermes_docmd_wait(hw, HERMES_PROGRAM_DISABLE, 0, &resp); rc = hermes_docmd_wait(hw, HERMES_PROGRAM_DISABLE, 0, &resp);
printk(KERN_DEBUG PFX "PROGRAM_DISABLE returned %d, " pr_debug(PFX "PROGRAM_DISABLE returned %d, "
"r0 0x%04x, r1 0x%04x, r2 0x%04x\n", "r0 0x%04x, r1 0x%04x, r2 0x%04x\n",
rc, resp.resp0, resp.resp1, resp.resp2); rc, resp.resp0, resp.resp1, resp.resp2);
...@@ -463,7 +462,7 @@ int hermesi_program_end(hermes_t *hw) ...@@ -463,7 +462,7 @@ int hermesi_program_end(hermes_t *hw)
rc = -EIO; rc = -EIO;
err = hermes_aux_control(hw, 0); err = hermes_aux_control(hw, 0);
printk(KERN_DEBUG PFX "AUX disable returned %d\n", err); pr_debug(PFX "AUX disable returned %d\n", err);
/* Acknowledge any outstanding command */ /* Acknowledge any outstanding command */
hermes_write_regn(hw, EVACK, 0xFFFF); hermes_write_regn(hw, EVACK, 0xFFFF);
...@@ -496,9 +495,8 @@ int hermes_program(hermes_t *hw, const char *first_block, const void *end) ...@@ -496,9 +495,8 @@ int hermes_program(hermes_t *hw, const char *first_block, const void *end)
while ((blkaddr != BLOCK_END) && while ((blkaddr != BLOCK_END) &&
(((void *) blk + blklen) <= end)) { (((void *) blk + blklen) <= end)) {
printk(KERN_DEBUG PFX pr_debug(PFX "Programming block of length %d "
"Programming block of length %d to address 0x%08x\n", "to address 0x%08x\n", blklen, blkaddr);
blklen, blkaddr);
#if !LIMIT_PROGRAM_SIZE #if !LIMIT_PROGRAM_SIZE
/* wl_lkm driver splits this into writes of 2000 bytes */ /* wl_lkm driver splits this into writes of 2000 bytes */
...@@ -510,8 +508,7 @@ int hermes_program(hermes_t *hw, const char *first_block, const void *end) ...@@ -510,8 +508,7 @@ int hermes_program(hermes_t *hw, const char *first_block, const void *end)
addr = blkaddr; addr = blkaddr;
while (addr < (blkaddr + blklen)) { while (addr < (blkaddr + blklen)) {
printk(KERN_DEBUG PFX pr_debug(PFX "Programming subblock of length %d "
"Programming subblock of length %d "
"to address 0x%08x. Data @ %p\n", "to address 0x%08x. Data @ %p\n",
len, addr, &blk->data[addr - blkaddr]); len, addr, &blk->data[addr - blkaddr]);
...@@ -643,7 +640,7 @@ int hermes_apply_pda_with_defaults(hermes_t *hw, ...@@ -643,7 +640,7 @@ int hermes_apply_pda_with_defaults(hermes_t *hw,
pdi = hermes_find_pdi(first_pdi, record_id, pda_end); pdi = hermes_find_pdi(first_pdi, record_id, pda_end);
if (pdi) if (pdi)
printk(KERN_DEBUG PFX "Found record 0x%04x at %p\n", pr_debug(PFX "Found record 0x%04x at %p\n",
record_id, pdi); record_id, pdi);
switch (record_id) { switch (record_id) {
...@@ -654,7 +651,7 @@ int hermes_apply_pda_with_defaults(hermes_t *hw, ...@@ -654,7 +651,7 @@ int hermes_apply_pda_with_defaults(hermes_t *hw,
default_pdi = NULL; default_pdi = NULL;
if (outdoor_pdi) { if (outdoor_pdi) {
pdi = outdoor_pdi; pdi = outdoor_pdi;
printk(KERN_DEBUG PFX pr_debug(PFX
"Using outdoor record 0x%04x at %p\n", "Using outdoor record 0x%04x at %p\n",
record_id + 1, pdi); record_id + 1, pdi);
} }
...@@ -684,8 +681,7 @@ int hermes_apply_pda_with_defaults(hermes_t *hw, ...@@ -684,8 +681,7 @@ int hermes_apply_pda_with_defaults(hermes_t *hw,
if (!pdi && default_pdi) { if (!pdi && default_pdi) {
/* Use default */ /* Use default */
pdi = default_pdi; pdi = default_pdi;
printk(KERN_DEBUG PFX pr_debug(PFX "Using default record 0x%04x at %p\n",
"Using default record 0x%04x at %p\n",
record_id, pdi); record_id, pdi);
} }
......
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