mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Atanasov <alex@ssi.bg>
To: Stefan Talpalaru <stefantalpalaru@yahoo.com>
Cc: linux-kernel@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>
Subject: Re: PATCH: CMD640 IDE chipset
Date: Wed, 29 Oct 2003 14:48:45 +0200	[thread overview]
Message-ID: <20031029144845.14d57ba6.alex@ssi.bg> (raw)
In-Reply-To: <20031029121218.56602.qmail@web20606.mail.yahoo.com>

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

  reply	other threads:[~2003-10-29 12:49 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 [this message]
2003-11-10 12:28       ` Stefan Talpalaru
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=20031029144845.14d57ba6.alex@ssi.bg \
    --to=alex@ssi.bg \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stefantalpalaru@yahoo.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

all inboxes | Powered by JetHome®