Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 12 Aug 1998 18:33:14 +0930
From:      Greg Lehey <grog@lemis.com>
To:        Thomas Runge <runge@egd.igd.fhg.de>, "freebsd-questions@FreeBSD.ORG" <freebsd-questions@FreeBSD.ORG>
Subject:   Re: Aladdin V boards trouble
Message-ID:  <19980812183314.J28142@lemis.com>
In-Reply-To: <35D14E33.98645E0A@rostock.zgdv.de>; from Thomas Runge on Wed, Aug 12, 1998 at 10:11:31AM %2B0200
References:  <35D14E33.98645E0A@rostock.zgdv.de>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wednesday, 12 August 1998 at 10:11:31 +0200, Thomas Runge wrote:
> Hi there.
>
> I've got a new Aladdin V based board. It has onboard
> PCI IDE supporting PIO modes up to mode 5, Ultra DMA/33 and
> 100 MHz CPU bus frequency (you may find a complete
> description at http://www.ali.com.tw/av.htm).
>
> I built a kernel supporting multi sector and 32 bit transfers
> including LBA support. This one works, but not fine. It
> freezes my box on heavy disk usage very often.

You don't say what version of FreeBSD.  Since 2.x doesn't support
UDMA, this must be -CURRENT, in which case you probably shouldn't be
asking here.  Since this is a question that will be asked more often,
though, I'm not following up to -current.

> I switched on some kernel options for debug messages and
> getting this on failure: interrupt timeout:
> status 50<rdy, seekdone> error 1 <no_dam> wdtimeout()
> DMA status 4.
>
> I find this message while booting: "ide_pci: generic_dma_init
> 01f0:1: warning, IDE controller timing not set" and traced
> it down to ide_pci.c. There I found, that my board isnt
> explicitly supported, just some intel based ones. And the
> generic DMA routines used by the kernel seem to have problems...

I've checked this message, and it seems to me that it's telling me
that your primary slave has not been set to run DMA.  I get it on my
machine too, for both slave drives:

wdc0 at 0x1f0-0x1f7 irq 14 flags 0xa0ffa0ff on isa
ide_pci: generic_dmainit 01f0:1: warning, IDE controller timing not set
wdc0: unit 0 (wd0): <ST51270A>, DMA, 32-bit, multi-block-32
wd0: 1223MB (2504880 sectors), 2485 cyls, 16 heads, 63 S/T, 512 B/S
wdc1 at 0x170-0x177 irq 15 flags 0xa0ffa0ff on isa
ide_pci: generic_dmainit 0170:1: warning, IDE controller timing not set
wdc1: unit 0 (wd2): <IBM-DHEA-36480>, DMA, 32-bit, multi-block-16
wd2: 6197MB (12692736 sectors), 12592 cyls, 16 heads, 63 S/T, 512 B/S

It doesn't worry me overly, because these drives don't exist.  Does
your primary slave exist?  It doesn't seem to be worried about the
primary master.  I don't think the fact that your chip isn't mentioned
specifically means anything at all.  I'm running an SiS chipset, and
it's not mentioned either.

> So, my question is, is there is a patch or work in progress
> to support this board? Or is it possible to disable DMA
> easily as long as there is no special driver for it?
> Maybe this should be a kernel option?

You can disable DMA with UserConfig.  Boot with the -c option and
select the visual configuration editor.  The flags are described in
wd(4).  Here's a description extracted from "The Complete FreeBSD",
second edition (http://www.cdrom.com/titles/os/bsdbook2.htm).

A number of flags and options apply to wdc0:

o The  flags  fields are used to enable the multi-sector I/O and the 32 bit I/O
  modes.  You can use them either  in  the  controller  definition  or  in  the
  individual   disk   definitions.   If  you  want  to  use  them  during  boot
  configuration, specify them in the controller definition.

  16 flag bits are provided for each drive.  The first 16 flag  bits  refer  to
  drive 1, and the second 16 bits refer to drive 0.  In each set of flags,

  o Bit 15 (0x8000) specifies to probe for 32 bit transfers.

  o Bit 14 (0x4000) enables waking powered-down laptop drives.

  o Bit 13 (0x2000) allows probing for PCI IDE DMA controllers, such as Intel's
    PIIX south bridges.

  o Bit 12 (0x1000) enables LBA (logical block addressing mode).  If  this  bit
    is  not  set,  the  driver  accesses the disk in CHS (cylinder/head/sector)
    mode.

  o In CHS mode, if bits 11 to 8 are not equal to 0, they specify the number of
    heads  to assume (between 1 and 15).  The driver recalculates the number of
    cylinders to make up the total size of the disk.

  o The low 8 bits specify the maximum number of  sectors  per  transfer.   The
    special  case 0xff represents the maximum transfer size which the drive can
    handle.

  See the man page for wd(4) (on your system, but not in this  book)  for  more
  details.

  Thus,  we  can  break  down  the example value 0xff8004 (the full 32 bits are
  0x00ff8004) into 0x00ff for drive 1  (use  the  maximum  transfer  size)  and
  0x8004 for drive 0 (allow probing for 32 bit support, and use a transfer size
  of 4 sectors).  We use CHS addressing for this drive.

Be warned: I've seen a 500% increase in CPU usage and a corresponding
80% decrease in throughput after disabling UDMA.

> (And no, I wont disable these features in BIOS, as there is another
> OS an my disk that I need and which supports it ;-> )

I don't think disabling them in the BIOS would make any difference.

Having said all that, though, I think you're probably barking up the
wrong tree.  I'm guessing that, as in my case, the warning refers to a
non-existent disk, and that your real problem lies elsewhere.  I'd
suspect the bus frequency.  Have you tried turning your bus back down
to 66 MHz?  I'd guess that you're running into a sporadic hardware
problem which is hitting you harder than your other operating system.
The fact that the chipset isn't listed as being supported is probably
not that significant.

Greg
--
See complete headers for address and phone numbers
finger grog@lemis.com for PGP public key

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19980812183314.J28142>