diff --git a/sg3_utils-sg_inq-blacklist.diff b/sg3_utils-sg_inq-blacklist.diff new file mode 100644 index 0000000..50f8836 --- /dev/null +++ b/sg3_utils-sg_inq-blacklist.diff @@ -0,0 +1,24 @@ +Index: sg3_utils-1.39/scripts/55-scsi-sg3_id.rules +=================================================================== +--- sg3_utils-1.39.orig/scripts/55-scsi-sg3_id.rules ++++ sg3_utils-1.39/scripts/55-scsi-sg3_id.rules +@@ -15,10 +15,19 @@ ENV{SCSI_MODEL}=="?*", ENV{ID_MODEL}="$e + ENV{SCSI_MODEL_ENC}=="?*", ENV{ID_MODEL_ENC}="$env{SCSI_MODEL_ENC}" + ENV{SCSI_REVISION}=="?*", ENV{ID_REVISION}="$env{SCSI_REVISION}" + ENV{SCSI_TYPE}=="?*", ENV{ID_TYPE}="$env{SCSI_TYPE}" ++ ++# don't inquire sn and di on broken devices (https://bugzilla.suse.com/show_bug.cgi?id=840054) ++# unkown device ++ATTRS{idVendor}=="0aec", ATTRS{idProduct}=="3260", ENV{SG3_UTILS_DEVICE_IGNORE_SN_DI}="1" ++# Sony/JMicron port replicator ++ATTRS{idVendor}=="054c", ATTRS{idProduct}=="06a0", ENV{SG3_UTILS_DEVICE_IGNORE_SN_DI}="1" ++ ++ENV{SG3_UTILS_DEVICE_IGNORE_SN_DI}=="1", GOTO="sg3_utils_sg_inq_sn_di_end" + # SCSI EVPD page 0x80 values + KERNEL=="sd*[!0-9]|sr*", ENV{ID_SCSI}=="1", IMPORT{program}="/usr/bin/sg_inq --export --page=sn $tempnode" + # SCSI EVPD page 0x83 values + KERNEL=="sd*[!0-9]|sr*", ENV{ID_SCSI}=="1", IMPORT{program}="/usr/bin/sg_inq --export --page=di $tempnode" ++LABEL="sg3_utils_sg_inq_sn_di_end" + + # ID_WWN compat mapping + ENV{SCSI_IDENT_LUN_NAA}=="?*", ENV{ID_WWN}!="?*", ENV{ID_WWN}="0x$env{SCSI_IDENT_LUN_NAA}" diff --git a/sg3_utils.changes b/sg3_utils.changes index e0c06b4..828d29c 100644 --- a/sg3_utils.changes +++ b/sg3_utils.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Sun Jan 4 13:55:32 UTC 2015 - lnussel@suse.de + +- blacklist some usb controllers that don't like sg_inq (bnc#840054) + Add: sg3_utils-sg_inq-blacklist.diff + ------------------------------------------------------------------- Wed Sep 3 15:57:47 CEST 2014 - hare@suse.de diff --git a/sg3_utils.spec b/sg3_utils.spec index 4b0713a..55fcb74 100644 --- a/sg3_utils.spec +++ b/sg3_utils.spec @@ -1,7 +1,7 @@ # # spec file for package sg3_utils # -# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -29,6 +29,7 @@ Source: http://sg.danny.cz/sg/p/%name-%version.tar.xz Patch0: sg3_utils-fix-missing-rule-for-scsi_serial-partitions.patch Patch1: sg3_utils-Fixup-formatting-of-invalid-VPD-page-0x83.patch Patch2: sg3_utils-Do-not-export-long-identifiers.patch +Patch3: sg3_utils-sg_inq-blacklist.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRequires: udev BuildRequires: xz @@ -86,6 +87,7 @@ applications that want to make use of libsgutils. %patch0 -p1 %patch1 -p1 %patch2 -p1 +%patch3 -p1 %build %configure --disable-static --with-pic