Subject: aha1542.c DMA problem
To: None <current-users@sun-lamp.cs.berkeley.edu>
From: Manuel Bouyer <bouyer@ensta.fr>
List: current-users
Date: 04/15/1994 11:50:47
Hi,
i've got a problem whith the aha1542.c driver.
I've  got a scsi driver which do the following things, from ioctl() (two 
different ioctl):

            if ((kdata=malloc(conf->packet_length,M_TEMP,M_NOWAIT))
                        ==NULL) {
                        printf("%s: not enouth memory\n",
                        sworm->sc_dev.dv_xname);
                return EIO;
                }

and then
    return scsi_scsi_cmd(sworm->sc_link, (struct scsi_generic *) &cmd,
        sizeof(cmd),kdata,len*WORM_BLKSIZE,CDRETRIES,
        10000, NULL, SCSI_DATA_OUT);

kdata is a global u_char*

conf->packet_length = 64 k (i've also tried 32 and  16 k,
and len*WORM_BLKSIZE is always =< conf->packet_length (A printf confirm these values)

sometines, all works fine.

sometimes, i get from aha0 a 'aha0: DMA beyond end of ISA' (depending on
how the malloc was performed, i think)
as i've only 16 Meg RAM

I am doing something wrong ?
I'm using the tar_files of Apr 10 (aha1542.c is Apr  9)

Here is what i get at boot: 

 CPU: i486DX (486-class CPU)
 real mem  = 16646144
 avail mem = 14553088
 using 228 buffers containing 933888 bytes of memory
 pc0 at isa0 port 0x60-0x6f irq 1: color
 com0 at isa0 port 0x3f8-0x3ff irq 4: ns82450 or ns16450, no fifo
 com1 at isa0 port 0x2f8-0x2ff irq 3: ns82450 or ns16450, no fifo
 lpt1 at isa0 port 0x378-0x37f: polled
 wdc0 at isa0 port 0x1f0-0x1f7 irq 14
 wd0 at wdc0 drive 0: 327MB 665 cyl, 16 head, 63 sec <Conner Peripherals 340MB - CP30344>
 fdc0 at isa0 port 0x3f0-0x3f7 irq 6 drq 2
 fd0 at fdc0 drive 0: 1.44MB 80 cyl, 2 head, 18 sec
 aha0: aha_cmd, cmd/data port empty 3
 aha0 at isa0 port 0x330-0x333 irq 11 drq 5
 scsibus0 at aha0
 aha0 targ 0 lun 0: <SEAGATE ST11200N SUN1.059500> SCSI2 direct fixed
 sd0 at scsibus0: 1005MB, 1872 cyl, 15 head, 73 se , 512 bytes/sec
 aha0 targ 1 lun 0: <SEAGATE ST11200N SUN1.058808> SCSI2 direct fixed
 sd1 at scsibus0: 1005MB, 1872 cyl, 15 head, 73 se , 512 bytes/sec
 aha0 targ 2 lun 0: <TEXEL   CD-ROM DM-XX24 K1.10> SCSI2 readonly removable
 cd0 at scsibus0: cd present, 400000 x 2048 byte records
 aha0 targ 3 lun 0: <SEAGATE ST11200N SUN1.059500> SCSI2 direct fixed
 sd2 at scsibus0: 1005MB, 1872 cyl, 15 head, 73 sec, 512 bytes/sec
 aha0 targ 4 lun 0: <SEAGATE ST11200N SUN1.059500> SCSI2 direct fixed
 sd3 at scsibus0: 1005MB, 1872 cyl, 15 head, 73 sec, 512 bytes/sec
 aha0 targ 5 lun 0: <RICOH   RS9200CD        0159> SCSI1 worm removable
 
 RICOH-
 RICOH   -worm0 at scsibus0: drive empty
 aha0 targ 6 lun 0: <HP      HP35480A        1009> SCSI2 sequential removable
 st0 at scsibus0: drive empty
 ed1 at isa0 port 0x250-0x25f iomem 0xd8000-0xd9fff
 irq 9: address 02:60:8c:aa:e5:60, type 3c503 (16-bit)
 ie0: unknown AT&T board type code 0
 ie0: can't map 3C507 RAM in high memory
 npx0 at isa0 port 0xf0-0xff: using exception 16
 biomask 4840 netmask 200 ttymask 1a


--
Manuel Bouyer, Ecole Nationale Superieure de Techniques Avancees, Paris
email: bouyer@ensta.fr
--

------------------------------------------------------------------------------