esp->slot = PHYSADDR(mem_start); 
esp->slot = CPHYSADDR(mem_start); 
static int dec_esp_detect(Scsi_Host_Template * tpnt){	struct NCR_ESP *esp;	struct ConfigDev *esp_dev;	int slot;	unsigned long mem_start;	if (IOASIC) {		esp_dev = 0;		esp = esp_allocate(tpnt, (void *) esp_dev);		/* Do command transfer with programmed I/O */		esp->do_pio_cmds = 1;		/* Required functions */		esp->dma_bytes_sent = &dma_bytes_sent;		esp->dma_can_transfer = &dma_can_transfer;		esp->dma_dump_state = &dma_dump_state;		esp->dma_init_read = &dma_init_read;		esp->dma_init_write = &dma_init_write;		esp->dma_ints_off = &dma_ints_off;		esp->dma_ints_on = &dma_ints_on;		esp->dma_irq_p = &dma_irq_p;		esp->dma_ports_p = &dma_ports_p;		esp->dma_setup = &dma_setup;		/* Optional functions */		esp->dma_barrier = 0;		esp->dma_drain = &dma_drain;		esp->dma_invalidate = 0;		esp->dma_irq_entry = 0;		esp->dma_irq_exit = 0;		esp->dma_poll = 0;		esp->dma_reset = 0;		esp->dma_led_off = 0;		esp->dma_led_on = 0;		/* virtual DMA functions */		esp->dma_mmu_get_scsi_one = &dma_mmu_get_scsi_one;		esp->dma_mmu_get_scsi_sgl = &dma_mmu_get_scsi_sgl;		esp->dma_mmu_release_scsi_one = 0;		esp->dma_mmu_release_scsi_sgl = 0;		esp->dma_advance_sg = &dma_advance_sg;		/* SCSI chip speed */		esp->cfreq = 25000000;		esp->dregs = 0;		/* ESP register base */		esp->eregs = (struct ESP_regs *) (system_base + IOASIC_SCSI);		/* Set the command buffer */		esp->esp_command = (volatile unsigned char *) cmd_buffer;		/* get virtual dma address for command buffer */		esp->esp_command_dvma = virt_to_phys(cmd_buffer);		esp->irq = dec_interrupt[DEC_IRQ_ASC];		esp->scsi_id = 7;		/* Check for differential SCSI-bus */		esp->diff = 0;		esp_initialize(esp);		if (request_irq(esp->irq, esp_intr, SA_INTERRUPT,				"ncr53c94", esp->ehost))			goto err_dealloc;		if (request_irq(dec_interrupt[DEC_IRQ_ASC_MERR],				scsi_dma_merr_int, SA_INTERRUPT,				"ncr53c94 error", esp->ehost))			goto err_free_irq;		if (request_irq(dec_interrupt[DEC_IRQ_ASC_ERR],				scsi_dma_err_int, SA_INTERRUPT,				"ncr53c94 overrun", esp->ehost))			goto err_free_irq_merr;		if (request_irq(dec_interrupt[DEC_IRQ_ASC_DMA],				scsi_dma_int, SA_INTERRUPT,				"ncr53c94 dma", esp->ehost))			goto err_free_irq_err;	}	if (TURBOCHANNEL) {		while ((slot = search_tc_card("PMAZ-AA")) >= 0) {			claim_tc_card(slot);			esp_dev = 0;			esp = esp_allocate(tpnt, (void *) esp_dev);			mem_start = get_tc_base_addr(slot);			/* Store base addr into esp struct */			esp->slot = PHYSADDR(mem_start);			esp->dregs = 0;			esp->eregs = (struct ESP_regs *) (mem_start + DEC_SCSI_SREG);			esp->do_pio_cmds = 1;			/* Set the command buffer */			esp->esp_command = (volatile unsigned char *) pmaz_cmd_buffer;			/* get virtual dma address for command buffer */			esp->esp_command_dvma = virt_to_phys(pmaz_cmd_buffer);			esp->cfreq = get_tc_speed();			esp->irq = get_tc_irq_nr(slot);			/* Required functions */			esp->dma_bytes_sent = &dma_bytes_sent;			esp->dma_can_transfer = &dma_can_transfer;			esp->dma_dump_state = &dma_dump_state;			esp->dma_init_read = &pmaz_dma_init_read;			esp->dma_init_write = &pmaz_dma_init_write;			esp->dma_ints_off = &pmaz_dma_ints_off;			esp->dma_ints_on = &pmaz_dma_ints_on;			esp->dma_irq_p = &dma_irq_p;			esp->dma_ports_p = &dma_ports_p;			esp->dma_setup = &pmaz_dma_setup;			/* Optional functions */			esp->dma_barrier = 0;			esp->dma_drain = &pmaz_dma_drain;			esp->dma_invalidate = 0;			esp->dma_irq_entry = 0;			esp->dma_irq_exit = 0;			esp->dma_poll = 0;			esp->dma_reset = 0;			esp->dma_led_off = 0;			esp->dma_led_on = 0;			esp->dma_mmu_get_scsi_one = pmaz_dma_mmu_get_scsi_one;			esp->dma_mmu_get_scsi_sgl = 0;			esp->dma_mmu_release_scsi_one = 0;			esp->dma_mmu_release_scsi_sgl = 0;			esp->dma_advance_sg = 0; 			if (request_irq(esp->irq, esp_intr, SA_INTERRUPT, 					 "PMAZ_AA", esp->ehost)) { 				esp_deallocate(esp); 				release_tc_card(slot); 				continue; 			}			esp->scsi_id = 7;			esp->diff = 0;			esp_initialize(esp);		}	}	if(nesps) {		printk("ESP: Total of %d ESP hosts found, %d actually in use.\n", nesps, esps_in_use);		esps_running = esps_in_use;		return esps_in_use;	}	return 0;err_free_irq_err:	free_irq(dec_interrupt[DEC_IRQ_ASC_ERR], scsi_dma_err_int);err_free_irq_merr:	free_irq(dec_interrupt[DEC_IRQ_ASC_MERR], scsi_dma_merr_int);err_free_irq:	free_irq(esp->irq, esp_intr);err_dealloc:	esp_deallocate(esp);	return 0;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/b04fc679055f76cfd17c6870716a8286ccfa3b8e/dec_esp.c/buggy/drivers/scsi/dec_esp.c