[patch] hald + SCSI DDS tape changer -> /var/log/messages spammage

Don Lewis truckman at FreeBSD.org
Mon Nov 26 15:27:07 PST 2007


>Submitter-Id:	current-users
>Originator:	Don Lewis
>Organization:	totally disorganized
>Confidential:	no
>Synopsis:	[patch] hald + SCSI DDS tape changer -> /var/log/messages spammage
>Severity:	non-critical
>Priority:	medium
>Category:	ports
>Class:		sw-bug
>Release:	FreeBSD 7.0-BETA3 i386
>Environment:
System: FreeBSD mousie.catspoiler.org 7.0-BETA3 FreeBSD 7.0-BETA3 #32: Fri Nov 23 09:50:45 PST 2007 dl at mousie.catspoiler.org:/usr/obj/usr/src/sys/GENERICDDB i386


  FreeBSD 6.x or greater (and probably FreeBSD 5.x).

  hal-0.5.8.20070909 (and an unknown number of earlier versions)

  gnome2-2.20.1 (and an unknown number of earlier versions)

  # camcontrol devlist
  <SEAGATE ST373207LW 0005>          at scbus0 target 0 lun 0 (pass0,da0)
  <TANDBERG SLR5 4/8GB =09:>         at scbus0 target 4 lun 0 (pass1,sa0)
  <SONY TSL-11000 L2u3>              at scbus0 target 6 lun 0 (pass2,sa1)
  <SONY TSL-11000 L2u3>              at scbus0 target 6 lun 1 (pass3,ch0)
  <PLEXTOR DVDR   PX-716A 1.04>      at scbus1 target 0 lun 0 (pass4,cd0)

>Description:

When hald is started on a machine with a Sony TSL-11000 SCSI tape changer,
it tries to treat the changer LUN as a CDROM, which upsets the SCSI bus
and causes /var/log/messages to be spammed with SCSI error messages.

Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): No or incomplete CDB sent to
device.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Protocol violation in Message
-in phase.  Attempting to abort.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Abort Message Sent
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): SCB 205 - Abort Completed.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): No or incomplete CDB sent to
device.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Protocol violation in Message
-in phase.  Attempting to abort.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Abort Message Sent
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): SCB 200 - Abort Completed.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): No or incomplete CDB sent to
device.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Protocol violation in Message
-in phase.  Attempting to abort.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Abort Message Sent
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): SCB 205 - Abort Completed.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): No or incomplete CDB sent to
device.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Protocol violation in Message
-in phase.  Attempting to abort.
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): Abort Message Sent
Nov 26 10:07:25 mousie kernel: (pass3:ahc0:0:6:1): SCB 200 - Abort Completed.

>How-To-Repeat:

Run hald on a machine with a SCSI tape changer.

>Fix:

The following patch was inspired by the patch attached to this message sent
to the hal mailing list:
<http://lists.freedesktop.org/archives/hal/2006-August/005887.html>


--- hald/freebsd/hf-scsi.c.orig	2007-02-10 13:10:50.000000000 -0800
+++ hald/freebsd/hf-scsi.c	2007-11-26 11:10:37.000000000 -0800
@@ -54,7 +54,7 @@
 static gboolean
 hf_scsi_is_cdrom (int type)
 {
-  return (type == T_CDROM || type == T_WORM || type == T_CHANGER || type == T_OPTICAL);
+  return (type == T_CDROM || type == T_WORM || type == T_OPTICAL);
 }
 
 static HalDevice *
@@ -129,11 +129,13 @@
       hal_device_property_set_string(device, "scsi.type", "processor");
       break;
     case T_WORM:
-    case T_CHANGER:
     case T_CDROM:
     case T_OPTICAL:
       hal_device_property_set_string(device, "scsi.type", "cdrom");
       break;
+    case T_CHANGER:
+      hal_device_property_set_string(device, "scsi.type", "medium_changer");
+      break;
     case T_SCANNER:
       hal_device_property_set_string(device, "scsi.type", "scanner");
       break;




More information about the freebsd-gnome mailing list