Modify

Opened 12 years ago

Closed 11 years ago

#272 closed defect (fixed)

IDE DMA kills WL-HDD

Reported by: nbd Owned by: nbd
Priority: normal Milestone: Kamikaze 7.06
Component: base system Version: 1.0
Keywords: Cc:

Description

As soon as I enable DMA on the WL-HDD using hdparm, it reboots immediately.

Attachments (1)

006-ide_workaround.patch (2.0 KB) - added by b.sander 11 years ago.
* new * enhanced ide_workaround patch for brcm-2.4 target

Download all attachments as: .zip

Change History (10)

comment:1 Changed 12 years ago by nbd

  • Milestone 1.0-rc5 deleted

comment:2 Changed 12 years ago by kaloz

  • Milestone set to 1.0-rc6

comment:3 Changed 12 years ago by james.cameron@…

On RC5 with WL-HDD, hdparm 6.3 shows DMA is already enabled after boot. Contrary to above, turning DMA off causes a reboot.

A build of hddtemp 0.3-beta14 also causes a reboot when it is asked to read the drive temperature.

(Since hdparm and hddtemp are not OpenWrt packages, do you really have to worry about it?)

comment:4 Changed 11 years ago by anonymous

But is there an other way to make the harddrive spinning down after some minutes?

Changed 11 years ago by b.sander

  • new * enhanced ide_workaround patch for brcm-2.4 target

comment:5 Changed 11 years ago by b.sander

the 006-ide_workaround.patch is for Kamikaze Kernel. this fix the hard-lockup on WL-HDD (e.g. hdparm -I or hddtemp).

comment:6 Changed 11 years ago by nbd

  • Milestone changed from 0.9/rc6 to Kamikaze

comment:7 Changed 11 years ago by nbd

  • Milestone changed from Kamikaze to Kamikaze Milestone 1

comment:8 Changed 11 years ago by b.sander

Just in case ...

--- linux-2.4.34/drivers/ide/pci/pdc202xx_old.bak	2006-12-23 21:34:20.000000000 +0100
+++ linux-2.4.34/drivers/ide/pci/pdc202xx_old.c	2007-01-24 18:03:28.000000000 +0100
@@ -253,23 +253,23 @@
 	pci_read_config_byte(dev, (drive_pci)|0x03, &DP);
 
 	if (speed < XFER_SW_DMA_0) {
-		if ((AP & 0x0F) || (BP & 0x07)) {
+		if ((AP & 0x0F) || (BP & 0x17)) {
 			/* clear PIO modes of lower 8421 bits of A Register */
 			pci_write_config_byte(dev, (drive_pci), AP &~0x0F);
 			pci_read_config_byte(dev, (drive_pci), &AP);
 
 			/* clear PIO modes of lower 421 bits of B Register */
-			pci_write_config_byte(dev, (drive_pci)|0x01, BP &~0x07);
+			pci_write_config_byte(dev, (drive_pci)|0x01, BP &~0x17);
 			pci_read_config_byte(dev, (drive_pci)|0x01, &BP);
 
 			pci_read_config_byte(dev, (drive_pci), &AP);
 			pci_read_config_byte(dev, (drive_pci)|0x01, &BP);
 		}
 	} else {
-		if ((BP & 0xF0) && (CP & 0x0F)) {
+		if ((BP & 0xE0) && (CP & 0x0F)) {
 			/* clear DMA modes of upper 842 bits of B Register */
 			/* clear PIO forced mode upper 1 bit of B Register */
-			pci_write_config_byte(dev, (drive_pci)|0x01, BP &~0xF0);
+			pci_write_config_byte(dev, (drive_pci)|0x01, BP &~0xE0);
 			pci_read_config_byte(dev, (drive_pci)|0x01, &BP);
 
 			/* clear DMA modes of lower 8421 bits of C Register */
@@ -373,6 +373,9 @@
 	u8 ultra_66		= ((id->dma_ultra & 0x0010) ||
 				   (id->dma_ultra & 0x0008)) ? 1 : 0;
 
+	if (hwif->rqsize != 256)
+		hwif->rqsize = 256;
+
 	switch(dev->device) {
 		case PCI_DEVICE_ID_PROMISE_20267:
 		case PCI_DEVICE_ID_PROMISE_20265:

comment:9 Changed 11 years ago by nbd

  • Resolution set to fixed
  • Status changed from new to closed

added in [7093]

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.