From owner-freebsd-bugs Mon Aug 28 2:20:17 2000 Delivered-To: freebsd-bugs@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id EB2F837B446 for ; Mon, 28 Aug 2000 02:20:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.9.3/8.9.2) id CAA49830; Mon, 28 Aug 2000 02:20:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from grape.phys.chs.nihon-u.ac.jp (grape.phys.chs.nihon-u.ac.jp [133.43.174.46]) by hub.freebsd.org (Postfix) with ESMTP id B0F8F37B424 for ; Mon, 28 Aug 2000 02:14:45 -0700 (PDT) Received: (from hiramoto@localhost) by grape.phys.chs.nihon-u.ac.jp (8.11.0/8.11.0) id e7S9Ei401248; Mon, 28 Aug 2000 18:14:44 +0900 (JST) (envelope-from hiramoto) Message-Id: <200008280914.e7S9Ei401248@grape.phys.chs.nihon-u.ac.jp> Date: Mon, 28 Aug 2000 18:14:44 +0900 (JST) From: hiramoto@phys.chs.nihon-u.ac.jp Reply-To: hiramoto@phys.chs.nihon-u.ac.jp To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/20895: sym driver doesn't work for SYM53C895A Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org >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