Linux MIPS Architecture development
 help / color / mirror / Atom feed
From: Pete Popov <ppopov@embeddedalley.com>
To: Ulrich Eckhardt <eckhardt@satorlaser.com>
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: Re: [patch]small bug in PCMCIA on DB1x00 boards
Date: Mon, 21 Feb 2005 09:26:14 -0800	[thread overview]
Message-ID: <421A19B6.6050102@embeddedalley.com> (raw)
In-Reply-To: <200502211609.42963.eckhardt@satorlaser.com>

Ulrich Eckhardt wrote:
> Hello!
> 
> Another patch that fixes some small glitches in the PCMCIA code.
> 
> Note: I have not (yet) been able to get the compact-flash card to be 
> recognised on my board (it is supposed to appear as PCMCIA/IDE device, 
> right?) but this patch addresses three things that should be obvious without 
> testing. Yes, I know, those are famous last words, but look yourselves. ;)
> 
> BTW: I found that au1000_xxs1500.c and au1000_pb1x00.c can't compile due 
> changed PCMCIA interfaces,

I've updated the db1x00 driver only. It should be easy to update the 
rest of the boards, using the db1x as an example.

Pete

  some functions (socket_state, configure_socket)
> were changed from returning void to returning int and changed their 
> parameters. These two are also the last two files that use struct 
> pcmcia_configure. Maybe copying that struct to the .c files and adding an 
> #error with a proper comment would be a good idea?
> 
> Uli
> 
> 
> Changes:
>  * removed struct pcmcia_irqs, which was unused
>  * added an explicit BUG() in a place marked with "should never happen"
>  * added a missing early return when the card-voltage could not be
>    detected, as a comment above already says.
> 
> ---
> 
> Index: au1000_db1x00.c
> ===================================================================
> RCS file: /home/cvs/linux/drivers/pcmcia/au1000_db1x00.c,v
> retrieving revision 1.6
> diff -u -r1.6 au1000_db1x00.c
> --- au1000_db1x00.c 14 Oct 2004 06:24:25 -0000 1.6
> +++ au1000_db1x00.c 21 Feb 2005 14:13:21 -0000
> @@ -91,7 +91,9 @@
>    vs = (bcsr->status & 0xC)>>2;
>    inserted = !(bcsr->status & (1<<5));
>    break;
> - default:/* should never happen */
> + default:
> +  /* should never happen */
> +  BUG();
>    return;
>   }
>  
> @@ -109,8 +111,8 @@
>      break;
>     default:
>      /* return without setting 'detect' */
> -    printk(KERN_ERR "db1x00 bad VS (%d)\n",
> -      vs);
> +    printk(KERN_ERR "db1x00 bad VS (%d)\n", vs);
> +    return;
>    }
>    state->detect = 1;
>    state->ready = 1;
> Index: au1000_generic.h
> ===================================================================
> RCS file: /home/cvs/linux/drivers/pcmcia/au1000_generic.h,v
> retrieving revision 1.4
> diff -u -r1.4 au1000_generic.h
> --- au1000_generic.h 19 Oct 2004 07:26:37 -0000 1.4
> +++ au1000_generic.h 21 Feb 2005 14:13:21 -0000
> @@ -78,13 +78,6 @@
>            reset: 1;
>  };
>  
> -struct pcmcia_irqs {
> - int sock;
> - int irq;
> - const char *str;
> -};
> -
> -
>  struct au1000_pcmcia_socket {
>   struct pcmcia_socket socket;
>  
> 
> 

      reply	other threads:[~2005-02-21 17:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-21 15:09 [patch]small bug in PCMCIA on DB1x00 boards Ulrich Eckhardt
2005-02-21 17:26 ` Pete Popov [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=421A19B6.6050102@embeddedalley.com \
    --to=ppopov@embeddedalley.com \
    --cc=eckhardt@satorlaser.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox