Date: Wed, 25 Sep 1996 02:48:40 +0200 (MET DST) From: Bertrand Petit <elrond@imladris.frmug.fr.net> To: freebsd-scsi@freebsd.org Subject: Two NCR adaptaters and spin up. Message-ID: <199609250048.CAA29302@imladris.frmug.fr.net>
next in thread | raw e-mail | index | archive | help
Hello, This is my first message in this list and also this is the first time I dig my hands in the FreeBSD kernel. I got there because I'm building a machine equiped with two NCR adaptators (Asus SCSI-2000 for exactitude) hooked on a TP55 Asus motherboard. All of this is drived by FreeBSD 2.2-960501-SNAP. Boths of the SCSI busses are loaded with hard drives with the auto spinup feature disabled. Upon system powerup, devices on the first bus are spined up by the NCR bios: the second adaptater is leaved aside. I decided, to correct this to add sinup code in the scsi code. I've choosen to add this in sd.c sd_get_parans() function. I may be wrong at that point. The start of the function looks like this (ommiting variables declaration): /* * Is this unit ready? */ if(scsi_test_unit_ready(sc_link,flags|SCSI_SILENT)!=0) { printf("Unit is not ready trying to spinning it up\n"); if(scsi_start_unit(sc_link,flags)!=0) printf("Spinup failed!\n"); return(0); } This code almost work: the unit is detected as not ready (generating errors messages despite the SCSI_SILENT flag) the command is sent (the unit starts) and then the NCR driver barfs but I don't know why. What am I doing wrong? From the boot messages (included bellow) I guess there is something wronf with command queing. Is it necessary to wait for the queued commands to complete before sending the start unit command? Thanks for your help. Sep 24 21:50:28 phoe /kernel.test: ncr1 <ncr 53c810 scsi> rev 2 int a irq 10 on pci0:10 Sep 24 21:50:29 phoe /kernel.test: ncr1 waiting for scsi devices to settle Sep 24 21:50:29 phoe /kernel.test: (ncr1:6:0): "CONNER CFP2105S 2.14GB 15" type 0 fixed SCSI 2 Sep 24 21:50:29 phoe /kernel.test: sd1(ncr1:6:0): Direct-Access Sep 24 21:50:29 phoe /kernel.test: Sep 24 21:50:29 phoe /kernel.test: sd1(ncr1:6:0): FAST SCSI-2 100ns (10 Mb/sec) offset 8. Sep 24 21:50:29 phoe /kernel.test: Sep 24 21:50:29 phoe /kernel.test: sd1(ncr1:6:0): NOT READY asc:4,0 Sep 24 21:50:29 phoe /kernel.test: sd1(ncr1:6:0): Logical unit not ready, cause not reportable field replaceable unit: 15 Sep 24 21:50:30 phoe /kernel.test: , retries:2 Sep 24 21:50:30 phoe /kernel.test: Sep 24 21:50:30 phoe /kernel.test: sd1(ncr1:6:0): NOT READY asc:4,0 Sep 24 21:50:30 phoe /kernel.test: sd1(ncr1:6:0): Logical unit not ready, cause not reportable field replaceable unit: 15 Sep 24 21:50:30 phoe /kernel.test: , retries:1 Sep 24 21:50:30 phoe /kernel.test: Sep 24 21:50:31 phoe /kernel.test: sd1(ncr1:6:0): NOT READY asc:4,0 Sep 24 21:50:31 phoe /kernel.test: sd1(ncr1:6:0): Logical unit not ready, cause not reportable field replaceable unit: 15 Sep 24 21:50:31 phoe /kernel.test: , FAILURE Sep 24 21:50:31 phoe /kernel.test: Unit is not ready trying to spinning it up Sep 24 21:50:31 phoe /kernel.test: ncr1: aborting job ... Sep 24 21:50:31 phoe /kernel.test: ncr1:6: ERROR (90:0) (8-0-0) (8/13) @ (a54:50000000). Sep 24 21:50:31 phoe /kernel.test: script cmd = 740a8700 Sep 24 21:50:31 phoe /kernel.test: reg: da 00 00 13 47 08 06 1f 35 08 00 00 80 00 07 02. Sep 24 21:50:31 phoe /kernel.test: ncr1: restart (fatal error). Sep 24 21:50:31 phoe /kernel.test: Sep 24 21:50:31 phoe /kernel.test: sd1(ncr1:6:0): COMMAND FAILED (9 ff) @f0beea00. Sep 24 21:50:31 phoe /kernel.test: Sep 24 21:50:31 phoe /kernel.test: sd1(ncr1:6:0): FAST SCSI-2 100ns (10 Mb/sec) offset 8. Sep 24 21:50:31 phoe /kernel.test: Sep 24 21:50:32 phoe /kernel.test: sd1(ncr1:6:0): ABORTED COMMAND asc:4e,0 Overlapped commands attempted field replaceable unit: 14 Sep 24 21:50:32 phoe /kernel.test: , retries:1 Sep 24 21:50:32 phoe /kernel.test: 0MB (0 512 byte sectors) -- %!ps | Bertrand Petit alias | elrond@imladris.frmug.fr.net | Cette zone est | % | >elrond le demi-Elfe< | elrond@freenix.fr | a louer | 550 0 translate 90 rotate/NewCenturySchlbk-Bold findfont 690 scalefont setfont -5 15 moveto(42)true charpath clip/Helvetica-Bold findfont 8 scalefont setfont 0 9 800{dup 360 mod 360 div 1 1 sethsbcolor/y exch def rand 10 mod neg 11 800 {y moveto(42)show}for}for clippath 4 setlinewidth 0 setgray stroke showpage
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199609250048.CAA29302>