Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.1:Rings:1-MinimalX
mdadm
0002-imsm-support-for-second-and-combined-AHCI-...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-imsm-support-for-second-and-combined-AHCI-controller.patch of Package mdadm
Commit: 81188ef870ead9121d66287eb2ced28a25a1e8d4 From: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Date: Wed, 19 Nov 2014 13:53:27 +0100 Subject: [PATCH 2/5] imsm: support for second and combined AHCI controllers in UEFI mode References: FATE#318193 Grantly platform introduces a second AHCI controller (sSATA) and two new UEFI variables for the RSTe firmware. This patch adds support for those variables in order to correctly determine IMSM platform capabilities in UEFI mode. Signed-off-by: Artur Paszkiewicz <artur.paszkiewicz@intel.com> Signed-off-by: NeilBrown <neilb@suse.de> --- platform-intel.c | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) --- a/platform-intel.c +++ b/platform-intel.c @@ -401,6 +401,8 @@ static const struct imsm_orom *find_imsm #define SYS_EFI_VAR_PATH "/sys/firmware/efi/vars" #define SCU_PROP "RstScuV" #define AHCI_PROP "RstSataV" +#define AHCI_SSATA_PROP "RstsSatV" +#define AHCI_CSATA_PROP "RstCSatV" #define VENDOR_GUID \ EFI_GUID(0x193dfefa, 0xa445, 0x4302, 0x99, 0xd8, 0xef, 0x3a, 0xad, 0x1a, 0x04, 0xc6) @@ -455,6 +457,7 @@ const struct imsm_orom *find_imsm_efi(st { struct imsm_orom orom; const struct imsm_orom *ret; + int err; if (check_env("IMSM_TEST_AHCI_EFI") || check_env("IMSM_TEST_SCU_EFI")) return imsm_platform_test(hba); @@ -466,7 +469,26 @@ const struct imsm_orom *find_imsm_efi(st if (hba->type == SYS_DEV_SATA && hba->class != PCI_CLASS_RAID_CNTRL) return NULL; - if (read_efi_variable(&orom, sizeof(orom), hba->type == SYS_DEV_SAS ? SCU_PROP : AHCI_PROP, VENDOR_GUID)) + err = read_efi_variable(&orom, sizeof(orom), hba->type == SYS_DEV_SAS ? SCU_PROP : AHCI_PROP, VENDOR_GUID); + + /* try to read variable for second AHCI controller */ + if (err && hba->type == SYS_DEV_SATA) + err = read_efi_variable(&orom, sizeof(orom), AHCI_SSATA_PROP, VENDOR_GUID); + + /* try to read variable for combined AHCI controllers */ + if (err && hba->type == SYS_DEV_SATA) { + static const struct imsm_orom *csata; + + err = read_efi_variable(&orom, sizeof(orom), AHCI_CSATA_PROP, VENDOR_GUID); + if (!err) { + if (!csata) + csata = add_orom(&orom); + add_orom_device_id(csata, hba->dev_id); + return csata; + } + } + + if (err) return NULL; ret = add_orom(&orom);
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor