Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 28 Aug 2000 21:41:29 +0200 (CEST)
From:      =?ISO-8859-1?Q?G=E9rard_Roudier?= <groudier@club-internet.fr>
To:        hiramoto@phys.chs.nihon-u.ac.jp
Cc:        FreeBSD-bugs@FreeBSD.ORG
Subject:   Re: kern/20895: sym driver doesn't work for SYM53C895A
Message-ID:  <Pine.LNX.4.10.10008282133430.208-100000@linux.local>
In-Reply-To: <Pine.LNX.4.10.10008282050310.1246-100000@linux.local>

next in thread | previous in thread | raw e-mail | index | archive | help

I probably replied too quickly to your problem report. :)
Your patch just falls back to 32 bit BARs for RAM resource if 64 bits does
fail. That should mean that the SYM53C895A does not have 64 bit BARs for
memory window. I will check that, but for now, you can try the below patch
that just fixes the chip features description and let me know:

--- sym_hipd.c.orig=09Mon Aug 28 21:26:36 2000
+++ sym_hipd.c=09Mon Aug 28 21:27:05 2000
@@ -8869,7 +8869,7 @@
  ,
  {PCI_ID_SYM53C895A, 0xff, "895a", 6, 31, 7, 4,
  FE_WIDE|FE_ULTRA2|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFS|FE_LDSTR|FE_PFEN|
- FE_RAM|FE_RAM8K|FE_64BIT|FE_IO256|FE_NOPM|FE_LEDC|FE_LCKFRQ}
+ FE_RAM|FE_RAM8K|FE_IO256|FE_NOPM|FE_LEDC|FE_LCKFRQ}
  ,
  {PCI_ID_LSI53C1010, 0x00, "1010-33", 6, 31, 7, 8,
  FE_WIDE|FE_ULTRA3|FE_QUAD|FE_CACHE_SET|FE_BOF|FE_DFBC|FE_LDSTR|FE_PFEN|

Btw, I still will be glad to see the PCI configuration space of your
chip. :-)

Btw, current ncr(4) seems not to care about 64 bit BARs. This let me thing
that it may have problems with SYMBIOS chip that have 64 bit BARs. :-)

  Gerard.

On Mon, 28 Aug 2000, G=E9rard Roudier wrote:

> I am glad that you found some trick for your system to work, but I guess
> that your patch will not go into `sym', as it is, for the following
> reason:
>=20
> The below relevant part of the trace:
>=20
>     0x1000-0x10ff mem 0xb1100000-0xb1101fff,0xb1400000-0xb14003ff
>=20
> seems to indicate that MMIO resource (256 bytes) and on-chip RAM resource
> (8192 bytes) are presented to the driver, by some part, in reverse order.
>=20
> I donnot know why for now, but reporting the first 64 bytes of PCI config
> space will actually tell me what part is wrong, and so a correct fix or
> work-around will get possible to be implemented.
>=20
> Thanks in advance to report me the actual content of the PCI configuratio=
n
> space header (first 64 bytes) of your SYM53C895A.
>=20
>   G=E9rard.
>=20
> On Mon, 28 Aug 2000 hiramoto@phys.chs.nihon-u.ac.jp wrote:
>=20
> >=20
> > >Number:         20895
> > >Category:       kern
> > >Synopsis:       sym driver doesn't work for SYM53C895A
> > >Confidential:   no
> > >Severity:       critical
> > >Priority:       high
> > >Responsible:    freebsd-bugs
> > >State:          open
> > >Quarter:       =20
> > >Keywords:      =20
> > >Date-Required:
> > >Class:          sw-bug
> > >Submitter-Id:   current-users
> > >Arrival-Date:   Mon Aug 28 02:20:03 PDT 2000
> > >Closed-Date:
> > >Last-Modified:
> > >Originator:     Hisashi Hiramoto
> > >Release:        FreeBSD 4.1-STABLE i386
> > >Organization:
> > >Environment:
> >=20
> > =094.1-stable and 5.0-current (x86)
> > =09Compaq Prliant ML 330 (on-board chips sym53c895a ultra2 scsi,
> > =09no ide disk)
> > =09
> > >Description:
> >=20
> > =09sym0: <895a> port 0x1000-0x10ff mem 0xb1100000-0xb1101fff,0xb1400000=
-0xb14003ff irq 15 at device 4.0 on pci1
> > =09sym0: failed to allocate RAM resouces
> >=20
> > =09Fatal trap 12: page fault while in kernel mode
> > =09=09.....
> >=20
> > =09The legacy(?) ncr driver works, so the generic kernel of 4.1 is OK,
> > =09but it works as ultra, not as ultra-2.
> >=20
> > >How-To-Repeat:
> >=20
> > =09In my system (Compaq Prliant ML 330), 5.0 generic kernel and
> > =094.1-stable kernel with sym (without ncr) reliably reproduce
> > =09this problem.  I have no idea whether this is generic for any
> > =09sytems having Symbios 53c895a or not,  because I have no other
> > =09system with 53c895a.
> >=20
> > >Fix:
> >=20
> > =09The following patch works at least for me, although I don't know
> > =09this is the right fix. (Non-FreeBSD_Bus_Io_Abstraction part is
> > =09untested)
> >=20
> >=20
> > *** sym_hipd.c.orig=09Mon Jul  3 15:21:53 2000
> > --- sym_hipd.c=09Mon Aug 28 02:39:07 2000
> > ***************
> > *** 9057,9066 ****
> >   =09    (command & PCIM_CMD_MEMEN) !=3D 0) {
> >   #ifdef FreeBSD_Bus_Io_Abstraction
> >   =09=09int regs_id =3D SYM_PCI_RAM;
> > ! =09=09if (np->features & FE_64BIT)
> >   =09=09=09regs_id =3D SYM_PCI_RAM64;
> > ! =09=09np->ram_res =3D bus_alloc_resource(dev, SYS_RES_MEMORY, &regs_i=
d,
> > ! =09=09=09=09=09=09 0, ~0, 1, RF_ACTIVE);
> >   =09=09if (!np->ram_res) {
> >   =09=09=09device_printf(dev,"failed to allocate RAM resources\n");
> >   =09=09=09goto attach_failed;
> > --- 9057,9072 ----
> >   =09    (command & PCIM_CMD_MEMEN) !=3D 0) {
> >   #ifdef FreeBSD_Bus_Io_Abstraction
> >   =09=09int regs_id =3D SYM_PCI_RAM;
> > ! =09=09if (np->features & FE_64BIT) {
> >   =09=09=09regs_id =3D SYM_PCI_RAM64;
> > ! =09=09=09np->ram_res =3D bus_alloc_resource(dev, SYS_RES_MEMORY,
> > ! =09=09=09=09=09=09&regs_id, 0, ~0, 1, RF_ACTIVE);
> > ! =09=09=09if (!np->ram_res)
> > ! =09=09=09=09regs_id =3D SYM_PCI_RAM;
> > ! =09=09}
> > ! =09=09if (regs_id =3D=3D SYM_PCI_RAM)
> > ! =09=09=09np->ram_res =3D bus_alloc_resource(dev, SYS_RES_MEMORY,
> > ! =09=09=09=09=09=09&regs_id, 0, ~0, 1, RF_ACTIVE);
> >   =09=09if (!np->ram_res) {
> >   =09=09=09device_printf(dev,"failed to allocate RAM resources\n");
> >   =09=09=09goto attach_failed;
> > ***************
> > *** 9074,9082 ****
> >   #else
> >   =09=09vm_offset_t vaddr, paddr;
> >   =09=09int regs_id =3D SYM_PCI_RAM;
> > ! =09=09if (np->features & FE_64BIT)
> >   =09=09=09regs_id =3D SYM_PCI_RAM64;
> > ! =09=09if (!pci_map_mem(pci_tag, regs_id, &vaddr, &paddr)) {
> >   =09=09=09printf("%s: failed to map RAM window\n", sym_name(np));
> >   =09=09=09goto attach_failed;
> >   =09=09}
> > --- 9080,9092 ----
> >   #else
> >   =09=09vm_offset_t vaddr, paddr;
> >   =09=09int regs_id =3D SYM_PCI_RAM;
> > ! =09=09if (np->features & FE_64BIT) {
> >   =09=09=09regs_id =3D SYM_PCI_RAM64;
> > ! =09=09=09if (!pci_map_mem(pci_tag, regs_id, &vaddr, &paddr))
> > ! =09=09=09=09regs_id =3D SYM_PCI_RAM;
> > ! =09=09}
> > ! =09=09if (regs_id =3D=3D SYM_PCI_RAM &&
> > ! =09=09    !pci_map_mem(pci_tag, regs_id, &vaddr, &paddr)) {
> >   =09=09=09printf("%s: failed to map RAM window\n", sym_name(np));
> >   =09=09=09goto attach_failed;
> >   =09=09}
> >=20
> > >Release-Note:
> > >Audit-Trail:
> > >Unformatted:
> >=20
> >=20
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-bugs" in the body of the message
>=20
>=20



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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.LNX.4.10.10008282133430.208-100000>