FreeBSD Bugzilla – Attachment 54360 Details for
Bug 82261
DMA-support on Sparc64 broken
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
ata-chipset.c.diff2
ata-chipset.c.diff2 (text/plain; charset=us-ascii), 2.52 KB, created by
marius
on 2005-08-20 00:59:06 UTC
(
hide
)
Description:
ata-chipset.c.diff2
Filename:
MIME Type:
Creator:
marius
Created:
2005-08-20 00:59:06 UTC
Size:
2.52 KB
patch
obsolete
>Index: ata-chipset.c >=================================================================== >RCS file: /mnt/futile/usr/data/bsd/cvs/fbsd/src/sys/dev/ata/ata-chipset.c,v >retrieving revision 1.129 >diff -u -r1.129 ata-chipset.c >--- ata-chipset.c 17 Aug 2005 15:00:33 -0000 1.129 >+++ ata-chipset.c 19 Aug 2005 23:31:11 -0000 >@@ -76,6 +76,7 @@ > static int ata_ali_allocate(device_t dev); > static int ata_ali_sata_allocate(device_t dev); > static void ata_ali_setmode(device_t dev, int mode); >+static void ata_ali_new_reset(device_t dev); > static int ata_amd_chipinit(device_t dev); > static int ata_cyrix_chipinit(device_t dev); > static void ata_cyrix_setmode(device_t dev, int mode); >@@ -878,10 +879,13 @@ > break; > > case ALINEW: >- /* deactivate the ATAPI FIFO and enable ATAPI UDMA */ >+ /* enable ATAPI UDMA */ > pci_write_config(dev, 0x53, > pci_read_config(dev, 0x53, 1) | 0x01, 1); > >+ /* use interrupt to indicate zero count instead of ATA66 byte counter */ >+ pci_write_config(dev, 0x4a, pci_read_config(dev, 0x4a, 1) | 0x20, 1); >+ > /* enable cable detection and UDMA support on newer chips */ > pci_write_config(dev, 0x4b, pci_read_config(dev, 0x4b, 1) | 0x09, 1); > >@@ -891,6 +895,7 @@ > "using PIO transfers above 137GB as workaround for " > "48bit DMA access bug, expect reduced performance\n"); > ctlr->allocate = ata_ali_allocate; >+ ctlr->reset = ata_ali_new_reset; > ctlr->setmode = ata_ali_setmode; > break; > >@@ -1025,6 +1030,41 @@ > } > } > >+static void >+ata_ali_new_reset(device_t dev) >+{ >+ device_t parent = device_get_parent(dev); >+ struct ata_pci_controller *ctlr = device_get_softc(parent); >+ struct ata_channel *ch = device_get_softc(dev); >+ device_t *children; >+ int nchildren, i; >+ u_int8_t ideic; >+ >+ ata_generic_reset(dev); >+ if (ctlr->chip->chiprev < 0xc4) { >+ /* >+ * After a reset disable and reenable the channel via the IDE >+ * interface control bits of the ISA part in the southbridge. >+ * This works around a bug in the IDE part which causes data >+ * corruption in UDMA modes. >+ */ >+ if (!device_get_children(device_get_parent(parent), &children, >+ &nchildren)) { >+ for (i = 0; i < nchildren; i++) { >+ if (pci_get_devid(children[i]) == 0x153310b9) { >+ ideic = pci_read_config(children[i], 0x58, 1); >+ pci_write_config(children[i], 0x58, >+ ideic & ~(0x04 << ch->unit), 1); >+ ata_udelay(1000); >+ pci_write_config(children[i], 0x58, ideic, 1); >+ break; >+ } >+ } >+ free(children, M_TEMP); >+ } >+ } >+} >+ > > /* > * American Micro Devices (AMD) chipset support functions
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 82261
:
54359
| 54360