summaryrefslogtreecommitdiffstats
path: root/drivers/pci/vc.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/pci/vc.c')
-rw-r--r--drivers/pci/vc.c18
1 files changed, 8 insertions, 10 deletions
diff --git a/drivers/pci/vc.c b/drivers/pci/vc.c
index 1fa3a3219c45..881b9861aed4 100644
--- a/drivers/pci/vc.c
+++ b/drivers/pci/vc.c
@@ -57,7 +57,7 @@ static void pci_vc_load_arb_table(struct pci_dev *dev, int pos)
57 PCI_VC_PORT_STATUS_TABLE)) 57 PCI_VC_PORT_STATUS_TABLE))
58 return; 58 return;
59 59
60 dev_err(&dev->dev, "VC arbitration table failed to load\n"); 60 pci_err(dev, "VC arbitration table failed to load\n");
61} 61}
62 62
63/** 63/**
@@ -85,7 +85,7 @@ static void pci_vc_load_port_arb_table(struct pci_dev *dev, int pos, int res)
85 if (pci_wait_for_pending(dev, status_pos, PCI_VC_RES_STATUS_TABLE)) 85 if (pci_wait_for_pending(dev, status_pos, PCI_VC_RES_STATUS_TABLE))
86 return; 86 return;
87 87
88 dev_err(&dev->dev, "VC%d port arbitration table failed to load\n", res); 88 pci_err(dev, "VC%d port arbitration table failed to load\n", res);
89} 89}
90 90
91/** 91/**
@@ -161,11 +161,11 @@ enable:
161 pci_write_config_dword(dev, ctrl_pos, ctrl); 161 pci_write_config_dword(dev, ctrl_pos, ctrl);
162 162
163 if (!pci_wait_for_pending(dev, status_pos, PCI_VC_RES_STATUS_NEGO)) 163 if (!pci_wait_for_pending(dev, status_pos, PCI_VC_RES_STATUS_NEGO))
164 dev_err(&dev->dev, "VC%d negotiation stuck pending\n", id); 164 pci_err(dev, "VC%d negotiation stuck pending\n", id);
165 165
166 if (link && !pci_wait_for_pending(link, status_pos2, 166 if (link && !pci_wait_for_pending(link, status_pos2,
167 PCI_VC_RES_STATUS_NEGO)) 167 PCI_VC_RES_STATUS_NEGO))
168 dev_err(&link->dev, "VC%d negotiation stuck pending\n", id); 168 pci_err(link, "VC%d negotiation stuck pending\n", id);
169} 169}
170 170
171/** 171/**
@@ -195,8 +195,7 @@ static int pci_vc_do_save_buffer(struct pci_dev *dev, int pos,
195 /* Sanity check buffer size for save/restore */ 195 /* Sanity check buffer size for save/restore */
196 if (buf && save_state->cap.size != 196 if (buf && save_state->cap.size !=
197 pci_vc_do_save_buffer(dev, pos, NULL, save)) { 197 pci_vc_do_save_buffer(dev, pos, NULL, save)) {
198 dev_err(&dev->dev, 198 pci_err(dev, "VC save buffer size does not match @0x%x\n", pos);
199 "VC save buffer size does not match @0x%x\n", pos);
200 return -ENOMEM; 199 return -ENOMEM;
201 } 200 }
202 201
@@ -366,14 +365,14 @@ int pci_save_vc_state(struct pci_dev *dev)
366 365
367 save_state = pci_find_saved_ext_cap(dev, vc_caps[i].id); 366 save_state = pci_find_saved_ext_cap(dev, vc_caps[i].id);
368 if (!save_state) { 367 if (!save_state) {
369 dev_err(&dev->dev, "%s buffer not found in %s\n", 368 pci_err(dev, "%s buffer not found in %s\n",
370 vc_caps[i].name, __func__); 369 vc_caps[i].name, __func__);
371 return -ENOMEM; 370 return -ENOMEM;
372 } 371 }
373 372
374 ret = pci_vc_do_save_buffer(dev, pos, save_state, true); 373 ret = pci_vc_do_save_buffer(dev, pos, save_state, true);
375 if (ret) { 374 if (ret) {
376 dev_err(&dev->dev, "%s save unsuccessful %s\n", 375 pci_err(dev, "%s save unsuccessful %s\n",
377 vc_caps[i].name, __func__); 376 vc_caps[i].name, __func__);
378 return ret; 377 return ret;
379 } 378 }
@@ -426,8 +425,7 @@ void pci_allocate_vc_save_buffers(struct pci_dev *dev)
426 425
427 len = pci_vc_do_save_buffer(dev, pos, NULL, false); 426 len = pci_vc_do_save_buffer(dev, pos, NULL, false);
428 if (pci_add_ext_cap_save_buffer(dev, vc_caps[i].id, len)) 427 if (pci_add_ext_cap_save_buffer(dev, vc_caps[i].id, len))
429 dev_err(&dev->dev, 428 pci_err(dev, "unable to preallocate %s save buffer\n",
430 "unable to preallocate %s save buffer\n",
431 vc_caps[i].name); 429 vc_caps[i].name);
432 } 430 }
433} 431}