All of lore.kernel.org
 help / color / mirror / Atom feed
From: "MATSUBAYASHI, 'Shaolin' Kohji" <shaolin@rhythmaning.org>
To: Tejun Heo <htejun@gmail.com>
Cc: linux-ide@vger.kernel.org, shaolin@rhythmaning.org
Subject: ata_piix on MacBook4,1: CD/DVD drive often fails to work
Date: Mon, 09 Jun 2008 20:16:28 +0900	[thread overview]
Message-ID: <k6d4mqvoxf.wl%shaolin@rhythmaning.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 3019 bytes --]

Hi,

It happens very often on my MacBook4,1 (still running with i686 kernel
for a certain personal reason, not x86_64 though) that the machine
slows down, gnome CD player suddenly opens (even though there is no CD
media loaded into the drive), and touchpad don't work nicely.

  irq 21: nobody cared (try booting with the "irqpoll" option)
  Disabling IRQ #21


In such a situation, dmesg always shows the following messages
every two seconds which slows down the machine so bad and annoying:

  hda: status error: status=0x59 { DriveReady SeekComplete DataRequest Error }
  hda: status error: error=0x40 { LastFailedSense=0x04 }
  ide: failed opcode was: unknown
  hda: drive not ready for command


Removing ide-cd_mod kernel module would help stopping these
repeating messages though.


The IDE (PATA) controller attached with the CD/DVD drive is:

00:1f.1 IDE interface [0101]: Intel Corporation 82801HBM/HEM (ICH8M/ICH8M-E) IDE Controller [8086:2850] (rev 03) (prog-if 8f [Master SecP SecO PriP PriO])
        Subsystem: Apple Computer Inc. Unknown device [106b:00a1]
        Control: I/O+ Mem- BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B-
        Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
        Latency: 0
        Interrupt: pin A routed to IRQ 21
        Region 0: I/O ports at 6108 [size=8]
        Region 1: I/O ports at 6124 [size=4]
        Region 2: I/O ports at 6100 [size=8]
        Region 3: I/O ports at 6120 [size=4]
        Region 4: I/O ports at 60e0 [size=16]


/proc/interrupts shows like this:

           CPU0       CPU1       
  0:     149053     159890   IO-APIC-edge      timer
  8:          0          3   IO-APIC-edge      rtc
  9:      21652       1462   IO-APIC-fasteoi   acpi
 16:      96958     103303   IO-APIC-fasteoi   uhci_hcd:usb2, uhci_hcd:usb3, i915@pci:0000:00:02.0
 17:      10238         17   IO-APIC-fasteoi   eth0
 18:      75785       3642   IO-APIC-fasteoi   ata_piix, uhci_hcd:usb5
 19:          2          0   IO-APIC-fasteoi   ohci1394
 20:         98         97   IO-APIC-fasteoi   uhci_hcd:usb1, ehci_hcd:usb6, HDA Intel
 21:      39926      36169   IO-APIC-fasteoi   ide0, ehci_hcd:usb4, uhci_hcd:usb7
NMI:          0          0   Non-maskable interrupts
LOC:     505228     495166   Local timer interrupts
RES:     115346     108647   Rescheduling interrupts
CAL:        110      14262   function call interrupts
TLB:        182        184   TLB shootdowns
TRM:          0          0   Thermal event interrupts
SPU:          0          0   Spurious interrupts
ERR:          0
MIS:          0


Then the following patch fixed the problem anyhow at least on my machine
(I suspect changing from ich_pata_100 to ich_pata_66, especially
removing the flag PIIX_FLAG_CHECKINTR, did something good in this case).

I am not certain whether this patch is the right/correct solution
for that, but anyway here's it. Let me know if there's something
I can do for debugging further.

--
Kohji


[-- Attachment #2: ata_piix-pata-apple.patch --]
[-- Type: text/plain, Size: 596 bytes --]

diff --git a/drivers/ata/ata_piix.c b/drivers/ata/ata_piix.c
index 81b7ae3..93b5741 100644
--- a/drivers/ata/ata_piix.c
+++ b/drivers/ata/ata_piix.c
@@ -214,6 +214,8 @@ static const struct pci_device_id piix_pci_tbl[] = {
 	/* ICH7/7-R (i945, i975) UDMA 100*/
 	{ 0x8086, 0x27DF, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 	{ 0x8086, 0x269E, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
+	/* ICH8 Mobile PATA Controller, Apple */
+	{ 0x8086, 0x2850, 0x106b, 0x00a1, 0, 0, ich_pata_66 },
 	/* ICH8 Mobile PATA Controller */
 	{ 0x8086, 0x2850, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich_pata_100 },
 

             reply	other threads:[~2008-06-09 11:24 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-09 11:16 MATSUBAYASHI, 'Shaolin' Kohji [this message]
2008-06-09 13:11 ` ata_piix on MacBook4,1: CD/DVD drive often fails to work MATSUBAYASHI, 'Shaolin' Kohji
2008-06-09 13:46   ` Tejun Heo

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=k6d4mqvoxf.wl%shaolin@rhythmaning.org \
    --to=shaolin@rhythmaning.org \
    --cc=htejun@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 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.