Accepting request 267166 from home:lnussel:branches:Base:System

- blacklist some usb controllers that don't like sg_inq (bnc#840054)
  Add: sg3_utils-sg_inq-blacklist.diff

OBS-URL: https://build.opensuse.org/request/show/267166
OBS-URL: https://build.opensuse.org/package/show/Base:System/sg3_utils?expand=0&rev=46
This commit is contained in:
Robert Milasan 2015-01-06 09:53:20 +00:00 committed by Git OBS Bridge
parent 022fc83749
commit 0e6e64a4dc
3 changed files with 33 additions and 1 deletions

View File

@ -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}"

View File

@ -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 Wed Sep 3 15:57:47 CEST 2014 - hare@suse.de

View File

@ -1,7 +1,7 @@
# #
# spec file for package sg3_utils # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # 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 Patch0: sg3_utils-fix-missing-rule-for-scsi_serial-partitions.patch
Patch1: sg3_utils-Fixup-formatting-of-invalid-VPD-page-0x83.patch Patch1: sg3_utils-Fixup-formatting-of-invalid-VPD-page-0x83.patch
Patch2: sg3_utils-Do-not-export-long-identifiers.patch Patch2: sg3_utils-Do-not-export-long-identifiers.patch
Patch3: sg3_utils-sg_inq-blacklist.diff
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: udev BuildRequires: udev
BuildRequires: xz BuildRequires: xz
@ -86,6 +87,7 @@ applications that want to make use of libsgutils.
%patch0 -p1 %patch0 -p1
%patch1 -p1 %patch1 -p1
%patch2 -p1 %patch2 -p1
%patch3 -p1
%build %build
%configure --disable-static --with-pic %configure --disable-static --with-pic