- if ((oshp_run_status != NC_RUN_SUCCESS) && (osc_run_status != NC_RUN_SUCCESS)) {
- err("Fails to gain control of native hot-plug\n");
- rc = -ENODEV;
- }
+ if (!osc_exist) {
+ if (!oshp_exist) {
+ err("Both _OSC and OSHP methods do not exist\n");
+ rc = -ENODEV;
+ } else if (!run_oshp_success) {
+ err("Fails to run OSHP to gain control of native hot-plug\n");
+ rc = -ENODEV;
+ }
+ } else if (!run__osc_success) {
+ err("Fails to run _OSC to gain control of native hot-plug\n");
+ rc = -ENODEV;
+ }
+ dbg("%s: run__osc_success %x osc_exist %x\n", __FUNCTION__,
+ run__osc_success, osc_exist);
+ dbg("%s: run_oshp_success %x oshp_exist %x", __FUNCTION__,
+ run_oshp_success, oshp_exist);