diff options
author | David Kilroy <kilroyd@googlemail.com> | 2009-06-18 18:21:27 -0400 |
---|---|---|
committer | John W. Linville <linville@tuxdriver.com> | 2009-07-10 15:01:45 -0400 |
commit | 35832c50d1d1552618f55aa5457a251df9e63b26 (patch) | |
tree | f919054e61f2b47f55876651e05d3b6981255330 /drivers | |
parent | ea60a6aaf55984a13a7150568cc103d006e86ab2 (diff) |
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: David Kilroy <kilroyd@googlemail.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/net/wireless/orinoco/hermes_dld.c | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/drivers/net/wireless/orinoco/hermes_dld.c b/drivers/net/wireless/orinoco/hermes_dld.c index a9ba195cdada..a3eefe109df4 100644 --- a/drivers/net/wireless/orinoco/hermes_dld.c +++ b/drivers/net/wireless/orinoco/hermes_dld.c | |||
@@ -309,7 +309,7 @@ int hermes_read_pda(hermes_t *hw, | |||
309 | 309 | ||
310 | /* Open auxiliary port */ | 310 | /* Open auxiliary port */ |
311 | ret = hermes_aux_control(hw, 1); | 311 | ret = hermes_aux_control(hw, 1); |
312 | printk(KERN_DEBUG PFX "AUX enable returned %d\n", ret); | 312 | pr_debug(PFX "AUX enable returned %d\n", ret); |
313 | if (ret) | 313 | if (ret) |
314 | return ret; | 314 | return ret; |
315 | 315 | ||
@@ -319,12 +319,12 @@ int hermes_read_pda(hermes_t *hw, | |||
319 | 319 | ||
320 | /* Close aux port */ | 320 | /* Close aux port */ |
321 | ret = hermes_aux_control(hw, 0); | 321 | ret = hermes_aux_control(hw, 0); |
322 | printk(KERN_DEBUG PFX "AUX disable returned %d\n", ret); | 322 | pr_debug(PFX "AUX disable returned %d\n", ret); |
323 | 323 | ||
324 | /* Check PDA length */ | 324 | /* Check PDA length */ |
325 | pda_size = le16_to_cpu(pda[0]); | 325 | pda_size = le16_to_cpu(pda[0]); |
326 | printk(KERN_DEBUG PFX "Actual PDA length %d, Max allowed %d\n", | 326 | pr_debug(PFX "Actual PDA length %d, Max allowed %d\n", |
327 | pda_size, pda_len); | 327 | pda_size, pda_len); |
328 | if (pda_size > pda_len) | 328 | if (pda_size > pda_len) |
329 | return -EINVAL; | 329 | return -EINVAL; |
330 | 330 | ||
@@ -422,20 +422,19 @@ int hermesi_program_init(hermes_t *hw, u32 offset) | |||
422 | return err; | 422 | return err; |
423 | 423 | ||
424 | err = hermes_aux_control(hw, 1); | 424 | err = hermes_aux_control(hw, 1); |
425 | printk(KERN_DEBUG PFX "AUX enable returned %d\n", err); | 425 | pr_debug(PFX "AUX enable returned %d\n", err); |
426 | 426 | ||
427 | if (err) | 427 | if (err) |
428 | return err; | 428 | return err; |
429 | 429 | ||
430 | printk(KERN_DEBUG PFX "Enabling volatile, EP 0x%08x\n", offset); | 430 | pr_debug(KERN_DEBUG PFX "Enabling volatile, EP 0x%08x\n", offset); |
431 | err = hermes_doicmd_wait(hw, | 431 | err = hermes_doicmd_wait(hw, |
432 | HERMES_PROGRAM_ENABLE_VOLATILE, | 432 | HERMES_PROGRAM_ENABLE_VOLATILE, |
433 | offset & 0xFFFFu, | 433 | offset & 0xFFFFu, |
434 | offset >> 16, | 434 | offset >> 16, |
435 | 0, | 435 | 0, |
436 | NULL); | 436 | NULL); |
437 | printk(KERN_DEBUG PFX "PROGRAM_ENABLE returned %d\n", | 437 | pr_debug(PFX "PROGRAM_ENABLE returned %d\n", err); |
438 | err); | ||
439 | 438 | ||
440 | return err; | 439 | return err; |
441 | } | 440 | } |
@@ -454,16 +453,16 @@ int hermesi_program_end(hermes_t *hw) | |||
454 | 453 | ||
455 | rc = hermes_docmd_wait(hw, HERMES_PROGRAM_DISABLE, 0, &resp); | 454 | rc = hermes_docmd_wait(hw, HERMES_PROGRAM_DISABLE, 0, &resp); |
456 | 455 | ||
457 | printk(KERN_DEBUG PFX "PROGRAM_DISABLE returned %d, " | 456 | pr_debug(PFX "PROGRAM_DISABLE returned %d, " |
458 | "r0 0x%04x, r1 0x%04x, r2 0x%04x\n", | 457 | "r0 0x%04x, r1 0x%04x, r2 0x%04x\n", |
459 | rc, resp.resp0, resp.resp1, resp.resp2); | 458 | rc, resp.resp0, resp.resp1, resp.resp2); |
460 | 459 | ||
461 | if ((rc == 0) && | 460 | if ((rc == 0) && |
462 | ((resp.status & HERMES_STATUS_CMDCODE) != HERMES_CMD_DOWNLD)) | 461 | ((resp.status & HERMES_STATUS_CMDCODE) != HERMES_CMD_DOWNLD)) |
463 | rc = -EIO; | 462 | rc = -EIO; |
464 | 463 | ||
465 | err = hermes_aux_control(hw, 0); | 464 | err = hermes_aux_control(hw, 0); |
466 | printk(KERN_DEBUG PFX "AUX disable returned %d\n", err); | 465 | pr_debug(PFX "AUX disable returned %d\n", err); |
467 | 466 | ||
468 | /* Acknowledge any outstanding command */ | 467 | /* Acknowledge any outstanding command */ |
469 | hermes_write_regn(hw, EVACK, 0xFFFF); | 468 | hermes_write_regn(hw, EVACK, 0xFFFF); |
@@ -496,9 +495,8 @@ int hermes_program(hermes_t *hw, const char *first_block, const void *end) | |||
496 | 495 | ||
497 | while ((blkaddr != BLOCK_END) && | 496 | while ((blkaddr != BLOCK_END) && |
498 | (((void *) blk + blklen) <= end)) { | 497 | (((void *) blk + blklen) <= end)) { |
499 | printk(KERN_DEBUG PFX | 498 | pr_debug(PFX "Programming block of length %d " |
500 | "Programming block of length %d to address 0x%08x\n", | 499 | "to address 0x%08x\n", blklen, blkaddr); |
501 | blklen, blkaddr); | ||
502 | 500 | ||
503 | #if !LIMIT_PROGRAM_SIZE | 501 | #if !LIMIT_PROGRAM_SIZE |
504 | /* wl_lkm driver splits this into writes of 2000 bytes */ | 502 | /* wl_lkm driver splits this into writes of 2000 bytes */ |
@@ -510,10 +508,9 @@ int hermes_program(hermes_t *hw, const char *first_block, const void *end) | |||
510 | addr = blkaddr; | 508 | addr = blkaddr; |
511 | 509 | ||
512 | while (addr < (blkaddr + blklen)) { | 510 | while (addr < (blkaddr + blklen)) { |
513 | printk(KERN_DEBUG PFX | 511 | pr_debug(PFX "Programming subblock of length %d " |
514 | "Programming subblock of length %d " | 512 | "to address 0x%08x. Data @ %p\n", |
515 | "to address 0x%08x. Data @ %p\n", | 513 | len, addr, &blk->data[addr - blkaddr]); |
516 | len, addr, &blk->data[addr - blkaddr]); | ||
517 | 514 | ||
518 | hermes_aux_setaddr(hw, addr); | 515 | hermes_aux_setaddr(hw, addr); |
519 | hermes_write_bytes(hw, HERMES_AUXDATA, | 516 | hermes_write_bytes(hw, HERMES_AUXDATA, |
@@ -643,8 +640,8 @@ int hermes_apply_pda_with_defaults(hermes_t *hw, | |||
643 | 640 | ||
644 | pdi = hermes_find_pdi(first_pdi, record_id, pda_end); | 641 | pdi = hermes_find_pdi(first_pdi, record_id, pda_end); |
645 | if (pdi) | 642 | if (pdi) |
646 | printk(KERN_DEBUG PFX "Found record 0x%04x at %p\n", | 643 | pr_debug(PFX "Found record 0x%04x at %p\n", |
647 | record_id, pdi); | 644 | record_id, pdi); |
648 | 645 | ||
649 | switch (record_id) { | 646 | switch (record_id) { |
650 | case 0x110: /* Modem REFDAC values */ | 647 | case 0x110: /* Modem REFDAC values */ |
@@ -654,9 +651,9 @@ int hermes_apply_pda_with_defaults(hermes_t *hw, | |||
654 | default_pdi = NULL; | 651 | default_pdi = NULL; |
655 | if (outdoor_pdi) { | 652 | if (outdoor_pdi) { |
656 | pdi = outdoor_pdi; | 653 | pdi = outdoor_pdi; |
657 | printk(KERN_DEBUG PFX | 654 | pr_debug(PFX |
658 | "Using outdoor record 0x%04x at %p\n", | 655 | "Using outdoor record 0x%04x at %p\n", |
659 | record_id + 1, pdi); | 656 | record_id + 1, pdi); |
660 | } | 657 | } |
661 | break; | 658 | break; |
662 | case 0x5: /* HWIF Compatiblity */ | 659 | case 0x5: /* HWIF Compatiblity */ |
@@ -684,9 +681,8 @@ int hermes_apply_pda_with_defaults(hermes_t *hw, | |||
684 | if (!pdi && default_pdi) { | 681 | if (!pdi && default_pdi) { |
685 | /* Use default */ | 682 | /* Use default */ |
686 | pdi = default_pdi; | 683 | pdi = default_pdi; |
687 | printk(KERN_DEBUG PFX | 684 | pr_debug(PFX "Using default record 0x%04x at %p\n", |
688 | "Using default record 0x%04x at %p\n", | 685 | record_id, pdi); |
689 | record_id, pdi); | ||
690 | } | 686 | } |
691 | 687 | ||
692 | if (pdi) { | 688 | if (pdi) { |