53 #include <linux/pci.h>
55 #include <linux/slab.h>
71 dev_err(&pdev->
dev,
"Failed to enable PCI device\n");
75 dev_err(&pdev->
dev,
"Failed to allocate PCI resources\n");
83 dev_err(&pdev->
dev,
"Failed to allocate memory\n");
91 pci_set_drvdata(pdev, (
void *)sp);
98 dev_err(sp->
dev,
"Failed to allocate event buffer\n");
99 goto error_eventbuffer;
103 dev_err(sp->
dev,
"Failed to allocate heartbeat command\n");
104 goto error_heartbeat;
110 dev_err(sp->
dev,
"Failed to ioremap pci memory\n");
117 dev_err(sp->
dev,
"Failed to register interrupt handler\n");
118 goto error_request_irq;
125 dev_err(sp->
dev,
"Failed to initialize remote queue\n");
126 goto error_send_message;
131 dev_err(sp->
dev,
"Failed to send driver VPD to service processor\n");
132 goto error_send_message;
136 dev_err(sp->
dev,
"Failed to send OS state to service processor\n");
137 goto error_send_message;
156 pci_set_drvdata(pdev,
NULL);
170 dbg(
"Unregistering UART\n");
172 dbg(
"Sending OS down message\n");
174 err(
"failed to get repsonse to 'Send OS State' command\n");
175 dbg(
"Disabling heartbeats\n");
177 dbg(
"Disabling interrupts\n");
179 dbg(
"Freeing SP irq\n");
181 dbg(
"Cleaning up\n");
185 pci_set_drvdata(pdev,
NULL);
199 .id_table = ibmasm_pci_table,
200 .probe = ibmasm_init_one,
204 static void __exit ibmasm_exit (
void)
212 static int __init ibmasm_init(
void)
214 int result = pci_register_driver(&ibmasm_driver);
221 err(
"Failed to register ibmasmfs file system");