From owner-freebsd-scsi@FreeBSD.ORG Mon Apr 2 11:08:21 2007 Return-Path: X-Original-To: freebsd-scsi@FreeBSD.org Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6343916A405 for ; Mon, 2 Apr 2007 11:08:21 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [69.147.83.40]) by mx1.freebsd.org (Postfix) with ESMTP id 4F02813C4C1 for ; Mon, 2 Apr 2007 11:08:21 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (linimon@localhost [127.0.0.1]) by freefall.freebsd.org (8.13.4/8.13.4) with ESMTP id l32B8LbN052265 for ; Mon, 2 Apr 2007 11:08:21 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from linimon@localhost) by freefall.freebsd.org (8.13.4/8.13.4/Submit) id l32B8Jbq052261 for freebsd-scsi@FreeBSD.org; Mon, 2 Apr 2007 11:08:19 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 2 Apr 2007 11:08:19 GMT Message-Id: <200704021108.l32B8Jbq052261@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: linimon set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to you X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Apr 2007 11:08:21 -0000 Current FreeBSD problem reports Critical problems Serious problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/39388 scsi ncr/sym drivers fail with 53c810 and more than 256MB m o kern/40895 scsi wierd kernel / device driver bug o kern/52638 scsi [panic] SCSI U320 on SMP server won't run faster than s kern/57398 scsi [mly] Current fails to install on mly(4) based RAID di o kern/60598 scsi wire down of scsi devices conflicts with config o kern/60641 scsi [sym] Sporadic SCSI bus resets with 53C810 under load s kern/61165 scsi [panic] kernel page fault after calling cam_send_ccb o kern/74627 scsi [ahc] [hang] Adaptec 2940U2W Can't boot 5.3 o kern/81887 scsi [aac] Adaptec SCSI 2130S aac0: GetDeviceProbeInfo comm o kern/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/92798 scsi [ahc] SCSI problem with timeouts o kern/93128 scsi [sym] FreeBSD 6.1 BETA 1 has problems with Symbios/LSI o kern/94838 scsi Kernel panic while mounting SD card with lock switch o o kern/99954 scsi [ahc] reading from DVD failes on 6.x (regression) 14 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/23314 scsi aic driver fails to detect Adaptec 1520B unless PnP is o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce o kern/38828 scsi [feature request] DPT PM2012B/90 doesn't work o kern/44587 scsi dev/dpt/dpt.h is missing defines required for DPT_HAND o kern/76178 scsi [ahd] Problem with ahd and large SCSI Raid system o kern/96133 scsi [scsi] [patch] add scsi quirk for joyfly 128mb flash u o kern/103702 scsi [cam] [patch] ChipsBnk: Unsupported USB memory stick 7 problems total. From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 07:39:41 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id F41CF16A408 for ; Tue, 3 Apr 2007 07:39:40 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 967E613C487 for ; Tue, 3 Apr 2007 07:39:40 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so1586428ana for ; Tue, 03 Apr 2007 00:39:39 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=dj7Vvux3l0CbV2Gy28azeeqFm4v71Kf4AZA/jqEZ42+Xz5eEFJ7knQK5+yngtV/Sh6nCVVdU41VCVBb2JeaagHK1RJ+XZT7HzgB9qECuhjrKihXRSyr9gmedN3mJWLJjLvkcvB3baxYJpeGAi9wbd09rKLjK0su3HmrJw5S/Rv0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=XnegNETnQZcB5I5xqo9SNaYOM+LiWeAb5Dz8EG41yBTOIpbutmFtt6pOmh+ULiiuFgS2kWu5ykGbQcQ+ZirWmS+9uohmjiWudpKlLGuxHMp9peK/ADiGnsvboK5H/AnTgWVKup7SpNw5bc6iUJKrKvAAI/sUASoOriJ/db1U+ao= Received: by 10.100.13.12 with SMTP id 12mr4100822anm.1175585979700; Tue, 03 Apr 2007 00:39:39 -0700 (PDT) Received: by 10.100.231.18 with HTTP; Tue, 3 Apr 2007 00:39:39 -0700 (PDT) Message-ID: <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> Date: Tue, 3 Apr 2007 00:39:39 -0700 From: "Josh Carroll" To: "Scott Long" In-Reply-To: <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070313205731.GB3866@melamine.cuivre.fr.eu.org> <8cb6106e0703261057j55b554f9h84a894a4dbd19991@mail.gmail.com> <20070326180018.GA23771@melamine.cuivre.fr.eu.org> <460829E9.3080102@samsco.org> <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703262119g5a9afd4m2c3d5665c85c4969@mail.gmail.com> <4608A35E.3010404@samsco.org> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org, Thomas Quinot Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 07:39:41 -0000 > I'm unable to get past the INQUIRY with the cam_xpt.c patch with the > serial inquiry workaround along with the cam and scsi_cd patches. Ok, I was able to find the right combination of patches to get this to work. I cvsup'd today (4/2/2007) so all the patches to the files in sys/dev/ata appear to already have been committed. I patched cam_xpt.c with the patch that removes "REQUIRE_GIANT" in two places, and sets the serial inquiry quirk for my drive. I also patched with Scott's scsi_cd.c patch. Rather than paste thousands of lines of code in this update again, I'm throwing the dmesg output up on my web server, so I hope that's ok. I figure it's easier to follow without it (the SNR is too high :)) Anyway, I was able to get booted again to test. Without a CD in the drive after boot, I get a huge number of interrupts still on the ata controller, and I see a lot of READ CAPACITY timeouts. But it finally stops and I still have /dev/cd0 and the interrupts are no longer "storming". Here is the dmesg output from the start of the boot process up to the point where the interrupt storm stops and things settle down: http://pflog.net/atapicam/dmesg.post_boot.gz I then issued the following cdrecord command: cdrecord -scanbus Here is the dmesg output from that command: http://pflog.net/atapicam/dmesg.cdrecord.scanbus.gz I then issued a cdrecord command to burn a CD-RW at 4x: cdrecord -v dev=2,1,0 /path/to/file.iso There were some long timeouts during which the interrupts were storming as well (based on the delta in the # before and after the cdrecord command). But it ultimately finished, and I was able to mount the resulting burned disc. The only data I could get from dmesg was during the tail end of the cd write, since the dmesg buffer was clobbered. Here's that dmesg output: http://pflog.net/atapicam/dmesg.cdrecord.burn.gz What's odd is the drive still hangs on various commands when there is no disc in the drive, or there is a blank CD-RW in the drive. For example, trying to mount the blank'd CD-RW disc with /dev/cd0 takes almost a few minutes to timeout during which I see: acd0: FAILURE - READ_TOC timed out (I see this 6 times) g_vfs_done(): cd0[READ(offset=32768, length=2048)]error = 5 mount_cd9660: /dev/cd0: Input/output error If I issue the same mount command against /dev/acd0, it immediately gives me the Input/output error. Another note. On a different boot, I tried using cdrecord to blank the disc, which worked, though I saw quite a few errors (camcontrol debug off prior). The command issued was: cdrecord dev=2,1,0 blank=fast The errors I saw in dmesg were: acd0: FAILURE - READ_DVD_STRUCTURE timed out (I imagine this is because I didn't specify a media type) acd0: FAILURE - READ_BUFFER timed out acd0: FAILURE - MODE_SELECT_BIG ILLEGAL REQUEST asc=0x24 ascq=0x00 (I saw this right before the cdrecord command finished) I hope this updated info helps. It seems to still hang on the READ CAPACITY command, though at least now I'm able to use the device after the drive calms down. Though I am still seeing other commands time out as well, cdrecord appears to still work albeit very slowly (due in part I'm sure to WITNESS, but also due to these multi-second (minute?) timeouts). Thanks, Josh From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 08:28:04 2007 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2985F16A402 for ; Tue, 3 Apr 2007 08:28:04 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from vlakno.cz (vlk.vlakno.cz [62.168.28.247]) by mx1.freebsd.org (Postfix) with ESMTP id DBE5913C45D for ; Tue, 3 Apr 2007 08:28:03 +0000 (UTC) (envelope-from rdivacky@vlk.vlakno.cz) Received: from localhost (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 361B28BCE9A for ; Tue, 3 Apr 2007 10:08:09 +0200 (CEST) X-Virus-Scanned: amavisd-new at vlakno.cz Received: from vlakno.cz ([127.0.0.1]) by localhost (vlk.vlakno.cz [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id CaR8yAXk1yak for ; Tue, 3 Apr 2007 10:08:07 +0200 (CEST) Received: from vlk.vlakno.cz (localhost [127.0.0.1]) by vlakno.cz (Postfix) with ESMTP id 396548BCE4A for ; Tue, 3 Apr 2007 10:08:07 +0200 (CEST) Received: (from rdivacky@localhost) by vlk.vlakno.cz (8.13.8/8.13.8/Submit) id l33886AQ060834 for scsi@freebsd.org; Tue, 3 Apr 2007 10:08:06 +0200 (CEST) (envelope-from rdivacky) Date: Tue, 3 Apr 2007 10:08:06 +0200 From: Roman Divacky To: scsi@freebsd.org Message-ID: <20070403080806.GA60720@freebsd.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.2i Cc: Subject: question about fbsd scsi layer X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 08:28:04 -0000 hi I am trying to port some semi-driver for linux sg device from netbsd to freebsd (in linux emulation layer) and it uses scsi. the netbsd code looks basically like this: struct scsireq req; req.flags = SCCMD_WRITE; req.cmd = cmd; ...further initialization of req... ioctl(fp, SCIOCCOMAND, &req, td); return req to userland; I don't understand how to do this in FreeBSD, we don't have SCIOCCOMAND etc. can you point me in the right way? thnx roman p.s. please CC me as I am not subscribed to this ml From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 08:37:18 2007 Return-Path: X-Original-To: scsi@freebsd.org Delivered-To: freebsd-scsi@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id BA71C16A405 for ; Tue, 3 Apr 2007 08:37:18 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 7337113C46C for ; Tue, 3 Apr 2007 08:37:18 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l338bAT4054363; Tue, 3 Apr 2007 02:37:15 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4612122F.70808@samsco.org> Date: Tue, 03 Apr 2007 02:37:03 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Roman Divacky References: <20070403080806.GA60720@freebsd.org> In-Reply-To: <20070403080806.GA60720@freebsd.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Tue, 03 Apr 2007 02:37:15 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: scsi@freebsd.org Subject: Re: question about fbsd scsi layer X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 08:37:18 -0000 Roman Divacky wrote: > hi > > I am trying to port some semi-driver for linux sg device from netbsd to > freebsd (in linux emulation layer) and it uses scsi. the netbsd code > looks basically like this: > > struct scsireq req; > > req.flags = SCCMD_WRITE; > req.cmd = cmd; > ...further initialization of req... > > ioctl(fp, SCIOCCOMAND, &req, td); > > return req to userland; > > I don't understand how to do this in FreeBSD, we don't have SCIOCCOMAND etc. > > can you point me in the right way? > > thnx > > roman > > p.s. please CC me as I am not subscribed to this ml There is absolutely no similarity between the SCSI layers in FreeBSD and NetBSD. I suggest you read the various CAM man pages and look at how camcontrol is written. Scott From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 14:59:21 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 327FD16A409 for ; Tue, 3 Apr 2007 14:59:21 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.freebsd.org (Postfix) with SMTP id 51D8913C455 for ; Tue, 3 Apr 2007 14:59:19 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: (qmail 29185 invoked from network); 3 Apr 2007 14:32:38 -0000 Received: from unknown (HELO ?192.168.2.5?) (192.168.2.5) by andxor.it with SMTP; 3 Apr 2007 14:32:38 -0000 Message-ID: <46126585.8080204@FreeBSD.org> Date: Tue, 03 Apr 2007 16:32:37 +0200 From: Alex Dupre User-Agent: Mozilla Thunderbird 1.5.0.10 (X11/20070317) MIME-Version: 1.0 To: freebsd-current@freebsd.org, freebsd-scsi@freebsd.org Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit Cc: Subject: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 14:59:21 -0000 Hello, I found an incorrect behavior of the targ device on -CURRENT: closing the descriptor doesn't return. On -STABLE it works. I think to have identified the problem (or at least the change that exposed it) in the conditional msleep() call added into kern_conf.c to destroy_devl() in rev. 1.119. This is a simple testcase: #include #include int main(int argc, char *argv[]) { int targ_fd = open("/dev/targ0", O_RDWR); if (targ_fd < 0) err(1, "Do you have 'device targ' in your kernel?"); close(targ_fd); } -- Alex Dupre From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 16:17:08 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4ED1A16A4CF; Tue, 3 Apr 2007 16:17:08 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id 07BA113C4BD; Tue, 3 Apr 2007 16:17:07 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l33GGxfT067039; Tue, 3 Apr 2007 10:17:04 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <46127DF4.5080703@samsco.org> Date: Tue, 03 Apr 2007 10:16:52 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Alex Dupre References: <46126585.8080204@FreeBSD.org> In-Reply-To: <46126585.8080204@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Tue, 03 Apr 2007 10:17:04 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 16:17:08 -0000 Alex Dupre wrote: > Hello, > I found an incorrect behavior of the targ device on -CURRENT: closing > the descriptor doesn't return. On -STABLE it works. I think to have > identified the problem (or at least the change that exposed it) in the > conditional msleep() call added into kern_conf.c to destroy_devl() in > rev. 1.119. > > This is a simple testcase: > > > #include > #include > > int > main(int argc, char *argv[]) > { > int targ_fd = open("/dev/targ0", O_RDWR); > > if (targ_fd < 0) > err(1, "Do you have 'device targ' in your kernel?"); > > close(targ_fd); > } > Are there any other console messages from the targ driver? Can you turn on CAMDEBUG and send us the trace of what is going on? Scott From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 17:17:23 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C118816A403 for ; Tue, 3 Apr 2007 17:17:23 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from lab.alexdupre.com (lab.alexdupre.com [81.174.31.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0B1BE13C469 for ; Tue, 3 Apr 2007 17:17:22 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: (qmail 59865 invoked from network); 3 Apr 2007 16:50:41 -0000 Received: from unknown (HELO ?192.168.178.2?) (192.168.178.2) by lab.alexdupre.com with SMTP; 3 Apr 2007 16:50:41 -0000 Message-ID: <461285E0.8000008@FreeBSD.org> Date: Tue, 03 Apr 2007 18:50:40 +0200 From: Alex Dupre User-Agent: Thunderbird 1.5.0.10 (X11/20070310) MIME-Version: 1.0 To: Scott Long References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> In-Reply-To: <46127DF4.5080703@samsco.org> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 17:17:23 -0000 Scott Long wrote: > Are there any other console messages from the targ driver? Can you > turn on CAMDEBUG and send us the trace of what is going on? CAMDEBUG is already on, but simply opening/closing the targ device, without sending any ioctl to enable it, shouldn't produce any CAM message. I traced the kernel thread and I found that it doesn't return from the destroy_devl() function: csw->d_purge is NULL and dev->si_threadcount is '1'. The thread enters the following block (kern_conf.c, row 690) and never exits. while (dev->si_threadcount != 0) { /* Use unique dummy wait ident */ msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); } -- Alex Dupre From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 17:21:42 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 32D9C16A402 for ; Tue, 3 Apr 2007 17:21:42 +0000 (UTC) (envelope-from Juergen.Dankoweit@t-online.de) Received: from mailout02.sul.t-online.com (mailout02.sul.t-online.com [194.25.134.17]) by mx1.freebsd.org (Postfix) with ESMTP id E2C8B13C459 for ; Tue, 3 Apr 2007 17:21:41 +0000 (UTC) (envelope-from Juergen.Dankoweit@t-online.de) Received: from fwd34.aul.t-online.de by mailout02.sul.t-online.com with smtp id 1HYmLp-0004U4-00; Tue, 03 Apr 2007 18:59:21 +0200 Received: from mail.juergendankoweit.net (XNn-hiZCre5hQTrhCB9mNi8L6cmj9SxEAfLK2gu5tOS+P1r1VzkyQh@[84.150.81.250]) by fwd34.sul.t-online.de with esmtp id 1HYmLi-1gJJFg0; Tue, 3 Apr 2007 18:59:14 +0200 Received: from localhost (localhost.juergendankoweit.net [127.0.0.1]) by mail.juergendankoweit.net (Postfix) with ESMTP id DEF6011E69 for ; Tue, 3 Apr 2007 18:59:14 +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 m8+kwIisSYEG for ; Tue, 3 Apr 2007 18:59:05 +0200 (CEST) Received: from primergy470.juergendankoweit.net (primergy470.juergendankoweit.net [192.168.1.1]) by mail.juergendankoweit.net (Postfix) with ESMTP id 830DE11C08 for ; Tue, 3 Apr 2007 18:59:05 +0200 (CEST) From: Juergen.Dankoweit@t-online.de (Juergen Dankoweit) To: freebsd-scsi@freebsd.org Content-Type: text/plain Organization: FreeBSD-Onkel Date: Tue, 03 Apr 2007 18:59:04 +0200 Message-Id: <1175619544.2347.10.camel@primergy470.juergendankoweit.net> Mime-Version: 1.0 X-Mailer: Evolution 2.4.2.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-ID: XNn-hiZCre5hQTrhCB9mNi8L6cmj9SxEAfLK2gu5tOS+P1r1VzkyQh X-TOI-MSGID: f880676f-8765-4924-a619-00ee7a533d89 Subject: Error messages from SCSI (sym and ahc) 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: Tue, 03 Apr 2007 17:21:42 -0000 Hello to the list, on several test machines in our company we get these error messages from the SCSI-HBA drivers: (noperiph:sym1:-1:-1): SCSI Bus reset detected (pass1:sym1:0:2:0): phase change 2-3 16@bc310b68 resid=10 (pass1:sym1:0:2:0): phase change 2-1 16@bc310b68 resid=6 Changing that LSI adaptor to an Adaptec 29160N the following error messages are shown: (pass0:ahc0:0:2:0) No or incomplete CDB sent to device ahc: Issued Channel A Bus reset. 1 SCBs aborted pass1 (at sym) and pass0 (at ahc) are an SCSI-DVD-RAM (Panasonic LF-D201). The device is unusable. But the funny things are: We installed FreeBSD from THIS device... and FreeBSD 5.5 does not show those messages... Information about the used system: Siemens-Fujitsu Primergy C200, LSI 53C1010 onboard, dual CPU (1,4GHz), 3GB RAM, FreeBSD 6.2 (current source code). The SCSI bus was tested with special SCSI test hardware is Ok. What does the system wants to say to me? Many thanks for the answers J. Dankoweit From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 20:58:55 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 8040F16A402 for ; Tue, 3 Apr 2007 20:58:55 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.176]) by mx1.freebsd.org (Postfix) with ESMTP id EA42B13C448 for ; Tue, 3 Apr 2007 20:58:52 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: by ik-out-1112.google.com with SMTP id c21so1326043ika for ; Tue, 03 Apr 2007 13:58:51 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Ln5CzKV7+5PXpPvzY4s7hu1AvYPpraVPR2ZzWY9csA1y3GNbx1srSdDm8iiMdPsAGefPqYuxX4JhPNpuCgbj14Wzjk8fkSXRWNIT2DbZdLDm3+4PYIkx5XNjmdtyDex679J3A2X40+k+lyS56RQTmnhUcUWNQBbbWOFro6vBQFI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=QknbNVFbxND/VPERQqD90S9WoPdcUPacqvzhhqPnGIH8W7QqCIgjQfxIhlIfuB4AIyi1kGK6zYb8oBmM4WtjueW5QtnGT4qVOEZHphuSdSkLsdtgQ3M+Fqt0e2inKPvTQ91D9dIDk+UZsJ0EY8nAE8uQ24O67H79kfo5sAT8o5o= Received: by 10.114.46.1 with SMTP id t1mr2450020wat.1175632476529; Tue, 03 Apr 2007 13:34:36 -0700 (PDT) Received: by 10.114.25.18 with HTTP; Tue, 3 Apr 2007 13:34:36 -0700 (PDT) Message-ID: <7579f7fb0704031334seaf7380g8c6447980f5528ac@mail.gmail.com> Date: Tue, 3 Apr 2007 13:34:36 -0700 From: "Matthew Jacob" To: Juergen.Dankoweit@freebsd-onkel.de In-Reply-To: <1175619544.2347.10.camel@primergy470.juergendankoweit.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1175619544.2347.10.camel@primergy470.juergendankoweit.net> Cc: freebsd-scsi@freebsd.org Subject: Re: Error messages from SCSI (sym and ahc) X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 20:58:55 -0000 Hmm. Can you send mail to me at mjacob@freebsd.org so we can take this offline? On 4/3/07, Juergen Dankoweit wrote: > Hello to the list, > > on several test machines in our company we get these error messages from > the SCSI-HBA drivers: > (noperiph:sym1:-1:-1): SCSI Bus reset detected > (pass1:sym1:0:2:0): phase change 2-3 16@bc310b68 resid=10 > (pass1:sym1:0:2:0): phase change 2-1 16@bc310b68 resid=6 > > Changing that LSI adaptor to an Adaptec 29160N the following error > messages are shown: > (pass0:ahc0:0:2:0) No or incomplete CDB sent to device > ahc: Issued Channel A Bus reset. 1 SCBs aborted > > pass1 (at sym) and pass0 (at ahc) are an SCSI-DVD-RAM (Panasonic > LF-D201). The device is unusable. > But the funny things are: We installed FreeBSD from THIS device... > and FreeBSD 5.5 does not show those messages... > > Information about the used system: > Siemens-Fujitsu Primergy C200, LSI 53C1010 onboard, dual CPU (1,4GHz), > 3GB RAM, FreeBSD 6.2 (current source code). > The SCSI bus was tested with special SCSI test hardware is Ok. > > What does the system wants to say to me? > > Many thanks for the answers > > J. Dankoweit > > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 20:59:06 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 04CAC16A407 for ; Tue, 3 Apr 2007 20:59:06 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.168]) by mx1.freebsd.org (Postfix) with ESMTP id C0C2B13C458 for ; Tue, 3 Apr 2007 20:59:03 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so445635ugh for ; Tue, 03 Apr 2007 13:59:02 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=mwqCWv7Zp8U0hVdbhIEMs/iGTleREGDSNNTYHvOb+IFKZYoWI9E7xXj7BEcSgL+jCgzsjeZJnOCoch7HK0CD9p9J1xad8klHYvZg1sY00jbS+h98iCkiW62AuWQvpR1yzAVZNKacWb+Ib5c39P6s7x+BO7LyjYglOui/TwIQTXA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=j+v0GveHZ8asHFJq7BM/gzbqIvKUKHVeBjylahv8Wr5htFxb96v1iIY8p8oZB3d8Q72zWFMfIdpkiUBVrM7iac4sJkubTOp44Xq9OFLyWcQUEzXJg4h5+ZTiAJOTnpmU6iWctnCV6EU2LDOyCmYKX3LPJEtvdr/RsPepCQoS5Mk= Received: by 10.114.13.1 with SMTP id 1mr2428847wam.1175632346777; Tue, 03 Apr 2007 13:32:26 -0700 (PDT) Received: by 10.114.25.18 with HTTP; Tue, 3 Apr 2007 13:32:26 -0700 (PDT) Message-ID: <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> Date: Tue, 3 Apr 2007 13:32:26 -0700 From: "Matthew Jacob" To: "Alex Dupre" In-Reply-To: <461285E0.8000008@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> <461285E0.8000008@FreeBSD.org> Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 20:59:06 -0000 Yeah- I've seen this too. On 4/3/07, Alex Dupre wrote: > Scott Long wrote: > > Are there any other console messages from the targ driver? Can you > > turn on CAMDEBUG and send us the trace of what is going on? > > CAMDEBUG is already on, but simply opening/closing the targ device, > without sending any ioctl to enable it, shouldn't produce any CAM > message. I traced the kernel thread and I found that it doesn't return > from the destroy_devl() function: csw->d_purge is NULL and > dev->si_threadcount is '1'. The thread enters the following block > (kern_conf.c, row 690) and never exits. > > > while (dev->si_threadcount != 0) { > /* Use unique dummy wait ident */ > msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); > } > > > -- > Alex Dupre > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 21:35:03 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 3F15416A404; Tue, 3 Apr 2007 21:35:03 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id E75C713C448; Tue, 3 Apr 2007 21:35:02 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l33LYpdm070116; Tue, 3 Apr 2007 15:34:56 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4612C873.1020505@samsco.org> Date: Tue, 03 Apr 2007 15:34:43 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Matthew Jacob References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> <461285E0.8000008@FreeBSD.org> <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> In-Reply-To: <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Tue, 03 Apr 2007 15:34:56 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 21:35:03 -0000 My guess is that the kninit() in targopen isn't being cleaned up from in targclose. I'm not terribly familiar in how the knote API works, though. Scott Matthew Jacob wrote: > Yeah- I've seen this too. > > On 4/3/07, Alex Dupre wrote: >> Scott Long wrote: >> > Are there any other console messages from the targ driver? Can you >> > turn on CAMDEBUG and send us the trace of what is going on? >> >> CAMDEBUG is already on, but simply opening/closing the targ device, >> without sending any ioctl to enable it, shouldn't produce any CAM >> message. I traced the kernel thread and I found that it doesn't return >> from the destroy_devl() function: csw->d_purge is NULL and >> dev->si_threadcount is '1'. The thread enters the following block >> (kern_conf.c, row 690) and never exits. >> >> >> while (dev->si_threadcount != 0) { >> /* Use unique dummy wait ident */ >> msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); >> } >> >> >> -- >> Alex Dupre >> _______________________________________________ >> freebsd-scsi@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi >> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" >> From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 22:26:53 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 4D31716A403; Tue, 3 Apr 2007 22:26:53 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id DD71913C448; Tue, 3 Apr 2007 22:26:52 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l33MQiHl070411; Tue, 3 Apr 2007 16:26:49 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4612D49C.8040100@samsco.org> Date: Tue, 03 Apr 2007 16:26:36 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: Matthew Jacob References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> <461285E0.8000008@FreeBSD.org> <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> <4612C873.1020505@samsco.org> In-Reply-To: <4612C873.1020505@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Tue, 03 Apr 2007 16:26:50 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 22:26:53 -0000 Actually, I think it's a wildly incorrect use of the clone API. I'll take a look at in the in next few days and try to commit something that works. Scott Scott Long wrote: > My guess is that the kninit() in targopen isn't being cleaned up from in > targclose. I'm not terribly familiar in how the knote API works, > though. > > Scott > > > Matthew Jacob wrote: >> Yeah- I've seen this too. >> >> On 4/3/07, Alex Dupre wrote: >>> Scott Long wrote: >>> > Are there any other console messages from the targ driver? Can you >>> > turn on CAMDEBUG and send us the trace of what is going on? >>> >>> CAMDEBUG is already on, but simply opening/closing the targ device, >>> without sending any ioctl to enable it, shouldn't produce any CAM >>> message. I traced the kernel thread and I found that it doesn't return >>> from the destroy_devl() function: csw->d_purge is NULL and >>> dev->si_threadcount is '1'. The thread enters the following block >>> (kern_conf.c, row 690) and never exits. >>> >>> >>> while (dev->si_threadcount != 0) { >>> /* Use unique dummy wait ident */ >>> msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); >>> } >>> >>> >>> -- >>> Alex Dupre >>> _______________________________________________ >>> freebsd-scsi@freebsd.org mailing list >>> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi >>> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" >>> > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 23:12:20 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 942F416A405 for ; Tue, 3 Apr 2007 23:12:20 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.235]) by mx1.freebsd.org (Postfix) with ESMTP id 4C4CF13C48A for ; Tue, 3 Apr 2007 23:12:20 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so9016wra for ; Tue, 03 Apr 2007 16:12:19 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tq87wcP92KCJ9xXgvYW1exZgQyq52R5JmcZBYefJkpcpzgOA/qzxbpB80tMR+LiFC3UogZWuaarBHoHIbk9nMm5DpJ30G9uRRp782aiihnMI+yAGDzsTXZKXO1szWP4L0CcJOAnwdFVUfFb2GhV/+UgeKHdUatxw/TBXY8XtTlk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=KRyccpZHEA6VcfjHbRZLZBU+9zJTO5euj3WhKDqMFdVI2slX/u0U4RP+Wk/++0Iy5iB6rCPz0jH/fMSpcarfNPVtwz9H8HMoEmr/+Nnz6w8rvCU/1Thb7CCpENe8ZZ48DBt49cYoALIM7P83abZslU5rgVpSex7/hSURhuG4+AQ= Received: by 10.115.106.7 with SMTP id i7mr2450060wam.1175641939033; Tue, 03 Apr 2007 16:12:19 -0700 (PDT) Received: by 10.114.25.18 with HTTP; Tue, 3 Apr 2007 16:12:18 -0700 (PDT) Message-ID: <7579f7fb0704031612m2b9ba127w2b411e4eecd706fa@mail.gmail.com> Date: Tue, 3 Apr 2007 16:12:18 -0700 From: "Matthew Jacob" To: "Scott Long" In-Reply-To: <4612C873.1020505@samsco.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> <461285E0.8000008@FreeBSD.org> <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> <4612C873.1020505@samsco.org> Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 23:12:20 -0000 Neither am I. I had to fool around with this at one point to get it to work and it's probably gotten broken again as other parts of the kernel get more lock clean. Sigh. On 4/3/07, Scott Long wrote: > My guess is that the kninit() in targopen isn't being cleaned up from in > targclose. I'm not terribly familiar in how the knote API works, > though. > > Scott > > > Matthew Jacob wrote: > > Yeah- I've seen this too. > > > > On 4/3/07, Alex Dupre wrote: > >> Scott Long wrote: > >> > Are there any other console messages from the targ driver? Can you > >> > turn on CAMDEBUG and send us the trace of what is going on? > >> > >> CAMDEBUG is already on, but simply opening/closing the targ device, > >> without sending any ioctl to enable it, shouldn't produce any CAM > >> message. I traced the kernel thread and I found that it doesn't return > >> from the destroy_devl() function: csw->d_purge is NULL and > >> dev->si_threadcount is '1'. The thread enters the following block > >> (kern_conf.c, row 690) and never exits. > >> > >> > >> while (dev->si_threadcount != 0) { > >> /* Use unique dummy wait ident */ > >> msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); > >> } > >> > >> > >> -- > >> Alex Dupre > >> _______________________________________________ > >> freebsd-scsi@freebsd.org mailing list > >> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > >> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > >> > > From owner-freebsd-scsi@FreeBSD.ORG Tue Apr 3 23:12:59 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 62FE816A401 for ; Tue, 3 Apr 2007 23:12:59 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.183]) by mx1.freebsd.org (Postfix) with ESMTP id E8B4513C468 for ; Tue, 3 Apr 2007 23:12:58 +0000 (UTC) (envelope-from lydianconcepts@gmail.com) Received: by ik-out-1112.google.com with SMTP id c21so6840ika for ; Tue, 03 Apr 2007 16:12:57 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=tjoL3E9mEDa5ManOCQjAsh+puZ0ILuN+l/EN/yS/kAQyb6yIJNvwsEZzA+PI6S2hkMriEVXrbtAtL8bP+h88+iHkomiwrfPTp31kG6fQrq6mPv397qkq6vYWvvfQbPgqwTBbQe8oAG2Pso7/Uq0iYXuP2RE7TXqPB4WOuWXmD9k= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Gk0oDdQdwm009G2oKxC5ZlGuLQv10sIx/4Qb/cdjO/C/p/gpL3pl5XT8a3GNw/KiSbM/zIv5opZEISKOO81FIufmgTpIf//CpLluyoj+an4uKWBJqPpxo+bsUtOD+Tzt/MkvkpAKTE2pgk/h6JGR7efO3/Rx/9ENdMzvJTlTuDM= Received: by 10.115.61.1 with SMTP id o1mr2467707wak.1175641976590; Tue, 03 Apr 2007 16:12:56 -0700 (PDT) Received: by 10.114.25.18 with HTTP; Tue, 3 Apr 2007 16:12:56 -0700 (PDT) Message-ID: <7579f7fb0704031612q354b1b57u9a36378736e235df@mail.gmail.com> Date: Tue, 3 Apr 2007 16:12:56 -0700 From: "Matthew Jacob" To: "Scott Long" In-Reply-To: <7579f7fb0704031612m2b9ba127w2b411e4eecd706fa@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> <461285E0.8000008@FreeBSD.org> <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> <4612C873.1020505@samsco.org> <7579f7fb0704031612m2b9ba127w2b411e4eecd706fa@mail.gmail.com> Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 03 Apr 2007 23:12:59 -0000 I mean to say I'll put it on my list, but if others have a quick insight into fixing it that would be mucho appreciated. On 4/3/07, Matthew Jacob wrote: > Neither am I. I had to fool around with this at one point to get it to > work and it's probably gotten broken again as other parts of the > kernel get more lock clean. Sigh. > > On 4/3/07, Scott Long wrote: > > My guess is that the kninit() in targopen isn't being cleaned up from in > > targclose. I'm not terribly familiar in how the knote API works, > > though. > > > > Scott > > > > > > Matthew Jacob wrote: > > > Yeah- I've seen this too. > > > > > > On 4/3/07, Alex Dupre wrote: > > >> Scott Long wrote: > > >> > Are there any other console messages from the targ driver? Can you > > >> > turn on CAMDEBUG and send us the trace of what is going on? > > >> > > >> CAMDEBUG is already on, but simply opening/closing the targ device, > > >> without sending any ioctl to enable it, shouldn't produce any CAM > > >> message. I traced the kernel thread and I found that it doesn't return > > >> from the destroy_devl() function: csw->d_purge is NULL and > > >> dev->si_threadcount is '1'. The thread enters the following block > > >> (kern_conf.c, row 690) and never exits. > > >> > > >> > > >> while (dev->si_threadcount != 0) { > > >> /* Use unique dummy wait ident */ > > >> msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); > > >> } > > >> > > >> > > >> -- > > >> Alex Dupre > > >> _______________________________________________ > > >> freebsd-scsi@freebsd.org mailing list > > >> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > > >> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > > >> > > > > > From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 4 04:07:07 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B116216A406 for ; Wed, 4 Apr 2007 04:07:07 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id 6823513C45D for ; Wed, 4 Apr 2007 04:07:06 +0000 (UTC) (envelope-from josh.carroll@gmail.com) Received: by an-out-0708.google.com with SMTP id c24so86651ana for ; Tue, 03 Apr 2007 21:07:06 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qUJ7PZplx10wbLEvvY0kvCTIGPp+oa3QLZQmfLHPtuGzAtWBDu62u6ErtQLDxGwA4nEg3RM0GIRv/B0ukWa9g1KazWJHv8uOZ0VHYjqrACiJEq0Bk+PxrRRuRx160ef8R8lyaWtmaHSKn/gZPBnH/ltccmKYkciXMEMOsKf8rbk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=MxutRurlhk7QuZKYB+OmPa408qI8VZPp2IffKqT2Qdw9xVNBnnNErXA9suG9j5uCYulSuVaM3h8dcrzaRP2ydx39EfOwQbft8AQCIvFNRmtQtRZyGPaJ9kBwJmDbaDWuhdJDUwmvw6r8B6Af7F4Iz7n25DxuD/6biRMsaypn1ew= Received: by 10.100.32.1 with SMTP id f1mr140000anf.1175659626031; Tue, 03 Apr 2007 21:07:06 -0700 (PDT) Received: by 10.100.231.18 with HTTP; Tue, 3 Apr 2007 21:07:05 -0700 (PDT) Message-ID: <8cb6106e0704032107w457026b1t1e04ed11008af48a@mail.gmail.com> Date: Tue, 3 Apr 2007 21:07:05 -0700 From: "Josh Carroll" To: "Scott Long" In-Reply-To: <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <20070313205731.GB3866@melamine.cuivre.fr.eu.org> <20070326180018.GA23771@melamine.cuivre.fr.eu.org> <460829E9.3080102@samsco.org> <8cb6106e0703261318o120c620ar6b2461802632fc01@mail.gmail.com> <8cb6106e0703262119g5a9afd4m2c3d5665c85c4969@mail.gmail.com> <4608A35E.3010404@samsco.org> <8cb6106e0703262157m7fd0ae96p3bb5368af797dc6b@mail.gmail.com> <460AA9E3.4030106@samsco.org> <8cb6106e0703281531k4c5bebecp5566c64c8f458a74@mail.gmail.com> <8cb6106e0704030039if46397fvfc993d9c9e19e1fc@mail.gmail.com> Cc: freebsd-scsi@freebsd.org, bug-followup@freebsd.org, Thomas Quinot Subject: Re: kern/103602: drive gets wedged on READ CD CAPACITY if no disc is in X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: josh.carroll@gmail.com List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2007 04:07:07 -0000 Thinking out of the box, I decided to use sg3_utils on both the semi-working 7.0-CURRENT kernel I had, and on a Linux Knoppix 5.1 live CD. Pretty much every sg utility resulted in a acd0 FAILURE message (I ran the commands against /dev/cd0 though of course). Here are the various dmesg messages: acd0: FAILURE - INQUIRY timed out acd0: FAILURE - MODE_SENSE_BIG timed out acd0: FAILURE - READ_CAPACITY timed out acd0: FAILURE - SEND_KEY timed out acd0: FAILURE - unknown CMD (0x46) timed out It seems like every atapi command is timing out when I boot without a disc in the drive. The only command that semi-worked was sg_turs. Without a CD in the drive, I get the following output: test unit ready cdb: 00 00 00 00 00 00 test unit ready: Probably uninitialized data. Try to view as SCSI-1 non-extended sense: AdValid=0 Error class=0 Error code=0 Raw sense data (in hex): 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 If I insert a CD and run it, I get normal output (e.g. matching that of what I saw on Knoppix): test unit ready cdb: 00 00 00 00 00 00 Perhaps there is a subtle difference with TUR with and without a disc, which the kernel can sense and take appropriate action? When running any of these sg* commands in Knoppix with no disc in the drive, I get a message similar to this: sg_readcap.no_disc.out:READ CAPACITY (10) failed, device not ready Interestingly, the sg_vpd command fails to read the serial # as well, so that is definitely a known bug with this drive I think. Here is the sg_vpd output on Knoppix: Supported VPD pages VPD page: fetching VPD page failed I don't know if the output of any of these sg commands on Knoppix is useful (e.g. sg_get_config, sg_modes, sginfo) in terms of finding out details of the device, but if interested I've posted a tarball of the outputs here: http://pflog.net/floyd/sg_output.tgz Anyway, I thought some of this might be useful. At least I hope :) Josh From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 4 08:12:03 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id AA10916A401; Wed, 4 Apr 2007 08:12:03 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from cs1.cs.huji.ac.il (cs1.cs.huji.ac.il [132.65.16.10]) by mx1.freebsd.org (Postfix) with ESMTP id 6466813C465; Wed, 4 Apr 2007 08:12:03 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from pampa.cs.huji.ac.il ([132.65.80.32]) by cs1.cs.huji.ac.il with esmtp id 1HZ0b2-000C6b-Uq; Wed, 04 Apr 2007 11:12:00 +0300 X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.2 To: Scott Long In-reply-to: Your message of Tue, 03 Apr 2007 16:26:36 -0600 . Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 04 Apr 2007 11:12:00 +0300 From: Danny Braniss Message-ID: Cc: freebsd-scsi@freebsd.org, freebsd-current@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2007 08:12:03 -0000 I stumbled on the same problem when porting iSCSI to current, calling dev_destroy() hangs because si_threadcount is not zero, Tai-hwa Liang came up with a patch, which fixes the close(), but causes panics when rebooting. danny > Actually, I think it's a wildly incorrect use of the clone API. I'll > take a look at in the in next few days and try to commit something that > works. > > Scott > > > Scott Long wrote: > > My guess is that the kninit() in targopen isn't being cleaned up from in > > targclose. I'm not terribly familiar in how the knote API works, > > though. > > > > Scott > > > > > > Matthew Jacob wrote: > >> Yeah- I've seen this too. > >> > >> On 4/3/07, Alex Dupre wrote: > >>> Scott Long wrote: > >>> > Are there any other console messages from the targ driver? Can you > >>> > turn on CAMDEBUG and send us the trace of what is going on? > >>> > >>> CAMDEBUG is already on, but simply opening/closing the targ device, > >>> without sending any ioctl to enable it, shouldn't produce any CAM > >>> message. I traced the kernel thread and I found that it doesn't return > >>> from the destroy_devl() function: csw->d_purge is NULL and > >>> dev->si_threadcount is '1'. The thread enters the following block > >>> (kern_conf.c, row 690) and never exits. > >>> > >>> > >>> while (dev->si_threadcount != 0) { > >>> /* Use unique dummy wait ident */ > >>> msleep(&csw, &devmtx, PRIBIO, "devdrn", hz / 10); > >>> } > >>> > >>> > >>> -- > >>> Alex Dupre > >>> _______________________________________________ > >>> freebsd-scsi@freebsd.org mailing list > >>> http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > >>> To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > >>> > > > > _______________________________________________ > > freebsd-scsi@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > > _______________________________________________ > freebsd-scsi@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-scsi > To unsubscribe, send any mail to "freebsd-scsi-unsubscribe@freebsd.org" > From owner-freebsd-scsi@FreeBSD.ORG Wed Apr 4 10:03:55 2007 Return-Path: X-Original-To: freebsd-scsi@freebsd.org Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E920716A401 for ; Wed, 4 Apr 2007 10:03:55 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: from andxor.it (relay.andxor.it [195.223.2.3]) by mx1.freebsd.org (Postfix) with SMTP id 1558713C455 for ; Wed, 4 Apr 2007 10:03:54 +0000 (UTC) (envelope-from ale@FreeBSD.org) Received: (qmail 76170 invoked from network); 4 Apr 2007 10:03:51 -0000 Received: from unknown (HELO ?192.168.2.5?) (192.168.2.5) by andxor.it with SMTP; 4 Apr 2007 10:03:51 -0000 Message-ID: <46137807.4060203@FreeBSD.org> Date: Wed, 04 Apr 2007 12:03:51 +0200 From: Alex Dupre User-Agent: Mozilla Thunderbird 1.5.0.10 (X11/20070317) MIME-Version: 1.0 To: Scott Long References: <46126585.8080204@FreeBSD.org> <46127DF4.5080703@samsco.org> <461285E0.8000008@FreeBSD.org> <7579f7fb0704031332o64d0637coe17770971d5a6e29@mail.gmail.com> <4612C873.1020505@samsco.org> <4612D49C.8040100@samsco.org> In-Reply-To: <4612D49C.8040100@samsco.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-current@freebsd.org, freebsd-scsi@freebsd.org Subject: Re: targclose doesn't return X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Apr 2007 10:03:56 -0000 Scott Long ha scritto: > Actually, I think it's a wildly incorrect use of the clone API. Hmm, I don't think scsi_target uses the clone API. Yes, probably it should or at least it will be better, but the problem will remain. From what I've understood we cannot call destroy_dev directly from d_close. The solutions I see are: - use the destroy_dev_sched function posted by Kostik - remove the device externally, after closing it (like other clonable devices already do) The latter approach probably needs some redesign of the scsi_target code, while the first should be simpler if it works as expected (perhaps we should handle in a different way an open() to a closed but not already destroyed device, dunno). > I'll > take a look at in the in next few days and try to commit something that > works. Thanks for your support. I'm available to help (as much as I'm able) and test patches. -- Alex Dupre From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 6 05:28:33 2007 Return-Path: X-Original-To: freebsd-scsi@FreeBSD.org Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5AEF816A47C; Fri, 6 Apr 2007 05:28:33 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from tarsier.geekcn.org (tarsier.geekcn.org [210.51.165.229]) by mx1.freebsd.org (Postfix) with ESMTP id 4CD2513C483; Fri, 6 Apr 2007 05:28:31 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from localhost (tarsier.geekcn.org [210.51.165.229]) by tarsier.geekcn.org (Postfix) with ESMTP id 15793EB7FBB; Fri, 6 Apr 2007 13:12:21 +0800 (CST) X-Virus-Scanned: amavisd-new at geekcn.org Received: from tarsier.geekcn.org ([210.51.165.229]) by localhost (mail.geekcn.org [210.51.165.229]) (amavisd-new, port 10024) with ESMTP id ZkDBJXZBLtOu; Fri, 6 Apr 2007 13:12:13 +0800 (CST) Received: from [10.217.12.249] (sina152-194.staff.sina.com.cn [61.135.152.194]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by tarsier.geekcn.org (Postfix) with ESMTP id 16E1AEB7F02; Fri, 6 Apr 2007 13:12:08 +0800 (CST) DomainKey-Signature: a=rsa-sha1; s=default; d=delphij.net; c=nofws; q=dns; h=message-id:date:from:organization:user-agent:mime-version:to: subject:x-enigmail-version:content-type; b=Jf7NFeh90wUwfIkjQx9oCQdBdeUle/GGajzJz3VXfFwf/HlPawbXG1nkCSXHijmRq IjwEYifANw9gI5kvuqYwA== Message-ID: <4615D6A0.9020706@delphij.net> Date: Fri, 06 Apr 2007 13:12:00 +0800 From: LI Xin Organization: The FreeBSD Project User-Agent: Thunderbird 1.5.0.10 (Macintosh/20070221) MIME-Version: 1.0 To: freebsd-scsi@FreeBSD.org X-Enigmail-Version: 0.94.1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enig5A768131B587653D8334EEBD" Cc: Subject: asr support on amd64? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2007 05:28:33 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig5A768131B587653D8334EEBD Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi, It seems that asr(4) does compile on amd64, is there any reason why it is not enabled in GENERIC and modules build? Cheers, --=20 Xin LI http://www.delphij.net/ FreeBSD - The Power to Serve! --------------enig5A768131B587653D8334EEBD Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.7 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFGFdagOfuToMruuMARCn2ZAJ9DY6KTVuKwX0rw2bU3vpmIK2aCMACcC8QS 7I4YGsN5YfzbqT8lNUaLocg= =sl4Z -----END PGP SIGNATURE----- --------------enig5A768131B587653D8334EEBD-- From owner-freebsd-scsi@FreeBSD.ORG Fri Apr 6 05:42:57 2007 Return-Path: X-Original-To: freebsd-scsi@FreeBSD.org Delivered-To: freebsd-scsi@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 82E1116A40E for ; Fri, 6 Apr 2007 05:42:57 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.freebsd.org (Postfix) with ESMTP id D7F7313C487 for ; Fri, 6 Apr 2007 05:42:56 +0000 (UTC) (envelope-from scottl@samsco.org) Received: from phobos.samsco.home (phobos.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.8/8.13.8) with ESMTP id l365gZWj086886; Thu, 5 Apr 2007 23:42:35 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <4615DDBF.5050303@samsco.org> Date: Thu, 05 Apr 2007 23:42:23 -0600 From: Scott Long User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.2pre) Gecko/20070111 SeaMonkey/1.1 MIME-Version: 1.0 To: LI Xin References: <4615D6A0.9020706@delphij.net> In-Reply-To: <4615D6A0.9020706@delphij.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-2.0.2 (pooker.samsco.org [168.103.85.57]); Thu, 05 Apr 2007 23:42:35 -0600 (MDT) X-Spam-Status: No, score=-1.4 required=5.5 tests=ALL_TRUSTED autolearn=failed version=3.1.8 X-Spam-Checker-Version: SpamAssassin 3.1.8 (2007-02-13) on pooker.samsco.org Cc: freebsd-scsi@FreeBSD.org Subject: Re: asr support on amd64? X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 06 Apr 2007 05:42:57 -0000 LI Xin wrote: > Hi, > > It seems that asr(4) does compile on amd64, is there any reason why it > is not enabled in GENERIC and modules build? > > Cheers, The hardware can only handle 32 bit DMA (though there are rumors of 64-bit extensions that may or may not exist in some hardware). Unfortunately, the driver makes many 32-bit assumptions as well as being written in a way that is completely incompatible with the busdma architecture. Without this, you don't get bounce buffers for >32bit DMA. Fixing it is far from trivial; I've spent dozens of hours on it and have gotten it into much better shape that it was originally, but it still requires a significant amount of effort and re-architecture in order to work. Adding the rumored 32-bit extensions is not enough; there are quite a few spots of 64-bit long/int uncleanliness that are hidden by many layers of casts and obfuscation. If you're interested in working on this, I'd be happy to offer suggestions and answer questions. You might also consider porting the NetBSD I2O layer + ASR extension, or even writing a new driver and/or I2O layer from scratch. Be aware that both this hardware and I2O in general are dead ends; very little development is going on in these technologies anymore (arguably for very good reason). Scott