aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/netxen/netxen_nic_init.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r--drivers/net/netxen/netxen_nic_init.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/net/netxen/netxen_nic_init.c b/drivers/net/netxen/netxen_nic_init.c
index a36892457761..8e7c4a5bc26a 100644
--- a/drivers/net/netxen/netxen_nic_init.c
+++ b/drivers/net/netxen/netxen_nic_init.c
@@ -585,7 +585,7 @@ int netxen_backup_crbinit(struct netxen_adapter *adapter)
585{ 585{
586 int ret = FLASH_SUCCESS; 586 int ret = FLASH_SUCCESS;
587 int val; 587 int val;
588 char *buffer = kmalloc(FLASH_SECTOR_SIZE, GFP_KERNEL); 588 char *buffer = kmalloc(NETXEN_FLASH_SECTOR_SIZE, GFP_KERNEL);
589 589
590 if (!buffer) 590 if (!buffer)
591 return -ENOMEM; 591 return -ENOMEM;
@@ -601,13 +601,13 @@ int netxen_backup_crbinit(struct netxen_adapter *adapter)
601 goto out_kfree; 601 goto out_kfree;
602 602
603 /* copy sector 0 to sector 63 */ 603 /* copy sector 0 to sector 63 */
604 ret = netxen_rom_fast_read_words(adapter, CRBINIT_START, 604 ret = netxen_rom_fast_read_words(adapter, NETXEN_CRBINIT_START,
605 buffer, FLASH_SECTOR_SIZE); 605 buffer, NETXEN_FLASH_SECTOR_SIZE);
606 if (ret != FLASH_SUCCESS) 606 if (ret != FLASH_SUCCESS)
607 goto out_kfree; 607 goto out_kfree;
608 608
609 ret = netxen_rom_fast_write_words(adapter, FIXED_START, 609 ret = netxen_rom_fast_write_words(adapter, NETXEN_FIXED_START,
610 buffer, FLASH_SECTOR_SIZE); 610 buffer, NETXEN_FLASH_SECTOR_SIZE);
611 if (ret != FLASH_SUCCESS) 611 if (ret != FLASH_SUCCESS)
612 goto out_kfree; 612 goto out_kfree;
613 613
@@ -654,7 +654,8 @@ void check_erased_flash(struct netxen_adapter *adapter, int addr)
654 int count = 0, erased_errors = 0; 654 int count = 0, erased_errors = 0;
655 int range; 655 int range;
656 656
657 range = (addr == USER_START) ? FIXED_START : addr + FLASH_SECTOR_SIZE; 657 range = (addr == NETXEN_USER_START) ?
658 NETXEN_FIXED_START : addr + NETXEN_FLASH_SECTOR_SIZE;
658 659
659 for (i = addr; i < range; i += 4) { 660 for (i = addr; i < range; i += 4) {
660 netxen_rom_fast_read(adapter, i, &val); 661 netxen_rom_fast_read(adapter, i, &val);
@@ -689,7 +690,7 @@ netxen_flash_erase_sections(struct netxen_adapter *adapter, int start, int end)
689 int i; 690 int i;
690 691
691 for (i = start; i < end; i++) { 692 for (i = start; i < end; i++) {
692 ret = netxen_rom_se(adapter, i * FLASH_SECTOR_SIZE); 693 ret = netxen_rom_se(adapter, i * NETXEN_FLASH_SECTOR_SIZE);
693 if (ret) 694 if (ret)
694 break; 695 break;
695 ret = netxen_rom_wip_poll(adapter); 696 ret = netxen_rom_wip_poll(adapter);
@@ -706,8 +707,8 @@ netxen_flash_erase_secondary(struct netxen_adapter *adapter)
706 int ret = FLASH_SUCCESS; 707 int ret = FLASH_SUCCESS;
707 int start, end; 708 int start, end;
708 709
709 start = SECONDARY_START / FLASH_SECTOR_SIZE; 710 start = NETXEN_SECONDARY_START / NETXEN_FLASH_SECTOR_SIZE;
710 end = USER_START / FLASH_SECTOR_SIZE; 711 end = NETXEN_USER_START / NETXEN_FLASH_SECTOR_SIZE;
711 ret = netxen_flash_erase_sections(adapter, start, end); 712 ret = netxen_flash_erase_sections(adapter, start, end);
712 713
713 return ret; 714 return ret;
@@ -719,8 +720,8 @@ netxen_flash_erase_primary(struct netxen_adapter *adapter)
719 int ret = FLASH_SUCCESS; 720 int ret = FLASH_SUCCESS;
720 int start, end; 721 int start, end;
721 722
722 start = PRIMARY_START / FLASH_SECTOR_SIZE; 723 start = NETXEN_PRIMARY_START / NETXEN_FLASH_SECTOR_SIZE;
723 end = SECONDARY_START / FLASH_SECTOR_SIZE; 724 end = NETXEN_SECONDARY_START / NETXEN_FLASH_SECTOR_SIZE;
724 ret = netxen_flash_erase_sections(adapter, start, end); 725 ret = netxen_flash_erase_sections(adapter, start, end);
725 726
726 return ret; 727 return ret;