Date: Thu, 12 Dec 96 19:12:50 JST From: akiyama@kme.mei.co.jp To: FreeBSD-gnats-submit@freebsd.org Subject: kern/2199: Got a lots of "Target Busy" messages with od. Message-ID: <9612121012.AA01873@kmegate.kme.mei.co.jp> Resent-Message-ID: <199612121020.CAA04012@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 2199
>Category: kern
>Synopsis: Got a lots of "Target Busy" messages with od.
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Thu Dec 12 02:20:01 PST 1996
>Last-Modified:
>Originator: Shunsuke Akiyama
>Organization:
Kyushu Matsushita Electric Co., LTD.
>Release: FreeBSD 2.2-ALPHA i386
>Environment:
FreeBSD 2.2-ALPHA kernel configured with "od".
Adaptec AHA-2940 SCSI Adapter and Matsushita LF-3200 MO drive.
>Description:
I've got a lots of "Target Busy" messages when mounting MO
while drive reading media DMA information. In this case, MO
drive returns busy status to SCSI adapter. SCSI subsystem
retry the I/O operation, and prints "Target Busy" message.
Then I got many messages on the console.
>How-To-Repeat:
mount MO media, while drive reading media DMA information.
>Fix:
===================================================================
--- sys/scsi/od.c 1996/11/06 19:12:01
+++ sys/scsi/od.c 1996/12/07 12:13:04
@@ -52,6 +52,7 @@
* WARNING! Use at your own risk. Joerg's ancient SONY SMO drive
* groks it fine, while Shunsuke's Fujitsu chokes on it and times
* out.
+ *
#define OD_AUTO_TURNOFF
*/
@@ -309,22 +310,24 @@
dev, unit, PARTITION(dev)));
/*
- * Try to start the drive, and try to clear "Unit Attention"
- * condition, when media had been changed before.
+ * Try to clear "Unit Attention" condition, when media had
+ * been changed before.
* This operation also clears the SDEV_MEDIA_LOADED flag in its
* error handling routine.
+ * And MUST be a first SCSI I/O operation in od_open().
*/
- scsi_start_unit(sc_link, SCSI_SILENT);
- scsi_prevent(sc_link, PR_PREVENT, SCSI_ERR_OK | SCSI_SILENT);
+ scsi_test_unit_ready(sc_link, SCSI_SILENT);
/*
- * Make sure the drive is ready.
+ * Try to start the drive (ignore failure).
*/
- scsi_test_unit_ready(sc_link, 0);
+ scsi_start_unit(sc_link, SCSI_ERR_OK | SCSI_SILENT);
+ scsi_prevent(sc_link, PR_PREVENT, SCSI_ERR_OK | SCSI_SILENT);
SC_DEBUG(sc_link, SDEV_DB3, ("'start' attempted "));
sc_link->flags |= SDEV_OPEN; /* unit attn becomes an err now */
+
/*
* If it's been invalidated, then forget the label.
*/
@@ -458,6 +461,11 @@
bp->b_error = EIO;
goto bad;
}
+
+ /*
+ * Check it's not too big a transfer for our adapter
+ */
+ odminphys(bp);
/*
* Odd number of bytes or negative offset
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9612121012.AA01873>
