pastebin - collaborative debugging tool
rovema.kpaste.net RSS


simatickernelmodules driver debug, try #017
Posted by Anonymous on Thu 12th Aug 2021 14:30
raw | new post

  1. Index: simatic-ipc-modules-lsp-v1.2.0RC1/simatic-ipc.c
  2. ===================================================================
  3. --- simatic-ipc-modules-lsp-v1.2.0RC1/simatic-ipc.c     (revision 1)
  4. +++ simatic-ipc-modules-lsp-v1.2.0RC1/simatic-ipc.c     (working copy)
  5. @@ -139,7 +139,7 @@
  6.                    SIMATIC_IPC_DEVICE_NONE,
  7.                    SIMATIC_IPC_DEVICE_NONE,
  8.                    SIMATIC_IPC_DEVICE_NONE,
  9. -                  SIMATIC_IPC_DEVICE_NONE},
  10. +                  SIMATIC_IPC_DEVICE_227E},
  11.         { IPC427E, SIMATIC_IPC_DEVICE_427E,
  12.                    SIMATIC_IPC_DEVICE_427E,
  13.                    SIMATIC_IPC_DEVICE_427E,
  14. @@ -369,6 +369,8 @@
  15.  {
  16.         u32 did = 0;
  17.         struct pci_dev *pdev;
  18. +      
  19. +       pr_info("check_request_uio(): XXX nvrammode=%x\n\n", (int)nvrammode);
  20.  
  21.         switch (nvrammode) {
  22.         case SIMATIC_IPC_DEVICE_227E:
  23. @@ -379,15 +381,22 @@
  24.                 did = PCI_DEVICE_ID_NVRAM_OTHER;
  25.                 break;
  26.         default:
  27. +               pr_info("check_request_uio(): error return no nvrammode\n");
  28.                 return 0;               /* nothing to do */
  29.         }
  30. +       pr_info("check_request_uio(): did=%lx\n", (long)did);
  31.  
  32.         pdev = pci_get_device(PCI_VENDOR_ID_SIEMENS, did, NULL);
  33. +       pr_info("check_request_uio(): pdev=%lx\n", (long)pdev);
  34.         if (!pdev)
  35. +       {
  36. +               pr_info("check_request_uio(): return no pdev\n");
  37.                 return 0;
  38. +       }
  39.  
  40.         /* request UIO on models, which supports the NVRAM device, if it exists */
  41.         request_module("uio");
  42. +       pr_info("check_request_uio(): success, did=%lx\n", (long)did);
  43.         return did;
  44.  }
  45.  
  46. @@ -566,6 +575,7 @@
  47.         }
  48.  
  49.         if (nvrammode != SIMATIC_IPC_DEVICE_NONE) {
  50. +               pr_info("# mark blabla1\n");
  51.                 nvram_did = check_request_uio(nvrammode);
  52.                 if (nvram_did) {
  53.                         platform_data.devmode = nvrammode;
  54. @@ -574,11 +584,16 @@
  55.                                 (NULL, KBUILD_MODNAME "_nvram", PLATFORM_DEVID_NONE,
  56.                                  &platform_data, sizeof(struct simatic_ipc_platform));
  57.                         if (IS_ERR(ipc_nvram_platform_device))
  58. +                       {
  59. +                               pr_info("bloody error XXX9\n");
  60.                                 return PTR_ERR(ipc_nvram_platform_device);
  61. +                       }
  62.  
  63. -                       pr_debug("device=%s created\n",
  64. +                       pr_info("device=%s created\n",
  65.                                  ipc_nvram_platform_device->name);
  66. +                       pr_info("# mark blabla2\n");
  67.                 }
  68. +               pr_info("# mark blabla3\n");
  69.         }
  70.  
  71.         request_addional_modules(station_id);
  72. @@ -640,7 +655,7 @@
  73.         }
  74.  
  75.         if (ipc_name)
  76. -               pr_info("SIMATIC IPC%s detected.\n", ipc_name);
  77. +               pr_info("SIMATIC IPC%s (modded) detected.\n", ipc_name);
  78.         else
  79.                 pr_info("No supported SIMATIC IPC detected.\n");
  80.  }

Submit a correction or amendment below (click here to make a fresh posting)
After submitting an amendment, you'll be able to view the differences between the old and new posts easily.

Syntax highlighting:

To highlight particular lines, prefix each line with {%HIGHLIGHT}




All content is user-submitted.
The administrators of this site (kpaste.net) are not responsible for their content.
Abuse reports should be emailed to us at