Bug 810579

Summary: builtin CD/DVD drive is ignored on Apple Macintosh Mini PowerPC
Product: [Fedora] Fedora Reporter: John Reiser <jreiser>
Component: kernelAssignee: Kernel Maintainer List <kernel-maint>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 17CC: gansalmon, harald, itamar, jonathan, karsten, kernel-maint, madhu.chinakonda, udev-maint
Target Milestone: ---   
Target Release: ---   
Hardware: powerpc   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-04-19 00:02:41 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/var/log/messages including udev_log="debug"
none
find /sys | grep hdb
none
lspci
none
lspci -n none

Description John Reiser 2012-04-06 20:36:20 UTC
Created attachment 575823 [details]
/var/log/messages including udev_log="debug"

Description of problem: The builtin CD/DVD drive on an Apple Macintosh Mini is not recognized for automounting of media, eject, etc.  Instead /dev/hdb does work manually (mount /dev/hdb /mnt; eject /dev/hdb).  An external drive via USB2.0 does works (and gets /dev/sr0 as its name.)


Version-Release number of selected component (if applicable):
udev-181-2.fc17.ppc
udisks2-1.93.0-1.fc17.ppc
dbus-1.4.10-4.fc17.ppc
gnome-desktop3-3.3.91-1.fc17.ppc
gnome-session-3.3.92-2.fc17.ppc
kernel-3.3.0-1.fc17.ppc


How reproducible: every time


Steps to Reproduce:
1. boot Fedora 17 on Apple Macintosh Mini G4 PowerPC
2. insert CD/DVD with ISO 9660 filesystem
3.
  
Actual results: no attempt to automount the CD/DVD


Expected results: CD/DVD is automounted


Additional info:

Comment 1 John Reiser 2012-04-06 20:37:53 UTC
Created attachment 575824 [details]
find /sys | grep hdb

Here are all the pathnames in /sys that have 'hdb'.

Comment 2 John Reiser 2012-04-06 20:38:35 UTC
Created attachment 575825 [details]
lspci

Comment 3 John Reiser 2012-04-06 20:38:57 UTC
Created attachment 575826 [details]
lspci -n

Comment 4 Kay Sievers 2012-04-07 08:09:22 UTC
Libata drivers need to be used, which create /dev/sr0.

The deprecated IDE drivers are not supported at all in recent userspace or
advanced kernel infrastructure like the media presence polling.

There is no way really, to make them work today, they should not even be compiled.

Comment 5 Josh Boyer 2012-04-09 16:56:38 UTC
There's a long sad history of the powerpc Macs having crappy support in the drivers for ATA stuff.

John, if you rmmod ide_pmac and insmod pata_macio does it bind and create the devices one would expect?

Comment 6 John Reiser 2012-04-09 19:16:26 UTC
There is no module ide_pmac nor ide-pmac (not loaded, nor anywhere in /lib/modules/...), and pata_macio already is loaded.  The complete output of "lsmod" is:
-----
Module                  Size  Used by
ipt_MASQUERADE          2384  1 
nf_conntrack_netbios_ns     1137  0 
nf_conntrack_broadcast     1227  1 nf_conntrack_netbios_ns
ip6table_mangle         1816  1 
ip6t_REJECT             4638  4 
nf_conntrack_ipv6       8560  4 
nf_defrag_ipv6          8882  1 nf_conntrack_ipv6
ip6table_filter         1679  1 
ip6_tables             13923  2 ip6table_filter,ip6table_mangle
iptable_nat             5250  1 
nf_nat                 17898  2 iptable_nat,ipt_MASQUERADE
iptable_mangle          1731  1 
nf_conntrack_ipv4       9022  7 nf_nat,iptable_nat
nf_defrag_ipv4          1493  1 nf_conntrack_ipv4
xt_conntrack            3288  8 
nf_conntrack           73459  8 xt_conntrack,nf_conntrack_ipv4,nf_nat,iptable_nat,nf_conntrack_ipv6,nf_conntrack_broadcast,nf_conntrack_netbios_ns,ipt_MASQUERADE
snd_aoa_codec_toonie     2023  2 
snd_aoa_fabric_layout    10306  0 
snd_aoa                15972  2 snd_aoa_fabric_layout,snd_aoa_codec_toonie
snd_aoa_i2sbus         19836  1 
sungem                 29921  0 
snd_aoa_soundbus        4561  2 snd_aoa_i2sbus,snd_aoa_fabric_layout
i2c_powermac            4276  0 
sungem_phy             12014  1 sungem
snd_pcm                87819  1 snd_aoa_i2sbus
snd_page_alloc          6913  1 snd_pcm
snd_timer              21428  1 snd_pcm
snd                    69787  6 snd_timer,snd_pcm,snd_aoa_i2sbus,snd_aoa,snd_aoa_fabric_layout,snd_aoa_codec_toonie
soundcore               6877  1 snd
pmac_zilog             19181  0 
uinput                  7993  0 
ide_cd_mod             28150  0 
pata_macio             14524  0 
firewire_ohci          34566  0 
firewire_core          58815  1 firewire_ohci
crc_itu_t               1347  1 firewire_core
pmac                   16095  1 
radeon                819427  1 
power_supply           12469  1 radeon
i2c_algo_bit            5835  1 radeon
drm_kms_helper         31114  1 radeon
ttm                    70961  1 radeon
drm                   216810  3 ttm,drm_kms_helper,radeon
i2c_core               27928  5 drm,drm_kms_helper,i2c_algo_bit,radeon,i2c_powermac
-----

Comment 7 Josh Boyer 2012-04-09 19:35:24 UTC
(In reply to comment #6)
> There is no module ide_pmac nor ide-pmac (not loaded, nor anywhere in
> /lib/modules/...), and pata_macio already is loaded.  The complete output of
> "lsmod" is:
> -----
> Module                  Size  Used by
> pmac                   16095  1 

Sorry, my mistake on the name.  This is the one I was talking about.  Blacklist it and try again please.

Comment 8 John Reiser 2012-04-09 20:28:22 UTC
Appending " rdblacklist=pmac" to the kernel boot command line works.  /dev/sr0 and /dev/disk/by-label/<actual-DVD-label> have the right stuff.  Inserting a DVD causes an icon to appear on the Xfce session desktop, and double clicking the icon gets the platter mounted under /run/media/<user>/<actual-DVD-label>. "eject\r" does eject the platter.  The root filesystem is now /dev/sda4 instead of /dev/hda4.  Filesystems on an external USB2.0 disk appear as /dev/sdb* whereas the old names were /dev/sda*.

Comment 9 John Reiser 2012-04-09 20:29:19 UTC
... and module pata_macio now has use count equal to 1.

Comment 10 Josh Boyer 2012-04-10 00:29:04 UTC
Karsten, you had mentioned something similar to this last week.  Does this bug describe the issue you were seeing?

Comment 11 Karsten Hopp 2012-04-10 11:26:45 UTC
Although my problem was early in the installer, this is the same problem. The CD/DVD device uses the old pata (pmac) module when it works just fine with sata.
As udev doesn't have any support for pata devices anymore, userspace will fail.
But as this report shows, even the old Mac Minis work just fine with sata so I think we can get rid of the pac module.

Comment 12 Karsten Hopp 2012-04-10 11:27:26 UTC
s/pac/pmac/, but I think you've already guessed that

Comment 13 Josh Boyer 2012-04-10 13:52:18 UTC
(In reply to comment #12)
> s/pac/pmac/, but I think you've already guessed that

OK.  I'll just turn it off then.  Should be in the next builds.

Comment 14 Josh Boyer 2012-04-10 14:59:34 UTC
Changed in f17/rawhide.  Should be in the next builds of each.

Comment 15 John Reiser 2012-04-11 16:08:32 UTC
ybin and /etc/yaboot.conf do not cooperate with names /dev/sda*.  For example, the old usage was /dev/hda2.  Now /dev/hda2 does not exist, so ybin complains.  ybin won't accept /dev/sda2.  Faking /dev/hda2 -> /dev/sda2 via hardlink or symlink both fail.  I tried adding the line "ofboot=/disk@0:2" to yaboot.conf.  Then ybin accepts it (and "boot=/dev/sda2"_, but actual booting fails (brief "folder with question mark" screen, then menu for linux/macos/openfirmware/cd/net, but typing a letter gets the gray blank screen and CPU hangs.)

I recover with Fedora 12 DVD (boot "linux resuce"), keep a multi-boot setup (Fedora 12, Fedora 15 [for bootstrapping rpm-4.9.1], Fedora 17, MacOSX), and run ybin under Fedora 12.

Comment 16 Karsten Hopp 2012-04-11 16:46:47 UTC
that's not correct. Harddisks already used the sata module in F16 and had /dev/sdX device names. I had /dev/sdX in my f16 yaboot.conf and ybin worked without any problems.

Comment 17 John Reiser 2012-04-11 17:55:16 UTC
That's what I have encountered.  It may be due to problems with how F17 got installed on this box whose last fully-successful install (and running base) was F12, but it _did_ happen.

On my installation of F17, with yaboot-1.3.17-2.fc16.ppc (and "rpm --verify" does not complain), installing a new boot stanza using "ybin" certainly did not work at all the first time, has displayed various problems during attempts to fix it, and booting still does not succeed (except after going back to F12 and running ybin there.)

The first problem was /dev/hda* (as specified in bootstrap from yaboot.conf of F12 when ybin was run under F17, with a stanza that named the correct F17 kernel and initrd) did not exist, so ybin complained and refused to make changes.  After changing yaboot.conf to specify /dev/sda*, then ybin complained that those names were not configured.  After fiddling around trying hardlinks, symlinks, and by adding "ofboot=/disk@0:2" (and later removing that) and a few detours through rescue mode, F12, and F17 (and running ybin under various circumstances) now ybin on F17 does not complain about /dev/sda*.  However, boot does not work.  I see the Apple "no system folder" icon (folder with question mark) briefly, then the text menu for kind of boot (linux/macos/...), but typing a letter results in a hang with full-screen gray.

I will get back to F17, then try yabootconfig in the hope that this will fix stale files in the AppleBootstrap partition.

Comment 18 Josh Boyer 2012-04-19 00:02:41 UTC
This is in 3.3.1-5.