summaryrefslogtreecommitdiffstats
path: root/drivers/scsi
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tsbogend@alpha.franken.de>1999-03-25 22:41:20 +0000
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>1999-03-25 22:41:20 +0000
commit3f108a94024ddc7545500d616561830196e06b72 (patch)
tree34627ca3c07b339511e79d993cf27b88e786ad79 /drivers/scsi
parent9f7dc58742167e883abc041db35e4d8f16e93100 (diff)
added workaround for getting passed bogus pointer from wd33c93. This fixes
the reported CDrom problems. But there is still something fishy with broken SCSI devices
Diffstat (limited to 'drivers/scsi')
-rw-r--r--drivers/scsi/sgiwd93.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/drivers/scsi/sgiwd93.c b/drivers/scsi/sgiwd93.c
index da045fe91..db8e0bb17 100644
--- a/drivers/scsi/sgiwd93.c
+++ b/drivers/scsi/sgiwd93.c
@@ -5,7 +5,7 @@
*
* (In all truth, Jed Schimmel wrote all this code.)
*
- * $Id: sgiwd93.c,v 1.9 1998/09/16 21:49:41 tsbogend Exp $
+ * $Id: sgiwd93.c,v 1.10 1999/03/24 00:04:11 tsbogend Exp $
*/
#include <linux/init.h>
#include <linux/types.h>
@@ -132,9 +132,18 @@ static int dma_setup(Scsi_Cmnd *cmd, int datainp)
write_wd33c93_count(regp, totlen);
} else {
/* Non-scattered dma. */
-#ifdef DEBUG_DMA */
+#ifdef DEBUG_DMA
printk("ONEBUF<%p,%d>", cmd->SCp.ptr, cmd->SCp.this_residual);
#endif
+ /*
+ * wd33c93 shouldn't pass us bogus dma_setups, but
+ * it does:-( The other wd33c93 drivers deal with
+ * it the same way (which isn't that obvious).
+ * IMHO a better fix would be, not to do these
+ * dma setups in the first place
+ */
+ if (cmd->SCp.ptr == NULL)
+ return 1;
fill_hpc_entries (&hcp, cmd->SCp.ptr,cmd->SCp.this_residual);
write_wd33c93_count(regp, cmd->SCp.this_residual);
}