This commit is contained in:
mchristi 2010-07-12 20:55:43 +00:00
parent f8d692d13d
commit 274d9d4edb
2 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,31 @@
diff -aurp open-iscsi-2.0-871.1-bnx2i/brcm_iscsi_uio/src/unix/nic.c open-iscsi-2.0-871.1-bnx2i.work/brcm_iscsi_uio/src/unix/nic.c
--- open-iscsi-2.0-871.1-bnx2i/brcm_iscsi_uio/src/unix/nic.c 2010-05-20 20:16:05.000000000 -0500
+++ open-iscsi-2.0-871.1-bnx2i.work/brcm_iscsi_uio/src/unix/nic.c 2010-07-07 21:32:22.000000000 -0500
@@ -1168,6 +1168,7 @@ void *nic_loop(void *arg)
nic->start_time = time(NULL);
nic->flags &= ~NIC_UNITIALIZED;
nic->flags |= NIC_INITIALIZED;
+ nic->state &= ~NIC_STOPPED;
nic->state |= NIC_RUNNING;
/* Signal that the device enable is done */
diff -aurp open-iscsi-2.0-871.1-bnx2i/brcm_iscsi_uio/src/unix/nic_utils.c open-iscsi-2.0-871.1-bnx2i.work/brcm_iscsi_uio/src/unix/nic_utils.c
--- open-iscsi-2.0-871.1-bnx2i/brcm_iscsi_uio/src/unix/nic_utils.c 2010-05-20 20:16:05.000000000 -0500
+++ open-iscsi-2.0-871.1-bnx2i.work/brcm_iscsi_uio/src/unix/nic_utils.c 2010-07-07 21:32:22.000000000 -0500
@@ -831,13 +831,14 @@ int nic_disable(nic_t *nic)
if( (nic->flags & NIC_ENABLED) &&
(nic->state & NIC_RUNNING))
{
+ /* Wait for the device to be disabled */
+ pthread_mutex_lock(&nic->nic_mutex);
+
nic->flags &= ~NIC_ENABLED;
nic->flags |= NIC_DISABLED;
nic->state &= ~NIC_RUNNING;
nic->state |= NIC_STOPPED;
- /* Wait for the device to be disabled */
- pthread_mutex_lock(&nic->nic_mutex);
pthread_cond_wait(&nic->disable_wait_cond,
&nic->nic_mutex);
pthread_mutex_unlock(&nic->nic_mutex);

View File

@ -3,7 +3,7 @@
Summary: iSCSI daemon and utility programs
Name: iscsi-initiator-utils
Version: 6.2.0.872
Release: 6%{?dist}
Release: 7%{?dist}
Source0: http://people.redhat.com/mchristi/iscsi/rhel6.0/source/open-iscsi-2.0-872-rc4-bnx2i.tar.gz
Source1: iscsid.init
Source2: iscsidevs.init
@ -26,6 +26,8 @@ Patch6: iscsi-initiator-utils-fix-lib-sysfs-init.patch
Patch7: iscsi-initiator-utils-fix-uip-init-race.patch
# Don't compile iscsistart as static
Patch8: iscsi-initiator-utils-dont-use-static.patch
# Fix brcm nic state
Patch9: iscsi-initiator-utils-fix-brcm-nic-state.patch
Group: System Environment/Daemons
License: GPLv2+
@ -62,6 +64,7 @@ developing applications that use %{name}.
%patch6 -p1 -b .fix-lib-sysfs-init
%patch7 -p1 -b .fix-uip-init-race
%patch8 -p1 -b .dont-use-static
%patch9 -p1 -b .fix-brcm-nic-state
%build
cd utils/open-isns
@ -180,6 +183,9 @@ fi
%{_includedir}/libiscsi.h
%changelog
* Mon Jul 12 2010 Mike Christie <mchristi@redhat.com> 6.2.0.872.7
- 595591 Fix nic state bug in brcm_iscsiuio.
* Thu Jul 8 2010 Mike Christie <mchristi@redhat.com> 6.2.0.872.6
- 602899 Add discovery db support.
- 595591 Sync brcm_iscsiuio to 0.5.15.