From: Thibaut VARENE <T-Bone@parisc-linux.org>
To: linux-ide@vger.kernel.org
Cc: akpm@osdl.org, bzolnier@gmail.com, benh@kernel.crashing.org
Subject: [PATCH] Restore support for AEC6280M cards in aec62xx.c
Date: Sun, 11 Dec 2005 00:05:36 +0100 [thread overview]
Message-ID: <20051211000536.5bd822dd@localhost.localdomain> (raw)
[-- Attachment #1: Type: text/plain, Size: 941 bytes --]
Hi
This patch was initially sent to linux-ide about a month ago, and was
supposed to hit -mm, see:
http://marc.theaimsgroup.com/?l=linux-ide&m=113161988518500&w=2
As I didn't see this happening, I'm resending the patch, diff'd against
2.6.15-rc5. It fixes a serious bug that has been in the kernel for ages,
preventing users of Macintosh-flavoured AEC cards to use them with Linux.
The code has been brought up with the help of Benh.
HTH
T-Bone
ide-pci-aec62xx-maccards.diff:
This patch adds missing initialization sequence, necessary to get the
"Macintosh" version of AEC6280 cards to work in Linux. Without this
patch, the driver hangs for several minutes trying to initialize the
card and the kernel is left in an unstable state. This patch has been
tested fine on ppc and i386.
Signed-off-by: Thibaut VARENE <varenet@parisc-linux.org>
drivers/ide/pci/aec62xx.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
[-- Attachment #2: ide-pci-aec62xx-maccards.diff --]
[-- Type: text/x-patch, Size: 884 bytes --]
--- linux-2.6.15-rc5/drivers/ide/pci/aec62xx.c.orig 2005-12-10 23:47:10.000000000 +0100
+++ linux-2.6.15-rc5/drivers/ide/pci/aec62xx.c 2005-12-10 23:48:51.000000000 +0100
@@ -262,6 +262,21 @@
else
pci_set_drvdata(dev, (void *) aec6xxx_34_base);
+ /* These are necessary to get AEC6280 Macintosh cards to work */
+ if ((dev->device == PCI_DEVICE_ID_ARTOP_ATP865) ||
+ (dev->device == PCI_DEVICE_ID_ARTOP_ATP865R)) {
+ u8 reg49h = 0, reg4ah = 0;
+ /* Clear reset and test bits. */
+ pci_read_config_byte(dev, 0x49, ®49h);
+ pci_write_config_byte(dev, 0x49, reg49h & ~0x30);
+ /* Enable chip interrupt output. */
+ pci_read_config_byte(dev, 0x4a, ®4ah);
+ pci_write_config_byte(dev, 0x4a, reg4ah & ~0x01);
+ /* Enable burst mode. */
+ pci_read_config_byte(dev, 0x4a, ®4ah);
+ pci_write_config_byte(dev, 0x4a, reg4ah | 0x80);
+ }
+
return dev->irq;
}
reply other threads:[~2005-12-10 23:05 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20051211000536.5bd822dd@localhost.localdomain \
--to=t-bone@parisc-linux.org \
--cc=akpm@osdl.org \
--cc=benh@kernel.crashing.org \
--cc=bzolnier@gmail.com \
--cc=linux-ide@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;
as well as URLs for NNTP newsgroup(s).