patch-2.1.48 linux/drivers/scsi/esp.c
Next file: linux/drivers/scsi/ppa.c
Previous file: linux/drivers/scsi/atari_scsi.c
Back to the patch index
Back to the overall index
- Lines: 69
- Date:
Thu Jul 31 13:09:17 1997
- Orig file:
v2.1.47/linux/drivers/scsi/esp.c
- Orig date:
Wed Apr 23 19:01:22 1997
diff -u --recursive --new-file v2.1.47/linux/drivers/scsi/esp.c linux/drivers/scsi/esp.c
@@ -1705,7 +1705,7 @@
* the nexus and tell the device to abort. However, we really
* cannot 'reconnect' per se, therefore we tell the upper layer
* the safest thing we can. This is, wait a bit, if nothing
- * happens, we are really hung so reset the bug.
+ * happens, we are really hung so reset the bus.
*/
return SCSI_ABORT_SNOOZE;
@@ -1743,11 +1743,10 @@
done_SC->request_bufflen,
esp->edev->my_bus);
} else {
- struct scatterlist *scl = (struct scatterlist *)done_SC->buffer;
#ifdef DEBUG_ESP_SG
printk("esp%d: unmapping sg ", esp->esp_id);
#endif
- mmu_release_scsi_sgl((struct mmu_sglist *) scl,
+ mmu_release_scsi_sgl((struct mmu_sglist *) done_SC->buffer,
done_SC->use_sg - 1,
esp->edev->my_bus);
#ifdef DEBUG_ESP_SG
@@ -2010,7 +2009,7 @@
if(sz > 0x1000000)
sz = 0x1000000;
} else {
- base = ((__u32)sp->SCp.ptr);
+ base = ((__u32)((unsigned long)sp->SCp.ptr));
base &= (0x1000000 - 1);
end = (base + sp->SCp.this_residual);
if(end > 0x1000000)
@@ -2280,11 +2279,12 @@
tmp |= DMA_ST_WRITE;
else
tmp &= ~(DMA_ST_WRITE);
- dregs->st_addr = ((__u32)SCptr->SCp.ptr);
+ dregs->st_addr = ((__u32)((unsigned long)SCptr->SCp.ptr));
dregs->cond_reg = tmp;
} else {
esp_setcount(eregs, hmuch, 0);
- dma_setup(dregs, esp->dma->revision, ((__u32)SCptr->SCp.ptr),
+ dma_setup(dregs, esp->dma->revision,
+ ((__u32)((unsigned long)SCptr->SCp.ptr)),
hmuch, (thisphase == in_datain));
ESPDATA(("DMA|TI --> do_intr_end\n"));
esp_cmd(esp, eregs, ESP_CMD_DMA | ESP_CMD_TI);
@@ -4059,8 +4059,12 @@
}
#else
+/* XXX Gross hack for sun4u SMP, fix it right later... -DaveM */
#ifdef __sparc_v9__
-#error Dave you need to fix some things first...
+extern unsigned char ino_to_pil[];
+#define INO_TO_PIL(esp) (ino_to_pil[(esp)->irq])
+#else
+#define INO_TO_PIL(esp) ((esp)->irq & 0xf)
#endif
/* For SMP we only service one ESP on the list list at our IRQ level! */
@@ -4070,7 +4074,7 @@
/* Handle all ESP interrupts showing at this IRQ level. */
for_each_esp(esp) {
- if((esp->irq & 0xf) == irq) {
+ if(INO_TO_PIL(esp) == irq) {
if(DMA_IRQ_P(esp->dregs)) {
DMA_INTSOFF(esp->dregs);
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov