patch-2.3.41 linux/drivers/scsi/blz2060.c
Next file: linux/drivers/scsi/cyberstorm.c
Previous file: linux/drivers/scsi/blz1230.c
Back to the patch index
Back to the overall index
- Lines: 75
- Date:
Fri Jan 28 08:04:58 2000
- Orig file:
v2.3.40/linux/drivers/scsi/blz2060.c
- Orig date:
Wed Aug 18 10:00:52 1999
diff -u --recursive --new-file v2.3.40/linux/drivers/scsi/blz2060.c linux/drivers/scsi/blz2060.c
@@ -16,6 +16,7 @@
#include <linux/module.h>
+#include <linux/init.h>
#include <linux/kernel.h>
#include <linux/delay.h>
#include <linux/types.h>
@@ -60,13 +61,16 @@
int __init blz2060_esp_detect(Scsi_Host_Template *tpnt)
{
struct NCR_ESP *esp;
- const struct ConfigDev *esp_dev;
- unsigned int key;
+ struct zorro_dev *z = NULL;
unsigned long address;
- if ((key = zorro_find(ZORRO_PROD_PHASE5_BLIZZARD_2060, 0, 0))){
- esp_dev = zorro_get_board(key);
- esp = esp_allocate(tpnt, (void *) esp_dev);
+ if ((z = zorro_find_device(ZORRO_PROD_PHASE5_BLIZZARD_2060, z))) {
+ unsigned long board = z->resource.start;
+ if (request_mem_region(board+BLZ2060_ESP_ADDR,
+ sizeof(struct ESP_regs), "NCR53C9x")) {
+ strcpy(z->name, "Blizzard 2060 Accelerator");
+
+ esp = esp_allocate(tpnt, (void *)board+BLZ2060_ESP_ADDR);
/* Do command transfer with programmed I/O */
esp->do_pio_cmds = 1;
@@ -101,7 +105,7 @@
* relative to the device (i.e. in the same Zorro
* I/O block).
*/
- address = (unsigned long)ZTWO_VADDR(esp_dev->cd_BoardAddr);
+ address = (unsigned long)ZTWO_VADDR(board);
esp->dregs = (void *)(address + BLZ2060_DMA_ADDR);
/* ESP register base */
@@ -112,7 +116,6 @@
esp->esp_command_dvma = virt_to_bus(cmd_buffer);
esp->irq = IRQ_AMIGA_PORTS;
- esp->slot = key;
request_irq(IRQ_AMIGA_PORTS, esp_intr, SA_SHIRQ,
"Blizzard 2060 SCSI", esp_intr);
@@ -124,11 +127,10 @@
esp_initialize(esp);
- zorro_config_board(key, 0);
-
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;
}
@@ -249,12 +251,11 @@
int blz2060_esp_release(struct Scsi_Host *instance)
{
#ifdef MODULE
- unsigned int key;
+ unsigned long address = (unsigned long)((struct NCR_ESP *)instance->hostdata)->edev;
- key = ((struct NCR_ESP *)instance->hostdata)->slot;
esp_deallocate((struct NCR_ESP *)instance->hostdata);
esp_release();
- zorro_unconfig_board(key, 0);
+ release_mem_region(address, sizeof(struct ESP_regs));
free_irq(IRQ_AMIGA_PORTS, esp_intr);
#endif
return 1;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)