 /* Force use of PCI config space for indirect register * write calls. */ tp->tg3_flags |= TG3_FLAG_PCIX_TARGET_HWBUG; 
static int tg3_load_firmware_cpu(struct tg3 *tp, u32 cpu_base, u32 cpu_scratch_base,				 int cpu_scratch_size, struct fw_info *info){	int err, i;	u32 orig_tg3_flags = tp->tg3_flags;	void (*write_op)(struct tg3 *, u32, u32);	if (cpu_base == TX_CPU_BASE &&	    (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)) {		printk(KERN_ERR PFX "tg3_load_firmware_cpu: Trying to load "		       "TX cpu firmware on %s which is 5705.\n",		       tp->dev->name);		return -EINVAL;	}	if (tp->tg3_flags2 & TG3_FLG2_5705_PLUS)		write_op = tg3_write_mem;	else		write_op = tg3_write_indirect_reg32;	/* Force use of PCI config space for indirect register	 * write calls.	 */	tp->tg3_flags |= TG3_FLAG_PCIX_TARGET_HWBUG;	/* It is possible that bootcode is still loading at this point.	 * Get the nvram lock first before halting the cpu.	 */	tg3_nvram_lock(tp);	err = tg3_halt_cpu(tp, cpu_base);	tg3_nvram_unlock(tp);	if (err)		goto out;	for (i = 0; i < cpu_scratch_size; i += sizeof(u32))		write_op(tp, cpu_scratch_base + i, 0);	tw32(cpu_base + CPU_STATE, 0xffffffff);	tw32(cpu_base + CPU_MODE, tr32(cpu_base+CPU_MODE)|CPU_MODE_HALT);	for (i = 0; i < (info->text_len / sizeof(u32)); i++)		write_op(tp, (cpu_scratch_base +			      (info->text_base & 0xffff) +			      (i * sizeof(u32))),			 (info->text_data ?			  info->text_data[i] : 0));	for (i = 0; i < (info->rodata_len / sizeof(u32)); i++)		write_op(tp, (cpu_scratch_base +			      (info->rodata_base & 0xffff) +			      (i * sizeof(u32))),			 (info->rodata_data ?			  info->rodata_data[i] : 0));	for (i = 0; i < (info->data_len / sizeof(u32)); i++)		write_op(tp, (cpu_scratch_base +			      (info->data_base & 0xffff) +			      (i * sizeof(u32))),			 (info->data_data ?			  info->data_data[i] : 0));	err = 0;out:	tp->tg3_flags = orig_tg3_flags;	return err;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/1ee582d8e49a1c9dd43b2599f1cd26507182a8d4/tg3.c/clean/drivers/net/tg3.c