diff options
Diffstat (limited to 'drivers/scsi/BusLogic.c')
| -rw-r--r-- | drivers/scsi/BusLogic.c | 207 | 
1 files changed, 12 insertions, 195 deletions
| diff --git a/drivers/scsi/BusLogic.c b/drivers/scsi/BusLogic.c index ccb061ab0a0a..3ee46a843cb5 100644 --- a/drivers/scsi/BusLogic.c +++ b/drivers/scsi/BusLogic.c @@ -562,60 +562,6 @@ done:  /* -  blogic_add_probeaddr_isa appends a single ISA I/O Address to the list -  of I/O Address and Bus Probe Information to be checked for potential BusLogic -  Host Adapters. -*/ - -static void __init blogic_add_probeaddr_isa(unsigned long io_addr) -{ -	struct blogic_probeinfo *probeinfo; -	if (blogic_probeinfo_count >= BLOGIC_MAX_ADAPTERS) -		return; -	probeinfo = &blogic_probeinfo_list[blogic_probeinfo_count++]; -	probeinfo->adapter_type = BLOGIC_MULTIMASTER; -	probeinfo->adapter_bus_type = BLOGIC_ISA_BUS; -	probeinfo->io_addr = io_addr; -	probeinfo->pci_device = NULL; -} - - -/* -  blogic_init_probeinfo_isa initializes the list of I/O Address and -  Bus Probe Information to be checked for potential BusLogic SCSI Host Adapters -  only from the list of standard BusLogic MultiMaster ISA I/O Addresses. -*/ - -static void __init blogic_init_probeinfo_isa(struct blogic_adapter *adapter) -{ -	/* -	   If BusLogic Driver Options specifications requested that ISA -	   Bus Probes be inhibited, do not proceed further. -	 */ -	if (blogic_probe_options.noprobe_isa) -		return; -	/* -	   Append the list of standard BusLogic MultiMaster ISA I/O Addresses. -	 */ -	if (!blogic_probe_options.limited_isa || blogic_probe_options.probe330) -		blogic_add_probeaddr_isa(0x330); -	if (!blogic_probe_options.limited_isa || blogic_probe_options.probe334) -		blogic_add_probeaddr_isa(0x334); -	if (!blogic_probe_options.limited_isa || blogic_probe_options.probe230) -		blogic_add_probeaddr_isa(0x230); -	if (!blogic_probe_options.limited_isa || blogic_probe_options.probe234) -		blogic_add_probeaddr_isa(0x234); -	if (!blogic_probe_options.limited_isa || blogic_probe_options.probe130) -		blogic_add_probeaddr_isa(0x130); -	if (!blogic_probe_options.limited_isa || blogic_probe_options.probe134) -		blogic_add_probeaddr_isa(0x134); -} - - -#ifdef CONFIG_PCI - - -/*    blogic_sort_probeinfo sorts a section of blogic_probeinfo_list in order    of increasing PCI Bus and Device Number.  */ @@ -667,14 +613,11 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)  	int nonpr_mmcount = 0, mmcount = 0;  	bool force_scan_order = false;  	bool force_scan_order_checked = false; -	bool addr_seen[6];  	struct pci_dev *pci_device = NULL;  	int i;  	if (blogic_probeinfo_count >= BLOGIC_MAX_ADAPTERS)  		return 0;  	blogic_probeinfo_count++; -	for (i = 0; i < 6; i++) -		addr_seen[i] = false;  	/*  	   Iterate over the MultiMaster PCI Host Adapters.  For each  	   enumerated host adapter, determine whether its ISA Compatible @@ -744,11 +687,8 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)  		host_adapter->io_addr = io_addr;  		blogic_intreset(host_adapter);  		if (blogic_cmd(host_adapter, BLOGIC_INQ_PCI_INFO, NULL, 0, -				&adapter_info, sizeof(adapter_info)) == -				sizeof(adapter_info)) { -			if (adapter_info.isa_port < 6) -				addr_seen[adapter_info.isa_port] = true; -		} else +				&adapter_info, sizeof(adapter_info)) != +				sizeof(adapter_info))  			adapter_info.isa_port = BLOGIC_IO_DISABLE;  		/*  		   Issue the Modify I/O Address command to disable the @@ -836,45 +776,6 @@ static int __init blogic_init_mm_probeinfo(struct blogic_adapter *adapter)  		blogic_sort_probeinfo(&blogic_probeinfo_list[nonpr_mmindex],  					nonpr_mmcount);  	/* -	   If no PCI MultiMaster Host Adapter is assigned the Primary -	   I/O Address, then the Primary I/O Address must be probed -	   explicitly before any PCI host adapters are probed. -	 */ -	if (!blogic_probe_options.noprobe_isa) -		if (pr_probeinfo->io_addr == 0 && -				(!blogic_probe_options.limited_isa || -				 blogic_probe_options.probe330)) { -			pr_probeinfo->adapter_type = BLOGIC_MULTIMASTER; -			pr_probeinfo->adapter_bus_type = BLOGIC_ISA_BUS; -			pr_probeinfo->io_addr = 0x330; -		} -	/* -	   Append the list of standard BusLogic MultiMaster ISA I/O Addresses, -	   omitting the Primary I/O Address which has already been handled. -	 */ -	if (!blogic_probe_options.noprobe_isa) { -		if (!addr_seen[1] && -				(!blogic_probe_options.limited_isa || -				 blogic_probe_options.probe334)) -			blogic_add_probeaddr_isa(0x334); -		if (!addr_seen[2] && -				(!blogic_probe_options.limited_isa || -				 blogic_probe_options.probe230)) -			blogic_add_probeaddr_isa(0x230); -		if (!addr_seen[3] && -				(!blogic_probe_options.limited_isa || -				 blogic_probe_options.probe234)) -			blogic_add_probeaddr_isa(0x234); -		if (!addr_seen[4] && -				(!blogic_probe_options.limited_isa || -				 blogic_probe_options.probe130)) -			blogic_add_probeaddr_isa(0x130); -		if (!addr_seen[5] && -				(!blogic_probe_options.limited_isa || -				 blogic_probe_options.probe134)) -			blogic_add_probeaddr_isa(0x134); -	} -	/*  	   Iterate over the older non-compliant MultiMaster PCI Host Adapters,  	   noting the PCI bus location and assigned IRQ Channel.  	 */ @@ -1078,18 +979,10 @@ static void __init blogic_init_probeinfo_list(struct blogic_adapter *adapter)  				}  			}  		} -	} else { -		blogic_init_probeinfo_isa(adapter);  	}  } -#else -#define blogic_init_probeinfo_list(adapter) \ -		blogic_init_probeinfo_isa(adapter) -#endif				/* CONFIG_PCI */ - -  /*    blogic_failure prints a standardized error message, and then returns false.  */ @@ -1539,14 +1432,6 @@ static bool __init blogic_rdconfig(struct blogic_adapter *adapter)  		else if (config.irq_ch15)  			adapter->irq_ch = 15;  	} -	if (adapter->adapter_bus_type == BLOGIC_ISA_BUS) { -		if (config.dma_ch5) -			adapter->dma_ch = 5; -		else if (config.dma_ch6) -			adapter->dma_ch = 6; -		else if (config.dma_ch7) -			adapter->dma_ch = 7; -	}  	/*  	   Determine whether Extended Translation is enabled and save it in  	   the Host Adapter structure. @@ -1686,8 +1571,7 @@ static bool __init blogic_rdconfig(struct blogic_adapter *adapter)  	if (adapter->fw_ver[0] == '5')  		adapter->adapter_qdepth = 192;  	else if (adapter->fw_ver[0] == '4') -		adapter->adapter_qdepth = (adapter->adapter_bus_type != -						BLOGIC_ISA_BUS ? 100 : 50); +		adapter->adapter_qdepth = 100;  	else  		adapter->adapter_qdepth = 30;  	if (strcmp(adapter->fw_ver, "3.31") >= 0) { @@ -1728,25 +1612,16 @@ static bool __init blogic_rdconfig(struct blogic_adapter *adapter)  	 */  	adapter->bios_addr = ext_setupinfo.bios_addr << 12;  	/* -	   ISA Host Adapters require Bounce Buffers if there is more than -	   16MB memory. -	 */ -	if (adapter->adapter_bus_type == BLOGIC_ISA_BUS && -			(void *) high_memory > (void *) MAX_DMA_ADDRESS) -		adapter->need_bouncebuf = true; -	/*  	   BusLogic BT-445S Host Adapters prior to board revision E have a  	   hardware bug whereby when the BIOS is enabled, transfers to/from  	   the same address range the BIOS occupies modulo 16MB are handled  	   incorrectly.  Only properly functioning BT-445S Host Adapters -	   have firmware version 3.37, so require that ISA Bounce Buffers -	   be used for the buggy BT-445S models if there is more than 16MB -	   memory. +	   have firmware version 3.37.  	 */ -	if (adapter->bios_addr > 0 && strcmp(adapter->model, "BT-445S") == 0 && -			strcmp(adapter->fw_ver, "3.37") < 0 && -			(void *) high_memory > (void *) MAX_DMA_ADDRESS) -		adapter->need_bouncebuf = true; +	if (adapter->bios_addr > 0 && +	    strcmp(adapter->model, "BT-445S") == 0 && +	    strcmp(adapter->fw_ver, "3.37") < 0) +		return blogic_failure(adapter, "Too old firmware");  	/*  	   Initialize parameters common to MultiMaster and FlashPoint  	   Host Adapters. @@ -1769,14 +1644,9 @@ common:  		if (adapter->drvr_opts != NULL &&  				adapter->drvr_opts->qdepth[tgt_id] > 0)  			qdepth = adapter->drvr_opts->qdepth[tgt_id]; -		else if (adapter->need_bouncebuf) -			qdepth = BLOGIC_TAG_DEPTH_BB;  		adapter->qdepth[tgt_id] = qdepth;  	} -	if (adapter->need_bouncebuf) -		adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH_BB; -	else -		adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH; +	adapter->untag_qdepth = BLOGIC_UNTAG_DEPTH;  	if (adapter->drvr_opts != NULL)  		adapter->common_qdepth = adapter->drvr_opts->common_qdepth;  	if (adapter->common_qdepth > 0 && @@ -1839,11 +1709,7 @@ static bool __init blogic_reportconfig(struct blogic_adapter *adapter)  	blogic_info("Configuring BusLogic Model %s %s%s%s%s SCSI Host Adapter\n", adapter, adapter->model, blogic_adapter_busnames[adapter->adapter_bus_type], (adapter->wide ? " Wide" : ""), (adapter->differential ? " Differential" : ""), (adapter->ultra ? " Ultra" : ""));  	blogic_info("  Firmware Version: %s, I/O Address: 0x%lX, IRQ Channel: %d/%s\n", adapter, adapter->fw_ver, adapter->io_addr, adapter->irq_ch, (adapter->level_int ? "Level" : "Edge"));  	if (adapter->adapter_bus_type != BLOGIC_PCI_BUS) { -		blogic_info("  DMA Channel: ", adapter); -		if (adapter->dma_ch > 0) -			blogic_info("%d, ", adapter, adapter->dma_ch); -		else -			blogic_info("None, ", adapter); +		blogic_info("  DMA Channel: None, ", adapter);  		if (adapter->bios_addr > 0)  			blogic_info("BIOS Address: 0x%lX, ", adapter,  					adapter->bios_addr); @@ -1996,18 +1862,6 @@ static bool __init blogic_getres(struct blogic_adapter *adapter)  	}  	adapter->irq_acquired = true;  	/* -	   Acquire exclusive access to the DMA Channel. -	 */ -	if (adapter->dma_ch > 0) { -		if (request_dma(adapter->dma_ch, adapter->full_model) < 0) { -			blogic_err("UNABLE TO ACQUIRE DMA CHANNEL %d - DETACHING\n", adapter, adapter->dma_ch); -			return false; -		} -		set_dma_mode(adapter->dma_ch, DMA_MODE_CASCADE); -		enable_dma(adapter->dma_ch); -		adapter->dma_chan_acquired = true; -	} -	/*  	   Indicate the System Resource Acquisition completed successfully,  	 */  	return true; @@ -2027,11 +1881,6 @@ static void blogic_relres(struct blogic_adapter *adapter)  	if (adapter->irq_acquired)  		free_irq(adapter->irq_ch, adapter);  	/* -	   Release exclusive access to the DMA Channel. -	 */ -	if (adapter->dma_chan_acquired) -		free_dma(adapter->dma_ch); -	/*  	   Release any allocated memory structs not released elsewhere  	 */  	if (adapter->mbox_space) @@ -2299,7 +2148,6 @@ static void __init blogic_inithoststruct(struct blogic_adapter *adapter,  	host->this_id = adapter->scsi_id;  	host->can_queue = adapter->drvr_qdepth;  	host->sg_tablesize = adapter->drvr_sglimit; -	host->unchecked_isa_dma = adapter->need_bouncebuf;  	host->cmd_per_lun = adapter->untag_qdepth;  } @@ -3578,7 +3426,7 @@ Target	Requested Completed  Requested Completed  Requested Completed\n\  /*    blogic_msg prints Driver Messages.  */ - +__printf(2, 4)  static void blogic_msg(enum blogic_msglevel msglevel, char *fmt,  			struct blogic_adapter *adapter, ...)  { @@ -3666,37 +3514,7 @@ static int __init blogic_parseopts(char *options)  		memset(drvr_opts, 0, sizeof(struct blogic_drvr_options));  		while (*options != '\0' && *options != ';') { -			/* Probing Options. */ -			if (blogic_parse(&options, "IO:")) { -				unsigned long io_addr = simple_strtoul(options, -								&options, 0); -				blogic_probe_options.limited_isa = true; -				switch (io_addr) { -				case 0x330: -					blogic_probe_options.probe330 = true; -					break; -				case 0x334: -					blogic_probe_options.probe334 = true; -					break; -				case 0x230: -					blogic_probe_options.probe230 = true; -					break; -				case 0x234: -					blogic_probe_options.probe234 = true; -					break; -				case 0x130: -					blogic_probe_options.probe130 = true; -					break; -				case 0x134: -					blogic_probe_options.probe134 = true; -					break; -				default: -					blogic_err("BusLogic: Invalid Driver Options (invalid I/O Address 0x%lX)\n", NULL, io_addr); -					return 0; -				} -			} else if (blogic_parse(&options, "NoProbeISA")) -				blogic_probe_options.noprobe_isa = true; -			else if (blogic_parse(&options, "NoProbePCI")) +			if (blogic_parse(&options, "NoProbePCI"))  				blogic_probe_options.noprobe_pci = true;  			else if (blogic_parse(&options, "NoProbe"))  				blogic_probe_options.noprobe = true; @@ -3851,7 +3669,6 @@ static struct scsi_host_template blogic_template = {  #if 0  	.eh_abort_handler = blogic_abort,  #endif -	.unchecked_isa_dma = 1,  	.max_sectors = 128,  }; | 
