diff options
author | Dan Williams <dan.j.williams@intel.com> | 2011-03-11 13:43:57 -0500 |
---|---|---|
committer | Dan Williams <dan.j.williams@intel.com> | 2011-07-03 06:55:31 -0400 |
commit | 4711ba10b13891edf228944a9d0a21dfe7fe90f0 (patch) | |
tree | c846eb029eb2bc827a614df963b00aa412b95956 /drivers | |
parent | 2e8320f751030a12efc3e64ee857bfa4647f81fe (diff) |
isci: fix oem parameter initialization and mode detection
1/ Since commit 858d4aa7 "isci: Move firmware loading to per PCI device" we have
been silently falling back to built-in defaults for the parameter settings by
skipping the call to scic_oem_parameters_set().
2/ The afe parameters from the firmware were not being honored
3/ The latest oem parameter definition flips the mode_type values which are
now 0: for APC 1: for MPC. For APC we need to make sure all the phys
default to the same address otherwise strict_wide_ports will cause duplicate
domains.
4/ Fix up the driver announcement to indicate the source of the
parameters.
5/ Fix up the sas addresses to be unique per controller (in the fallback case)
Signed-off-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/scsi/isci/core/sci_base_controller.h | 2 | ||||
-rw-r--r-- | drivers/scsi/isci/core/scic_sds_controller.c | 30 | ||||
-rw-r--r-- | drivers/scsi/isci/firmware/create_fw.c | 11 | ||||
-rw-r--r-- | drivers/scsi/isci/firmware/create_fw.h | 39 | ||||
-rw-r--r-- | drivers/scsi/isci/host.c | 30 | ||||
-rw-r--r-- | drivers/scsi/isci/init.c | 6 | ||||
-rw-r--r-- | drivers/scsi/isci/probe_roms.c | 5 | ||||
-rw-r--r-- | drivers/scsi/isci/probe_roms.h | 8 |
8 files changed, 73 insertions, 58 deletions
diff --git a/drivers/scsi/isci/core/sci_base_controller.h b/drivers/scsi/isci/core/sci_base_controller.h index 36c53406ea5a..8e0c46f8b221 100644 --- a/drivers/scsi/isci/core/sci_base_controller.h +++ b/drivers/scsi/isci/core/sci_base_controller.h | |||
@@ -289,8 +289,6 @@ static inline void sci_base_controller_construct( | |||
289 | u32 mde_count, | 289 | u32 mde_count, |
290 | struct sci_base_memory_descriptor_list *next_mdl) | 290 | struct sci_base_memory_descriptor_list *next_mdl) |
291 | { | 291 | { |
292 | scic_base->parent.private = NULL; | ||
293 | |||
294 | sci_base_state_machine_construct( | 292 | sci_base_state_machine_construct( |
295 | &scic_base->state_machine, | 293 | &scic_base->state_machine, |
296 | &scic_base->parent, | 294 | &scic_base->parent, |
diff --git a/drivers/scsi/isci/core/scic_sds_controller.c b/drivers/scsi/isci/core/scic_sds_controller.c index 12b2ad5a28b0..b0edd8408fe7 100644 --- a/drivers/scsi/isci/core/scic_sds_controller.c +++ b/drivers/scsi/isci/core/scic_sds_controller.c | |||
@@ -595,6 +595,7 @@ void scic_sds_controller_enable_port_task_scheduler( | |||
595 | */ | 595 | */ |
596 | void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | 596 | void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) |
597 | { | 597 | { |
598 | const struct scic_sds_oem_params *oem = &scic->oem_parameters.sds1; | ||
598 | u32 afe_status; | 599 | u32 afe_status; |
599 | u32 phy_id; | 600 | u32 phy_id; |
600 | 601 | ||
@@ -632,6 +633,8 @@ void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | |||
632 | } | 633 | } |
633 | 634 | ||
634 | for (phy_id = 0; phy_id < SCI_MAX_PHYS; phy_id++) { | 635 | for (phy_id = 0; phy_id < SCI_MAX_PHYS; phy_id++) { |
636 | const struct sci_phy_oem_params *oem_phy = &oem->phys[phy_id]; | ||
637 | |||
635 | if (is_b0()) { | 638 | if (is_b0()) { |
636 | /* Configure transmitter SSC parameters */ | 639 | /* Configure transmitter SSC parameters */ |
637 | scu_afe_txreg_write(scic, phy_id, afe_tx_ssc_control, 0x00030000); | 640 | scu_afe_txreg_write(scic, phy_id, afe_tx_ssc_control, 0x00030000); |
@@ -691,16 +694,16 @@ void scic_sds_controller_afe_initialization(struct scic_sds_controller *scic) | |||
691 | } | 694 | } |
692 | udelay(AFE_REGISTER_WRITE_DELAY); | 695 | udelay(AFE_REGISTER_WRITE_DELAY); |
693 | 696 | ||
694 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control0, 0x000E7C03); | 697 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control0, oem_phy->afe_tx_amp_control0); |
695 | udelay(AFE_REGISTER_WRITE_DELAY); | 698 | udelay(AFE_REGISTER_WRITE_DELAY); |
696 | 699 | ||
697 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control1, 0x000E7C03); | 700 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control0, oem_phy->afe_tx_amp_control1); |
698 | udelay(AFE_REGISTER_WRITE_DELAY); | 701 | udelay(AFE_REGISTER_WRITE_DELAY); |
699 | 702 | ||
700 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control2, 0x000E7C03); | 703 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control0, oem_phy->afe_tx_amp_control2); |
701 | udelay(AFE_REGISTER_WRITE_DELAY); | 704 | udelay(AFE_REGISTER_WRITE_DELAY); |
702 | 705 | ||
703 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control3, 0x000E7C03); | 706 | scu_afe_txreg_write(scic, phy_id, afe_tx_amp_control0, oem_phy->afe_tx_amp_control3); |
704 | udelay(AFE_REGISTER_WRITE_DELAY); | 707 | udelay(AFE_REGISTER_WRITE_DELAY); |
705 | } | 708 | } |
706 | 709 | ||
@@ -2027,6 +2030,7 @@ void scic_sds_controller_release_frame( | |||
2027 | */ | 2030 | */ |
2028 | static void scic_sds_controller_set_default_config_parameters(struct scic_sds_controller *scic) | 2031 | static void scic_sds_controller_set_default_config_parameters(struct scic_sds_controller *scic) |
2029 | { | 2032 | { |
2033 | struct isci_host *ihost = sci_object_get_association(scic); | ||
2030 | u16 index; | 2034 | u16 index; |
2031 | 2035 | ||
2032 | /* Default to APC mode. */ | 2036 | /* Default to APC mode. */ |
@@ -2058,7 +2062,7 @@ static void scic_sds_controller_set_default_config_parameters(struct scic_sds_co | |||
2058 | * is worked around by having the upper 32-bits of SAS address | 2062 | * is worked around by having the upper 32-bits of SAS address |
2059 | * with a value greater then the Vitesse company identifier. | 2063 | * with a value greater then the Vitesse company identifier. |
2060 | * Hence, usage of 0x5FCFFFFF. */ | 2064 | * Hence, usage of 0x5FCFFFFF. */ |
2061 | scic->oem_parameters.sds1.phys[index].sas_address.low = 0x00000001; | 2065 | scic->oem_parameters.sds1.phys[index].sas_address.low = 0x1 + ihost->id; |
2062 | scic->oem_parameters.sds1.phys[index].sas_address.high = 0x5FCFFFFF; | 2066 | scic->oem_parameters.sds1.phys[index].sas_address.high = 0x5FCFFFFF; |
2063 | } | 2067 | } |
2064 | 2068 | ||
@@ -2604,14 +2608,11 @@ enum sci_status scic_oem_parameters_set( | |||
2604 | struct scic_sds_controller *scic, | 2608 | struct scic_sds_controller *scic, |
2605 | union scic_oem_parameters *scic_parms) | 2609 | union scic_oem_parameters *scic_parms) |
2606 | { | 2610 | { |
2607 | if ( | 2611 | u32 state = scic->parent.state_machine.current_state_id; |
2608 | (scic->parent.state_machine.current_state_id | 2612 | |
2609 | == SCI_BASE_CONTROLLER_STATE_RESET) | 2613 | if (state == SCI_BASE_CONTROLLER_STATE_RESET || |
2610 | || (scic->parent.state_machine.current_state_id | 2614 | state == SCI_BASE_CONTROLLER_STATE_INITIALIZING || |
2611 | == SCI_BASE_CONTROLLER_STATE_INITIALIZING) | 2615 | state == SCI_BASE_CONTROLLER_STATE_INITIALIZED) { |
2612 | || (scic->parent.state_machine.current_state_id | ||
2613 | == SCI_BASE_CONTROLLER_STATE_INITIALIZED) | ||
2614 | ) { | ||
2615 | u16 index; | 2616 | u16 index; |
2616 | u8 combined_phy_mask = 0; | 2617 | u8 combined_phy_mask = 0; |
2617 | 2618 | ||
@@ -2651,7 +2652,8 @@ enum sci_status scic_oem_parameters_set( | |||
2651 | if (scic_parms->sds1.controller.max_concurrent_dev_spin_up > MAX_CONCURRENT_DEVICE_SPIN_UP_COUNT) | 2652 | if (scic_parms->sds1.controller.max_concurrent_dev_spin_up > MAX_CONCURRENT_DEVICE_SPIN_UP_COUNT) |
2652 | return SCI_FAILURE_INVALID_PARAMETER_VALUE; | 2653 | return SCI_FAILURE_INVALID_PARAMETER_VALUE; |
2653 | 2654 | ||
2654 | memcpy(&scic->oem_parameters, scic_parms, sizeof(*scic_parms)); | 2655 | scic->oem_parameters.sds1 = scic_parms->sds1; |
2656 | |||
2655 | return SCI_SUCCESS; | 2657 | return SCI_SUCCESS; |
2656 | } | 2658 | } |
2657 | 2659 | ||
diff --git a/drivers/scsi/isci/firmware/create_fw.c b/drivers/scsi/isci/firmware/create_fw.c index f8f96d6eb7df..c7a2887a7e95 100644 --- a/drivers/scsi/isci/firmware/create_fw.c +++ b/drivers/scsi/isci/firmware/create_fw.c | |||
@@ -44,7 +44,7 @@ void set_binary_values(struct isci_orom *isci_orom) | |||
44 | 44 | ||
45 | /* setting OROM signature */ | 45 | /* setting OROM signature */ |
46 | strncpy(isci_orom->hdr.signature, sig, strlen(sig)); | 46 | strncpy(isci_orom->hdr.signature, sig, strlen(sig)); |
47 | isci_orom->hdr.version = 0x10; | 47 | isci_orom->hdr.version = version; |
48 | isci_orom->hdr.total_block_length = sizeof(struct isci_orom); | 48 | isci_orom->hdr.total_block_length = sizeof(struct isci_orom); |
49 | isci_orom->hdr.hdr_length = sizeof(struct sci_bios_oem_param_block_hdr); | 49 | isci_orom->hdr.hdr_length = sizeof(struct sci_bios_oem_param_block_hdr); |
50 | isci_orom->hdr.num_elements = num_elements; | 50 | isci_orom->hdr.num_elements = num_elements; |
@@ -65,6 +65,15 @@ void set_binary_values(struct isci_orom *isci_orom) | |||
65 | (__u32)(sas_addr[ctrl_idx][phy_idx] >> 32); | 65 | (__u32)(sas_addr[ctrl_idx][phy_idx] >> 32); |
66 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].sas_address.low = | 66 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].sas_address.low = |
67 | (__u32)(sas_addr[ctrl_idx][phy_idx]); | 67 | (__u32)(sas_addr[ctrl_idx][phy_idx]); |
68 | |||
69 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control0 = | ||
70 | afe_tx_amp_control0; | ||
71 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control1 = | ||
72 | afe_tx_amp_control1; | ||
73 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control2 = | ||
74 | afe_tx_amp_control2; | ||
75 | isci_orom->ctrl[ctrl_idx].phys[phy_idx].afe_tx_amp_control3 = | ||
76 | afe_tx_amp_control3; | ||
68 | } | 77 | } |
69 | } | 78 | } |
70 | } | 79 | } |
diff --git a/drivers/scsi/isci/firmware/create_fw.h b/drivers/scsi/isci/firmware/create_fw.h index 788a8de0c2bc..9f9afbd97d69 100644 --- a/drivers/scsi/isci/firmware/create_fw.h +++ b/drivers/scsi/isci/firmware/create_fw.h | |||
@@ -25,14 +25,37 @@ static const int num_elements = 2; | |||
25 | * if there is a port/phy on which you do not wish to override the default | 25 | * if there is a port/phy on which you do not wish to override the default |
26 | * values, use the value assigned to UNINIT_PARAM (255). | 26 | * values, use the value assigned to UNINIT_PARAM (255). |
27 | */ | 27 | */ |
28 | |||
28 | /* discovery mode type (port auto config mode by default ) */ | 29 | /* discovery mode type (port auto config mode by default ) */ |
30 | |||
31 | /* | ||
32 | * if there is a port/phy on which you do not wish to override the default | ||
33 | * values, use the value "0000000000000000". SAS address of zero's is | ||
34 | * considered invalid and will not be used. | ||
35 | */ | ||
29 | #ifdef MPC | 36 | #ifdef MPC |
30 | static const int mode_type = SCIC_PORT_MANUAL_CONFIGURATION_MODE; | 37 | static const int mode_type = SCIC_PORT_MANUAL_CONFIGURATION_MODE; |
31 | static const __u8 phy_mask[2][4] = { {1, 2, 4, 8}, | 38 | static const __u8 phy_mask[2][4] = { {1, 2, 4, 8}, |
32 | {1, 2, 4, 8} }; | 39 | {1, 2, 4, 8} }; |
40 | static const unsigned long long sas_addr[2][4] = { { 0x5FCFFFFFF0000001ULL, | ||
41 | 0x5FCFFFFFF0000002ULL, | ||
42 | 0x5FCFFFFFF0000003ULL, | ||
43 | 0x5FCFFFFFF0000004ULL }, | ||
44 | { 0x5FCFFFFFF0000005ULL, | ||
45 | 0x5FCFFFFFF0000006ULL, | ||
46 | 0x5FCFFFFFF0000007ULL, | ||
47 | 0x5FCFFFFFF0000008ULL } }; | ||
33 | #else /* APC (default) */ | 48 | #else /* APC (default) */ |
34 | static const int mode_type = SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE; | 49 | static const int mode_type = SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE; |
35 | static const __u8 phy_mask[2][4]; | 50 | static const __u8 phy_mask[2][4]; |
51 | static const unsigned long long sas_addr[2][4] = { { 0x5FCFFFFF00000001ULL, | ||
52 | 0x5FCFFFFF00000001ULL, | ||
53 | 0x5FCFFFFF00000001ULL, | ||
54 | 0x5FCFFFFF00000001ULL }, | ||
55 | { 0x5FCFFFFF00000002ULL, | ||
56 | 0x5FCFFFFF00000002ULL, | ||
57 | 0x5FCFFFFF00000002ULL, | ||
58 | 0x5FCFFFFF00000002ULL } }; | ||
36 | #endif | 59 | #endif |
37 | 60 | ||
38 | /* Maximum number of concurrent device spin up */ | 61 | /* Maximum number of concurrent device spin up */ |
@@ -47,22 +70,8 @@ static const unsigned int afe_tx_amp_control1 = 0x000e7c03; | |||
47 | static const unsigned int afe_tx_amp_control2 = 0x000e7c03; | 70 | static const unsigned int afe_tx_amp_control2 = 0x000e7c03; |
48 | static const unsigned int afe_tx_amp_control3 = 0x000e7c03; | 71 | static const unsigned int afe_tx_amp_control3 = 0x000e7c03; |
49 | 72 | ||
50 | /* | ||
51 | * if there is a port/phy on which you do not wish to override the default | ||
52 | * values, use the value "0000000000000000". SAS address of zero's is | ||
53 | * considered invalid and will not be used. | ||
54 | */ | ||
55 | static const unsigned long long sas_addr[2][4] = { { 0x5FCFFFFFF0000000ULL, | ||
56 | 0x5FCFFFFFF1000000ULL, | ||
57 | 0x5FCFFFFFF2000000ULL, | ||
58 | 0x5FCFFFFFF3000000ULL }, | ||
59 | { 0x5FCFFFFFF4000000ULL, | ||
60 | 0x5FCFFFFFF5000000ULL, | ||
61 | 0x5FCFFFFFF6000000ULL, | ||
62 | 0x5FCFFFFFF7000000ULL } }; | ||
63 | |||
64 | static const char blob_name[] = "isci_firmware.bin"; | 73 | static const char blob_name[] = "isci_firmware.bin"; |
65 | static const char sig[] = "ISCUOEMB"; | 74 | static const char sig[] = "ISCUOEMB"; |
66 | static const unsigned char version = 1; | 75 | static const unsigned char version = 0x10; |
67 | 76 | ||
68 | #endif | 77 | #endif |
diff --git a/drivers/scsi/isci/host.c b/drivers/scsi/isci/host.c index bb5b54d361b0..d6e2a73e797a 100644 --- a/drivers/scsi/isci/host.c +++ b/drivers/scsi/isci/host.c | |||
@@ -418,7 +418,7 @@ int isci_host_init(struct isci_host *isci_host) | |||
418 | int err = 0, i; | 418 | int err = 0, i; |
419 | enum sci_status status; | 419 | enum sci_status status; |
420 | struct scic_sds_controller *controller; | 420 | struct scic_sds_controller *controller; |
421 | union scic_oem_parameters scic_oem_params; | 421 | union scic_oem_parameters oem; |
422 | union scic_user_parameters scic_user_params; | 422 | union scic_user_parameters scic_user_params; |
423 | struct isci_pci_info *pci_info = to_pci_info(isci_host->pdev); | 423 | struct isci_pci_info *pci_info = to_pci_info(isci_host->pdev); |
424 | 424 | ||
@@ -435,6 +435,7 @@ int isci_host_init(struct isci_host *isci_host) | |||
435 | } | 435 | } |
436 | 436 | ||
437 | isci_host->core_controller = controller; | 437 | isci_host->core_controller = controller; |
438 | sci_object_set_association(isci_host->core_controller, isci_host); | ||
438 | spin_lock_init(&isci_host->state_lock); | 439 | spin_lock_init(&isci_host->state_lock); |
439 | spin_lock_init(&isci_host->scic_lock); | 440 | spin_lock_init(&isci_host->scic_lock); |
440 | spin_lock_init(&isci_host->queue_lock); | 441 | spin_lock_init(&isci_host->queue_lock); |
@@ -457,12 +458,6 @@ int isci_host_init(struct isci_host *isci_host) | |||
457 | isci_host->sas_ha.dev = &isci_host->pdev->dev; | 458 | isci_host->sas_ha.dev = &isci_host->pdev->dev; |
458 | isci_host->sas_ha.lldd_ha = isci_host; | 459 | isci_host->sas_ha.lldd_ha = isci_host; |
459 | 460 | ||
460 | /*----------- SCIC controller Initialization Stuff ------------------ | ||
461 | * set association host adapter struct in core controller. | ||
462 | */ | ||
463 | sci_object_set_association(isci_host->core_controller, | ||
464 | (void *)isci_host); | ||
465 | |||
466 | /* | 461 | /* |
467 | * grab initial values stored in the controller object for OEM and USER | 462 | * grab initial values stored in the controller object for OEM and USER |
468 | * parameters | 463 | * parameters |
@@ -477,11 +472,11 @@ int isci_host_init(struct isci_host *isci_host) | |||
477 | return -ENODEV; | 472 | return -ENODEV; |
478 | } | 473 | } |
479 | 474 | ||
480 | scic_oem_parameters_get(controller, &scic_oem_params); | 475 | scic_oem_parameters_get(controller, &oem); |
481 | 476 | ||
482 | /* grab any OEM parameters specified in orom */ | 477 | /* grab any OEM parameters specified in orom */ |
483 | if (pci_info->orom) { | 478 | if (pci_info->orom) { |
484 | status = isci_parse_oem_parameters(&scic_oem_params, | 479 | status = isci_parse_oem_parameters(&oem, |
485 | pci_info->orom, | 480 | pci_info->orom, |
486 | isci_host->id); | 481 | isci_host->id); |
487 | if (status != SCI_SUCCESS) { | 482 | if (status != SCI_SUCCESS) { |
@@ -489,15 +484,14 @@ int isci_host_init(struct isci_host *isci_host) | |||
489 | "parsing firmware oem parameters failed\n"); | 484 | "parsing firmware oem parameters failed\n"); |
490 | return -EINVAL; | 485 | return -EINVAL; |
491 | } | 486 | } |
492 | } else { | 487 | } |
493 | status = scic_oem_parameters_set(isci_host->core_controller, | 488 | |
494 | &scic_oem_params); | 489 | status = scic_oem_parameters_set(isci_host->core_controller, &oem); |
495 | if (status != SCI_SUCCESS) { | 490 | if (status != SCI_SUCCESS) { |
496 | dev_warn(&isci_host->pdev->dev, | 491 | dev_warn(&isci_host->pdev->dev, |
497 | "%s: scic_oem_parameters_set failed\n", | 492 | "%s: scic_oem_parameters_set failed\n", |
498 | __func__); | 493 | __func__); |
499 | return -ENODEV; | 494 | return -ENODEV; |
500 | } | ||
501 | } | 495 | } |
502 | 496 | ||
503 | tasklet_init(&isci_host->completion_tasklet, | 497 | tasklet_init(&isci_host->completion_tasklet, |
diff --git a/drivers/scsi/isci/init.c b/drivers/scsi/isci/init.c index ef0c49a0c0a0..51a7bce20dae 100644 --- a/drivers/scsi/isci/init.c +++ b/drivers/scsi/isci/init.c | |||
@@ -466,6 +466,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic | |||
466 | struct isci_host *isci_host; | 466 | struct isci_host *isci_host; |
467 | const struct firmware *fw = NULL; | 467 | const struct firmware *fw = NULL; |
468 | struct isci_orom *orom; | 468 | struct isci_orom *orom; |
469 | char *source = "(platform)"; | ||
469 | 470 | ||
470 | check_si_rev(pdev); | 471 | check_si_rev(pdev); |
471 | 472 | ||
@@ -480,6 +481,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic | |||
480 | orom = isci_request_oprom(pdev); | 481 | orom = isci_request_oprom(pdev); |
481 | 482 | ||
482 | if (!orom) { | 483 | if (!orom) { |
484 | source = "(firmware)"; | ||
483 | orom = isci_request_firmware(pdev, fw); | 485 | orom = isci_request_firmware(pdev, fw); |
484 | if (!orom) { | 486 | if (!orom) { |
485 | /* TODO convert this to WARN_TAINT_ONCE once the | 487 | /* TODO convert this to WARN_TAINT_ONCE once the |
@@ -496,9 +498,9 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic | |||
496 | 498 | ||
497 | if (orom) | 499 | if (orom) |
498 | dev_info(&pdev->dev, | 500 | dev_info(&pdev->dev, |
499 | "OEM SAS parameters (version: %u.%u) loaded\n", | 501 | "OEM SAS parameters (version: %u.%u) loaded %s\n", |
500 | (orom->hdr.version & 0xf0) >> 4, | 502 | (orom->hdr.version & 0xf0) >> 4, |
501 | (orom->hdr.version & 0xf)); | 503 | (orom->hdr.version & 0xf), source); |
502 | 504 | ||
503 | pci_info->orom = orom; | 505 | pci_info->orom = orom; |
504 | 506 | ||
diff --git a/drivers/scsi/isci/probe_roms.c b/drivers/scsi/isci/probe_roms.c index 0d968d3b334b..1697487f908c 100644 --- a/drivers/scsi/isci/probe_roms.c +++ b/drivers/scsi/isci/probe_roms.c | |||
@@ -138,10 +138,7 @@ enum sci_status isci_parse_oem_parameters(union scic_oem_parameters *oem_params, | |||
138 | scu_index > orom->hdr.num_elements || !oem_params) | 138 | scu_index > orom->hdr.num_elements || !oem_params) |
139 | return -EINVAL; | 139 | return -EINVAL; |
140 | 140 | ||
141 | memcpy(oem_params, | 141 | oem_params->sds1 = orom->ctrl[scu_index]; |
142 | &orom->ctrl[scu_index], | ||
143 | sizeof(struct scic_sds_oem_params)); | ||
144 | |||
145 | return 0; | 142 | return 0; |
146 | } | 143 | } |
147 | 144 | ||
diff --git a/drivers/scsi/isci/probe_roms.h b/drivers/scsi/isci/probe_roms.h index c2162cf12056..1b444838779f 100644 --- a/drivers/scsi/isci/probe_roms.h +++ b/drivers/scsi/isci/probe_roms.h | |||
@@ -96,6 +96,10 @@ struct isci_oem_hdr { | |||
96 | #define ISCI_ROM_SIG "ISCUOEMB" | 96 | #define ISCI_ROM_SIG "ISCUOEMB" |
97 | #define ISCI_ROM_SIG_SIZE 8 | 97 | #define ISCI_ROM_SIG_SIZE 8 |
98 | 98 | ||
99 | #define ISCI_PREBOOT_SOURCE_INIT (0x00) | ||
100 | #define ISCI_PREBOOT_SOURCE_OROM (0x80) | ||
101 | #define ISCI_PREBOOT_SOURCE_EFI (0x81) | ||
102 | |||
99 | #define ISCI_EFI_VENDOR_GUID \ | 103 | #define ISCI_EFI_VENDOR_GUID \ |
100 | EFI_GUID(0x193dfefa, 0xa445, 0x4302, 0x99, 0xd8, 0xef, 0x3a, 0xad, \ | 104 | EFI_GUID(0x193dfefa, 0xa445, 0x4302, 0x99, 0xd8, 0xef, 0x3a, 0xad, \ |
101 | 0x1a, 0x04, 0xc6) | 105 | 0x1a, 0x04, 0xc6) |
@@ -112,8 +116,8 @@ struct isci_oem_hdr { | |||
112 | * being assigned is sufficient to declare manual PORT configuration. | 116 | * being assigned is sufficient to declare manual PORT configuration. |
113 | */ | 117 | */ |
114 | enum SCIC_PORT_CONFIGURATION_MODE { | 118 | enum SCIC_PORT_CONFIGURATION_MODE { |
115 | SCIC_PORT_MANUAL_CONFIGURATION_MODE = 0, | 119 | SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE = 0, |
116 | SCIC_PORT_AUTOMATIC_CONFIGURATION_MODE = 1 | 120 | SCIC_PORT_MANUAL_CONFIGURATION_MODE = 1 |
117 | }; | 121 | }; |
118 | 122 | ||
119 | struct sci_bios_oem_param_block_hdr { | 123 | struct sci_bios_oem_param_block_hdr { |