All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mickael Marchand <marchand@kde.org>
To: Jeff Garzik <jgarzik@pobox.com>
Cc: linux-kernel@vger.kernel.org,
	Bartlomiej Zolnierkiewicz <B.Zolnierkiewicz@elka.pw.edu.pl>,
	"Justin T. Gibbs" <gibbs@scsiguy.com>,
	Hugo Mills <hugo-lkml@carfax.org.uk>
Subject: Re: [PATCH] adaptec 1210sa
Date: Wed, 31 Dec 2003 12:25:39 +0100	[thread overview]
Message-ID: <200312311225.43794.marchand@kde.org> (raw)
In-Reply-To: <3FF21648.8030604@pobox.com>

[-- Attachment #1: Type: Text/Plain, Size: 1003 bytes --]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I can't test atm, I will test it in a few days.

here is the patch I used (the previous one was incomplete - diffed against the 
wrong file-), it includes the PCI ids you need.

Cheers,
Mik

Le Wednesday 31 December 2003 01:20, vous avez écrit :
> Mickael Marchand wrote:
> > reading linux-scsi I found a suggestion by Justin to make adaptec's 1210
> > sa working. I made the corresponding patch for libata, and it actually
> > works :)
> >
> > it needs  some redesign to only apply to aar1210 (as standard sil3112
> > does not need it) and I guess some testing before inclusion.
>
> Here is the patch I'm applying.  Please test and let me know how it goes.
>
> Also, someone please send me a patch for the PCI ids :)
>
> 	Jeff
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (GNU/Linux)

iD8DBQE/8rI2yOYzc4nQ8j0RAkLnAJ9PuvWKuQNTszOEajMBOKrDiR1WiwCaA2Wl
ASO6sogwJ696le2lvrwZyhI=
=bLBK
-----END PGP SIGNATURE-----

[-- Attachment #2: aar1210sa.diff --]
[-- Type: text/x-diff, Size: 1278 bytes --]

--- linux-2.4.23/drivers/scsi/sata_sil.c	2003-12-31 12:22:36.000000000 +0100
+++ linux-2.4.23.moria/drivers/scsi/sata_sil.c	2003-12-22 12:03:57.000000000 +0100
@@ -39,6 +39,7 @@
 
 enum {
 	sil_3112		= 0,
+	aar1210sa		= 1,
 
 	SIL_IDE0_TF		= 0x80,
 	SIL_IDE0_CTL		= 0x8A,
@@ -62,6 +63,7 @@
 
 static struct pci_device_id sil_pci_tbl[] = {
 	{ 0x1095, 0x3112, PCI_ANY_ID, PCI_ANY_ID, 0, 0, sil_3112 },
+	{ 0x1095, 0x0240, PCI_ANY_ID, PCI_ANY_ID, 0, 0, aar1210sa },
 	{ }	/* terminate list */
 };
 
@@ -122,6 +124,15 @@
 		.udma_mask	= 0x7f,			/* udma0-6; FIXME */
 		.port_ops	= &sil_ops,
 	},
+	/* aar1210sa */
+	{
+		.sht		= &sil_sht,
+		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_NO_LEGACY |
+				  ATA_FLAG_SRST | ATA_FLAG_MMIO,
+		.pio_mask	= 0x03,			/* pio3-4 */
+		.udma_mask	= 0x7f,			/* udma0-6; FIXME */
+		.port_ops	= &sil_ops,
+	},
 };
 
 MODULE_AUTHOR("Jeff Garzik");
@@ -263,6 +274,15 @@
 		goto err_out_regions;
 	}
 
+	u8 v;
+	pci_read_config_byte(pdev, 0x8a, &v);
+	int mask = 0x3f; //clear 6 and 7 bits
+	if (v & ~mask) {
+		printk("Reenabling interrupts because Adaptec's BIOS disables them\n" );
+		v &= mask;
+		pci_write_config_byte(pdev, 0x8a, v);
+	}
+
 	memset(probe_ent, 0, sizeof(*probe_ent));
 	INIT_LIST_HEAD(&probe_ent->node);
 	probe_ent->pdev = pdev;

  reply	other threads:[~2003-12-31 11:26 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-12-22  2:05 [PATCH] adaptec 1210sa Mickael Marchand
2003-12-30 23:34 ` Jeff Garzik
2003-12-30 23:57   ` Justin T. Gibbs
2003-12-30 23:55     ` Jeff Garzik
2003-12-31  0:10   ` Hugo Mills
2003-12-30 23:51 ` Jeff Garzik
2003-12-31  0:20 ` Jeff Garzik
2003-12-31 11:25   ` Mickael Marchand [this message]
2004-01-03 20:46   ` Mickael Marchand

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=200312311225.43794.marchand@kde.org \
    --to=marchand@kde.org \
    --cc=B.Zolnierkiewicz@elka.pw.edu.pl \
    --cc=gibbs@scsiguy.com \
    --cc=hugo-lkml@carfax.org.uk \
    --cc=jgarzik@pobox.com \
    --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 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.