diff options
author | Mithlesh Thukral <mithlesh@netxen.com> | 2007-06-07 04:36:36 -0700 |
---|---|---|
committer | Jeff Garzik <jeff@garzik.org> | 2007-06-09 18:25:35 -0400 |
commit | 0d04761d17976ce560a22d9a21af575cd0d1bc21 (patch) | |
tree | 16b15581443757002991e1a2a614552844f3df7d /drivers/net/netxen/netxen_nic_init.c | |
parent | 3e2facef86a1665d64961b541aa0773f5ca22125 (diff) |
NetXen: Fix compile failure seen on PPC architecture
NetXen: Add NETXEN prefixes to macros to clean them up.
This is a cleanup patch which adds NETXEN prefix to some stand
alone macro names.
These posed compile errors when NetXen driver was backported to 2.6.9
on PPC architecture as macros like USER_START are defined in file
arch/ppc64/mm/hash_utils.c
Signed-off-by: Andy Gospodarek <andy@greyhouse.net>
Signed-off by: Wen Xiong <wenxiong@us.ibm.com>
Acked-off by: Mithlesh Thukral <mithlesh@netxen.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
Diffstat (limited to 'drivers/net/netxen/netxen_nic_init.c')
-rw-r--r-- | drivers/net/netxen/netxen_nic_init.c | 23 |
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 a3689245776..8e7c4a5bc26 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) { int ret = FLASH_SUCCESS; int val; - char *buffer = kmalloc(FLASH_SECTOR_SIZE, GFP_KERNEL); + char *buffer = kmalloc(NETXEN_FLASH_SECTOR_SIZE, GFP_KERNEL); if (!buffer) return -ENOMEM; @@ -601,13 +601,13 @@ int netxen_backup_crbinit(struct netxen_adapter *adapter) goto out_kfree; /* copy sector 0 to sector 63 */ - ret = netxen_rom_fast_read_words(adapter, CRBINIT_START, - buffer, FLASH_SECTOR_SIZE); + ret = netxen_rom_fast_read_words(adapter, NETXEN_CRBINIT_START, + buffer, NETXEN_FLASH_SECTOR_SIZE); if (ret != FLASH_SUCCESS) goto out_kfree; - ret = netxen_rom_fast_write_words(adapter, FIXED_START, - buffer, FLASH_SECTOR_SIZE); + ret = netxen_rom_fast_write_words(adapter, NETXEN_FIXED_START, + buffer, NETXEN_FLASH_SECTOR_SIZE); if (ret != FLASH_SUCCESS) goto out_kfree; @@ -654,7 +654,8 @@ void check_erased_flash(struct netxen_adapter *adapter, int addr) int count = 0, erased_errors = 0; int range; - range = (addr == USER_START) ? FIXED_START : addr + FLASH_SECTOR_SIZE; + range = (addr == NETXEN_USER_START) ? + NETXEN_FIXED_START : addr + NETXEN_FLASH_SECTOR_SIZE; for (i = addr; i < range; i += 4) { netxen_rom_fast_read(adapter, i, &val); @@ -689,7 +690,7 @@ netxen_flash_erase_sections(struct netxen_adapter *adapter, int start, int end) int i; for (i = start; i < end; i++) { - ret = netxen_rom_se(adapter, i * FLASH_SECTOR_SIZE); + ret = netxen_rom_se(adapter, i * NETXEN_FLASH_SECTOR_SIZE); if (ret) break; ret = netxen_rom_wip_poll(adapter); @@ -706,8 +707,8 @@ netxen_flash_erase_secondary(struct netxen_adapter *adapter) int ret = FLASH_SUCCESS; int start, end; - start = SECONDARY_START / FLASH_SECTOR_SIZE; - end = USER_START / FLASH_SECTOR_SIZE; + start = NETXEN_SECONDARY_START / NETXEN_FLASH_SECTOR_SIZE; + end = NETXEN_USER_START / NETXEN_FLASH_SECTOR_SIZE; ret = netxen_flash_erase_sections(adapter, start, end); return ret; @@ -719,8 +720,8 @@ netxen_flash_erase_primary(struct netxen_adapter *adapter) int ret = FLASH_SUCCESS; int start, end; - start = PRIMARY_START / FLASH_SECTOR_SIZE; - end = SECONDARY_START / FLASH_SECTOR_SIZE; + start = NETXEN_PRIMARY_START / NETXEN_FLASH_SECTOR_SIZE; + end = NETXEN_SECONDARY_START / NETXEN_FLASH_SECTOR_SIZE; ret = netxen_flash_erase_sections(adapter, start, end); return ret; |