All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Jorge Boncompte [DTI2]" <jorge@dti2.net>
To: chas3@users.sourceforge.net
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH][ATM] iphase: BUG: sleeping function called from invalid context
Date: Sun, 15 Jun 2008 15:00:48 +0200	[thread overview]
Message-ID: <48551280.1090706@dti2.net> (raw)
In-Reply-To: <200806142105.m5EL5T49003929@cmf.nrl.navy.mil>

Chas Williams (CONTRACTOR) escribió:
> In message <4848106F.30503@dti2.net>,"Jorge Boncompte [DTI2]" writes:
>> 	iphase driver calls ioremap under spinlock_irqsave in his
>> initialization function. The spinlock seems to be there just for the 
>> sole purpose of preventing initializing multiple cards at once. So I 
>> think that removing it should be fine.
> 
> the lock is necessary to prevent multiple cards from modifying iadev_count
> at the wrong time since iadev_count is incremented and decremented.
> it might be simpler to just make a local copy of iadev_count and just
> always increment iadev_count.  if you fail to init a particular card,
> you will just leave a hole in ia_dev[].  something like the attached.

	I thought that device initialization inside a driver is serialized. isn't it?

> also, ia_remove_one() is broken since it assumes that the cards will be
> removed in the same order that they were installed.
> 
> even better would be to rewrite this to avoid the iadev[] array entirely
> and use a linked list.
> 

	I have a patch that removes iadev and iadev_count enterely that i did not sent because i thought it wouldn't be 
considered a bug fix. I'll sent it this week.

	Thanks for your review,

	-Jorge
-- 
==============================================================
Jorge Boncompte - Ingenieria y Gestion de RED
DTI2 - Desarrollo de la Tecnologia de las Comunicaciones
--------------------------------------------------------------
C/ Abogado Enriquez Barrios, 5   14004 CORDOBA (SPAIN)
Tlf: +34 957 761395 / FAX: +34 957 450380
==============================================================
- Sin pistachos no hay Rock & Roll...
- Without wicker a basket cannot be made.
==============================================================


  reply	other threads:[~2008-06-15 13:00 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-05 16:12 [PATCH][ATM] iphase: BUG: sleeping function called from invalid context Jorge Boncompte [DTI2]
2008-06-14 21:05 ` Chas Williams (CONTRACTOR)
2008-06-15 13:00   ` Jorge Boncompte [DTI2] [this message]
2008-06-15 14:47     ` Chas Williams (CONTRACTOR)

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=48551280.1090706@dti2.net \
    --to=jorge@dti2.net \
    --cc=chas3@users.sourceforge.net \
    --cc=netdev@vger.kernel.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.