From 01da8ef85f8ac07fe5f320ce6739c990986fd7a4 Mon Sep 17 00:00:00 2001 From: Pascal Rigaux Date: Tue, 30 Aug 2005 09:25:24 +0000 Subject: ahci says "ahci: probe of %s failed with error %d", but succeeds anyway, so we need to handle the ahci/ata_piix case otherwise --- perl-install/modules.pm | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) (limited to 'perl-install/modules.pm') diff --git a/perl-install/modules.pm b/perl-install/modules.pm index d176eed89..56ab526a3 100644 --- a/perl-install/modules.pm +++ b/perl-install/modules.pm @@ -132,22 +132,19 @@ sub load_category { if_($category =~ /net/, 'bmac', 'gmac', 'mace', 'airport'), ) : (), ); - my @l = (probe_category($category), - map { { driver => $_, description => $_, try => 1 } } @try_modules); + my @l = ( + (map { + my $other = { ahci => 'ata_piix', ata_piix => 'ahci' }->{$_->{driver}}; + ($_, if_($other, { %$_, driver => $other })); + } probe_category($category)), + (map { { driver => $_, description => $_, try => 1 } } @try_modules), + ); foreach (@l) { $o_wait_message->($_->{description}, $_->{driver}) if $o_wait_message; eval { load_and_configure($conf, $_->{driver}, $_->{options}) }; $_->{error} = $@; - if ($_->{error} && member($_->{driver}, 'ahci', 'ata_piix')) { - #- HACK: ahci and ata_piix handle the same hardware, it only depends on the bios configuration - my $other = $_->{driver} eq 'ahci' ? 'ata_piix' : 'ahci'; - log::l("failure loading $_->{driver}, trying $other instead (error is: $_->{error})"); - $_->{driver} = $other; - redo; - } - $_->{try} = 1 if member($_->{driver}, 'hptraid', 'ohci1394'); #- do not warn when this fails } grep { !($_->{error} && $_->{try}) } @l; -- cgit v1.2.1