u14-34 and 2.1.0

Heiko Eissfeldt (heiko@colossus.escape.de)
Sat, 28 Sep 1996 21:58:09 +0200 (MEST)


Hi Dario,

With these changes I could manage the first inquiry with
kernel 2.1.0 prepatch #4.

Cheers, Heiko

--- drivers/scsi/u14-34f.c.or Sat Jul 13 21:16:41 1996
+++ drivers/scsi/u14-34f.c Sat Sep 28 21:53:27 1996
@@ -322,7 +322,7 @@
memset(cpp, 0, sizeof(struct mscp));
cpp->opcode = OP_HOST_ADAPTER;
cpp->xdir = DTD_IN;
- cpp->data_address = (unsigned int) HD(j)->board_id;
+ cpp->data_address = (unsigned int) virt_to_bus(HD(j)->board_id);
cpp->data_len = sizeof(HD(j)->board_id);
cpp->scsi_cdbs_len = 6;
cpp->scsi_cdbs[0] = HA_CMD_INQUIRY;
@@ -338,7 +338,7 @@
outb(CMD_CLR_INTR, sh[j]->io_port + REG_SYS_INTR);

/* Store pointer in OGM address bytes */
- outl((unsigned int)cpp, sh[j]->io_port + REG_OGM);
+ outl((unsigned int) virt_to_bus(cpp), sh[j]->io_port + REG_OGM);

/* Issue OGM interrupt */
outb(CMD_OGM_INTR, sh[j]->io_port + REG_LCL_INTR);
@@ -448,7 +448,7 @@

sh[j]->io_port = *port_base;
sh[j]->n_io_port = REGION_SIZE;
- sh[j]->base = bios_segment_table[config_1.bios_segment];
+ sh[j]->base = bus_to_virt((unsigned long)bios_segment_table[config_1.bios_segment]);
sh[j]->irq = irq;
sh[j]->sg_tablesize = MAX_SGLIST;
sh[j]->this_id = config_2.ha_scsi_id;
@@ -519,7 +519,7 @@

printk("%s: PORT 0x%03x, BIOS 0x%05x, IRQ %u, DMA %u, SG %d, "\
"mbox %2d, CmdLun %d, C%d.\n", BN(j), sh[j]->io_port,
- (int)sh[j]->base, sh[j]->irq,
+ (int) virt_to_bus(sh[j]->base), sh[j]->irq,
sh[j]->dma_channel, sh[j]->sg_tablesize,
sh[j]->can_queue, sh[j]->cmd_per_lun,
sh[j]->hostt->use_clustering);
@@ -574,7 +574,7 @@
}

cpp->use_sg = SCpnt->use_sg;
- cpp->data_address = (unsigned int) cpp->sglist;
+ cpp->data_address = (unsigned int) virt_to_bus(cpp->sglist);
cpp->data_len = data_len;
}

@@ -649,7 +649,7 @@
cpp->target = SCpnt->target;
cpp->lun = SCpnt->lun;
cpp->SCpnt = SCpnt;
- cpp->sense_addr = (unsigned int) SCpnt->sense_buffer;
+ cpp->sense_addr = (unsigned int) virt_to_bus(SCpnt->sense_buffer);
cpp->sense_len = sizeof SCpnt->sense_buffer;

if (SCpnt->use_sg) {
@@ -657,7 +657,7 @@
build_sg_list(cpp, SCpnt);
}
else {
- cpp->data_address = (unsigned int)SCpnt->request_buffer;
+ cpp->data_address = (unsigned int) virt_to_bus(SCpnt->request_buffer);
cpp->data_len = SCpnt->request_bufflen;
}

@@ -675,7 +675,7 @@
}

/* Store pointer in OGM address bytes */
- outl((unsigned int)cpp, sh[j]->io_port + REG_OGM);
+ outl((unsigned int) virt_to_bus(cpp), sh[j]->io_port + REG_OGM);

/* Issue OGM interrupt */
outb(CMD_OGM_INTR, sh[j]->io_port + REG_LCL_INTR);
@@ -901,7 +901,7 @@
if (do_trace) printk("%s: ihdlr, start service, count %d.\n",
BN(j), HD(j)->iocount);

- spp = (struct mscp *)inl(sh[j]->io_port + REG_ICM);
+ spp = (struct mscp *) bus_to_virt(inl(sh[j]->io_port + REG_ICM));

/* Clear interrupt pending flag */
outb(CMD_CLR_INTR, sh[j]->io_port + REG_SYS_INTR);