From: Christoph Hellwig <hch@lst.de>
To: james.smart@emulex.com, jejb@steeleye.com
Cc: linux-scsi@vger.kernel.org
Subject: [PATCH] lpfc: mutex conversion
Date: Tue, 31 Jan 2006 18:17:16 +0100 [thread overview]
Message-ID: <20060131171716.GC28889@lst.de> (raw)
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);
}
/*
reply other threads:[~2006-01-31 17:17 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060131171716.GC28889@lst.de \
--to=hch@lst.de \
--cc=james.smart@emulex.com \
--cc=jejb@steeleye.com \
--cc=linux-scsi@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.