* [PATCH] lpfc: mutex conversion
@ 2006-01-31 17:17 Christoph Hellwig
0 siblings, 0 replies; only message in thread
From: Christoph Hellwig @ 2006-01-31 17:17 UTC (permalink / raw)
To: james.smart, jejb; +Cc: linux-scsi
switch lpfc from semaphore to mutex locking
Signed-off-by: Christoph Hellwig <hch@lst.de>
Index: linux-2.6/drivers/scsi/lpfc/lpfc.h
===================================================================
--- linux-2.6.orig/drivers/scsi/lpfc/lpfc.h 2006-01-06 12:51:02.000000000 +0100
+++ linux-2.6/drivers/scsi/lpfc/lpfc.h 2006-01-31 14:09:46.000000000 +0100
@@ -173,7 +173,7 @@
dma_addr_t slim2p_mapping;
uint16_t pci_cfg_value;
- struct semaphore hba_can_block;
+ struct mutex hba_can_block;
uint32_t hba_state;
#define LPFC_INIT_START 1 /* Initial state after board reset */
Index: linux-2.6/drivers/scsi/lpfc/lpfc_init.c
===================================================================
--- linux-2.6.orig/drivers/scsi/lpfc/lpfc_init.c 2006-01-06 12:51:02.000000000 +0100
+++ linux-2.6/drivers/scsi/lpfc/lpfc_init.c 2006-01-31 14:10:09.000000000 +0100
@@ -1393,7 +1393,7 @@
goto out_put_host;
host->unique_id = phba->brd_no;
- init_MUTEX(&phba->hba_can_block);
+ mutex_init(&phba->hba_can_block);
INIT_LIST_HEAD(&phba->ctrspbuflist);
INIT_LIST_HEAD(&phba->rnidrspbuflist);
INIT_LIST_HEAD(&phba->freebufList);
Index: linux-2.6/drivers/scsi/lpfc/lpfc_scsi.c
===================================================================
--- linux-2.6.orig/drivers/scsi/lpfc/lpfc_scsi.c 2006-01-31 12:23:38.000000000 +0100
+++ linux-2.6/drivers/scsi/lpfc/lpfc_scsi.c 2006-01-31 14:10:01.000000000 +0100
@@ -44,7 +44,7 @@
static inline void
lpfc_block_requests(struct lpfc_hba * phba)
{
- down(&phba->hba_can_block);
+ mutex_lock(&phba->hba_can_block);
scsi_block_requests(phba->host);
}
@@ -52,7 +52,7 @@
lpfc_unblock_requests(struct lpfc_hba * phba)
{
scsi_unblock_requests(phba->host);
- up(&phba->hba_can_block);
+ mutex_unlock(&phba->hba_can_block);
}
/*
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2006-01-31 17:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-31 17:17 [PATCH] lpfc: mutex conversion Christoph Hellwig
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.