From owner-freebsd-scsi@FreeBSD.ORG Sun Aug 31 11:00:58 2008 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 C1E2C106567C for ; Sun, 31 Aug 2008 11:00:58 +0000 (UTC) (envelope-from erich@fuujinnetworks.com) Received: from fluorine.fuujinnetworks.com (fluorine.fuujinnetworks.com [64.90.67.234]) by mx1.freebsd.org (Postfix) with ESMTP id 76AAE8FC12 for ; Sun, 31 Aug 2008 11:00:58 +0000 (UTC) (envelope-from erich@fuujinnetworks.com) Received: from [10.168.1.8] (copper.fuujinnetworks.com [64.90.67.254]) by fluorine.fuujinnetworks.com (Postfix) with ESMTP id 7EF678FC22; Sun, 31 Aug 2008 06:00:57 -0500 (CDT) Message-ID: <48BA87C6.5070008@fuujinnetworks.com> Date: Sun, 31 Aug 2008 06:00:06 -0600 From: Fuujin Networks LLC User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Alexander Sack References: <48B4CF57.30603@fuujinnetworks.com> <3c0b01820808271520w78d0f338iaf6996774512b5bb@mail.gmail.com> <48B733CF.5000105@fuujinnetworks.com> <3c0b01820808290914s638c970ejeae1d4f8c8c8a9d9@mail.gmail.com> <3c0b01820808290915t4e964182y784c215e28977252@mail.gmail.com> <48B8E879.7020809@fuujinnetworks.com> <3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba@mail.gmail.com> In-Reply-To: <3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: Qlogic FC scsi_target ISP2310 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: Sun, 31 Aug 2008 11:00:58 -0000 Alex: I apologize for not being more specific in my questions. I understand that we're loading the firmware via the kernel, but my question was why not load it from the card? If I have an HP SmartArray 5300 card and the firmware is out of date, I'm expected to update it, not load a kernel module to do it for me. This makes sense for many reasons, not he least of which is compatibility. I'm in no position to suggest what is proper from the standpoint of this particular problem, but I'm trying to understand the reason for choosing a kernel module rather than an sys admin as with nearly all other devices. I misunderstood the purpose of your patch as well. I thought the problem was a firmware loading issue, but as you mentioned, this does not appear to be the case. I did see your message with the patch and it was correctly applied and the kernel was correctly compiled. I did, however, reinstall the OS because of all the fiddling I did to this point. Funny thing is that I can't get it to crash anymore. I tried it clean, and the system tanked, but after I applied your patch, I can't get it to panic anymore. The loop looks like it comes up, but when I rescan with the initiator, the target stays up without incident, but nothing shows up in camcontrol as an emulated disk: amd_svr0-01# camcontrol devlist -v scbus0 on isp0 bus 0: < > at scbus0 target -1 lun -1 () scbus-1 on xpt0 bus 0: < > at scbus-1 target -1 lun -1 (xpt0) I do get this on the initiator though: [snip] Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, status not marked) Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.7 (count 36, resid 36, status not marked) [snip] After a clean install, this is what I see from dmesg on the target: [snip] registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set registered firmware set isp0: port 0x3000-0x30ff mem 0xfe020000-0xfe020fff irq 25 at device 1.0 on pci2 isp0: [ITHREAD] isp0: Board Type 2300, Chip Revision 0x1, loaded F/W Revision 3.3.19 isp0: target notify code 0x1007 isp0: target notify code 0x1007 isp0: target notify code 0x1007 isp0: target notify code 0x1008 isp0: target notify code 0x1006 [snip] Here's the complete kernel, also after a fresh install and the removal of unnecessary options/devices (stuff not in the server): Kernel cpu HAMMER ident GENERIC # To statically compile in device wiring instead of /boot/device.hints #hints "GENERIC.hints" # Default places to look for devices. makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols options SCHED_4BSD # 4BSD scheduler options PREEMPTION # Enable kernel thread preemption options INET # InterNETworking options INET6 # IPv6 communications protocols options SCTP # Stream Control Transmission Protocol options FFS # Berkeley Fast Filesystem options SOFTUPDATES # Enable FFS soft updates support options UFS_ACL # Support for access control lists options UFS_DIRHASH # Improve performance on big directories options UFS_GJOURNAL # Enable gjournal-based UFS journaling options MD_ROOT # MD is a potential root device options NFSCLIENT # Network Filesystem Client options NFSSERVER # Network Filesystem Server options NFS_ROOT # NFS usable as /, requires NFSCLIENT options NTFS # NT File System options MSDOSFS # MSDOS Filesystem options CD9660 # ISO 9660 Filesystem options PROCFS # Process filesystem (requires PSEUDOFS) options PSEUDOFS # Pseudo-filesystem framework options GEOM_PART_GPT # GUID Partition Tables. options GEOM_LABEL # Provides labelization options COMPAT_43TTY # BSD 4.3 TTY compat [KEEP THIS!] options COMPAT_IA32 # Compatible with i386 binaries options COMPAT_FREEBSD4 # Compatible with FreeBSD4 options COMPAT_FREEBSD5 # Compatible with FreeBSD5 options COMPAT_FREEBSD6 # Compatible with FreeBSD6 options SCSI_DELAY=5000 # Delay (in ms) before probing SCSI options KTRACE # ktrace(1) support options SYSVSHM # SYSV-style shared memory options SYSVMSG # SYSV-style message queues options SYSVSEM # SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING # POSIX P1003_1B real-time extensions options KBD_INSTALL_CDEV # install a CDEV entry in /dev options ADAPTIVE_GIANT # Giant mutex is adaptive. options STOP_NMI # Stop CPUS using NMI instead of IPI options AUDIT # Security event auditing # Make an SMP-capable kernel by default options SMP # Symmetric MultiProcessor Kernel # kernel debugging framework options KDB options DDB # CPU frequency control device cpufreq # Bus support. device acpi device pci # ATA and ATAPI devices device ata device atadisk # ATA disk drives device ataraid # ATA RAID drives device atapicd # ATAPI CDROM drives options ATA_STATIC_ID # Static device numbering # SCSI Controllers device isp # Qlogic family device ispfw # Firmware for QLogic HBAs- normally a module options ISP_TARGET_MODE # for ISP cards to operate in target mode device targ # SCSI Target device device targbh # SCSI Target Black Hole options CAMDEBUG options VFS_AIO # SCSI peripherals device scbus # SCSI bus (required for SCSI) device da # Direct Access (disks) device sa # Sequential Access (tape etc) device pass # Passthrough device (direct SCSI access) device ses # SCSI Environmental Services (and SAF-TE) # atkbdc0 controls both the keyboard and the PS/2 mouse device atkbdc # AT keyboard controller device atkbd # AT keyboard device psm # PS/2 mouse device kbdmux # keyboard multiplexer device vga # VGA video card driver device splash # Splash screen and screen saver support # syscons is the default console driver, resembling an SCO console device sc device agp # support several AGP chipsets # Serial (COM) ports device sio # 8250, 16[45]50 based serial ports device uart # Generic UART driver device em # Intel PRO/1000 adapter Gigabit Ethernet Card # PCI Ethernet NICs that use the common MII bus controller code. # NOTE: Be sure to keep the 'device miibus' line in order to use these NICs! device miibus # MII bus support device bce # Broadcom BCM5706/BCM5708 Gigabit Ethernet device bfe # Broadcom BCM440x 10/100 Ethernet device bge # Broadcom BCM570xx Gigabit Ethernet device fxp # Intel EtherExpress PRO/100B (82557, 82558) device re # RealTek 8139C+/8169/8169S/8110S device rl # RealTek 8129/8139 device sis # Silicon Integrated Systems SiS 900/SiS 7016 # Pseudo devices. device loop # Network loopback device random # Entropy device device ether # Ethernet support device sl # Kernel SLIP device ppp # Kernel PPP device tun # Packet tunnel. device pty # Pseudo-ttys (telnet etc) device md # Memory "disks" device gif # IPv6 and IPv4 tunneling device faith # IPv6-to-IPv4 relaying (translation) device firmware # firmware assist module # The `bpf' device enables the Berkeley Packet Filter. # Be aware of the administrative consequences of enabling this! # Note that 'bpf' is required for DHCP. device bpf # Berkeley packet filter Not sure what to make of this.... Would you recommend a different FC card? Emulex? Erich M. Jenkins Fuujin Networks, LLC PO Box 792 Brainerd, MN 56401 (p) 218-824-5038 (f) 218-824-7516 "You should never, never doubt what no one is sure about." -- Gene Wilder Alexander Sack wrote: > On Sat, Aug 30, 2008 at 2:28 AM, Fuujin Networks LLC > wrote: >> Alex: >> >> Thanks very much for the patch. Unfortunately, I ended up with a similar >> result as seen below. Just for grins, I tried the patch on a 64-bit system >> (AMD64) to see if there was a difference based on which architecture is used >> for the target. No difference there either; still dumps core and reboots. >> The upside I would think is that both branches seem to be in sync. I do have >> a sparc64 box here if you'd like to see what happens in that world (haven't >> tested it yet). > > No, no, no....the patch was not to FIX the target mode issue. There > is only one firmware and it does get loaded (even with the error > message below). I was *JUST* trying to avoid firmware_get() to > attempt to register a firmware that does not exist. I reversed the > patch, are you sure you applied the right one? Take a look but > isp_pci.c should have an added IS_SCSI(isp) to line 1039 here it is > again: > > --- isp_pci.c.0 2008-08-29 08:03:24.000000000 -0400 > +++ isp_pci.c 2008-08-29 07:58:08.000000000 -0400 > @@ -1039,7 +1039,7 @@ > } > > isp->isp_osinfo.fw = NULL; > - if (isp->isp_role & ISP_ROLE_TARGET) { > + if (isp->isp_role & ISP_ROLE_TARGET && IS_SCSI(isp)) { > snprintf(fwname, sizeof (fwname), "isp_%04x_it", did); > isp->isp_osinfo.fw = firmware_get(fwname); > } > > This should eliminate the firmware_get() message. But AGAIN this will > not fix your target mode issues. > >> [snip] >> (targ0:isp0:0:2:0): targdone 0xffffff0001ddda00 >> (targ0:isp0:0:2:0): targread >> (targ0:isp0:0:2:0): targread ccb 0xffffff0001ddda00 (0x800b7fe20) >> (targ0:isp0:0:2:0): targreturnccb 0xffffff0001ddda00 >> cam_debug: targfreeccb descr 0xffffff0001dda1c0 and >> cam_debug: freeing ccb 0xffffff0001ddda00 >> (targ0:isp0:0:2:0): write - uio_resid 8 >> (targ0:isp0:0:2:0): Sending queued ccb 0x933 (0x800b85040) >> (targ0:isp0:0:2:0): targstart 0xffffff0001369000 >> (targ0:isp0:0:2:0): sendccb 0xffffff0001369000 >> >> >> Fatal trap 12: page fault while in kernel mode >> cpuid = 0; apic id = 00 >> fault virtual address = 0x8 >> fault code = supervisor read data, page not present >> instruction pointer = 0x8:0xffffffff8025d2e8 >> stack pointer = 0x10:0xffffffffae3d06f0 >> frame pointer = 0x10:0xffffffff80a42000 >> code segment = base 0x0, limit 0xfffff, type 0x1b >> = DPL 0, pres 1, long 1, def32 0, gran 1 >> processor eflags = interrupt enabled, resume, IOPL = 0 >> current process = 783 (scsi_target) >> trap number = 12 >> panic: page fault >> cpuid = 0 >> Uptime: 7m21s >> Physical memory: 4021 MB >> Dumping 364 MB:: write - uio_resid 8 >> (targ0:isp0:0:2:0): getccb 0xffffff0001db7c00 >> (targ0:isp0:0:2:0): Sent ATIO/INOT (0x800b61a10) >> (targ0:isp0:0:2:0): write - uio_resid 8 >> (targ0:isp0:0:2:0): getccb 0xffffff0001db7b00 >> [snip] >> >> >> Seems to be nearly the same result in loading the firmware: >> >> [snip] >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> [snip] >> isp0: port 0x3000-0x30ff mem >> 0xfe020000-0xfe020fff irq 25 at device 1.0 on pci2 >> firmware_get: failed to load firmware image isp_2300_it >> isp0: [ITHREAD] > > Hold on, do you see this message with the patch? Are you sure you > rebuild and rebooted correctly? You should not see this message > anymore. I will verify the patch again but see above. > >> It doesn't appear that the firmware "isp_2300_it" either exists or possibly >> isn't named properly on the target machine (or the initiator for that >> matter). However, there do not seem to be any problems loading the firmware >> for the card when it's not in target mode. > > No there is no problem. The error message above is harmless. > >> From everything I've read, it looks like the firmware needs to be loaded via >> the kernel device option "ispfw". If for nothing other than my >> understanding, is there some reason we're not loading the firmware resident >> on the card? > > You ARE loading the firmware (isp_2300 one from ispfw) it just that > the code also tries to get an IT version of it and for fibre channel > cards there is no such thing. The patch I gave should remove this > nuisance BUT NOT FIX target mode. > > You need to rebuild the kernel with: > > options KDB > options DDB > > and when you panic, do a "bt" and copy the stack trace so we know > WHERE exactly its panicing on your 23xxx setup. Can you post your > kernel configuration file as well? > > Thanks! > > -aps From owner-freebsd-scsi@FreeBSD.ORG Sun Aug 31 17:12:33 2008 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 A563C106567D for ; Sun, 31 Aug 2008 17:12:33 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.234]) by mx1.freebsd.org (Postfix) with ESMTP id 7160A8FC15 for ; Sun, 31 Aug 2008 17:12:33 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so2169747rvf.43 for ; Sun, 31 Aug 2008 10:12:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=WO6XZaQJBfaW99dday49iUueZEgsqoBaWf4nu7yFTPw=; b=DfRtXVY3WznmyT/AGQpwPA7GITsjWOrE2rymLZYzccujgP24FlpbIESRIk4gMnNC2k d84ozcKqvPPDn6z7QllE3dgYUg8a54eckfgcwVQvL8QzUHzx3slFEA/5l5LKw3bAHuef vs7yc3Usut1ufsgvw04/L+RJWy8XcBgqYSSBs= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=qQsw4bhq/Zf1Zzv4Usa1D38U9wj8A9UMXT3tLJE2LJucmgggFzifWFDlztU5KGSCtX lKf2/Y4SYmuhjZlQfEBuHGK9Bw2VGFETErouTnEO2VmWYMJckCbefOuPt00JLg1hCg0e eMqwLjFWYPFDXQJfoj0ZN5elS8QDuYYvOTVfU= Received: by 10.141.23.7 with SMTP id a7mr2880849rvj.58.1220202752340; Sun, 31 Aug 2008 10:12:32 -0700 (PDT) Received: by 10.140.127.19 with HTTP; Sun, 31 Aug 2008 10:12:32 -0700 (PDT) Message-ID: <3c0b01820808311012n7e83a948t732e6544ddb0d703@mail.gmail.com> Date: Sun, 31 Aug 2008 13:12:32 -0400 From: "Alexander Sack" To: "Fuujin Networks LLC" In-Reply-To: <48BA87C6.5070008@fuujinnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48B4CF57.30603@fuujinnetworks.com> <3c0b01820808271520w78d0f338iaf6996774512b5bb@mail.gmail.com> <48B733CF.5000105@fuujinnetworks.com> <3c0b01820808290914s638c970ejeae1d4f8c8c8a9d9@mail.gmail.com> <3c0b01820808290915t4e964182y784c215e28977252@mail.gmail.com> <48B8E879.7020809@fuujinnetworks.com> <3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba@mail.gmail.com> <48BA87C6.5070008@fuujinnetworks.com> Cc: freebsd-scsi@freebsd.org Subject: Re: Qlogic FC scsi_target ISP2310 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: Sun, 31 Aug 2008 17:12:33 -0000 On Sun, Aug 31, 2008 at 8:00 AM, Fuujin Networks LLC wrote: > I apologize for not being more specific in my questions. I understand that > we're loading the firmware via the kernel, but my question was why not load > it from the card? If I have an HP SmartArray 5300 card and the firmware is > out of date, I'm expected to update it, not load a kernel module to do it > for me. This makes sense for many reasons, not he least of which is > compatibility. I'm in no position to suggest what is proper from the > standpoint of this particular problem, but I'm trying to understand the > reason for choosing a kernel module rather than an sys admin as with nearly > all other devices. We do both! QLogic ships each card with some version of the firmware on it that boots up at runtime. One of the nice features of the ISP is that its RISC based firmware can be updated at runtime ensuring you are always running the latest. The ispfw driver is strictly used to register firmwares with the generic firmware driver (the real action happens in isp during isp_reset()). I think the driver should really check to see if the ispfw version is less than the resident driver and do the right thing. I think it used to do that but was taken out, I don't know why - I'm actually thinking of maybe it should be added back. In any event, if you want to disable loading of the firmware you can set in your hints file: hint.isp.0.fwload_disable=1 That should prevent the driver from loading the ispfw version (please check during bootup what version your resident firmware is at to determine which is newer). If you do this then you should see: isp0: Board Type 2300, Chip Revision 0x1, resident F/W Revision instead of isp0: Board Type 2300, Chip Revision 0x1, loaded F/W Revision Having a separate utility (typically DOS or Windows based) is not that great in my eyes but to each his own. Bottom line is you should run the latest ISP firmware (whether its the one that was flashed from QLogic or the one in the ispfw driver). I'm thinking that perhaps and audit should be done and we should ship the latest firmware off the QLogic website. What version is shipped with your card? Looks like 3.3.25 is the latest for 23xx cards. Hmmm.... > I misunderstood the purpose of your patch as well. I thought the problem > was a firmware loading issue, but as you mentioned, this does not appear to > be the case. Right, it seems something else. > I did see your message with the patch and it was correctly applied and the > kernel was correctly compiled. I did, however, reinstall the OS because of > all the fiddling I did to this point. Funny thing is that I can't get it to > crash anymore. I tried it clean, and the system tanked, but after I applied > your patch, I can't get it to panic anymore. The loop looks like it comes > up, but when I rescan with the initiator, the target stays up without > incident, but nothing shows up in camcontrol as an emulated disk: > > amd_svr0-01# camcontrol devlist -v > scbus0 on isp0 bus 0: > < > at scbus0 target -1 lun -1 () > scbus-1 on xpt0 bus 0: > < > at scbus-1 target -1 lun -1 (xpt0) > > I do get this on the initiator though: > > [snip] > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, > status not marked) > Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.7 (count 36, resid 36, > status not marked) > [snip] > > After a clean install, this is what I see from dmesg on the target: > > [snip] > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > registered firmware set > isp0: port 0x3000-0x30ff mem > 0xfe020000-0xfe020fff irq 25 at device 1.0 on pci2 > isp0: [ITHREAD] > isp0: Board Type 2300, Chip Revision 0x1, loaded F/W Revision 3.3.19 > isp0: target notify code 0x1007 > isp0: target notify code 0x1007 > isp0: target notify code 0x1007 > isp0: target notify code 0x1008 > isp0: target notify code 0x1006 > [snip] Is this with or without the isp patch I sent regarding the firmware? I noticed its not trying to get isp_2300_it like before (I'm hoping that's due to the patch I sent otherwise I'm confused this holiday weekend). > Here's the complete kernel, also after a fresh install and the removal of > unnecessary options/devices (stuff not in the server): > # SCSI Controllers > device isp # Qlogic family > device ispfw # Firmware for QLogic HBAs- normally a > module > options ISP_TARGET_MODE # for ISP cards to operate in target mode > device targ # SCSI Target device > device targbh # SCSI Target Black Hole > options CAMDEBUG > options VFS_AIO Thanks for this, I just wanted to verify your build options look good. > Not sure what to make of this.... Would you recommend a different FC card? > Emulex? I have no direct experience with Emulex with FreeBSD so I'm not the right person to ask. I was under the impression that the 23xx target mode was working. Did you enable target mode in the BIOS by chance (or disable it, I think on my 24xx BIOS I have that option but I'm not in front of it yet). Just verify your BIOS version number and options before completely giving up! :D -aps From owner-freebsd-scsi@FreeBSD.ORG Sun Aug 31 22:22:58 2008 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 61C2D1065672 for ; Sun, 31 Aug 2008 22:22:58 +0000 (UTC) (envelope-from erich@fuujinnetworks.com) Received: from fluorine.fuujinnetworks.com (fluorine.fuujinnetworks.com [64.90.67.234]) by mx1.freebsd.org (Postfix) with ESMTP id 26BBE8FC08 for ; Sun, 31 Aug 2008 22:22:58 +0000 (UTC) (envelope-from erich@fuujinnetworks.com) Received: from [10.168.1.8] (copper.fuujinnetworks.com [64.90.67.254]) by fluorine.fuujinnetworks.com (Postfix) with ESMTP id 400198FC22; Sun, 31 Aug 2008 17:22:57 -0500 (CDT) Message-ID: <48BB279E.7080402@fuujinnetworks.com> Date: Sun, 31 Aug 2008 17:22:06 -0600 From: Fuujin Networks LLC User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Alexander Sack References: <48B4CF57.30603@fuujinnetworks.com> <3c0b01820808271520w78d0f338iaf6996774512b5bb@mail.gmail.com> <48B733CF.5000105@fuujinnetworks.com> <3c0b01820808290914s638c970ejeae1d4f8c8c8a9d9@mail.gmail.com> <3c0b01820808290915t4e964182y784c215e28977252@mail.gmail.com> <48B8E879.7020809@fuujinnetworks.com> <3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba@mail.gmail.com> <48BA87C6.5070008@fuujinnetworks.com> <3c0b01820808311012n7e83a948t732e6544ddb0d703@mail.gmail.com> In-Reply-To: <3c0b01820808311012n7e83a948t732e6544ddb0d703@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: Qlogic FC scsi_target ISP2310 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: Sun, 31 Aug 2008 22:22:58 -0000 Alex: Thanks very much for your input and assistance! I'm by no means an expert with FC on FreeBSD, but since it's my OS of choice I'm trying to fight through this one. The fresh install is using your patch, so I believe everything is working correctly there. :) I've noticed a few things about the isp driver that make me a bit nervous though. When I booted after a fresh install, I found that the system (initiator) hangs if the target is up and on the loop. Then the system comes up after I physically unplug the link. Plugging it back in doesn't produce any error messages on either end, but the target won't panic, and the initiator spits out the error I included in the previous email. I'm starting the scsi target with "./scsi_target -d 0:2:0 backing.file" and rescanning the initiator with "camcontrol rescan all". This generally caused a core dump/kernel panic, but doesn't seem to be doing this now (for no reason evident to me anyway)... Is there something particular about these cards and the SCSI bus:id:lun that I'm missing? Perhaps in the cards configuration settings? It appears from the man page for ISP that the driver ignores settings on the card. Is this actually the case?? BTW: I appreciate your assistance during a holiday weekend of all things! Proves once again why open source is the way to go!! Erich M. Jenkins Fuujin Networks, LLC PO Box 792 Brainerd, MN 56401 (p) 218-824-5038 (f) 218-824-7516 "You should never, never doubt what no one is sure about." -- Gene Wilder Alexander Sack wrote: > On Sun, Aug 31, 2008 at 8:00 AM, Fuujin Networks LLC > wrote: >> I apologize for not being more specific in my questions. I understand that >> we're loading the firmware via the kernel, but my question was why not load >> it from the card? If I have an HP SmartArray 5300 card and the firmware is >> out of date, I'm expected to update it, not load a kernel module to do it >> for me. This makes sense for many reasons, not he least of which is >> compatibility. I'm in no position to suggest what is proper from the >> standpoint of this particular problem, but I'm trying to understand the >> reason for choosing a kernel module rather than an sys admin as with nearly >> all other devices. > > We do both! QLogic ships each card with some version of the firmware > on it that boots up at runtime. One of the nice features of the ISP > is that its RISC based firmware can be updated at runtime ensuring you > are always running the latest. The ispfw driver is strictly used to > register firmwares with the generic firmware driver (the real action > happens in isp during isp_reset()). > > I think the driver should really check to see if the ispfw version is > less than the resident driver and do the right thing. I think it used > to do that but was taken out, I don't know why - I'm actually thinking > of maybe it should be added back. > > In any event, if you want to disable loading of the firmware you can > set in your hints file: > > hint.isp.0.fwload_disable=1 > > That should prevent the driver from loading the ispfw version (please > check during bootup what version your resident firmware is at to > determine which is newer). If you do this then you should see: > > isp0: Board Type 2300, Chip Revision 0x1, resident F/W Revision > > instead of > > isp0: Board Type 2300, Chip Revision 0x1, loaded F/W Revision > > Having a separate utility (typically DOS or Windows based) is not that > great in my eyes but to each his own. Bottom line is you should run > the latest ISP firmware (whether its the one that was flashed from > QLogic or the one in the ispfw driver). I'm thinking that perhaps and > audit should be done and we should ship the latest firmware off the > QLogic website. What version is shipped with your card? Looks like > 3.3.25 is the latest for 23xx cards. Hmmm.... > >> I misunderstood the purpose of your patch as well. I thought the problem >> was a firmware loading issue, but as you mentioned, this does not appear to >> be the case. > > Right, it seems something else. > >> I did see your message with the patch and it was correctly applied and the >> kernel was correctly compiled. I did, however, reinstall the OS because of >> all the fiddling I did to this point. Funny thing is that I can't get it to >> crash anymore. I tried it clean, and the system tanked, but after I applied >> your patch, I can't get it to panic anymore. The loop looks like it comes >> up, but when I rescan with the initiator, the target stays up without >> incident, but nothing shows up in camcontrol as an emulated disk: >> >> amd_svr0-01# camcontrol devlist -v >> scbus0 on isp0 bus 0: >> < > at scbus0 target -1 lun -1 () >> scbus-1 on xpt0 bus 0: >> < > at scbus-1 target -1 lun -1 (xpt0) >> >> I do get this on the initiator though: >> >> [snip] >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.7 (count 36, resid 36, >> status not marked) >> [snip] >> >> After a clean install, this is what I see from dmesg on the target: >> >> [snip] >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> isp0: port 0x3000-0x30ff mem >> 0xfe020000-0xfe020fff irq 25 at device 1.0 on pci2 >> isp0: [ITHREAD] >> isp0: Board Type 2300, Chip Revision 0x1, loaded F/W Revision 3.3.19 >> isp0: target notify code 0x1007 >> isp0: target notify code 0x1007 >> isp0: target notify code 0x1007 >> isp0: target notify code 0x1008 >> isp0: target notify code 0x1006 >> [snip] > > Is this with or without the isp patch I sent regarding the firmware? > I noticed its not trying to get isp_2300_it like before (I'm hoping > that's due to the patch I sent otherwise I'm confused this holiday > weekend). > >> Here's the complete kernel, also after a fresh install and the removal of >> unnecessary options/devices (stuff not in the server): > >> # SCSI Controllers >> device isp # Qlogic family >> device ispfw # Firmware for QLogic HBAs- normally a >> module >> options ISP_TARGET_MODE # for ISP cards to operate in target mode >> device targ # SCSI Target device >> device targbh # SCSI Target Black Hole >> options CAMDEBUG >> options VFS_AIO > > Thanks for this, I just wanted to verify your build options look good. > >> Not sure what to make of this.... Would you recommend a different FC card? >> Emulex? > > I have no direct experience with Emulex with FreeBSD so I'm not the > right person to ask. I was under the impression that the 23xx target > mode was working. Did you enable target mode in the BIOS by chance > (or disable it, I think on my 24xx BIOS I have that option but I'm not > in front of it yet). Just verify your BIOS version number and options > before completely giving up! :D > > -aps From owner-freebsd-scsi@FreeBSD.ORG Mon Sep 1 09:00:43 2008 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 0E2CF1065681 for ; Mon, 1 Sep 2008 09:00:43 +0000 (UTC) (envelope-from erich@fuujinnetworks.com) Received: from fluorine.fuujinnetworks.com (fluorine.fuujinnetworks.com [64.90.67.234]) by mx1.freebsd.org (Postfix) with ESMTP id CC12E8FC20 for ; Mon, 1 Sep 2008 09:00:42 +0000 (UTC) (envelope-from erich@fuujinnetworks.com) Received: from [10.168.1.8] (copper.fuujinnetworks.com [64.90.67.254]) by fluorine.fuujinnetworks.com (Postfix) with ESMTP id BD1358FC2D; Mon, 1 Sep 2008 04:00:41 -0500 (CDT) Message-ID: <48BBBD16.80402@fuujinnetworks.com> Date: Mon, 01 Sep 2008 03:59:50 -0600 From: Fuujin Networks LLC User-Agent: Thunderbird 2.0.0.16 (Windows/20080708) MIME-Version: 1.0 To: Alexander Sack References: <48B4CF57.30603@fuujinnetworks.com> <3c0b01820808271520w78d0f338iaf6996774512b5bb@mail.gmail.com> <48B733CF.5000105@fuujinnetworks.com> <3c0b01820808290914s638c970ejeae1d4f8c8c8a9d9@mail.gmail.com> <3c0b01820808290915t4e964182y784c215e28977252@mail.gmail.com> <48B8E879.7020809@fuujinnetworks.com> <3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba@mail.gmail.com> <48BA87C6.5070008@fuujinnetworks.com> <3c0b01820808311012n7e83a948t732e6544ddb0d703@mail.gmail.com> In-Reply-To: <3c0b01820808311012n7e83a948t732e6544ddb0d703@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: Qlogic FC scsi_target ISP2310 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, 01 Sep 2008 09:00:43 -0000 Alex: So here's something interesting. The target decided to panic on me just now. Here's the last message from the target before it rebooted: scsi_target: main loop beginning scsi_target: read ready scsi_target: event -1 done scsi_target: Working on ATIO 0x800b7fe20 scsi_target: tcmd_handle atio 0x800b7fe20 ctio 0x800b85040 atioflags 0x8000 scsi_target: INQUIRY from 0: 12 0 0 0 24 0 The initiator just sits there and says the rescan was successful with no events or errors..... Here's the panic: Fatal trap 12: page fault while in kernel mode cpuid = 0; apic id = 00 fault virtual address = 0x8 fault code = supervisor read data, page not present instruction pointer = 0x8:0xffffffff8022f128 stack pointer = 0x10:0xffffffffae3c1650 frame pointer = 0x10:0xffffffffae3c16e0 code segment = base 0x0, limit oxfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 777 (scsi_target) [thread pid 777 tid 100075 ] Stopped at isp_pci_dmasetup+0x1d8: movq 0x8(%rax),%rsi Here's the bt: Tracing pid 777 tid 100075 td 0xffffff00016e100 isp_pci_dmasetup() at isp_dmasetup+0x1d8 isp_action() at isp_action+0x1089 xpt_run_dev_sendq() at xpt_run_dev_sendq+0x1c4 xpt_action() at xpt_action+0x796 targsendccb() at targsendccb+0x9e targstart() at targstart+0x130 xpt_run_dev_allocq() at xpt_run_dev_allocq+0xd4 targwrite() at targwrite+0x184 giant_write() at giant_write+0x60 devfs_write_f() at devfs_write_f+0x75 dofilewrite() at dofilewrite+0x85 kern_writev() at kern_writev+0x4c write() at write+0x54 syscall() at syscall+0x254 Xfast_syscall() at Xfast_syscall+0xab --- syscall (4, FreeBSD ELF64, write), rip = 0x800929d3c, rsp = 0x7fffffff4908, rbp = 0x800b83440 --- Please note the above trace was copied by hand because I couldn't get console redirection to stay up when this died. Does anyone know how to get this data into a file or out via serial (vt100 perhaps??) or is this pretty much a manual process?? Erich M. Jenkins Fuujin Networks, LLC PO Box 792 Brainerd, MN 56401 (p) 218-824-5038 (f) 218-824-7516 "You should never, never doubt what no one is sure about." -- Gene Wilder Alexander Sack wrote: > On Sun, Aug 31, 2008 at 8:00 AM, Fuujin Networks LLC > wrote: >> I apologize for not being more specific in my questions. I understand that >> we're loading the firmware via the kernel, but my question was why not load >> it from the card? If I have an HP SmartArray 5300 card and the firmware is >> out of date, I'm expected to update it, not load a kernel module to do it >> for me. This makes sense for many reasons, not he least of which is >> compatibility. I'm in no position to suggest what is proper from the >> standpoint of this particular problem, but I'm trying to understand the >> reason for choosing a kernel module rather than an sys admin as with nearly >> all other devices. > > We do both! QLogic ships each card with some version of the firmware > on it that boots up at runtime. One of the nice features of the ISP > is that its RISC based firmware can be updated at runtime ensuring you > are always running the latest. The ispfw driver is strictly used to > register firmwares with the generic firmware driver (the real action > happens in isp during isp_reset()). > > I think the driver should really check to see if the ispfw version is > less than the resident driver and do the right thing. I think it used > to do that but was taken out, I don't know why - I'm actually thinking > of maybe it should be added back. > > In any event, if you want to disable loading of the firmware you can > set in your hints file: > > hint.isp.0.fwload_disable=1 > > That should prevent the driver from loading the ispfw version (please > check during bootup what version your resident firmware is at to > determine which is newer). If you do this then you should see: > > isp0: Board Type 2300, Chip Revision 0x1, resident F/W Revision > > instead of > > isp0: Board Type 2300, Chip Revision 0x1, loaded F/W Revision > > Having a separate utility (typically DOS or Windows based) is not that > great in my eyes but to each his own. Bottom line is you should run > the latest ISP firmware (whether its the one that was flashed from > QLogic or the one in the ispfw driver). I'm thinking that perhaps and > audit should be done and we should ship the latest firmware off the > QLogic website. What version is shipped with your card? Looks like > 3.3.25 is the latest for 23xx cards. Hmmm.... > >> I misunderstood the purpose of your patch as well. I thought the problem >> was a firmware loading issue, but as you mentioned, this does not appear to >> be the case. > > Right, it seems something else. > >> I did see your message with the patch and it was correctly applied and the >> kernel was correctly compiled. I did, however, reinstall the OS because of >> all the fiddling I did to this point. Funny thing is that I can't get it to >> crash anymore. I tried it clean, and the system tanked, but after I applied >> your patch, I can't get it to panic anymore. The loop looks like it comes >> up, but when I rescan with the initiator, the target stays up without >> incident, but nothing shows up in camcontrol as an emulated disk: >> >> amd_svr0-01# camcontrol devlist -v >> scbus0 on isp0 bus 0: >> < > at scbus0 target -1 lun -1 () >> scbus-1 on xpt0 bus 0: >> < > at scbus-1 target -1 lun -1 (xpt0) >> >> I do get this on the initiator though: >> >> [snip] >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.5 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.6 (count 36, resid 36, >> status not marked) >> Aug 31 05:44:34 test kernel: isp0: bad underrun for 0.7 (count 36, resid 36, >> status not marked) >> [snip] >> >> After a clean install, this is what I see from dmesg on the target: >> >> [snip] >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> registered firmware set >> isp0: port 0x3000-0x30ff mem >> 0xfe020000-0xfe020fff irq 25 at device 1.0 on pci2 >> isp0: [ITHREAD] >> isp0: Board Type 2300, Chip Revision 0x1, loaded F/W Revision 3.3.19 >> isp0: target notify code 0x1007 >> isp0: target notify code 0x1007 >> isp0: target notify code 0x1007 >> isp0: target notify code 0x1008 >> isp0: target notify code 0x1006 >> [snip] > > Is this with or without the isp patch I sent regarding the firmware? > I noticed its not trying to get isp_2300_it like before (I'm hoping > that's due to the patch I sent otherwise I'm confused this holiday > weekend). > >> Here's the complete kernel, also after a fresh install and the removal of >> unnecessary options/devices (stuff not in the server): > >> # SCSI Controllers >> device isp # Qlogic family >> device ispfw # Firmware for QLogic HBAs- normally a >> module >> options ISP_TARGET_MODE # for ISP cards to operate in target mode >> device targ # SCSI Target device >> device targbh # SCSI Target Black Hole >> options CAMDEBUG >> options VFS_AIO > > Thanks for this, I just wanted to verify your build options look good. > >> Not sure what to make of this.... Would you recommend a different FC card? >> Emulex? > > I have no direct experience with Emulex with FreeBSD so I'm not the > right person to ask. I was under the impression that the 23xx target > mode was working. Did you enable target mode in the BIOS by chance > (or disable it, I think on my 24xx BIOS I have that option but I'm not > in front of it yet). Just verify your BIOS version number and options > before completely giving up! :D > > -aps From owner-freebsd-scsi@FreeBSD.ORG Mon Sep 1 11:07:02 2008 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 640DE1065763 for ; Mon, 1 Sep 2008 11:07:02 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 542138FC18 for ; Mon, 1 Sep 2008 11:07:02 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m81B721G068565 for ; Mon, 1 Sep 2008 11:07:02 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m81B71Xc068560 for freebsd-scsi@FreeBSD.org; Mon, 1 Sep 2008 11:07:01 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 1 Sep 2008 11:07:01 GMT Message-Id: <200809011107.m81B71Xc068560@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-scsi@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-scsi@FreeBSD.org 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, 01 Sep 2008 11:07:02 -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/90282 scsi [sym] SCSI bus resets cause loss of ch device o kern/92798 scsi [ahc] SCSI problem with timeouts 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] o kern/110847 scsi [ahd] Tyan U320 onboard problem with more than 3 disks o kern/120247 scsi [mpt] FreeBSD 6.3 and LSI Logic 1030 = only 3.300MB/s o kern/124667 scsi [amd] [panic] FreeBSD-7 kernel page faults at amd-scsi 15 problems total. Non-critical problems S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/35234 scsi World access to /dev/pass? (for scanner) requires acce o kern/38828 scsi [dpt] [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/114597 scsi [sym] System hangs at SCSI bus reset with dual HBAs o kern/119668 scsi [cam] [patch] certain errors are too verbose comparing o kern/120487 scsi [sg] scsi_sg incompatible with scanners o sparc/121676 scsi [iscsi] iscontrol do not connect iscsi-target on sparc o kern/123666 scsi [aac] attach fails with Adaptec SAS RAID 3805 controll o kern/123674 scsi [ahc] ahc driver dumping o kern/126866 scsi [isp] [panic] kernel panic on card initialization 11 problems total. From owner-freebsd-scsi@FreeBSD.ORG Tue Sep 2 16:52:08 2008 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 72640106570C for ; Tue, 2 Sep 2008 16:52:08 +0000 (UTC) (envelope-from westr@connection.ca) Received: from nc-tor-mail1.connection.ca (nc-tor-mail1.connection.ca [205.207.122.26]) by mx1.freebsd.org (Postfix) with ESMTP id 4F84E8FC25 for ; Tue, 2 Sep 2008 16:52:08 +0000 (UTC) (envelope-from westr@connection.ca) Received: from localhost (external.tor.connection.ca [216.234.38.18]) by nc-tor-mail1.connection.ca (Postfix) with ESMTP id 8DB4644B420 for ; Tue, 2 Sep 2008 12:52:07 -0400 (EDT) Date: Tue, 2 Sep 2008 12:52:07 -0400 From: Ross Organization: Network Connection X-Priority: 3 (Normal) Message-ID: <479922773.20080902125207@connection.ca> To: freebsd-scsi@freebsd.org In-Reply-To: <3c0b01820808291515j759236e6h262c533846587d57@mail.gmail.com> References: <13710393234.20080826164158@connection.ca> <48B46EE1.8060408@samsco.org> <3c0b01820808270743n5fd40995u6e9506b772f2b03c@mail.gmail.com> <86689256.20080827112751@connection.ca> <3c0b01820808271333l34ead8ele99daab695baf667@mail.gmail.com> <34442830.20080829103621@connection.ca> <3c0b01820808290822tce5619bie11b8e97fe9a9062@mail.gmail.com> <08661720.20080829151750@connection.ca> <3c0b01820808291515j759236e6h262c533846587d57@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re[8]: isp(4) - kernel panic on initialization of driver X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ross List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Sep 2008 16:52:08 -0000 AS> I think your doing some great work but I don't think this is the AS> *right* direction to take. The bottom line is the ISP should have AS> interrupts disabled until it completes a full reset and loads the AS> firmware, period. You shouldn't have to ignore ASYNC events during a AS> reset - that doesn't make sense to me....yet....! I've created a small patch that so far seems to be working (survived ~10+ reboots). From what I can tell, using the ISP_ENABLE_INTS & ISP_DISABLE_INTS functions won't do anything to stop the problem. Basically my hypotheses is that the ASYNC command is already sitting around in the mailbox of the card waiting to be read, so no interrupt is actually being generated during the time the driver is starting up - so you can't disable it. (The card is active with a valid running rom before freebsd gets it's paws on it, so it's probably already cleanly read it, but hasn't acted upon it) The crash is located with the very first mailbox read, where if it doesn't recognize the mailbox response, it parses it anyways (in case it's something that needs to be done), and exit out if there's an error. But the isp_parse_async() function makes the assumption that isp_state == ISP_RUNSTATE, so it's safe to do anything. Where in fact is actually gets called when not in ISP_RUNSTATE (with the assumption that no problematic async command could be generated at this point). I'm guessing the true fix would be upon startup to somehow make sure the mailbox queue is emptied before attempting to query the card (for the firmware version). But how to do that is beyond me. Let me know what you think. Ross. -= start [~/isp]$ diff -u isp.c.orig isp.c --- isp.c.orig 2008-08-22 16:32:57.000000000 -0400 +++ isp.c 2008-09-02 11:48:18.000000000 -0400 @@ -4557,8 +4557,10 @@ isp_prt(isp, ISP_LOGWARN, "mailbox cmd (0x%x) with no waiters", mbox); } - } else if (isp_parse_async(isp, mbox) < 0) { - return; + } else if (isp->isp_state == ISP_RUNSTATE) { + if (isp_parse_async(isp, mbox) < 0) { + return; + } } if ((IS_FC(isp) && mbox != ASYNC_RIO_RESP) || isp->isp_state != ISP_RUNSTATE) { -= -- Ross West Tel: +1 416 967 6767 Network Manager Fax: +1 416 967 7777 Network Connection Email: westr@connection.ca From owner-freebsd-scsi@FreeBSD.ORG Tue Sep 2 18:42:14 2008 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 751031065687 for ; Tue, 2 Sep 2008 18:42:14 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id 43F628FC08 for ; Tue, 2 Sep 2008 18:42:14 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3363949rvf.43 for ; Tue, 02 Sep 2008 11:42:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=gRCXPB7Ejz+E0ktmzoFdTd07ZcwzrKbBcxAhUB1dJTM=; b=l9/Q+F52MV5BKxIg2R7oFYjviX525dvrgrdO8C6M5OitNSVkko1bryQBFB/APDI/gw UUB8/UjbtY0O0/UPAeLbqQSASQguOtsZVc4xjzFR5j1Nz7MGtWDGNG4Bsq+6jk0fMZLN 7OdyFVz6kIDcXOtVQTetkELAEKUUgwK1I3fUM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=blsqvsZgmbHXkEouSIIe2i15zOZuHPz0cYU1AIHfbFEKmmw1GQRDlfob+WqK097h3G IHsnrcPfUeTIjStwL7ZktSd1w9Unm0fJIfFluXVPVJ8ynXXsPTM3q+l2CzHE5Zr0hMFX 50FWmUFYXHRd7m7ZWPN4xe31qbiy/s/My/4V4= Received: by 10.141.146.4 with SMTP id y4mr4350447rvn.272.1220380933913; Tue, 02 Sep 2008 11:42:13 -0700 (PDT) Received: by 10.140.127.19 with HTTP; Tue, 2 Sep 2008 11:42:13 -0700 (PDT) Message-ID: <3c0b01820809021142v1192123aq1116c5528dda4920@mail.gmail.com> Date: Tue, 2 Sep 2008 14:42:13 -0400 From: "Alexander Sack" To: Ross In-Reply-To: <479922773.20080902125207@connection.ca> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <13710393234.20080826164158@connection.ca> <48B46EE1.8060408@samsco.org> <3c0b01820808270743n5fd40995u6e9506b772f2b03c@mail.gmail.com> <86689256.20080827112751@connection.ca> <3c0b01820808271333l34ead8ele99daab695baf667@mail.gmail.com> <34442830.20080829103621@connection.ca> <3c0b01820808290822tce5619bie11b8e97fe9a9062@mail.gmail.com> <08661720.20080829151750@connection.ca> <3c0b01820808291515j759236e6h262c533846587d57@mail.gmail.com> <479922773.20080902125207@connection.ca> Cc: freebsd-scsi@freebsd.org Subject: Re: Re[8]: isp(4) - kernel panic on initialization of driver 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, 02 Sep 2008 18:42:14 -0000 On Tue, Sep 2, 2008 at 12:52 PM, Ross wrote: > > AS> I think your doing some great work but I don't think this is the > AS> *right* direction to take. The bottom line is the ISP should have > AS> interrupts disabled until it completes a full reset and loads the > AS> firmware, period. You shouldn't have to ignore ASYNC events during a > AS> reset - that doesn't make sense to me....yet....! > > I've created a small patch that so far seems to be working (survived > ~10+ reboots). From what I can tell, using the ISP_ENABLE_INTS & > ISP_DISABLE_INTS functions won't do anything to stop the problem. Yes Ross, I just discovered this myself that AYNC events are let through to the host regardless of ISP_ENABLE_INTS. > Basically my hypotheses is that the ASYNC command is already sitting > around in the mailbox of the card waiting to be read, so no interrupt > is actually being generated during the time the driver is starting up > - so you can't disable it. That's right but the ISP should be reset. YWe actually issue mailbox commands BEFORE we do the RISC reset. I think that maybe ultimately the bug. > (The card is active with a valid running rom before freebsd gets it's > paws on it, so it's probably already cleanly read it, but hasn't acted > upon it) Yes I believe your right. > The crash is located with the very first mailbox read, where if it > doesn't recognize the mailbox response, it parses it anyways > (in case it's something that needs to be done), and exit out if > there's an error. > > But the isp_parse_async() function makes the assumption that isp_state > == ISP_RUNSTATE, so it's safe to do anything. Where in fact is > actually gets called when not in ISP_RUNSTATE (with the assumption > that no problematic async command could be generated at this point). > > I'm guessing the true fix would be upon startup to somehow make sure > the mailbox queue is emptied before attempting to query the card > (for the firmware version). But how to do that is beyond me. Are you ok with trying another patch to maybe do exactly that? Let me take a look at your patch as well. Thanks! -aps From owner-freebsd-scsi@FreeBSD.ORG Tue Sep 2 23:42:58 2008 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 DB8D51065677 for ; Tue, 2 Sep 2008 23:42:57 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.229]) by mx1.freebsd.org (Postfix) with ESMTP id AA91F8FC14 for ; Tue, 2 Sep 2008 23:42:57 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so3514887rvf.43 for ; Tue, 02 Sep 2008 16:42:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=OjsVRAEBfLW++8DVj23ftOUpJyzSeA81CzXxT5a/E64=; b=Wp1HND1bw/D2DfNt+6sFS6CAMgTXVG7RSfE7BL/MeZu4QaZ/VAEtOueadIOzBvlvEy eu4W1XEJ1QuSc8oRQoKdORZWCizhR+uvfnj7xESFIWLH+sVz5CR171yaMU/VjBXtyNXv 0xSiJBKzgT0F2ucYq1xhv9LqcuOxnBm3ikxPY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=wsUAwOzOruAPOItVt56ZvAoFLRbz6gVC8bXDlP4UsExX6efUMup47O+UB6MBWvBd1n YeUpLaJrZC7zvETwdMzerf5s+fm2uTgj5unumZDBPsiVxf5MMjxC8YNFYFP2P7ZhRupN uVdcU4GsgOEahh4svpeuCW0g0ABFoVir1l3Z4= Received: by 10.140.126.14 with SMTP id y14mr4524090rvc.96.1220398977186; Tue, 02 Sep 2008 16:42:57 -0700 (PDT) Received: by 10.140.127.19 with HTTP; Tue, 2 Sep 2008 16:42:57 -0700 (PDT) Message-ID: <3c0b01820809021642s70edbea6k7cadd0b8f051357c@mail.gmail.com> Date: Tue, 2 Sep 2008 19:42:57 -0400 From: "Alexander Sack" To: "Fuujin Networks LLC" In-Reply-To: <48BBBD16.80402@fuujinnetworks.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48B4CF57.30603@fuujinnetworks.com> <3c0b01820808271520w78d0f338iaf6996774512b5bb@mail.gmail.com> <48B733CF.5000105@fuujinnetworks.com> <3c0b01820808290914s638c970ejeae1d4f8c8c8a9d9@mail.gmail.com> <3c0b01820808290915t4e964182y784c215e28977252@mail.gmail.com> <48B8E879.7020809@fuujinnetworks.com> <3c0b01820808300708s5ed5cb18o5199e0e4ec1dcbba@mail.gmail.com> <48BA87C6.5070008@fuujinnetworks.com> <3c0b01820808311012n7e83a948t732e6544ddb0d703@mail.gmail.com> <48BBBD16.80402@fuujinnetworks.com> Cc: freebsd-scsi@freebsd.org Subject: Re: Qlogic FC scsi_target ISP2310 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, 02 Sep 2008 23:42:58 -0000 On Mon, Sep 1, 2008 at 5:59 AM, Fuujin Networks LLC wrote: > Alex: > > So here's something interesting. The target decided to panic on me just now. > Here's the last message from the target before it rebooted: > > scsi_target: main loop beginning > scsi_target: read ready > scsi_target: event -1 done > scsi_target: Working on ATIO 0x800b7fe20 > scsi_target: tcmd_handle atio 0x800b7fe20 ctio 0x800b85040 atioflags 0x8000 > scsi_target: INQUIRY from 0: 12 0 0 0 24 0 > > The initiator just sits there and says the rescan was successful with no > events or errors..... > > > Here's the panic: > > Fatal trap 12: page fault while in kernel mode > cpuid = 0; apic id = 00 > fault virtual address = 0x8 > fault code = supervisor read data, page not present > instruction pointer = 0x8:0xffffffff8022f128 > stack pointer = 0x10:0xffffffffae3c1650 > frame pointer = 0x10:0xffffffffae3c16e0 > code segment = base 0x0, limit oxfffff, type 0x1b > = DPL 0, pres 1, long 1, def32 0, gran 1 > processor eflags = interrupt enabled, resume, IOPL = 0 > current process = 777 (scsi_target) > [thread pid 777 tid 100075 ] > Stopped at isp_pci_dmasetup+0x1d8: movq 0x8(%rax),%rsi > > Here's the bt: > > Tracing pid 777 tid 100075 td 0xffffff00016e100 > isp_pci_dmasetup() at isp_dmasetup+0x1d8 > isp_action() at isp_action+0x1089 > xpt_run_dev_sendq() at xpt_run_dev_sendq+0x1c4 > xpt_action() at xpt_action+0x796 > targsendccb() at targsendccb+0x9e > targstart() at targstart+0x130 > xpt_run_dev_allocq() at xpt_run_dev_allocq+0xd4 > targwrite() at targwrite+0x184 > giant_write() at giant_write+0x60 > devfs_write_f() at devfs_write_f+0x75 > dofilewrite() at dofilewrite+0x85 > kern_writev() at kern_writev+0x4c > write() at write+0x54 > syscall() at syscall+0x254 > Xfast_syscall() at Xfast_syscall+0xab > --- syscall (4, FreeBSD ELF64, write), rip = 0x800929d3c, rsp = > 0x7fffffff4908, rbp = 0x800b83440 --- > > Please note the above trace was copied by hand because I couldn't get > console redirection to stay up when this died. Does anyone know how to get > this data into a file or out via serial (vt100 perhaps??) or is this pretty > much a manual process?? Erich, if you had a gdb session you could log it or use print screen I suppose. But yea it can be a pain in the butt to copy stack traces. I don't know why you panic'ed and I haven't had a single cycle to look a this particular issue. So it seems you and Sean (see other thread) are having trouble using the QLA2[34]xx cards in target mode. Seems like there needs to be more testing involved. I'll see if tomorrow I can build target mode in on my box and reproduce the panic (a panic, hopefully with a similar stacktrace!). Thanks for this, stay tuned... -aps From owner-freebsd-scsi@FreeBSD.ORG Wed Sep 3 20:15:45 2008 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 1065A10657D5 for ; Wed, 3 Sep 2008 20:15:45 +0000 (UTC) (envelope-from klapperzhu@gmail.com) Received: from yx-out-2324.google.com (yx-out-2324.google.com [74.125.44.28]) by mx1.freebsd.org (Postfix) with ESMTP id C19828FC1B for ; Wed, 3 Sep 2008 20:15:44 +0000 (UTC) (envelope-from klapperzhu@gmail.com) Received: by yx-out-2324.google.com with SMTP id 8so1652359yxb.13 for ; Wed, 03 Sep 2008 13:15:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=WBWJ5dGL7cXbZno9EjhEwQ1CjPjO5ktwxQ9kPK+LN44=; b=hZBuLhdj43ojy1Jy3FKbAEtmxdQ1j2K96RNcO3UTjeUdjl7iqr8SsNhLy6BwQOyl6i KuynGB9Dl9pllLuAeNGkwi9ONV6sOObsGjlNBbkSGyiVWCCsl76HIgfLLGrQV8rShL9N v/davUL78tqxxbI61ZsDk6oaywHtjMGAktk9E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=Rh2tWhBbnN6uYX3Z2N0885KtlGpl4jKKO9UL1pVPJN3VDnp9jTF9sFzXQK+QVHDz91 tOo6x8oELuCNrzKnWR2Hgfwc6zBP0Xzja4/ez7r+6kdhhDpxCFgQBOhNHWtagy3iVgnJ 2EEgTPkvY6m0ZMbXYGx/3WNVXLIfU5/fSXNPU= Received: by 10.142.231.7 with SMTP id d7mr3185556wfh.264.1220471250292; Wed, 03 Sep 2008 12:47:30 -0700 (PDT) Received: by 10.142.162.10 with HTTP; Wed, 3 Sep 2008 12:47:30 -0700 (PDT) Message-ID: Date: Wed, 3 Sep 2008 15:47:30 -0400 From: "Klapper Zhu" To: freebsd-scsi@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: build/install a single module (isp) 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, 03 Sep 2008 20:15:45 -0000 Hi, This is a newbie question. But how do I quickly build/install a single module (/usr/src/sys/dev/isp) in the kernel source ? From owner-freebsd-scsi@FreeBSD.ORG Wed Sep 3 21:17:44 2008 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 A0F241065673 for ; Wed, 3 Sep 2008 21:17:44 +0000 (UTC) (envelope-from klapperzhu@gmail.com) Received: from mail-gx0-f17.google.com (mail-gx0-f17.google.com [209.85.217.17]) by mx1.freebsd.org (Postfix) with ESMTP id 59F6F8FC1A for ; Wed, 3 Sep 2008 21:17:44 +0000 (UTC) (envelope-from klapperzhu@gmail.com) Received: by gxk10 with SMTP id 10so6223357gxk.19 for ; Wed, 03 Sep 2008 14:17:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=qIH15bh8obKhhfY9ihFRGjh7HgXJHxZUCpBxg01BNkM=; b=ROsscdPnn+H8E+3ayjnBqlZtCu8OEdeGej+GTxnTKYMJ478dXk/IYeeW6WqrT0As/i b8itVajJJvyWqdvf/Y9A86NkSsrqi7/18BZ/CRFqwz21KkLVZZGoO4VIHssBgdQdlZRC KqtBrP/E38Z0BJsjk/cel+U5DAd1g0fpSZNAE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=MHWRiudtp60N6XWZOKlgeqGB/CO0mserbDgkuerDWPTD1DMCyzYl3QZpPqZ6Kw0XDu rPqPOgHPLMDE0gL4K7jK5yh5DTZ3OnIcX1zqXH4bSCF3f0sOIJyaR00v6gTvubo1S8mV Is+p/VvZeSDu5nNksWzZTEZlGSRjLY2er3824= Received: by 10.150.156.9 with SMTP id d9mr3228374ybe.88.1220476663677; Wed, 03 Sep 2008 14:17:43 -0700 (PDT) Received: by 10.150.140.11 with HTTP; Wed, 3 Sep 2008 14:17:43 -0700 (PDT) Message-ID: Date: Wed, 3 Sep 2008 17:17:43 -0400 From: "Klapper Zhu" To: freebsd-scsi@freebsd.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: Subject: Re: build/install a single module (isp) 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, 03 Sep 2008 21:17:44 -0000 I found the answer..... On Wed, Sep 3, 2008 at 3:47 PM, Klapper Zhu wrote: > Hi, > > This is a newbie question. But how do I quickly build/install a single > module (/usr/src/sys/dev/isp) in the kernel source ? > From owner-freebsd-scsi@FreeBSD.ORG Wed Sep 3 22:14:28 2008 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 67B8D106567D for ; Wed, 3 Sep 2008 22:14:28 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from cenn-smtp.mc.mpls.visi.com (cenn.mc.mpls.visi.com [208.42.156.9]) by mx1.freebsd.org (Postfix) with ESMTP id 3D1F58FC1B for ; Wed, 3 Sep 2008 22:14:28 +0000 (UTC) (envelope-from josh@tcbug.org) Received: from mail.tcbug.org (mail.tcbug.org [208.42.70.163]) by cenn-smtp.mc.mpls.visi.com (Postfix) with ESMTP id 2720081BA for ; Wed, 3 Sep 2008 16:56:37 -0500 (CDT) Received: from build64.tcbug.org (unknown [208.42.70.167]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.tcbug.org (Postfix) with ESMTPSA id 02B7C4A644C for ; Wed, 3 Sep 2008 16:56:37 -0500 (CDT) From: Josh Paetzel To: freebsd-scsi@freebsd.org Date: Wed, 3 Sep 2008 16:56:31 -0500 User-Agent: KMail/1.9.10 MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1668561.r6dEq0PQyK"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200809031656.36558.josh@tcbug.org> Subject: Success with SAS in FreeBSD finally 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, 03 Sep 2008 22:14:28 -0000 --nextPart1668561.r6dEq0PQyK Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Just tossing this out there for the archives really, but the 3ware 9690SA i= s a=20 really nice solution for SAS on FreeBSD. =20 Also, if you have one grab the firmware 3ware released yesterday, it's good= =20 for a substantial performance increase. (This also applies to 9650 SATA=20 controllers as well) For even bigger bonus you can do the firmware update = in=20 OS from FreeBSD with tw_cli I've used the Dell Perc/5 and an LSI 3041R-E HBA and neither one have the=20 performance or in os monitoring that this 3ware does. =2D-=20 Thanks, Josh Paetzel PGP: 8A48 EF36 5E9F 4EDA 5A8C 11B4 26F9 01F1 27AF AECB --nextPart1668561.r6dEq0PQyK Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAki/CBQACgkQJvkB8Sevrsu8lQCcDUhQXPbkFfRJhfbGA2EsxCVw K3oAoIBIymSB0M644luPpfAymC3aIunD =np+5 -----END PGP SIGNATURE----- --nextPart1668561.r6dEq0PQyK-- From owner-freebsd-scsi@FreeBSD.ORG Wed Sep 3 22:48:13 2008 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 2D136106567C for ; Wed, 3 Sep 2008 22:48:13 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from flat.berklix.org (flat.berklix.org [83.236.223.115]) by mx1.freebsd.org (Postfix) with ESMTP id B06BB8FC17 for ; Wed, 3 Sep 2008 22:48:12 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.net (p549A5B64.dip.t-dialin.net [84.154.91.100]) (authenticated bits=0) by flat.berklix.org (8.13.8/8.13.8) with ESMTP id m83MXkkJ028451; Thu, 4 Sep 2008 00:33:47 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.net (8.13.8/8.13.8) with ESMTP id m83MXfli019604; Thu, 4 Sep 2008 00:33:41 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.13.8/8.13.8) with ESMTP id m83MXVRe015145; Thu, 4 Sep 2008 00:33:36 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200809032233.m83MXVRe015145@fire.js.berklix.net> To: freebsd-scsi@freebsd.org From: "Julian Stacey" Organization: http://berklix.com BSD Linux Unix Consultancy, Munich Germany. User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://berklix.com/~jhs/cv/ Date: Thu, 04 Sep 2008 00:33:31 +0200 Sender: jhs@berklix.org Cc: jhs@berklix.com Subject: how to format an ide hard disc in a usb enclosure 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, 03 Sep 2008 22:48:13 -0000 Hi freebsd-scsi@, How does one reformat an IDE disc in a USB enclosure appearing on 7.0-Release via devd as /dev/ da0 da0s1 da0s1a da0s1c pass1 ? su camcontrol devlist at scbus2 target 0 lun 0 (pass0,cd0) at scbus3 target 0 lun 0 (pass1,da0) camcontrol format da0 You are about to REMOVE ALL DATA from the following device: camcontrol: scsiformat: error sending inquiry camcontrol format 3:0:0 You are about to REMOVE ALL DATA from the following device: camcontrol: scsiformat: error sending inquiry Should I be using something from ports/ ? eg cd /usr/ports/sysutils/smartmontools ... smartctl -i -T verypermissive /dev/da0 Device: USB 2.0 Storage Device Version: 0100 >> Terminate command early due to bad response to IEC mode page A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. cd /usr/ports/sysutils/sformat ... sformat -auto 0 0 3 ... Enter number of heads -1 (1 - 255)/: ... too many questions I dont know answer to, I just want to reformat whole device. Background Yes, perhaps as the disc is throwing errors, it might be dieing, &/or bad disc sector list might be full/ filling, but that doesn't worry me: I had to power cycle it rapidly while travelling, might have been the reason, &/or maybe USB hub didnt deliver enough power then (despite doubler cable, thus 1.0A not 0.5A), but theres' nothing vital on that disk, it's just a scratch space for experiments, so I'd like to reformat. Cheers, Julian -- Julian Stacey: BSDUnixLinux C Prog Admin SysEng Consult Munich www.berklix.com Mail plain ASCII text. HTML & Base64 text are spam. www.asciiribbon.org From owner-freebsd-scsi@FreeBSD.ORG Thu Sep 4 20:51:16 2008 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 22F781065705 for ; Thu, 4 Sep 2008 20:51:15 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.227]) by mx1.freebsd.org (Postfix) with ESMTP id 75B478FC19 for ; Thu, 4 Sep 2008 20:51:15 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so156023rvf.43 for ; Thu, 04 Sep 2008 13:51:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=GrYCluqKvT+qe3nwczckVTqMU+UDwMOUNE+ijjHDd0Q=; b=UUyxVuELHimrnR3WKhV7GwouMagquwYeRWDK2LzdvB2+bnbowskY4KDPCrf1W5fNdE 75f8J6tQwc6s9U3t+nstUg5CsI1sJOWE6qMomht1mkfsq2vXRkHlHIaziAoG8Dpvf0f2 335mctubUvrOWhTwk6LjsHFxKaiRSt9853myM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=v0dBLO5nPnoUghSTzVkMolLUzTh/jyhfkXhSbcjbhTPEpxORKbrHD1KFpoNALmYIQJ pL7hnoShyVXioCXBJCOQ9/Ery/3IqJRDKSmAEQFL1XxzXG0QuhCnOiDarhV2kB+kBmvM I8H9KSQptKIyvKC8wba+HqitHL/QX63uEZQuk= Received: by 10.140.148.3 with SMTP id v3mr6030546rvd.139.1220561474866; Thu, 04 Sep 2008 13:51:14 -0700 (PDT) Received: by 10.140.127.19 with HTTP; Thu, 4 Sep 2008 13:51:14 -0700 (PDT) Message-ID: <3c0b01820809041351lfedc31bla7ba0e3142c3fa85@mail.gmail.com> Date: Thu, 4 Sep 2008 16:51:14 -0400 From: "Alexander Sack" To: "Julian Stacey" In-Reply-To: <200809032233.m83MXVRe015145@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200809032233.m83MXVRe015145@fire.js.berklix.net> Cc: freebsd-scsi@freebsd.org, jhs@berklix.com Subject: Re: how to format an ide hard disc in a usb enclosure 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: Thu, 04 Sep 2008 20:51:16 -0000 On Wed, Sep 3, 2008 at 6:33 PM, Julian Stacey wrote: > Hi freebsd-scsi@, > How does one reformat an IDE disc in a USB enclosure appearing on > 7.0-Release via devd as /dev/ da0 da0s1 da0s1a da0s1c pass1 ? > > su > camcontrol devlist > at scbus2 target 0 lun 0 (pass0,cd0) > at scbus3 target 0 lun 0 (pass1,da0) > camcontrol format da0 > You are about to REMOVE ALL DATA from the following device: > camcontrol: scsiformat: error sending inquiry > camcontrol format 3:0:0 > You are about to REMOVE ALL DATA from the following device: > camcontrol: scsiformat: error sending inquiry > > Should I be using something from ports/ ? eg > > cd /usr/ports/sysutils/smartmontools ... > smartctl -i -T verypermissive /dev/da0 > Device: USB 2.0 Storage Device Version: 0100 >>> Terminate command early due to bad response to IEC mode page > A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. > > cd /usr/ports/sysutils/sformat ... sformat -auto 0 0 3 > ... > Enter number of heads -1 (1 - 255)/: > ... too many questions I dont know answer to, > I just want to reformat whole device. > > Background > Yes, perhaps as the disc is throwing errors, it might be dieing, > &/or bad disc sector list might be full/ filling, but that doesn't > worry me: I had to power cycle it rapidly while travelling, might > have been the reason, &/or maybe USB hub didnt deliver enough power > then (despite doubler cable, thus 1.0A not 0.5A), but theres' nothing > vital on that disk, it's just a scratch space for experiments, so > I'd like to reformat. Julian are you trying low-level format the drive (something I don't recommend) or just write a new filesystem (a much better approach)? I would look at mkfs/bsdlabel commands to remake the filesystem so you can mount it again. Actually you can probably run sysinstall and use the disk creation options to do the dirty work as well. -aps From owner-freebsd-scsi@FreeBSD.ORG Thu Sep 4 21:00:11 2008 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 A28F01065691 for ; Thu, 4 Sep 2008 21:00:11 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from flat.berklix.org (flat.berklix.org [83.236.223.115]) by mx1.freebsd.org (Postfix) with ESMTP id D0BDD8FC1E for ; Thu, 4 Sep 2008 21:00:04 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.net (p549A55EC.dip.t-dialin.net [84.154.85.236]) (authenticated bits=0) by flat.berklix.org (8.13.8/8.13.8) with ESMTP id m84L01dF063828; Thu, 4 Sep 2008 23:00:02 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.net (8.13.8/8.13.8) with ESMTP id m84KxpEr027211; Thu, 4 Sep 2008 22:59:51 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.13.8/8.13.8) with ESMTP id m84KxeQA010430; Thu, 4 Sep 2008 22:59:45 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200809042059.m84KxeQA010430@fire.js.berklix.net> To: "Alexander Sack" From: "Julian Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://berklix.com In-reply-to: Your message "Thu, 04 Sep 2008 16:51:14 EDT." <3c0b01820809041351lfedc31bla7ba0e3142c3fa85@mail.gmail.com> Date: Thu, 04 Sep 2008 22:59:40 +0200 Sender: jhs@berklix.org Cc: freebsd-scsi@freebsd.org Subject: Re: how to format an ide hard disc in a usb enclosure 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: Thu, 04 Sep 2008 21:00:11 -0000 Hi, Reference: > From: "Alexander Sack" > Date: Thu, 4 Sep 2008 16:51:14 -0400 > Message-id: <3c0b01820809041351lfedc31bla7ba0e3142c3fa85@mail.gmail.com> "Alexander Sack" wrote: > On Wed, Sep 3, 2008 at 6:33 PM, Julian Stacey wrote: > > Hi freebsd-scsi@, > > How does one reformat an IDE disc in a USB enclosure appearing on > > 7.0-Release via devd as /dev/ da0 da0s1 da0s1a da0s1c pass1 ? > > > > su > > camcontrol devlist > > at scbus2 target 0 lun 0 (pass0,cd0) > > at scbus3 target 0 lun 0 (pass1,da0) > > camcontrol format da0 > > You are about to REMOVE ALL DATA from the following device: > > camcontrol: scsiformat: error sending inquiry > > camcontrol format 3:0:0 > > You are about to REMOVE ALL DATA from the following device: > > camcontrol: scsiformat: error sending inquiry > > > > Should I be using something from ports/ ? eg > > > > cd /usr/ports/sysutils/smartmontools ... > > smartctl -i -T verypermissive /dev/da0 > > Device: USB 2.0 Storage Device Version: 0100 > >>> Terminate command early due to bad response to IEC mode page > > A mandatory SMART command failed: exiting. To continue, add one or more '-T permissive' options. > > > > cd /usr/ports/sysutils/sformat ... sformat -auto 0 0 3 > > ... > > Enter number of heads -1 (1 - 255)/: > > ... too many questions I dont know answer to, > > I just want to reformat whole device. > > > > Background > > Yes, perhaps as the disc is throwing errors, it might be dieing, > > &/or bad disc sector list might be full/ filling, but that doesn't > > worry me: I had to power cycle it rapidly while travelling, might > > have been the reason, &/or maybe USB hub didnt deliver enough power > > then (despite doubler cable, thus 1.0A not 0.5A), but theres' nothing > > vital on that disk, it's just a scratch space for experiments, so > > I'd like to reformat. > > Julian are you trying low-level format the drive Yes > (something I don't > recommend) I know, hence the background, yes I'm fully aware of all repercusions thanks :-) > or just write a new filesystem (a much better approach)? I Nope I Really want to low level formt. > would look at mkfs/bsdlabel commands to remake the filesystem so you > can mount it again. Actually you can probably run sysinstall and use > the disk creation options to do the dirty work as well. Yup, thanks good tip for other times, I do indeed use sysinstall some times, when I'm feeling lazy :-) This time I Really want to low level format though. Cheers, Julian -- Julian Stacey: BSDUnixLinux C Prog Admin SysEng Consult Munich www.berklix.com Mail plain ASCII text. HTML & Base64 text are spam. www.asciiribbon.org From owner-freebsd-scsi@FreeBSD.ORG Thu Sep 4 21:57:13 2008 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 0D893106564A for ; Thu, 4 Sep 2008 21:57:13 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id D43E88FC13 for ; Thu, 4 Sep 2008 21:57:12 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so187252rvf.43 for ; Thu, 04 Sep 2008 14:57:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=kMuaSAodOCzkfJg1TMRrCm5BO6dCIs+yQ/nQSRgGIdA=; b=rgCK1Ziw+/4RmZDOKO/4kSLs/bg2PJ35Zb7GLoYT1reaNGYIKAyPme9r4PywyZBj5v 9IejlpNz5D5lPCoBCLiuTiRjJtW16w+IQxUyhTJitt8gx4IH/7W79gDN2/XeUyJBmtPB Nvlqv+3edzvr6BGTmSd/Yr3wu33kWIWZAT6kc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=v+sPBM/T8M+hDTJnRIfisQwuwUpGYVoxd2tnPa8N2H+lGUqntcd9gz0T5TcEnvvUYw jmgof93JSwHDNVOiUhUZrH3QfhWRXLJ2k4DjqEBc6k6h5H5AgFn5fBO0TwvNVlhDCto/ 7y5bGwXfc7cE6Uy3EmcHituL07hvcwSpNhbb4= Received: by 10.141.75.17 with SMTP id c17mr6052302rvl.212.1220565432240; Thu, 04 Sep 2008 14:57:12 -0700 (PDT) Received: by 10.140.127.19 with HTTP; Thu, 4 Sep 2008 14:57:12 -0700 (PDT) Message-ID: <3c0b01820809041457wc629c60i3b876b3895dc9e3d@mail.gmail.com> Date: Thu, 4 Sep 2008 17:57:12 -0400 From: "Alexander Sack" To: "Julian Stacey" In-Reply-To: <200809042059.m84KxeQA010430@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <3c0b01820809041351lfedc31bla7ba0e3142c3fa85@mail.gmail.com> <200809042059.m84KxeQA010430@fire.js.berklix.net> Cc: freebsd-scsi@freebsd.org Subject: Re: how to format an ide hard disc in a usb enclosure 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: Thu, 04 Sep 2008 21:57:13 -0000 On Thu, Sep 4, 2008 at 4:59 PM, Julian Stacey wrote: > I know, hence the background, yes I'm fully aware of all repercusions thanks :-) Then if you understand IDE, understand what a low-level format really is (was), then you know that this is probably NOT what you want to do on your disk and understand it will NOT fix your problem. Other than some special vendor utility or BIOS utility, low-level format doesn't make sense for IDE disks. There is no command for "format" and trying to reset the geometry like the old days doesn't even apply to modern disks. If you want to try a low-level format tool (for IDE that is probably just writing 0's or 1's to every sector on the disk and letting the hard disk automatically map bad blocks), I would just dd all zero's to it then try to create a filesystem. If you still get media errors, your disk is foobar or about to be foobar, its cheap and you already stated you don't have any critical data on it so buy a new disk! :D In fact Seagate offers a Windows too to do exactly this called ZeroFill: http://www.seagate.com/ww/v/index.jsp?vgnextoid=65a8783c970ce010VgnVCM100000dd04090aRCRD&locale=en-GB Not trying to be too cheeky here, but I think what you are asking doesn't makes sense...at least to me.... Thanks! -aps From owner-freebsd-scsi@FreeBSD.ORG Fri Sep 5 08:08:30 2008 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 3F512106564A for ; Fri, 5 Sep 2008 08:08:30 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from flat.berklix.org (flat.berklix.org [83.236.223.115]) by mx1.freebsd.org (Postfix) with ESMTP id A4D9D8FC19 for ; Fri, 5 Sep 2008 08:08:29 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.net (p549A5443.dip.t-dialin.net [84.154.84.67]) (authenticated bits=0) by flat.berklix.org (8.13.8/8.13.8) with ESMTP id m8588QY9080379; Fri, 5 Sep 2008 10:08:26 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.net (8.13.8/8.13.8) with ESMTP id m8588GfT030034; Fri, 5 Sep 2008 10:08:16 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.13.8/8.13.8) with ESMTP id m8588BFx006299; Fri, 5 Sep 2008 10:08:16 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200809050808.m8588BFx006299@fire.js.berklix.net> To: "Alexander Sack" From: "Julian Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://berklix.com In-reply-to: Your message "Thu, 04 Sep 2008 17:57:12 EDT." <3c0b01820809041457wc629c60i3b876b3895dc9e3d@mail.gmail.com> Date: Fri, 05 Sep 2008 10:08:11 +0200 Sender: jhs@berklix.org Cc: freebsd-scsi@freebsd.org Subject: Re: how to format an ide hard disc in a usb enclosure 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, 05 Sep 2008 08:08:30 -0000 Hi, Reference: > From: "Alexander Sack" > Date: Thu, 4 Sep 2008 17:57:12 -0400 > Message-id: <3c0b01820809041457wc629c60i3b876b3895dc9e3d@mail.gmail.com> "Alexander Sack" wrote: > On Thu, Sep 4, 2008 at 4:59 PM, Julian Stacey wrote: > > I know, hence the background, yes I'm fully aware of all repercusions thanks :-) > > Then if you understand IDE, understand what a low-level format really > is (was), then you know that this is probably NOT what you want to do > on your disk and understand it will NOT fix your problem. > > Other than some special vendor utility or BIOS utility, low-level > format doesn't make sense for IDE disks. There is no command for > "format" and trying to reset the geometry like the old days doesn't > even apply to modern disks. > > If you want to try a low-level format tool (for IDE that is probably > just writing 0's or 1's to every sector on the disk and letting the > hard disk automatically map bad blocks), I would just dd all zero's to > it then try to create a filesystem. If you still get media errors, > your disk is foobar or about to be foobar, its cheap and you already > stated you don't have any critical data on it so buy a new disk! :D > > In fact Seagate offers a Windows too to do exactly this called ZeroFill: > > http://www.seagate.com/ww/v/index.jsp?vgnextoid=65a8783c970ce010VgnVCM100000dd04090aRCRD&locale=en-GB > > Not trying to be too cheeky here, but I think what you are asking > doesn't makes sense...at least to me.... > > Thanks! I do not run Windows, I run FreeBSD. Repeat: How can I low level format this dik under FreeBSD ? Cheers, Julian -- Julian Stacey: BSDUnixLinux C Prog Admin SysEng Consult Munich www.berklix.com Mail plain ASCII text. HTML & Base64 text are spam. www.asciiribbon.org From owner-freebsd-scsi@FreeBSD.ORG Fri Sep 5 14:09:57 2008 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 417721065674 for ; Fri, 5 Sep 2008 14:09:57 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id 0AA3C8FC19 for ; Fri, 5 Sep 2008 14:09:56 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from max.local (rrcs-74-218-226-253.se.biz.rr.com [74.218.226.253]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id m85Du21r051362; Fri, 5 Sep 2008 09:56:03 -0400 (EDT) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-scsi@freebsd.org Date: Fri, 5 Sep 2008 09:56:53 -0400 User-Agent: KMail/1.9.9 References: <200809050808.m8588BFx006299@fire.js.berklix.net> In-Reply-To: <200809050808.m8588BFx006299@fire.js.berklix.net> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809050956.53652.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Julian Stacey Subject: Re: how to format an ide hard disc in a usb enclosure 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, 05 Sep 2008 14:09:57 -0000 On Friday 05 September 2008, Julian Stacey wrote: > "Alexander Sack" wrote: > > On Thu, Sep 4, 2008 at 4:59 PM, Julian Stacey wrote: > > > I know, hence the background, yes I'm fully aware of all repercusions > > > thanks :-) > > > > Then if you understand IDE, understand what a low-level format really > > is (was), then you know that this is probably NOT what you want to do > > on your disk and understand it will NOT fix your problem. > > > > Other than some special vendor utility or BIOS utility, low-level > > format doesn't make sense for IDE disks. There is no command for > > "format" and trying to reset the geometry like the old days doesn't > > even apply to modern disks. > > > > If you want to try a low-level format tool (for IDE that is probably > > just writing 0's or 1's to every sector on the disk and letting the > > hard disk automatically map bad blocks), I would just dd all zero's to > > it then try to create a filesystem. If you still get media errors, > > your disk is foobar or about to be foobar, its cheap and you already > > stated you don't have any critical data on it so buy a new disk! :D > > > > In fact Seagate offers a Windows too to do exactly this called > > ZeroFill: > > > > http://www.seagate.com/ww/v/index.jsp?vgnextoid=65a8783c970ce010VgnVCM1 > >00000dd04090aRCRD&locale=en-GB > > > > Not trying to be too cheeky here, but I think what you are asking > > doesn't makes sense...at least to me.... > > I do not run Windows, I run FreeBSD. > Repeat: How can I low level format this dik under FreeBSD ? Alexander told you above. It's not a low-level format in the traditional (circa early 1990's) sense, but will have the same practical result on modern drives: dd all zero's to the disk. Specifically, something like the following will do the trick. I'm using da0 since that's what you mentioned in your original e-mail Make sure it's still the correct device.. dd if=/dev/zero of=/dev/da0 bs=1m The bs flag isn't mandatory but will let it run quite a bit faster than the default 512 bytes. If you then want to put a UFS2 filesystem on it, I'd suggest the following: fdisk -I /dev/da0 bsdlabel -w /dev/da0 newfs -L myscratchdisk /dev/da0s1a If you ever expect to want to boot from the drive, add a -B flag to the fdisk and bsdlabel commands. Supplying a label to newfs will make the filesystem show up by name under /dev/ufs/myscratchdisk (or whatever you call it) so you can mount it reliably even if the device node changes. JN From owner-freebsd-scsi@FreeBSD.ORG Fri Sep 5 14:48:18 2008 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 8F607106564A for ; Fri, 5 Sep 2008 14:48:18 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from flat.berklix.org (flat.berklix.org [83.236.223.115]) by mx1.freebsd.org (Postfix) with ESMTP id 0FF9A8FC21 for ; Fri, 5 Sep 2008 14:48:17 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.net (p549A471A.dip.t-dialin.net [84.154.71.26]) (authenticated bits=0) by flat.berklix.org (8.13.8/8.13.8) with ESMTP id m85EmEiK091820 for ; Fri, 5 Sep 2008 16:48:15 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.net (8.13.8/8.13.8) with ESMTP id m85Em7nw032790 for ; Fri, 5 Sep 2008 16:48:07 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.13.8/8.13.8) with ESMTP id m85Em223012180 for ; Fri, 5 Sep 2008 16:48:07 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200809051448.m85Em223012180@fire.js.berklix.net> To: freebsd-scsi@freebsd.org From: "Julian Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://berklix.com In-reply-to: Your message "Fri, 05 Sep 2008 09:56:53 EDT." <200809050956.53652.lists@jnielsen.net> Date: Fri, 05 Sep 2008 16:48:02 +0200 Sender: jhs@berklix.org Subject: Re: how to format an ide hard disc in a usb enclosure 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, 05 Sep 2008 14:48:18 -0000 Hi, Reference: > From: John Nielsen > Date: Fri, 5 Sep 2008 09:56:53 -0400 > Message-id: <200809050956.53652.lists@jnielsen.net> John Nielsen wrote: > On Friday 05 September 2008, Julian Stacey wrote: > > "Alexander Sack" wrote: > > > On Thu, Sep 4, 2008 at 4:59 PM, Julian Stacey wrote: > > > > I know, hence the background, yes I'm fully aware of all repercusions > > > > thanks :-) > > > > > > Then if you understand IDE, understand what a low-level format really > > > is (was), then you know that this is probably NOT what you want to do > > > on your disk and understand it will NOT fix your problem. > > > > > > Other than some special vendor utility or BIOS utility, low-level > > > format doesn't make sense for IDE disks. There is no command for > > > "format" and trying to reset the geometry like the old days doesn't > > > even apply to modern disks. > > > > > > If you want to try a low-level format tool (for IDE that is probably > > > just writing 0's or 1's to every sector on the disk and letting the > > > hard disk automatically map bad blocks), I would just dd all zero's to > > > it then try to create a filesystem. If you still get media errors, > > > your disk is foobar or about to be foobar, its cheap and you already > > > stated you don't have any critical data on it so buy a new disk! :D > > > > > > In fact Seagate offers a Windows too to do exactly this called > > > ZeroFill: > > > > > > http://www.seagate.com/ww/v/index.jsp?vgnextoid=65a8783c970ce010VgnVCM1 > > >00000dd04090aRCRD&locale=en-GB > > > > > > Not trying to be too cheeky here, but I think what you are asking > > > doesn't makes sense...at least to me.... > > > > I do not run Windows, I run FreeBSD. > > Repeat: How can I low level format this dik under FreeBSD ? > > Alexander told you above. It's not a low-level format in the traditional > (circa early 1990's) sense, but will have the same practical result on > modern drives: dd all zero's to the disk. > > Specifically, something like the following will do the trick. I'm using da0 > since that's what you mentioned in your original e-mail Make sure it's > still the correct device.. > dd if=/dev/zero of=/dev/da0 bs=1m > > The bs flag isn't mandatory but will let it run quite a bit faster than the > default 512 bytes. > > If you then want to put a UFS2 filesystem on it, I'd suggest the following: > fdisk -I /dev/da0 > bsdlabel -w /dev/da0 > newfs -L myscratchdisk /dev/da0s1a > > If you ever expect to want to boot from the drive, add a -B flag to the > fdisk and bsdlabel commands. Supplying a label to newfs will make the > filesystem show up by name under /dev/ufs/myscratchdisk (or whatever you > call it) so you can mount it reliably even if the device node changes. > > JN > Aargh ! Please, no more superficial responses', if people don't know: Don't answer ! Label & dd noise is Irrelevant. Facts: I want to _Format_ the hardware. Whether others personaly dont _reccomend_ that is irrelevant. FreeBSD Did used to support issuing SCSI commands to low level format a device, at least over scsi cable. IDE devices do support low level format, whether others approve or not, I've `low level (*)' formatted both IDE & SCSI disks lots of times over decades, using eg adapter cards, DOS progs etc, & yes FreeBSD too for scsi (once was a command scsiformat I recall too). Thanks to both for trying, but I still hope for a 1st usefull response. Repeat: Can FreeBSD generate & pass scsi commands over USB that a ISB to IDE enclosure will take & use to format. (*) 'Low Level:' Even the term indicates wrong thinking. 'Format' to people of my background automatically means low level. Prepending 'low level' is just verbiage pandering to [ex] MS community too ignorant to know format for them just meant (on a hard disc) creating an FS, blather about `low level' allows others to distract to labels & personal recomendations etc. I want to _Format_ the disk !! Can FreeBSD do it ? How ? Or must one take disk out of USB enclosure & attach a laptop- to- 3.5"- IDE- size- adapter to format ? Cheers, Julian -- Julian Stacey: BSDUnixLinux C Prog Admin SysEng Consult Munich www.berklix.com Mail plain ASCII text. HTML & Base64 text are spam. www.asciiribbon.org From owner-freebsd-scsi@FreeBSD.ORG Fri Sep 5 14:59:10 2008 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 3B83D1065673 for ; Fri, 5 Sep 2008 14:59:10 +0000 (UTC) (envelope-from westr@connection.ca) Received: from nc-tor-mail2.connection.ca (nc-tor-mail2.connection.ca [205.207.122.27]) by mx1.freebsd.org (Postfix) with ESMTP id 1A3BF8FC1C for ; Fri, 5 Sep 2008 14:59:09 +0000 (UTC) (envelope-from westr@connection.ca) Received: from localhost (external.tor.connection.ca [216.234.38.18]) by nc-tor-mail2.connection.ca (Postfix) with ESMTP id 5736574E60E for ; Fri, 5 Sep 2008 10:59:09 -0400 (EDT) Date: Fri, 5 Sep 2008 10:57:05 -0400 From: Ross Organization: Network Connection X-Priority: 3 (Normal) Message-ID: <1741743380.20080905105705@connection.ca> To: freebsd-scsi@freebsd.org In-Reply-To: <200809051448.m85Em223012180@fire.js.berklix.net> References: Your message "Fri, 05 Sep 2008 09:56:53 EDT." <200809050956.53652.lists@jnielsen.net> <200809051448.m85Em223012180@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Subject: Re[2]: how to format an ide hard disc in a usb enclosure X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Ross List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Sep 2008 14:59:10 -0000 JS> Thanks to both for trying, but I still hope for a 1st usefull response. JS> Repeat: Can FreeBSD generate & pass scsi commands JS> over USB that a ISB to IDE enclosure will take & use to format. Do you know about "camcontrol" - it allows you to issue pretty well any scsi command to devices. Whether it'll do it over a usb device, I don't know - I've never tried. Ross. -- From owner-freebsd-scsi@FreeBSD.ORG Fri Sep 5 15:18:47 2008 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 52652106567D for ; Fri, 5 Sep 2008 15:18:47 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from flat.berklix.org (flat.berklix.org [83.236.223.115]) by mx1.freebsd.org (Postfix) with ESMTP id D36E58FC23 for ; Fri, 5 Sep 2008 15:18:46 +0000 (UTC) (envelope-from jhs@berklix.org) Received: from js.berklix.net (p549A73D7.dip.t-dialin.net [84.154.115.215]) (authenticated bits=0) by flat.berklix.org (8.13.8/8.13.8) with ESMTP id m85FIfl8092215; Fri, 5 Sep 2008 17:18:42 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (fire.js.berklix.net [192.168.91.41]) by js.berklix.net (8.13.8/8.13.8) with ESMTP id m85FIULd033036; Fri, 5 Sep 2008 17:18:30 +0200 (CEST) (envelope-from jhs@berklix.org) Received: from fire.js.berklix.net (localhost [127.0.0.1]) by fire.js.berklix.net (8.13.8/8.13.8) with ESMTP id m85FILKc012983; Fri, 5 Sep 2008 17:18:26 +0200 (CEST) (envelope-from jhs@fire.js.berklix.net) Message-Id: <200809051518.m85FILKc012983@fire.js.berklix.net> To: Ross From: "Julian Stacey" Organization: http://berklix.com BSD Unix Linux Consultancy, Munich Germany User-agent: EXMH on FreeBSD http://berklix.com/free/ X-URL: http://berklix.com In-reply-to: Your message "Fri, 05 Sep 2008 10:57:05 EDT." <1741743380.20080905105705@connection.ca> Date: Fri, 05 Sep 2008 17:18:21 +0200 Sender: jhs@berklix.org Cc: freebsd-scsi@freebsd.org Subject: Re: Re[2]: how to format an ide hard disc in a usb enclosure 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, 05 Sep 2008 15:18:47 -0000 Hi, Reference: > From: Ross > Reply-to: Ross > Date: Fri, 5 Sep 2008 10:57:05 -0400 > Message-id: <1741743380.20080905105705@connection.ca> Ross wrote: > > JS> Thanks to both for trying, but I still hope for a 1st usefull response. > JS> Repeat: Can FreeBSD generate & pass scsi commands > JS> over USB that a ISB to IDE enclosure will take & use to format. > > Do you know about "camcontrol" - it allows you to issue pretty well > any scsi command to devices. > > Whether it'll do it over a usb device, I don't know - I've never > tried. Thanks Ross, per my original post: camcontrol format da0 You are about to REMOVE ALL DATA from the following device: camcontrol: scsiformat: error sending inquiry camcontrol format 3:0:0 You are about to REMOVE ALL DATA from the following device: camcontrol: scsiformat: error sending inquiry yes I tried it, though I'm not experienced with it either, I'm hoping someone here on scsi@ might know if it shoudl work over USB bus (or if no one knows I could later ask on usb@ list. Cheers, Julian -- Julian Stacey: BSDUnixLinux C Prog Admin SysEng Consult Munich www.berklix.com Mail plain ASCII text. HTML & Base64 text are spam. www.asciiribbon.org From owner-freebsd-scsi@FreeBSD.ORG Fri Sep 5 16:11:43 2008 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 D868F106566B for ; Fri, 5 Sep 2008 16:11:43 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from ns1.jnielsen.net (ns1.jnielsen.net [69.55.238.237]) by mx1.freebsd.org (Postfix) with ESMTP id BBD578FC15 for ; Fri, 5 Sep 2008 16:11:43 +0000 (UTC) (envelope-from lists@jnielsen.net) Received: from max.local (rrcs-74-218-226-253.se.biz.rr.com [74.218.226.253]) (authenticated bits=0) by ns1.jnielsen.net (8.12.9p2/8.12.9) with ESMTP id m85GBc1r094824; Fri, 5 Sep 2008 12:11:39 -0400 (EDT) (envelope-from lists@jnielsen.net) From: John Nielsen To: freebsd-scsi@freebsd.org Date: Fri, 5 Sep 2008 12:12:29 -0400 User-Agent: KMail/1.9.9 References: <200809051518.m85FILKc012983@fire.js.berklix.net> In-Reply-To: <200809051518.m85FILKc012983@fire.js.berklix.net> X-Face: #X5#Y*q>F:]zT!DegL3z5Xo'^MN[$8k\[4^3rN~wm=s=Uw(sW}R?3b^*f1Wu*.<=?utf-8?q?of=5F4NrS=0A=09P*M/9CpxDo!D6?=)IY1w<9B1jB; tBQf[RU-R<,I)e"$q7N7 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200809051212.29727.lists@jnielsen.net> X-Virus-Scanned: ClamAV version 0.88.4, clamav-milter version 0.88.4 on ns1.jnielsen.net X-Virus-Status: Clean Cc: Julian Stacey Subject: Re: how to format an ide hard disc in a usb enclosure 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, 05 Sep 2008 16:11:43 -0000 On Friday 05 September 2008, Julian Stacey wrote: > Hi, > > Reference: > > From: Ross > > Reply-to: Ross > > Date: Fri, 5 Sep 2008 10:57:05 -0400 > > Message-id: <1741743380.20080905105705@connection.ca> > > Ross wrote: > > JS> Thanks to both for trying, but I still hope for a 1st usefull > > response. JS> Repeat: Can FreeBSD generate & pass scsi commands > > JS> over USB that a ISB to IDE enclosure will take & use to format. > > > > Do you know about "camcontrol" - it allows you to issue pretty well > > any scsi command to devices. > > > > Whether it'll do it over a usb device, I don't know - I've never > > tried. > > Thanks Ross, > per my original post: > camcontrol format da0 > You are about to REMOVE ALL DATA from the following device: > camcontrol: scsiformat: error sending inquiry > camcontrol format 3:0:0 > You are about to REMOVE ALL DATA from the following device: > camcontrol: scsiformat: error sending inquiry > > yes I tried it, though I'm not experienced with it either, > I'm hoping someone here on scsi@ might know if it shoudl work over USB > bus (or if no one knows I could later ask on usb@ list. Might require a custom kernel (to remove umass), but you could try atausb instead to give you a more native interface to the drive. What you'd do to format it from there I'm not sure but perhaps you know. JN From owner-freebsd-scsi@FreeBSD.ORG Sat Sep 6 14:05:27 2008 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 1101F106566B for ; Sat, 6 Sep 2008 14:05:27 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.230]) by mx1.freebsd.org (Postfix) with ESMTP id E05CC8FC13 for ; Sat, 6 Sep 2008 14:05:26 +0000 (UTC) (envelope-from pisymbol@gmail.com) Received: by rv-out-0506.google.com with SMTP id b25so1139284rvf.43 for ; Sat, 06 Sep 2008 07:05:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; 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; bh=3q749SPM68E5eTAcnb/bFkWJzxgF/j9pE7CrXg86MBk=; b=I1wP1O3GTunHIFaCT0BbEexsKgXABtqNXS/1ZdxaRdo1itiwnLred2wJUxICnN7xot 3n0pTD0SO6SKr3O0hf0o7/5T/uw+G0UkeO9ArpA8ETqXweIx/BEZP4Omn1KDQwlUiEwc AM1kbj2kxj5jGTJq4qFbKmxlUx8iKD40EQ6Zg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=oiFKrDFO1mXvt8W9u9ZnS8R9yZIt1x+EhvfSpjRPVV2zPWSJ4WJXZlmeV+hvw3nyVo J0DqJtNI4OdNqTWcX+UW+BP3xLZ6cTeHpl0lMDq/+AkzO5mH7ddRMNzSVp9R/4ZP5xe2 0tz7QYQrfE5AosUMjuolktG8hVO8HVa3USsZQ= Received: by 10.140.139.3 with SMTP id m3mr7479243rvd.44.1220709926010; Sat, 06 Sep 2008 07:05:26 -0700 (PDT) Received: by 10.141.136.21 with HTTP; Sat, 6 Sep 2008 07:05:25 -0700 (PDT) Message-ID: <3c0b01820809060705p74261c59s9f5e97a5e0a6a28c@mail.gmail.com> Date: Sat, 6 Sep 2008 10:05:25 -0400 From: "Alexander Sack" To: "Julian Stacey" In-Reply-To: <200809051448.m85Em223012180@fire.js.berklix.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <200809050956.53652.lists@jnielsen.net> <200809051448.m85Em223012180@fire.js.berklix.net> Cc: freebsd-scsi@freebsd.org Subject: Re: how to format an ide hard disc in a usb enclosure 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: Sat, 06 Sep 2008 14:05:27 -0000 On Fri, Sep 5, 2008 at 10:48 AM, Julian Stacey wrote: > Aargh ! Please, no more superficial responses', if people don't > know: Don't answer ! Label & dd noise is Irrelevant. Facts: I > want to _Format_ the hardware. Whether others personaly dont > _reccomend_ that is irrelevant. > > FreeBSD Did used to support issuing SCSI commands to low level > format a device, at least over scsi cable. IDE devices do support > low level format, whether others approve or not, I've `low level > (*)' formatted both IDE & SCSI disks lots of times over decades, > using eg adapter cards, DOS progs etc, & yes FreeBSD too for scsi > (once was a command scsiformat I recall too). Its not superficial, IDE does not support the *format* command. Check the ATA spec: http://www.real-world-systems.com/docs/e07163r2-Comments_on_ATA8-ACS_revision_4a.pdf.gz (or T13.org AT Group etc.) THERE IS NO FORMAT COMMAND. Check the spec, there is nothing *superficial* in what we are saying to you. Using camcontrol to send SCSI CDBs to an IDE disk is not going to work (it speaks ATA not SCSI). This is what we are trying to tell you. This isn't a BSD issue, this isn't an OS issue, this isn't a USB issue (go ahead ask, you will get the same answer), this is a hard disk issue in terms of what IDE supports. The old days of low-level format are now buried with the manufacturer and not available to the OS/system software. Low-level format for IDE is only achieved via a special vendor utility that can low-level format it and reset the partition geometry. No modern drive from a modern manufacturer is going to make that utility freely available (and it doesn't speak IDE either its probably at the firmware level of the drive, i.e. this would be a BIOS utility). Whether you use umass, atausb, or some magical driver you write, there is no command to send to this drive to "low-level format" it. Technically speaking if the USB enclosure was made by the hard disk manufacturer and could talk to the drive at its firmware level then I suppose you could send a SCSI CDB via USB umass which would get magically translated/converted to do the *right* vendor specific thing....you see how far-fetched this is? We are trying to save you some time and energy on an endeavor that makes no TECHNICAL sense! :D Thanks! -aps