Date: Tue, 25 Feb 2003 09:12:13 +0100 (CET) From: Soeren Schmidt <sos@spider.deepcore.dk> To: Anders Andersson <anders@andersa.net> Cc: sparc64@FreeBSD.ORG Subject: Re: sparc does not find ATA disk with new kernel Message-ID: <200302250812.h1P8CDae031207@spider.deepcore.dk> In-Reply-To: <20030224231316.GA71350@sushi.andersa.net>
next in thread | previous in thread | raw e-mail | index | archive | help
OK, could you please try this patch:
Index: ata-chipset.c
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-chipset.c,v
retrieving revision 1.3
diff -u -r1.3 ata-chipset.c
--- ata-chipset.c 23 Feb 2003 16:36:21 -0000 1.3
+++ ata-chipset.c 25 Feb 2003 08:10:26 -0000
@@ -1276,11 +1276,11 @@
struct ata_pci_controller *ctlr = device_get_softc(dev);
struct ata_chip_id *idx;
static struct ata_chip_id ids[] =
- {{ ATA_SII0680, 0x00, SII_SETCLK, 0x00, ATA_UDMA6, "SiI 0680" },
- { ATA_CMD649, 0x00, 0, SII_INTR, ATA_UDMA5, "CMD 649" },
- { ATA_CMD648, 0x00, 0, SII_INTR, ATA_UDMA4, "CMD 648" },
- { ATA_CMD646, 0x07, 0, 0x00, ATA_UDMA2, "CMD 646U2" },
- { ATA_CMD646, 0x00, 0, 0x00, ATA_WDMA2, "CMD 646" },
+ {{ ATA_SII0680, 0x00, 0, SII_SETCLK, ATA_UDMA6, "SiI 0680" },
+ { ATA_CMD649, 0x00, 0, SII_INTR, ATA_UDMA5, "CMD 649" },
+ { ATA_CMD648, 0x00, 0, SII_INTR, ATA_UDMA4, "CMD 648" },
+ { ATA_CMD646, 0x07, 0, SII_ENINTR, ATA_UDMA2, "CMD 646U2" },
+ { ATA_CMD646, 0x00, 0, SII_ENINTR, ATA_WDMA2, "CMD 646" },
{ 0, 0, 0, 0, 0, 0}};
char buffer[64];
@@ -1313,7 +1313,10 @@
return ENXIO;
}
- if (ctlr->chip->cfg1 == SII_SETCLK) {
+ if (ctlr->chip->cfg2 & SII_ENINTR)
+ pci_write_config(dev, 0x71, 0x01, 1);
+
+ if (ctlr->chip->cfg2 & SII_SETCLK) {
if ((pci_read_config(dev, 0x8a, 1) & 0x30) != 0x10)
pci_write_config(dev, 0x8a,
(pci_read_config(dev, 0x8a, 1) & 0x0F) | 0x10, 1);
Index: ata-pci.h
===================================================================
RCS file: /home/ncvs/src/sys/dev/ata/ata-pci.h,v
retrieving revision 1.1
diff -u -r1.1 ata-pci.h
--- ata-pci.h 20 Feb 2003 20:01:01 -0000 1.1
+++ ata-pci.h 25 Feb 2003 08:09:02 -0000
@@ -220,8 +220,9 @@
#define SWKS66 1
#define SWKS100 2
-#define SII_SETCLK 1
#define SII_INTR 0x01
+#define SII_SETCLK 0x02
+#define SII_ENINTR 0x04
#define SIS_SOUTH 1
#define SIS133NEW 2
-Søren
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-sparc" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200302250812.h1P8CDae031207>
