From owner-freebsd-stable@FreeBSD.ORG Mon Jan 15 13:32:18 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id DA4C616A407 for ; Mon, 15 Jan 2007 13:32:18 +0000 (UTC) (envelope-from hselasky@c2i.net) Received: from swip.net (mailfe02.swip.net [212.247.154.33]) by mx1.freebsd.org (Postfix) with ESMTP id 534AA13C428 for ; Mon, 15 Jan 2007 13:32:18 +0000 (UTC) (envelope-from hselasky@c2i.net) X-Cloudmark-Score: 0.000000 [] Received: from [193.217.102.48] (account mc467741@c2i.net HELO [10.0.0.249]) by mailfe02.swip.net (CommuniGate Pro SMTP 5.0.12) with ESMTPA id 386144402; Mon, 15 Jan 2007 13:32:11 +0100 From: Hans Petter Selasky To: freebsd-hackers@freebsd.org Date: Mon, 15 Jan 2007 13:31:45 +0100 User-Agent: KMail/1.7 References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200701151331.47185.hselasky@c2i.net> Cc: freebsd-stable@freebsd.org, Pietro Cerutti Subject: Re: atacontrol kernel crash (atausb?) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 15 Jan 2007 13:32:18 -0000 On Monday 15 January 2007 12:22, Pietro Cerutti wrote: > Hello, > this is a reproducible kernel page-fault crash on stable as of 1h ago: > > FreeBSD gahrtop.localhost 6.2-STABLE FreeBSD 6.2-STABLE #4: Mon Jan 15 > 11:24:56 CET 2007 > root@gahrtop.localhost:/usr/obj/usr/src/sys/GAHRTOP i386 > > 1) atacontrol list > ATA channel 0: > Master: ad0 Serial ATA v1.0 > Slave: no device present > ATA channel 1: > Master: no device present > Slave: acd0 ATA/ATAPI revision 5 > > 2) -> plug in USB stick (microspot 256MB USB2.0) > > 3) atacontrol list > ATA channel 0: > Master: ad0 Serial ATA v1.0 > Slave: no device present > ATA channel 1: > Master: no device present > Slave: acd0 ATA/ATAPI revision 5 > ATA channel 2: > Master: no device present > Slave: no device present > > 4) atacontrol attach ata2 This is a known issue that SOS should fix. If you look into the code of "ata_attach()" you will see that it tries to do things that are not allowed by USB devices, like allocating an IRQ: int ata_attach(device_t dev) { struct ata_channel *ch = device_get_softc(dev); int error, rid; /* check that we have a virgin channel to attach */ if (ch->r_irq) return EEXIST; /* initialize the softc basics */ ch->dev = dev; ch->state = ATA_IDLE; bzero(&ch->state_mtx, sizeof(struct mtx)); mtx_init(&ch->state_mtx, "ATA state lock", NULL, MTX_DEF); bzero(&ch->queue_mtx, sizeof(struct mtx)); mtx_init(&ch->queue_mtx, "ATA queue lock", NULL, MTX_DEF); TAILQ_INIT(&ch->ata_queue); /* reset the controller HW, the channel and device(s) */ while (ATA_LOCKING(dev, ATA_LF_LOCK) != ch->unit) tsleep(&error, PRIBIO, "ataatch", 1); ATA_RESET(dev); ATA_LOCKING(dev, ATA_LF_UNLOCK); /* setup interrupt delivery */ rid = ATA_IRQ_RID; ch->r_irq = bus_alloc_resource_any(dev, SYS_RES_IRQ, &rid, RF_SHAREABLE | RF_ACTIVE); if (!ch->r_irq) { device_printf(dev, "unable to allocate interrupt\n"); return ENXIO; } if ((error = bus_setup_intr(dev, ch->r_irq, ATA_INTR_FLAGS, (driver_intr_t *)ata_interrupt, ch, &ch->ih))) { device_printf(dev, "unable to setup interrupt\n"); return error; } /* probe and attach devices on this channel unless we are in early boot */ if (!ata_delayed_attach) ata_identify(dev); return 0; } Same with "ata_detach()". > > last one: why atausb doesn't have a manual page?? Probably the device driver is too new. --HPS