ppa problem in 2.0.32

Andrzej Krzysztofowicz (ankry@green.mif.pg.gda.pl)
Fri, 28 Nov 1997 18:24:07 +0100 (CET)


Hi
A null pointer dereference appears in 2.0.32 when ppa driver is compiled
as a module and the ppa module loading fails. It can happen when no parallel
port ZIP drive is connected or the parallel port is busy (eg used by lp
module).
The enclosed patch fixes this problem. However, I still don't know why
kernel needs /proc/scsi info about the ppa module even if ppa_start() fails
(returning 0 drives found). Maybe the problem should be corrected in lower
level scsi driver ?

***************** ppa patch starts ************************************
--- linux/drivers/scsi/ppa.c.old Thu Nov 14 14:20:10 1996
+++ linux/drivers/scsi/ppa.c Sun Nov 23 15:58:53 1997
@@ -397,6 +397,8 @@
{ struct Scsi_Host *hreg;
int rs;

+ host->proc_dir = &proc_scsi_ppa;
+
/* can we have the ports ? */

if (check_region(ppa_base,3)) {
@@ -416,8 +418,6 @@
}

/* now the glue ... */
-
- host->proc_dir = &proc_scsi_ppa;

request_region(ppa_base,3,"ppa");

********************** ppa patch ends ************************************

-- 
=======================================================================
  Andrzej M. Krzysztofowicz               ankry@mif.pg.gda.pl
  tel.  (0-58) 47 14 61
Wydz.Fizyki Technicznej i Matematyki Stosowanej Politechniki Gdanskiej