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 Mon Aug 28 21:26:36 2000
+++ sym_hipd.c Mon 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érard 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:
>
> The below relevant part of the trace:
>
> 0x1000-0x10ff mem 0xb1100000-0xb1101fff,0xb1400000-0xb14003ff
>
> 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.
>
> 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.
>
> Thanks in advance to report me the actual content of the PCI configuration
> space header (first 64 bytes) of your SYM53C895A.
>
> Gérard.
>
> On Mon, 28 Aug 2000 hiramoto@phys.chs.nihon-u.ac.jp wrote:
>
> >
> > >Number: 20895
> > >Category: kern
> > >Synopsis: sym driver doesn't work for SYM53C895A
> > >Confidential: no
> > >Severity: critical
> > >Priority: high
> > >Responsible: freebsd-bugs
> > >State: open
> > >Quarter:
> > >Keywords:
> > >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:
> >
> > 4.1-stable and 5.0-current (x86)
> > Compaq Prliant ML 330 (on-board chips sym53c895a ultra2 scsi,
> > no ide disk)
> >
> > >Description:
> >
> > sym0: <895a> port 0x1000-0x10ff mem 0xb1100000-0xb1101fff,0xb1400000-0xb14003ff irq 15 at device 4.0 on pci1
> > sym0: failed to allocate RAM resouces
> >
> > Fatal trap 12: page fault while in kernel mode
> > .....
> >
> > The legacy(?) ncr driver works, so the generic kernel of 4.1 is OK,
> > but it works as ultra, not as ultra-2.
> >
> > >How-To-Repeat:
> >
> > In my system (Compaq Prliant ML 330), 5.0 generic kernel and
> > 4.1-stable kernel with sym (without ncr) reliably reproduce
> > this problem. I have no idea whether this is generic for any
> > sytems having Symbios 53c895a or not, because I have no other
> > system with 53c895a.
> >
> > >Fix:
> >
> > The following patch works at least for me, although I don't know
> > this is the right fix. (Non-FreeBSD_Bus_Io_Abstraction part is
> > untested)
> >
> >
> > *** sym_hipd.c.orig Mon Jul 3 15:21:53 2000
> > --- sym_hipd.c Mon Aug 28 02:39:07 2000
> > ***************
> > *** 9057,9066 ****
> > (command & PCIM_CMD_MEMEN) != 0) {
> > #ifdef FreeBSD_Bus_Io_Abstraction
> > int regs_id = SYM_PCI_RAM;
> > ! if (np->features & FE_64BIT)
> > regs_id = SYM_PCI_RAM64;
> > ! np->ram_res = bus_alloc_resource(dev, SYS_RES_MEMORY, ®s_id,
> > ! 0, ~0, 1, RF_ACTIVE);
> > if (!np->ram_res) {
> > device_printf(dev,"failed to allocate RAM resources\n");
> > goto attach_failed;
> > --- 9057,9072 ----
> > (command & PCIM_CMD_MEMEN) != 0) {
> > #ifdef FreeBSD_Bus_Io_Abstraction
> > int regs_id = SYM_PCI_RAM;
> > ! if (np->features & FE_64BIT) {
> > regs_id = SYM_PCI_RAM64;
> > ! np->ram_res = bus_alloc_resource(dev, SYS_RES_MEMORY,
> > ! ®s_id, 0, ~0, 1, RF_ACTIVE);
> > ! if (!np->ram_res)
> > ! regs_id = SYM_PCI_RAM;
> > ! }
> > ! if (regs_id == SYM_PCI_RAM)
> > ! np->ram_res = bus_alloc_resource(dev, SYS_RES_MEMORY,
> > ! ®s_id, 0, ~0, 1, RF_ACTIVE);
> > if (!np->ram_res) {
> > device_printf(dev,"failed to allocate RAM resources\n");
> > goto attach_failed;
> > ***************
> > *** 9074,9082 ****
> > #else
> > vm_offset_t vaddr, paddr;
> > int regs_id = SYM_PCI_RAM;
> > ! if (np->features & FE_64BIT)
> > regs_id = SYM_PCI_RAM64;
> > ! if (!pci_map_mem(pci_tag, regs_id, &vaddr, &paddr)) {
> > printf("%s: failed to map RAM window\n", sym_name(np));
> > goto attach_failed;
> > }
> > --- 9080,9092 ----
> > #else
> > vm_offset_t vaddr, paddr;
> > int regs_id = SYM_PCI_RAM;
> > ! if (np->features & FE_64BIT) {
> > regs_id = SYM_PCI_RAM64;
> > ! if (!pci_map_mem(pci_tag, regs_id, &vaddr, &paddr))
> > ! regs_id = SYM_PCI_RAM;
> > ! }
> > ! if (regs_id == SYM_PCI_RAM &&
> > ! !pci_map_mem(pci_tag, regs_id, &vaddr, &paddr)) {
> > printf("%s: failed to map RAM window\n", sym_name(np));
> > goto attach_failed;
> > }
> >
> > >Release-Note:
> > >Audit-Trail:
> > >Unformatted:
> >
> >
> > To Unsubscribe: send mail to majordomo@FreeBSD.org
> > with "unsubscribe freebsd-bugs" in the body of the message
>
>
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>
