From: Pavel Machek <pavel@ucw.cz>
To: David Sterba <dsterba@suse.cz>
Cc: torvalds@linux-foundation.org, linux-kernel@vger.kernel.org,
jkosina@suse.cz, benm@symmetric.co.nz, stephen@symmetric.co.nz
Subject: Re: [PATCH] ipwireless: driver for 3G PC Card
Date: Sat, 2 Feb 2008 00:43:15 +0100 [thread overview]
Message-ID: <20080201234315.GA1761@elf.ucw.cz> (raw)
In-Reply-To: <200802011621.27239.dsterba@suse.cz>
Hi!
> > > +static irqreturn_t ipwireless_handle_v1_interrupt(int irq,
> > > + struct ipw_hardware *hw)
> > > +{
> > > + unsigned short irqn;
> > > + unsigned short ack;
> > > +
> > > + irqn = inw(hw->base_port + IOIR);
> > > +
> > > + /* Check if card is present */
> > > + if (irqn == (unsigned short) 0xFFFF) {
> > > + if (++hw->bad_interrupt_count >= 100) {
> > > + /*
> > > + * It is necessary to disable the interrupt at this
> > > + * point, or the kernel hangs, interrupting repeatedly
> > > + * forever.
> > > + */
> > > + hw->irq = irq;
> > > + hw->removed = 1;
> > > + disable_irq_nosync(irq);
> > > + printk(KERN_DEBUG IPWIRELESS_PCCARD_NAME
> > > + ": Mr. Fluffy is not happy!\n");
> > > + }
> > > + return IRQ_HANDLED;
> >
> > Not sure how this is supposed to work. If you assume unshared
> > interrupts, it should be possible to return something and make core
> > care.
> >
> > If you are assuming shared interrupts, either you should disable on
> > first 0xFFFF (are you sure cast is needed, btw?), or not at all,
> > because it could be the other device sedning you 100 of those...
> >
> > ...so which one is it?
>
> Shared. It'll check if device has interrupt pending, else exit.
can you remove bad_interrupt_count? It seems very random in presence
of shared interrupt.
> > > +static int config_ipwireless(struct ipw_dev *ipw)
> > > +{
> > > + struct pcmcia_device *link = ipw->link;
> > > + int ret;
> > > + config_info_t conf;
> > > + tuple_t tuple;
> > > + unsigned short buf[64];
> > > + cisparse_t parse;
> > > + unsigned short cor_value;
> > > + win_req_t reqAM;
> > > + win_req_t reqCM;
> >
> > Hiding structs BehindTypedefsIsEvil.
>
> Unfortunatelly PCMCIA subsystem is full of these and all drivers use them.
> I'll stay consistent for now.
Sorry if they were not yours.
> Updated patch v4 will follow.
Thanks!
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
prev parent reply other threads:[~2008-02-01 23:43 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-28 17:19 [PATCH] ipwireless: driver for 3G PC Card David Sterba
2008-01-28 17:53 ` Alexey Dobriyan
2008-01-30 13:28 ` Pavel Machek
2008-01-28 18:08 ` Randy Dunlap
2008-01-28 23:18 ` Jiri Slaby
2008-01-28 23:28 ` Randy Dunlap
2008-01-28 23:29 ` Jiri Slaby
2008-01-28 23:33 ` Randy Dunlap
2008-01-29 6:22 ` Pekka Enberg
2008-01-29 13:42 ` David Sterba
2008-01-29 13:40 ` David Sterba
2008-01-30 13:40 ` Pavel Machek
2008-01-30 21:29 ` Stephen Blackheath [to Foxconn]
2008-01-30 23:15 ` Pavel Machek
2008-02-01 15:21 ` David Sterba
2008-02-01 23:43 ` Pavel Machek [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=20080201234315.GA1761@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=benm@symmetric.co.nz \
--cc=dsterba@suse.cz \
--cc=jkosina@suse.cz \
--cc=linux-kernel@vger.kernel.org \
--cc=stephen@symmetric.co.nz \
--cc=torvalds@linux-foundation.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.