mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Talpalaru <stefantalpalaru@yahoo.com>
To: Alexander Atanasov <alex@ssi.bg>
Cc: linux-kernel@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Subject: Re: PATCH: CMD640 IDE chipset
Date: Mon, 10 Nov 2003 04:28:01 -0800 (PST)	[thread overview]
Message-ID: <20031110122801.16452.qmail@web20605.mail.yahoo.com> (raw)
In-Reply-To: <20031029144845.14d57ba6.alex@ssi.bg>

Hello Alexander!

> 	Hello,
> On Wed, 29 Oct 2003 04:12:18 -0800 (PST)
> Stefan Talpalaru <stefantalpalaru@yahoo.com> wrote:
> > and also some useless code (the wrapers: __put_cmd640_reg() and 
> > __get_cmd640_reg() - which I removed and placed the locks where
> > needed; the pci_conf1() and pci_conf2() functions).
> 	These wrappers were added to correct the locking in
> driver. There are places that you must access serveral registers

 where?

> holding the lock and that's why the wrappers came, so they
> are not useless. The locking in your patch is wrong -

  They are ugly.

> the problem is that you call get_cmd640_reg or put_cmd640_reg, which
> try to take ide_lock, while already holding it and it's a deadlock 

  I find it hard to believe (I'm running a patched kernel right now!),
but
 i'm only a newbie at kernel hacking, so please show me the light (not
joking).
  Thanks in advance.

> - thats what the wrappers solved. So, please , drop that change.
>        setup_count |= __get_cmd640_reg(arttim_regs[index]) & 0x3f;
> -       __put_cmd640_reg(arttim_regs[index], setup_count);
> -       __put_cmd640_reg(drwtim_regs[index],
pack_nibbles(active_count, recovery
> _count));
> +       setup_count |= get_cmd640_reg(arttim_regs[index]) & 0x3f;
> +       put_cmd640_reg(arttim_regs[index], setup_count);
> +       put_cmd640_reg(drwtim_regs[index], pack_nibbles(active_count,
recovery_c
> ount));
>         spin_unlock_irqrestore(&ide_lock, flags);
>  }
> 	here
> -       __put_cmd640_reg(reg, b);
> +       put_cmd640_reg(reg, b);
>         spin_unlock_irqrestore(&ide_lock, flags);
> 	and here for example.
> --
> have fun,
> alex

later,


=====
Stefan Talpalaru

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree

  reply	other threads:[~2003-11-10 12:28 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-10-27 12:26 CMD640 ide driver made to work Stefan Talpalaru
2003-10-27 14:35 ` Bartlomiej Zolnierkiewicz
2003-10-29 12:12   ` PATCH: CMD640 IDE chipset Stefan Talpalaru
2003-10-29 12:48     ` Alexander Atanasov
2003-11-10 12:28       ` Stefan Talpalaru [this message]
2003-10-29 19:36     ` Bartlomiej Zolnierkiewicz
2003-11-10 12:32       ` Stefan Talpalaru
2003-11-10 13:00       ` Stefan Talpalaru
2003-11-11 16:50         ` Bartlomiej Zolnierkiewicz
2003-11-11 17:26           ` Bartlomiej Zolnierkiewicz

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=20031110122801.16452.qmail@web20605.mail.yahoo.com \
    --to=stefantalpalaru@yahoo.com \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=alex@ssi.bg \
    --cc=linux-kernel@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 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®