Fusion MPT: Convert inactive_list_mutex in a mutex
Subsystems (2)
PATCH 1/1 Fusion MPT: Convert inactive_list_mutex in a mutex
MPT Fusion: The semaphore inactive_list_mutex is used as a mutex. Convert it to the mutex API
--
drivers/message/fusion/mptbase.c +5 -5
@@ -2136,7 +2136,7 @@ mpt_do_ioc_recovery(MPT_ADAPTER *ioc, u32 reason, int sleepFlag)/* * Initalize link list for inactive raid volumes. */ -init_MUTEX (&ioc->raid_data.inactive_list_mutex); +mutex_init (&ioc->raid_data.inactive_list_mutex);INIT_LIST_HEAD (&ioc->raid_data.inactive_list);if (ioc->bus_type ==SAS ) {
@@ -5122,13 +5122,13 @@ mpt_inactive_raid_list_free(MPT_ADAPTER *ioc)if (list_empty (&ioc->raid_data.inactive_list))return ; -down (&ioc->raid_data.inactive_list_mutex); +mutex_lock (&ioc->raid_data.inactive_list_mutex);list_for_each_entry_safe (component_info, pNext, &ioc->raid_data.inactive_list, list) {list_del (&component_info->list);kfree (component_info); } -up (&ioc->raid_data.inactive_list_mutex); +mutex_unlock (&ioc->raid_data.inactive_list_mutex); }/**
@@ -5187,7 +5187,7 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id)if (!handle_inactive_volumes) goto out; -down (&ioc->raid_data.inactive_list_mutex); +mutex_lock (&ioc->raid_data.inactive_list_mutex);for (i =0 ; i < buffer->NumPhysDisks; i++) {if (mpt_raid_phys_disk_pg0 (ioc, buffer->PhysDisk[i].PhysDiskNum, &phys_disk) !=0 )
@@ -5207,7 +5207,7 @@ mpt_inactive_raid_volumes(MPT_ADAPTER *ioc, u8 channel, u8 id)list_add_tail (&component_info->list, &ioc->raid_data.inactive_list); } -up (&ioc->raid_data.inactive_list_mutex); +mutex_unlock (&ioc->raid_data.inactive_list_mutex); out:if (buffer)
drivers/message/fusion/mptbase.h +1 -1
@@ -531,7 +531,7 @@ struct inactive_raid_component_info { typedef struct _RaidCfgData { IOCPage2_t *pIocPg2; /* table of Raid Volumes */ IOCPage3_t *pIocPg3; /* table of physical disks */ - struct semaphore inactive_list_mutex; + struct mutex inactive_list_mutex; struct list_head inactive_list; /* link list for physical disk that belong in inactive volumes */
drivers/message/fusion/mptscsih.c +4 -4
@@ -2295,14 +2295,14 @@ mptscsih_is_phys_disk(MPT_ADAPTER *ioc, u8 channel, u8 id)if (list_empty (&ioc->raid_data.inactive_list)) goto out; -down (&ioc->raid_data.inactive_list_mutex); +mutex_lock (&ioc->raid_data.inactive_list_mutex);list_for_each_entry (component_info, &ioc->raid_data.inactive_list, list) {if ((component_info->d.PhysDiskID == id) && (component_info->d.PhysDiskBus == channel)) rc =1 ; } -up (&ioc->raid_data.inactive_list_mutex); +mutex_unlock (&ioc->raid_data.inactive_list_mutex); out:return rc;
@@ -2332,14 +2332,14 @@ mptscsih_raid_id_to_num(MPT_ADAPTER *ioc, u8 channel, u8 id)if (list_empty (&ioc->raid_data.inactive_list)) goto out; -down (&ioc->raid_data.inactive_list_mutex); +mutex_lock (&ioc->raid_data.inactive_list_mutex);list_for_each_entry (component_info, &ioc->raid_data.inactive_list, list) {if ((component_info->d.PhysDiskID == id) && (component_info->d.PhysDiskBus == channel)) rc = component_info->d.PhysDiskNum; } -up (&ioc->raid_data.inactive_list_mutex); +mutex_unlock (&ioc->raid_data.inactive_list_mutex); out:return rc;
Signature · 12 lines
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona
Usually when people are sad, they don't do anything. They just cry over
their condition. But when they get angry, they bring about a change
(Malcolm X)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-James Bottomley
maintainerQuoted 4 lines · Matthias Kaehlcke
MPT Fusion: The semaphore
inactive_list_mutexis used as a mutex. Convert it to the mutex APISigned-off-by Matthias Kaehlcke <[email protected]>
Um, it would at least vaguely help if you checked the tree; even actually trying to apply the patch would have told you. I know the email notifications from scsi misc can sometimes get lost.
commit ed5f606fef22e515331aab4c1f927775cf4af70e
Author: Matthias Kaehlcke <[email protected]> Date: Sun Mar 9 12:16:27 2008 +0100
[SCSI] mpt fusion: convert inactive_list_mutex to a mutex
James
El Mon, May 05, 2008 at 09:26:06AM -0500 James Bottomley ha dit:
Quoted 10 lines · Matthias Kaehlcke
Quoted 4 lines
MPT Fusion: The semaphore
inactive_list_mutexis used as a mutex. Convert it to the mutex APISigned-off-by Matthias Kaehlcke <[email protected]>Um, it would at least vaguely help if you checked the tree; even actually trying to apply the patch would have told you. I know the email notifications from scsi misc can sometimes get lost.
Quoted 5 lines
commit
ed5f606fef22e515331aab4c1f927775cf4af70eAuthor: Matthias Kaehlcke <[email protected]> Date: Sun Mar 9 12:16:27 2008 +0100[SCSI] mpt fusion: convert
inactive_list_mutexto a mutex
apologizes for my ignorance, which tree exactly should i have checked for this patch? is it linux/kernel/git/jejb/scsi-misc-2.6.git?
regards
Signature · 10 lines
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona
Nationalism is an infantile disease. It is the measles of mankind
(Albert Einstein)
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-James Bottomley
maintainerQuoted 12 lines · Matthias Kaehlcke
El Mon, May 05, 2008 at 09:26:06AM -0500 James Bottomley ha dit:
Quoted 10 lines · Matthias Kaehlcke
Quoted 4 lines
MPT Fusion: The semaphore
inactive_list_mutexis used as a mutex. Convert it to the mutex APISigned-off-by Matthias Kaehlcke <[email protected]>Um, it would at least vaguely help if you checked the tree; even actually trying to apply the patch would have told you. I know the email notifications from scsi misc can sometimes get lost.
Quoted 8 lines
Quoted 5 lines
commit
ed5f606fef22e515331aab4c1f927775cf4af70eAuthor: Matthias Kaehlcke <[email protected]> Date: Sun Mar 9 12:16:27 2008 +0100[SCSI] mpt fusion: convert
inactive_list_mutexto a mutexapologizes for my ignorance, which tree exactly should i have checked for this patch? is it linux/kernel/git/jejb/scsi-misc-2.6.git?
It's in the released kernel and has been there for the past two weeks.
James
El Mon, May 05, 2008 at 10:28:37AM -0500 James Bottomley ha dit:
Quoted 17 lines · Matthias Kaehlcke
Quoted 16 lines
El Mon, May 05, 2008 at 09:26:06AM -0500 James Bottomley ha dit:
Quoted 14 lines · Matthias Kaehlcke
Quoted 4 lines
MPT Fusion: The semaphore
inactive_list_mutexis used as a mutex. Convert it to the mutex APISigned-off-by Matthias Kaehlcke <[email protected]>Um, it would at least vaguely help if you checked the tree; even actually trying to apply the patch would have told you. I know the email notifications from scsi misc can sometimes get lost.
commit
ed5f606fef22e515331aab4c1f927775cf4af70eAuthor: Matthias Kaehlcke <[email protected]> Date: Sun Mar 9 12:16:27 2008 +0100
Quoted 6 lines
Quoted 4 lines
Quoted 1 line
[SCSI] mpt fusion: convert
inactive_list_mutexto a mutexapologizes for my ignorance, which tree exactly should i have checked for this patch? is it linux/kernel/git/jejb/scsi-misc-2.6.git?
It's in the released kernel and has been there for the past two weeks.
i actually missed the mail notification and worked with outdated copy of linus' tree ...
thanks for your patience and sorry for making you loose your time
Signature · 10 lines
Matthias Kaehlcke
Embedded Linux Engineer
Barcelona
The assumption that what currently exists must necessarily
exist is the acid that corrodes all visionary thinking
.''`.
using free software / Debian GNU/Linux | http://debian.org : :' :
`. `'`
gpg --keyserver pgp.mit.edu --recv-keys 47D8E5D4 `-