Commit 62dc51fb authored by Sagar Biradar's avatar Sagar Biradar Committed by Martin K. Petersen

scsi: smartpqi: enhance numa node detection

- set pci_dev->dev to 0 only if the node is NO_NUMA_NODE.
  If not, do not reset the value but retain it.
Reviewed-by: default avatarMurthy Bhat <murthy.bhat@microsemi.com>
Reviewed-by: default avatarMahesh Rajashekhara <mahesh.rajashekhara@microsemi.com>
Reviewed-by: default avatarDave Carroll <david.carroll@microsemi.com>
Reviewed-by: default avatarScott Teel <scott.teel@microsemi.com>
Reviewed-by: default avatarKevin Barnett <kevin.barnett@microsemi.com>
Signed-off-by: default avatarSagar Biradar <sagar.biradar@microsemi.com>
Signed-off-by: default avatarDon Brace <don.brace@microsemi.com>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent 2b447f81
...@@ -7130,7 +7130,7 @@ static int pqi_pci_probe(struct pci_dev *pci_dev, ...@@ -7130,7 +7130,7 @@ static int pqi_pci_probe(struct pci_dev *pci_dev,
const struct pci_device_id *id) const struct pci_device_id *id)
{ {
int rc; int rc;
int node; int node, cp_node;
struct pqi_ctrl_info *ctrl_info; struct pqi_ctrl_info *ctrl_info;
pqi_print_ctrl_info(pci_dev, id); pqi_print_ctrl_info(pci_dev, id);
...@@ -7148,8 +7148,12 @@ static int pqi_pci_probe(struct pci_dev *pci_dev, ...@@ -7148,8 +7148,12 @@ static int pqi_pci_probe(struct pci_dev *pci_dev,
"controller device ID matched using wildcards\n"); "controller device ID matched using wildcards\n");
node = dev_to_node(&pci_dev->dev); node = dev_to_node(&pci_dev->dev);
if (node == NUMA_NO_NODE) if (node == NUMA_NO_NODE) {
set_dev_node(&pci_dev->dev, 0); cp_node = cpu_to_node(0);
if (cp_node == NUMA_NO_NODE)
cp_node = 0;
set_dev_node(&pci_dev->dev, cp_node);
}
ctrl_info = pqi_alloc_ctrl_info(node); ctrl_info = pqi_alloc_ctrl_info(node);
if (!ctrl_info) { if (!ctrl_info) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment