From owner-freebsd-scsi@FreeBSD.ORG Fri Aug 3 18:32:19 2007 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 816D516A417 for ; Fri, 3 Aug 2007 18:32:19 +0000 (UTC) (envelope-from Juergen.Dankoweit@t-online.de) Received: from mailout01.sul.t-online.com (mailout01.sul.t-online.de [194.25.134.80]) by mx1.freebsd.org (Postfix) with ESMTP id 2074D13C474 for ; Fri, 3 Aug 2007 18:32:19 +0000 (UTC) (envelope-from Juergen.Dankoweit@t-online.de) Received: from fwd32.aul.t-online.de by mailout01.sul.t-online.com with smtp id 1IH1hv-00039h-03; Fri, 03 Aug 2007 20:17:03 +0200 Received: from mail.juergendankoweit.net (SgHWBgZTgeEEMqpBsACWVDMk7Y3wcNn4TosmQZ2h2lJuzIFT-4Mw4z@[84.150.75.213]) by fwd32.aul.t-online.de with esmtp id 1IH1hm-1GSiDg0; Fri, 3 Aug 2007 20:16:54 +0200 Received: from localhost (localhost.juergendankoweit.net [127.0.0.1]) by mail.juergendankoweit.net (Postfix) with ESMTP id 1079012038 for ; Fri, 3 Aug 2007 20:17:24 +0200 (CEST) X-Virus-Scanned: amavisd-new at juergendankoweit.net Received: from mail.juergendankoweit.net ([127.0.0.1]) by localhost (mail.juergendankoweit.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id TFFTVirpmZTY for ; Fri, 3 Aug 2007 20:17:18 +0200 (CEST) Received: from primergy470.juergendankoweit.net (primergy470.juergendankoweit.net [192.168.1.1]) by mail.juergendankoweit.net (Postfix) with ESMTP id E22FE114C2 for ; Fri, 3 Aug 2007 20:17:17 +0200 (CEST) From: Juergen.Dankoweit@t-online.de (Juergen Dankoweit) To: freebsd-scsi@freebsd.org Content-Type: text/plain; charset=UTF-8 Organization: FreeBSD-Onkel Date: Fri, 03 Aug 2007 20:17:16 +0200 Message-Id: <1186165036.1613.17.camel@primergy470.juergendankoweit.net> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 8bit X-ID: SgHWBgZTgeEEMqpBsACWVDMk7Y3wcNn4TosmQZ2h2lJuzIFT-4Mw4z X-TOI-MSGID: fb81cd3a-4398-40a1-b4d4-bbabad5552de Subject: Possible solution for LSI chip problems X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Juergen.Dankoweit@FreeBSD-Onkel.de List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 03 Aug 2007 18:32:19 -0000 Hello to the list. As written in PR 114597 (http://www.freebsd.org/cgi/query-pr.cgi?pr=kern/114597) and PR 88315 (http://www.freebsd.org/cgi/query-pr.cgi?pr=i386/88315) there are some problems with the LSI SCSI chips on some systems. The third problem is that switching of the LSI chip over the machine setup does not affect FreeBSD because the it scans the PCI bus and finds the LSI device. That isn't a funny situation if you what to use an other HBA like Adaptec or so. My idea is to implement the following lines if (resource_disabled("sym", dev->unit)) return (ENXIO); in the following two functions in the sym_hpd.c code: line 8459: static int sym_pci_probe(device_t dev) { ... }; line 8476: static int sym_pci_attach(device_t dev) {... }; After this it is possible to disable the sym driver in the device.hints: hint.sym.x.disabled="1" (x = 0,1,...) In my opinion this would make it possible to use FreeBSD on systems where it hangs during boot time. Best regards Jürgen Dankoweit PS: My code suggestion: static int sym_pci_probe(device_t dev) { struct sym_pci_chip *chip; /* hint.sym.x.disabled="1" */ if (resource_disabled("sym", dev->unit)) return (ENXIO); chip = sym_find_pci_chip(dev); if (chip && sym_find_firmware(chip)) { device_set_desc(dev, chip->name); return (chip->lp_probe_bit & SYM_SETUP_LP_PROBE_MAP)? BUS_PROBE_LOW_PRIORITY : BUS_PROBE_DEFAULT; } return ENXIO; } /* * Attach a sym53c8xx device. */ static int sym_pci_attach(device_t dev) { struct sym_pci_chip *chip; u_short command; u_char cachelnsz; struct sym_hcb *np = 0; struct sym_nvram nvram; struct sym_fw *fw = 0; int i; bus_dma_tag_t bus_dmat; /* hint.sym.x.disabled="1" */ if (resource_disabled("sym", dev->unit)) return (ENXIO); bus_dmat = bus_get_dma_tag(dev); /* * Only probed devices should be attached. * We just enjoy being paranoid. :) */ chip = sym_find_pci_chip(dev); if (chip == NULL || (fw = sym_find_firmware(chip)) == NULL) return (ENXIO); [ and so on ]