From owner-freebsd-scsi Mon Jul 6 11:33:01 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id LAA26478 for freebsd-scsi-outgoing; Mon, 6 Jul 1998 11:33:01 -0700 (PDT) (envelope-from owner-freebsd-scsi@FreeBSD.ORG) Received: from panzer.plutotech.com (ken@panzer.plutotech.com [206.168.67.125]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id LAA26464 for ; Mon, 6 Jul 1998 11:32:53 -0700 (PDT) (envelope-from ken@panzer.plutotech.com) Received: (from ken@localhost) by panzer.plutotech.com (8.8.8/8.8.5) id MAA23873; Mon, 6 Jul 1998 12:24:05 -0600 (MDT) From: "Kenneth D. Merry" Message-Id: <199807061824.MAA23873@panzer.plutotech.com> Subject: Re: Two problems (Ultra2-performance and CD-recording) In-Reply-To: <199807061525.RAA18394@father.ludd.luth.se> from Rolf Larsson at "Jul 6, 98 05:25:47 pm" To: rln@ludd.luth.se (Rolf Larsson) Date: Mon, 6 Jul 1998 12:24:05 -0600 (MDT) Cc: gibbs@pluto.plutotech.com, scsi@FreeBSD.ORG X-Mailer: ELM [version 2.4ME+ PL28s (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM899749445-23828-0_ Content-Transfer-Encoding: 7bit Sender: owner-freebsd-scsi@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org --ELM899749445-23828-0_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Rolf Larsson wrote... > Kenneth D. Merry said something like this: > > > Notice the offset 0. That isn't good. We know there are problems > > with the 7890 and Ultra 2 disks, most likely related to negotiation. > > Others have reported similar strange behavior. The problems with the 7890 > > and Ultra 2 drives aren't likely to be fixed until Justin gets an Ultra 2 > > drive to test. The Atipa folks have agreed to send him one, and it should > > arrive in a couple of days. That will hopefully help him find the problem. > > OK. I'll hold my breath for now :-) speed isn't much of a problem anyway, > with 7 sambausers and an internal webserver it rocks quite good even with > that performance. > > > Well, there isn't a WORM driver in CAM at the moment. I'm working > > on it, though. In the next snapshot, the CDROM driver will attach to your > > WORM drive. For now, there are a couple of things you can do. > > > - If you just want to see if CAM probed your WORM drive, and don't > > want to make the above change for some reason, boot with -v, and > > you'll see all the passthrough driver probe messages. The > > passthrough driver attaches to every SCSI device. > > ...except this one (see attached dmesg output). That's odd, I guess. > found-> vendor=0x9005, dev=0x001f, revid=0x00 > class=01-00-00, hdrtype=0x00, mfdev=0 > intpin=a, irq=19 > map[0]: type 4, range 32, base 0000d000, size 8 > map[1]: type 1, range 64, base e3000000, size 12 > map[2]: type 0, range 0, base 00000000, size 0 > ahc0: rev 0x00 int a irq 19 on pci0.6.0 > ahc0: Reading SEEPROM...checksum error > ahc0: No SEEPROM available > ahc0: Using left over BIOS settings > ahc0: aic7890/91 Wide Channel A, SCSI Id=15, 32/255 SCBs > ahc0: Resetting Channel A > ahc0: Downloading Sequencer Program... 407 instructions downloaded Justin has made some fixes to the Adaptec driver since the last snapshot that may fix your problem. Notice that the SCSI ID of your adapter is 15. Your WORM drive is almost certainly a narrow device, so it won't see the controller. There's a bug in the May 20th version of the Adaptec driver on Ultra 2 controllers -- it reads the SCSI ID from the wrong place (when it is looking at "leftover BIOS values" on chips without a SEEPROM). The patch fixes that problem. The other thing the patch does is that it tries reading the SEEPROM in several different formats, just in case the one you have is different from what the driver thinks should be there. Anyway, try the patch out, and let me know if it helps things any. This patch may also be useful to other folks, so I'm CCing it to the scsi list. Ken -- Kenneth Merry ken@plutotech.com --ELM899749445-23828-0_ Content-Type: text/plain; charset=ISO-8859-1 Content-Disposition: attachment; filename=ahc_pci_diffs Content-Description: ahc_pci_diffs Content-Transfer-Encoding: 7bit *** src/sys/pci/ahc_pci.c.orig --- src/sys/pci/ahc_pci.c *************** *** 401,407 **** /* Remeber how the card was setup in case there is no SEEPROM */ ahc_outb(ahc, HCNTRL, ahc->pause); ! our_id = ahc_inb(ahc, SCSIID) & OID; sxfrctl1 = ahc_inb(ahc, SXFRCTL1) & STPWEN; scsiseq = ahc_inb(ahc, SCSISEQ); --- 401,410 ---- /* Remeber how the card was setup in case there is no SEEPROM */ ahc_outb(ahc, HCNTRL, ahc->pause); ! if ((ahc->features & AHC_ULTRA2) != 0) ! our_id = ahc_inb(ahc, SCSIID_ULTRA2) & OID; ! else ! our_id = ahc_inb(ahc, SCSIID) & OID; sxfrctl1 = ahc_inb(ahc, SXFRCTL1) & STPWEN; scsiseq = ahc_inb(ahc, SCSISEQ); *************** *** 581,590 **** --- 584,600 ---- sd.sd_status_offset = SEECTL; sd.sd_dataout_offset = SEECTL; + /* + * For some multi-channel devices, the c46 is simply too + * small to work. For the other controller types, we can + * get our information from either SEEPROM type. Set the + * type to start our probe with accordingly. + */ if (ahc->flags & AHC_LARGE_SEEPROM) sd.sd_chip = C56_66; else sd.sd_chip = C46; + sd.sd_MS = SEEMS; sd.sd_RDY = SEERDY; sd.sd_CS = SEECS; *************** *** 595,624 **** have_seeprom = acquire_seeprom(ahc, &sd); if (have_seeprom) { - bus_size_t start_addr; - - start_addr = 32 * (ahc->channel - 'A'); if (bootverbose) printf("%s: Reading SEEPROM...", ahc_name(ahc)); ! have_seeprom = read_seeprom(&sd, (u_int16_t *)&sc, start_addr, ! sizeof(sc)/2); ! if (have_seeprom) { ! /* Check checksum */ ! int i; ! int maxaddr = (sizeof(sc)/2) - 1; ! u_int16_t *scarray = (u_int16_t *)≻ ! for (i = 0; i < maxaddr; i++) ! checksum = checksum + scarray[i]; ! if (checksum != sc.checksum) { ! if(bootverbose) ! printf ("checksum error\n"); ! have_seeprom = 0; ! } else if (bootverbose) { ! printf("done.\n"); } } } --- 605,643 ---- have_seeprom = acquire_seeprom(ahc, &sd); if (have_seeprom) { if (bootverbose) printf("%s: Reading SEEPROM...", ahc_name(ahc)); ! ! for (;;) { ! bus_size_t start_addr; ! ! start_addr = 32 * (ahc->channel - 'A'); ! ! have_seeprom = read_seeprom(&sd, (u_int16_t *)&sc, ! start_addr, sizeof(sc)/2); ! if (have_seeprom) { ! /* Check checksum */ ! int i; ! int maxaddr = (sizeof(sc)/2) - 1; ! u_int16_t *scarray = (u_int16_t *)≻ ! for (i = 0; i < maxaddr; i++) ! checksum = checksum + scarray[i]; ! if (checksum == 0 || checksum != sc.checksum) { ! if (bootverbose && sd.sd_chip == C56_66) ! printf ("checksum error\n"); ! have_seeprom = 0; ! } else if (bootverbose) { ! printf("done.\n"); ! break; ! } } + + if (sd.sd_chip == C56_66) + break; + sd.sd_chip = C56_66; } } --ELM899749445-23828-0_-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message