mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alan Cox <alan@lxorguk.ukuu.org.uk>
To: martin@dalecki.de
Cc: Linus Torvalds <torvalds@transmeta.com>,
	Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] 2.5.29 IDE 109
Date: 30 Jul 2002 11:59:48 +0100	[thread overview]
Message-ID: <1028026788.6726.13.camel@irongate.swansea.linux.org.uk> (raw)
In-Reply-To: <3D45AAB4.1030409@evision.ag>

Martin. The CS5530 one seems unneeded looking at the databook. Try the
patch below instead, which removes the irq lock and uses the proper
kernel functions to enable MWI and master.

I'm not sure I like the fact you've deleted the ide-tape documentation.
IDE tape is a pretty tricky thing, especially all the command handling
weirdnesses. How about moving it into Changelog.idetape if you dont want
it in the code itself ?

diff -u --exclude-from /usr/src/exclude --new-file --recursive linux-2.5.29/drivers/ide/cs5530.c linux-2.5.29-ac1/drivers/ide/cs5530.c
--- linux-2.5.29/drivers/ide/cs5530.c	2002-07-27 15:33:52.000000000 +0100
+++ linux-2.5.29-ac1/drivers/ide/cs5530.c	2002-07-28 00:41:53.000000000 +0100
@@ -218,6 +218,7 @@
 			}
 		}
 	}
+
 	if (!master_0) {
 		printk("%s: unable to locate PCI MASTER function\n", dev->name);
 		return 0;
@@ -227,15 +228,13 @@
 		return 0;
 	}
 
-	save_flags(flags);
-	cli();	/* all CPUs (there should only be one CPU with this chipset) */
-
 	/*
 	 * Enable BusMaster and MemoryWriteAndInvalidate for the cs5530:
 	 * -->  OR 0x14 into 16-bit PCI COMMAND reg of function 0 of the cs5530
 	 */
-	pci_read_config_word (cs5530_0, PCI_COMMAND, &pcicmd);
-	pci_write_config_word(cs5530_0, PCI_COMMAND, pcicmd | PCI_COMMAND_MASTER | PCI_COMMAND_INVALIDATE);
+	 
+	pci_set_master(cs5530_0);
+	pci_set_mwi(cs5530_0);
 
 	/*
 	 * Set PCI CacheLineSize to 16-bytes:
@@ -274,8 +273,6 @@
 	pci_write_config_byte(master_0, 0x42, 0x00);
 	pci_write_config_byte(master_0, 0x43, 0xc1);
 
-	restore_flags(flags);
-
 	return 0;
 }
 

  reply	other threads:[~2002-07-30  9:40 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-27  3:12 Linux v2.5.29 Linus Torvalds
2002-07-27  3:23 ` Linus Torvalds
2002-07-27  6:26 ` Rusty Russell
2002-07-27  9:06 ` 2.5.29: oops on boot Ville Herva
2002-07-27  9:33   ` Ville Herva
2002-07-27 11:40 ` Linux v2.5.29 Peter Osterlund
2002-07-29 19:27 ` [PATCH] 2.5.29 IDE 108 Marcin Dalecki
2002-07-30 11:02   ` Alan Cox
2002-07-30  9:45     ` Marcin Dalecki
2002-07-29 20:51 ` [PATCH] 2.5.29 IDE 109 Marcin Dalecki
2002-07-30 10:59   ` Alan Cox [this message]
2002-07-30  9:51     ` Marcin Dalecki

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=1028026788.6726.13.camel@irongate.swansea.linux.org.uk \
    --to=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=martin@dalecki.de \
    --cc=torvalds@transmeta.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®