Date: Mon, 6 Jul 1998 12:41:10 -0600 (MDT) From: "Kenneth D. Merry" <ken@plutotech.com> To: ken@plutotech.com Cc: rln@ludd.luth.se, gibbs@pluto.plutotech.com, scsi@FreeBSD.ORG Subject: Re: Two problems (Ultra2-performance and CD-recording) Message-ID: <199807061841.MAA24042@panzer.plutotech.com> In-Reply-To: <no.id> from ken at "Jul 6, 98 12:24:05 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
--ELM899750470-24023-0_ Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit I wrote... > Justin has made some fixes to the Adaptec driver since the last > snapshot that may fix your problem. Oops. There was a bug in that patch. Anyway, here's a new one. Ken -- Kenneth Merry ken@plutotech.com --ELM899750470-24023-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,644 ---- 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; } } --ELM899750470-24023-0_-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-scsi" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199807061841.MAA24042>