+int nbl_dev_start(struct nbl_adapter *adapter, struct nbl_init_param *param)
+{
+ int ret;
+
+ ret = nbl_dev_start_common_dev(adapter, param);
+ return ret;
return nbl_dev_start_common_dev(adapter, param);
But then i have to ask, why bother having nbl_dev_start() when you can
just call nbl_dev_start_common().
-#define NBL_DRIVER_NAME "nbl_core"
+#define NBL_DRIVER_NAME "nbl"
Don't change things like this. Get it correct from the beginning.
quoted hunk ↗ jump to hunk
@@ -37,8 +37,7 @@ struct nbl_func_caps {
u32 has_ctrl:1;
u32 has_net:1;
u32 is_nic:1;
- u32 is_ocp:1;
- u32 rsv:28;
+ u32 rsv:29;
Why has is_ocp disappeared? Was it never used? Then don't add it in
the first place.
-module_pci_driver(nbl_driver);
+static int __init nbl_module_init(void)
+{
+ int status;
+
+ status = nbl_common_create_wq();
+ if (status) {
+ pr_err("Failed to create wq, err = %d\n", status);
+ goto wq_create_failed;
+ }
+ status = pci_register_driver(&nbl_driver);
+ if (status) {
+ pr_err("Failed to register PCI driver, err = %d\n", status);
+ goto pci_register_driver_failed;
+ }
+ pr_info("nbl module loaded\n");
Don't spam the log.
+static void __exit nbl_module_exit(void)
+{
+ pci_unregister_driver(&nbl_driver);
+ nbl_common_destroy_wq();
+
+ pr_info("nbl module unloaded\n");
More log spamming
Andrew