mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Masakazu Mokuno <mokuno@sm.sony.co.jp>
To: Daniel Walker <dwalker@mvista.com>
Cc: netdev@vger.kernel.org, jgarzik@pobox.com,
	netdev@vger.kernel.org, matthew@wil.cx, rusty@rustcorp.com.au,
	mingo@elte.hu, linux-kernel@vger.kernel.org, arjan@infradead.org,
	geoffrey.levand@am.sony.com, linux-wireless@vger.kernel.org
Subject: Re: [PATCH 1/3] ps3: gelic: scan_lock semaphore to mutex
Date: Tue, 27 May 2008 16:24:31 +0900	[thread overview]
Message-ID: <20080527161710.0149.40F06B3A@sm.sony.co.jp> (raw)
In-Reply-To: <20080522195404.061391772@mvista.com>

Added CC: linux-wireless

On Thu, 22 May 2008 00:00:01 -0700
Daniel Walker <dwalker@mvista.com> wrote:

> Signed-off-by: Daniel Walker <dwalker@mvista.com>
> 

patches #1 - #3:

Acked-by: Masakazu Mokuno <mokuno@sm.sony.co.jp>

> ---
>  drivers/net/ps3_gelic_wireless.c |   18 +++++++++---------
>  drivers/net/ps3_gelic_wireless.h |    2 +-
>  2 files changed, 10 insertions(+), 10 deletions(-)
> 
> Index: linux-2.6.25/drivers/net/ps3_gelic_wireless.c
> ===================================================================
> --- linux-2.6.25.orig/drivers/net/ps3_gelic_wireless.c
> +++ linux-2.6.25/drivers/net/ps3_gelic_wireless.c
> @@ -695,7 +695,7 @@ static int gelic_wl_get_scan(struct net_
>  	unsigned long this_time = jiffies;
>  
>  	pr_debug("%s: <-\n", __func__);
> -	if (down_interruptible(&wl->scan_lock))
> +	if (mutex_lock_interruptible(&wl->scan_lock))
>  		return -EAGAIN;
>  
>  	switch (wl->scan_stat) {
> @@ -733,7 +733,7 @@ static int gelic_wl_get_scan(struct net_
>  	wrqu->data.length = ev - extra;
>  	wrqu->data.flags = 0;
>  out:
> -	up(&wl->scan_lock);
> +	mutex_unlock(&wl->scan_lock);
>  	pr_debug("%s: -> %d %d\n", __func__, ret, wrqu->data.length);
>  	return ret;
>  }
> @@ -1554,7 +1554,7 @@ static int gelic_wl_start_scan(struct ge
>  	int ret = 0;
>  
>  	pr_debug("%s: <- always=%d\n", __func__, always_scan);
> -	if (down_interruptible(&wl->scan_lock))
> +	if (mutex_lock_interruptible(&wl->scan_lock))
>  		return -ERESTARTSYS;
>  
>  	/*
> @@ -1588,7 +1588,7 @@ static int gelic_wl_start_scan(struct ge
>  	}
>  	kfree(cmd);
>  out:
> -	up(&wl->scan_lock);
> +	mutex_unlock(&wl->scan_lock);
>  	pr_debug("%s: ->\n", __func__);
>  	return ret;
>  }
> @@ -1610,7 +1610,7 @@ static void gelic_wl_scan_complete_event
>  	DECLARE_MAC_BUF(mac);
>  
>  	pr_debug("%s:start\n", __func__);
> -	down(&wl->scan_lock);
> +	mutex_lock(&wl->scan_lock);
>  
>  	if (wl->scan_stat != GELIC_WL_SCAN_STAT_SCANNING) {
>  		/*
> @@ -1727,7 +1727,7 @@ static void gelic_wl_scan_complete_event
>  			    NULL);
>  out:
>  	complete(&wl->scan_done);
> -	up(&wl->scan_lock);
> +	mutex_unlock(&wl->scan_lock);
>  	pr_debug("%s:end\n", __func__);
>  }
>  
> @@ -2282,7 +2282,7 @@ static void gelic_wl_assoc_worker(struct
>  	wait_for_completion(&wl->scan_done);
>  
>  	pr_debug("%s: scan done\n", __func__);
> -	down(&wl->scan_lock);
> +	mutex_lock(&wl->scan_lock);
>  	if (wl->scan_stat != GELIC_WL_SCAN_STAT_GOT_LIST) {
>  		gelic_wl_send_iwap_event(wl, NULL);
>  		pr_info("%s: no scan list. association failed\n", __func__);
> @@ -2302,7 +2302,7 @@ static void gelic_wl_assoc_worker(struct
>  	if (ret)
>  		pr_info("%s: association failed %d\n", __func__, ret);
>  scan_lock_out:
> -	up(&wl->scan_lock);
> +	mutex_unlock(&wl->scan_lock);
>  out:
>  	up(&wl->assoc_stat_lock);
>  }
> @@ -2431,7 +2431,7 @@ static struct net_device *gelic_wl_alloc
>  
>  	INIT_DELAYED_WORK(&wl->event_work, gelic_wl_event_worker);
>  	INIT_DELAYED_WORK(&wl->assoc_work, gelic_wl_assoc_worker);
> -	init_MUTEX(&wl->scan_lock);
> +	mutex_init(&wl->scan_lock);
>  	init_MUTEX(&wl->assoc_stat_lock);
>  
>  	init_completion(&wl->scan_done);
> Index: linux-2.6.25/drivers/net/ps3_gelic_wireless.h
> ===================================================================
> --- linux-2.6.25.orig/drivers/net/ps3_gelic_wireless.h
> +++ linux-2.6.25/drivers/net/ps3_gelic_wireless.h
> @@ -241,7 +241,7 @@ enum gelic_wl_assoc_state {
>  #define GELIC_WEP_KEYS 4
>  struct gelic_wl_info {
>  	/* bss list */
> -	struct semaphore scan_lock;
> +	struct mutex scan_lock;
>  	struct list_head network_list;
>  	struct list_head network_free_list;
>  	struct gelic_wl_scan_info *networks;
> 
> -- 
> --
> To unsubscribe from this list: send the line "unsubscribe netdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

-- 
Masakazu Mokuno


      parent reply	other threads:[~2008-05-27  8:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-22  7:00 Daniel Walker
2008-05-22  7:00 ` [PATCH 2/3] ps3: gelic: assoc_stat_lock " Daniel Walker
2008-05-22  7:00 ` [PATCH 3/3] ps3: gelic: updown_lock " Daniel Walker
2008-05-31  2:20   ` Jeff Garzik
2008-05-27  7:24 ` Masakazu Mokuno [this message]

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=20080527161710.0149.40F06B3A@sm.sony.co.jp \
    --to=mokuno@sm.sony.co.jp \
    --cc=arjan@infradead.org \
    --cc=dwalker@mvista.com \
    --cc=geoffrey.levand@am.sony.com \
    --cc=jgarzik@pobox.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-wireless@vger.kernel.org \
    --cc=matthew@wil.cx \
    --cc=mingo@elte.hu \
    --cc=netdev@vger.kernel.org \
    --cc=rusty@rustcorp.com.au \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®