lkml.org 
[lkml]   [2009]   [Jul]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[Patch RFC 14/37] scsi: aacraid semaphore cleanup
    The usage of these "mutex"es is non obvious and probably completions
    in some places. Make it them semaphores.

    Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
    Cc: James Bottomley <James.Bottomley@HansenPartnership.com>
    ---
    drivers/scsi/aacraid/commctrl.c | 2 +-
    drivers/scsi/aacraid/commsup.c | 2 +-
    2 files changed, 2 insertions(+), 2 deletions(-)

    Index: linux-2.6-tip/drivers/scsi/aacraid/commctrl.c
    ===================================================================
    --- linux-2.6-tip.orig/drivers/scsi/aacraid/commctrl.c
    +++ linux-2.6-tip/drivers/scsi/aacraid/commctrl.c
    @@ -190,7 +190,7 @@ static int open_getadapter_fib(struct aa
    /*
    * Initialize the mutex used to wait for the next AIF.
    */
    - init_MUTEX_LOCKED(&fibctx->wait_sem);
    + semaphore_init_locked(&fibctx->wait_sem);
    fibctx->wait = 0;
    /*
    * Initialize the fibs and set the count of fibs on
    Index: linux-2.6-tip/drivers/scsi/aacraid/commsup.c
    ===================================================================
    --- linux-2.6-tip.orig/drivers/scsi/aacraid/commsup.c
    +++ linux-2.6-tip/drivers/scsi/aacraid/commsup.c
    @@ -124,7 +124,7 @@ int aac_fib_setup(struct aac_dev * dev)
    fibptr->hw_fib_va = hw_fib;
    fibptr->data = (void *) fibptr->hw_fib_va->data;
    fibptr->next = fibptr+1; /* Forward chain the fibs */
    - init_MUTEX_LOCKED(&fibptr->event_wait);
    + semaphore_init_locked(&fibptr->event_wait);
    spin_lock_init(&fibptr->event_lock);
    hw_fib->header.XferState = cpu_to_le32(0xffffffff);
    hw_fib->header.SenderSize = cpu_to_le16(dev->max_fib_size);



    \
     
     \ /
      Last update: 2009-07-26 10:27    [W:0.022 / U:0.092 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site