| Summary: | ATAPI TAPE hung in atrpq | ||
|---|---|---|---|
| Product: | Base System | Reporter: | Sean Winn <sean> |
| Component: | kern | Assignee: | Søren Schmidt <sos> |
| Status: | Closed FIXED | ||
| Severity: | Affects Only Me | ||
| Priority: | Normal | ||
| Version: | 4.6.1-RELEASE | ||
| Hardware: | Any | ||
| OS: | Any | ||
|
Description
Sean Winn
2002-08-06 17:00:06 UTC
In message <20020806155754.92708A6A2C@visi.gothic.net.au>, Sean writes: > Seagte STT20000A (IDE Travan 5 tape drive) - using dump to write out > a partition, dump hangs in 'atprq' (according to top) on > closing the tape device. The following patch is reported to fix this problem. Can you try it to see if it helps? Ian Index: atapi-all.c =================================================================== RCS file: /home/iedowse/CVS/src/sys/dev/ata/atapi-all.c,v retrieving revision 1.46.2.14 diff -u -r1.46.2.14 atapi-all.c --- atapi-all.c 14 Jul 2002 12:35:28 -0000 1.46.2.14 +++ atapi-all.c 14 Jul 2002 23:39:00 -0000 @@ -186,6 +186,7 @@ request->flags = flags; request->timeout = timeout * hz; request->ccbsize = atadev->param->packet_size ? 16 : 12; + request->error = EINPROGRESS; bcopy(ccb, request->ccb, request->ccbsize); if (callback) { request->callback = callback; @@ -215,7 +216,8 @@ } /* wait for request to complete */ - tsleep((caddr_t)request, PRIBIO, "atprq", 0); + if (request->error == EINPROGRESS) + tsleep((caddr_t)request, PRIBIO, "atprq", 0); splx(s); error = request->error; if (error) From: "Ian Dowse" <iedowse@maths.tcd.ie> To: "Sean" <sean@gothic.net.au> Cc: <FreeBSD-gnats-submit@FreeBSD.org> Sent: Wednesday, August 07, 2002 2:47 AM Subject: Re: kern/41382: ATAPI TAPE hung in atrpq > In message <20020806155754.92708A6A2C@visi.gothic.net.au>, Sean writes: > > Seagte STT20000A (IDE Travan 5 tape drive) - using dump to write out > > a partition, dump hangs in 'atprq' (according to top) on > > closing the tape device. > > The following patch is reported to fix this problem. Can you try > it to see if it helps? Dump completed without a problem; makes the tape drive useful for backups again :) > > Ian > > Index: atapi-all.c > =================================================================== > RCS file: /home/iedowse/CVS/src/sys/dev/ata/atapi-all.c,v > retrieving revision 1.46.2.14 > diff -u -r1.46.2.14 atapi-all.c > --- atapi-all.c 14 Jul 2002 12:35:28 -0000 1.46.2.14 > +++ atapi-all.c 14 Jul 2002 23:39:00 -0000 > @@ -186,6 +186,7 @@ > request->flags = flags; > request->timeout = timeout * hz; > request->ccbsize = atadev->param->packet_size ? 16 : 12; > + request->error = EINPROGRESS; > bcopy(ccb, request->ccb, request->ccbsize); > if (callback) { > request->callback = callback; > @@ -215,7 +216,8 @@ > } > > /* wait for request to complete */ > - tsleep((caddr_t)request, PRIBIO, "atprq", 0); > + if (request->error == EINPROGRESS) > + tsleep((caddr_t)request, PRIBIO, "atprq", 0); > splx(s); > error = request->error; > if (error) > > > Responsible Changed From-To: freebsd-bugs->sos Over to ATA maintainer. ast0: TAPE <Seagate STT8000A> at ata1-master PIO4 FreeBSD 4.6.2-RELEASE #0: Sat Aug 31 00:05:36 EDT 2002 CPU: Pentium II/Pentium II Xeon/Celeron (398.27-MHz 686-class CPU) Origin = "GenuineIntel" Id = 0x651 Stepping = 1 Features=0x183f9ff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,SEP,MTRR,PGE,MCA,CMOV, PA T,PSE36,MMX,FXSR> Prior to the patch, any tape operation to /dev/ast0 would hang after completion. The above patch to atapi-all.c corrected this problem with my Seagate 4/8 GB Seagate STT8000A Travan tape drive. Thanks for the fix! State Changed From-To: open->closed Fix committed to current. |