linux-wireless.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dan Williams <dcbw@redhat.com>
To: Andrey Yurovsky <andrey@cozybit.com>
Cc: linux-wireless@vger.kernel.org, tharvey@irobot.com
Subject: Re: [PATCH] libertas: check valid bits in SPI bus mode reg
Date: Tue, 04 Aug 2009 11:19:10 -0400	[thread overview]
Message-ID: <1249399150.21155.3.camel@localhost.localdomain> (raw)
In-Reply-To: <1249065319-18643-1-git-send-email-andrey@cozybit.com>

On Fri, 2009-07-31 at 11:35 -0700, Andrey Yurovsky wrote:
> The SPI driver writes to the bus mode register and performs a sanity
> check by reading back what we wrote, however only the lower four bits of
> that register are defined.  In some cases, the device side seems to set
> the higher bits, causing us to fail the sanity check unnecessarily.
> Check only the lower four bits instead.
> 
> Thanks to John Goyette from Schick Technologies for pointing out the
> problem.
> 
> Signed-off-by: Andrey Yurovsky <andrey@cozybit.com>

Acked-by: Dan Williams <dcbw@redhat.com>

> ---
>  drivers/net/wireless/libertas/if_spi.c |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/net/wireless/libertas/if_spi.c b/drivers/net/wireless/libertas/if_spi.c
> index 6564282..86263a9 100644
> --- a/drivers/net/wireless/libertas/if_spi.c
> +++ b/drivers/net/wireless/libertas/if_spi.c
> @@ -376,7 +376,7 @@ static int spu_set_bus_mode(struct if_spi_card *card, u16 mode)
>  	err = spu_read_u16(card, IF_SPI_SPU_BUS_MODE_REG, &rval);
>  	if (err)
>  		return err;
> -	if (rval != mode) {
> +	if ((rval & 0xF) != mode) {
>  		lbs_pr_err("Can't read bus mode register.\n");
>  		return -EIO;
>  	}


      reply	other threads:[~2009-08-04 16:18 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-31 18:35 [PATCH] libertas: check valid bits in SPI bus mode reg Andrey Yurovsky
2009-08-04 15:19 ` Dan Williams [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=1249399150.21155.3.camel@localhost.localdomain \
    --to=dcbw@redhat.com \
    --cc=andrey@cozybit.com \
    --cc=linux-wireless@vger.kernel.org \
    --cc=tharvey@irobot.com \
    /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;
as well as URLs for NNTP newsgroup(s).