Date: Tue, 25 Nov 1997 19:03:38 -0500 (EST) From: "Christopher T. Johnson" <cjohnson@camelot.com> To: "Christopher T. Johnson" <cjohnson@neunacht.netgsi.com> Cc: questions@freebsd.org Subject: Re: NCR 810a breaks AMANDA, help please Message-ID: <Pine.BSF.3.96.971125190215.5407A-100000@cygnet.camelot.com> In-Reply-To: <Pine.BSF.3.95q.971125150603.349A-100000@neunacht.netgsi.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 25 Nov 1997, Christopher T. Johnson wrote: > Date: Tue, 25 Nov 1997 15:29:54 -0500 (EST) > From: "Christopher T. Johnson" <cjohnson@neunacht.netgsi.com> > To: questions@freebsd.org > Subject: NCR 810a breaks AMANDA, help please > > Because one of our new computers needs an ISA scsi card, on Friday I > decided to upgrade my computer from an Adaptec 1542CP to an NCR > controller. The controller I ended up with is an ASUS SC-200 which is > recogonized as an NCR 53c810a. All well and good. > > I'm running FreeBSD Current as of Monday night. > > Once I installed the 810, disk response seemed to be much more responsive > but my amflush died. There are days when it does not pay to get up in the morning... The error or is: rewinding...[input/output error.] or equivlent. errno=5 on the IOCTL to do the rewind after the O_WRONLY Chris > > The following test code will cause the same error to occur: > ---------------------------------- > #include <stdio.h> > #include <sys/mtio.h> > #include <fcntl.h> > > main() > { > struct mtop mt; > int result; > int tapefd; > #define BUFFER_SIZE (32*1024) > char buffer[BUFFER_SIZE]; > > fprintf(stderr,"We is here.\n"); > > tapefd = open("/dev/nrst0", O_RDONLY); > if (tapefd < 0) { > perror("open"); > } > printstatus(tapefd); > > fprintf(stderr,"Rewind 1.\n"); > mt.mt_op = MTREW; > mt.mt_count = 1; > result = ioctl(tapefd, MTIOCTOP, &mt); > if (result < 0) { > perror("rewind 1"); > } > > printstatus(tapefd); > result = close(tapefd); > if (result) { > perror("close 1"); > } > > fprintf(stdout,"closed, now opening WRONLY\n"); > > tapefd = open("/dev/nrst0", O_WRONLY); > if (tapefd < 0) { > perror("open 2"); > } > printstatus(tapefd); > fprintf(stderr,"Rewind 1.\n"); > mt.mt_op = MTREW; > mt.mt_count = 1; > result = ioctl(tapefd, MTIOCTOP, &mt); > if (result < 0) { > perror("rewind 1"); > } > printstatus(tapefd); > > memset(buffer, '\0', BUFFER_SIZE); > sprintf(buffer, "AMANDA: TAPESTART DATE %s TAPE %s\n\014\n", > "X", "NET024"); > result = write(tapefd, buffer, BUFFER_SIZE); > if (result != BUFFER_SIZE) { > if (result > 0) { > perror("short write"); > } > } > printstatus(tapefd); > result = close(tapefd); > if (result) { > perror("close"); > } > fprintf(stderr,"We're out of here....\n"); > return 0; > } > printstatus(int fd) > { > struct mtget status; > int result; > result = ioctl(fd, MTIOCGET, &status); > if (result) { > perror("ioctl MTIOCGET"); > } > fprintf(stdout,"mt_type = 0x%x\nmt_dsreg = 0x%x\nmt_erreg = 0x%x\n", > status.mt_type, status.mt_dsreg, status.mt_erreg); > } > > ------------------------ > > I replaced the NCR card with the 1542 and the problem went away. Went > back to the NCR for more debugging. > > Here is what scsi says is the sense status after a rewind failure. > > ------------------------- > scsi -f /dev/rst0.ctl -c "03 00 00 00 20 00" -i 32 - |\ > hexdump -C > 00000000 70 00 00 00 00 7f ff 12 00 00 00 00 00 00 00 00 |p...............| > 00000010 00 00 00 00 00 00 00 22 f3 b1 00 00 00 00 00 00 |......."........| > -------------------------- > The command has also responeded as: > 00000000 70 00 00 00 ff ff ff 12 00 00 00 00 00 00 00 00 |p...............| > 00000010 00 00 00 00 00 00 00 22 f3 b1 00 00 00 00 00 00 |......."........| > > > Here is the results of the inquire: > scsi -f /dev/rst0.ctl -c "12 0 0 0 40 0" -i 64 "s8 z8 z16 z4" > EXABYTE EXB-8200 252X > > ------------ > > For grins, I modified the NCR driver so that the 53c810a was treated > just like it was a 53c810 as far as features was concerned, this made > no difference. > > ------------------- > > > Oh, the other reason I want to get away from the ADAPTEC card, it > gives me DMA beyond ISA range error messages often. > > Often enough that I'm willing to take a few dumps of the system for > anybody that wants to debug the aha driver. > > Thanks in advance... > Christopher T. Johnson <cjohnson@netgsi.com> > P.S. I'm running 3 weeks behind on my freebsd lists, please cc a copy > of any response to my e-mail address, thanks. > >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.971125190215.5407A-100000>