switch lpfc from semaphore to mutex locking Signed-off-by: Christoph Hellwig <hch@xxxxxx> 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); } /* - : send the line "unsubscribe linux-scsi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html