Skip to content

Commit

Permalink
isci: fix oem parameter validation on single controller skus
Browse files Browse the repository at this point in the history
OEM parameters [1] are parsed from the platform option-rom / efi
driver.  By default the driver was validating the parameters for the
dual-controller case, but in single-controller case only the first set
of parameters may be valid.

Limit the validation to the number of actual controllers detected
otherwise the driver may fail to parse the valid parameters leading to
driver-load or runtime failures.

[1] the platform specific set of phy address, configuration,and analog
    tuning values

[stable v3.0+]
Cc: <[email protected]>
Reported-by: Dave Jiang <[email protected]>
Tested-by: Dave Jiang <[email protected]>
Signed-off-by: Dan Williams <[email protected]>
  • Loading branch information
djbw committed May 17, 2012
1 parent 08e73be commit fc25f79
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/isci/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -639,7 +639,7 @@ static int __devinit isci_pci_probe(struct pci_dev *pdev, const struct pci_devic
if (!orom)
orom = isci_request_oprom(pdev);

for (i = 0; orom && i < ARRAY_SIZE(orom->ctrl); i++) {
for (i = 0; orom && i < num_controllers(pdev); i++) {
if (sci_oem_parameters_validate(&orom->ctrl[i],
orom->hdr.version)) {
dev_warn(&pdev->dev,
Expand Down

0 comments on commit fc25f79

Please sign in to comment.