Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 7 Jan 2014 11:11:28 -0700
From:      "Justin T. Gibbs" <gibbs@scsiguy.com>
To:        Ben Laurie <ben@links.org>
Cc:        freebsd-scsi@freebsd.org
Subject:   Re: Dropped interrupts
Message-ID:  <84D23688-DDC6-421E-9D21-3DA646229038@scsiguy.com>
In-Reply-To: <CAG5KPzwR5=WNKc5hck8F7CtCtk3mivwYFRFeCJT_zWdnetW=3w@mail.gmail.com>
References:  <CAG5KPzxUAnORPSyJDrSdBBNE7MBi-dD=M6=E1rMG%2Bc8rn4deUQ@mail.gmail.com> <AE41EB93-26BD-4BD0-9913-7CD0A5B6E1A4@scsiguy.com> <CAG5KPzwR5=WNKc5hck8F7CtCtk3mivwYFRFeCJT_zWdnetW=3w@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--Apple-Mail=_144B057E-CE36-465F-8836-FE3D78F47F9A
Content-Transfer-Encoding: quoted-printable
Content-Type: text/plain;
	charset=windows-1252

On Jan 7, 2014, at 12:36 AM, Ben Laurie <ben@links.org> wrote:

> Attached.
>=20
> On 7 January 2014 05:46, Justin T. Gibbs <gibbs@scsiguy.com> wrote:
>> On Jan 6, 2014, at 3:01 PM, Ben Laurie <ben@links.org> wrote:
>>=20
>>> Not subscribed to the list, so please cc on replies.
>>>=20
>>> I'm using Bacula with an LTO-2 SCSI drive.
>>>=20
>>> With increasing frequency lately, I've been getting errors like this
>>> from bacula:
>>>=20
>>> backup-sd JobId 13092: Error: block.c:608 Write error at 23:6772 on
>>> device "Ultrium" (/dev/nsa0). ERR=3DOperation not permitted.
>>>=20
>>> Associated with this, I see in dmesg:
>>>=20
>>> ahc0: Recovery Initiated
>>>=20
>>> [a lot of dump info, including=85]
>>=20
>> If you provide the dump info, I may be able to tell you why recovery =
is starting.
>>=20
>> The dmesg information from a boot of the system would be good to have =
too.
>>=20
>> =97
>> Justin

The target is keeping us in command phase for some reason.  No parity or =
other
errors are being reported.  My guess is that the tape drive does not =
like the command
that was issued for some reason.

Attached are two totally untested/uncompiled changes for you to try out. =
 The first
should give more information about the command that timed out so we can =
better
determine if it is well formed.  The second is an attempted fix for =
spurious=20
=93Interrupts may not be functioning=94 warnings.  Can you attempt to =
replicate this
again with these changes?

Thanks,
Justin


--Apple-Mail=_144B057E-CE36-465F-8836-FE3D78F47F9A
Content-Disposition: attachment;
	filename=aic7xxx.diff
Content-Type: application/octet-stream;
	x-unix-mode=0644;
	name="aic7xxx.diff"
Content-Transfer-Encoding: 7bit

--- //SpectraBSD/stable/sys/dev/aic7xxx/aic7xxx.c	2012-08-29 22:35:04.000000000 -0600
+++ /usr/home/justing/perforce/SpectraBSD/sys/dev/aic7xxx/aic7xxx.c	2012-08-29 22:35:04.000000000 -0600
@@ -7043,7 +7043,6 @@
 		u_int	saved_scbptr;
 		int	target;
 		int	lun;
-		int	i;
 		char	channel;
 
 		target = SCB_GET_TARGET(ahc, scb);
@@ -7051,15 +7050,9 @@
 		lun = SCB_GET_LUN(scb);
 
 		ahc_print_path(ahc, scb);
-		printf("SCB 0x%x - timed out\n", scb->hscb->tag);
-		if (scb->sg_count > 0) {
-			for (i = 0; i < scb->sg_count; i++) {
-				printf("sg[%d] - Addr 0x%x : Length %d\n",
-				       i,
-				       scb->sg_list[i].addr,
-				       scb->sg_list[i].len & AHC_SG_LEN_MASK);
-			}
-		}
+		printf("Timed out ");
+		ahc_print_scb(scb)
+
 		if (scb->flags & (SCB_DEVICE_RESET|SCB_ABORT)) {
 			/*
 			 * Been down this road before.
--- //SpectraBSD/stable/sys/dev/aic7xxx/aic_osm_lib.c	2012-06-29 17:23:35.000000000 -0600
+++ /usr/home/justing/perforce/SpectraBSD/sys/dev/aic7xxx/aic_osm_lib.c	2012-06-29 17:23:35.000000000 -0600
@@ -113,13 +113,14 @@
 	aic_lock(aic);
 	for (;;) {
 		
-		if (LIST_EMPTY(&aic->timedout_scbs) != 0
-		 && (aic->flags & AIC_SHUTDOWN_RECOVERY) == 0)
-			msleep(aic, &aic->platform_data->mtx, PUSER, "idle", 0);
-
 		if ((aic->flags & AIC_SHUTDOWN_RECOVERY) != 0)
 			break;
 
+		if (LIST_EMPTY(&aic->timedout_scbs) != 0) {
+			msleep(aic, &aic->platform_data->mtx, PUSER, "idle", 0);
+			continue;
+		}
+
 		aic_recover_commands(aic);
 	}
 	aic->platform_data->recovery_thread = NULL;

--Apple-Mail=_144B057E-CE36-465F-8836-FE3D78F47F9A
Content-Transfer-Encoding: 7bit
Content-Type: text/plain;
	charset=windows-1252



--Apple-Mail=_144B057E-CE36-465F-8836-FE3D78F47F9A--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?84D23688-DDC6-421E-9D21-3DA646229038>