{"action":"opened","number":170,"pull_request":{"url":"https://api.github.com/repos/hardkernel/linux/pulls/170","id":63986491,"html_url":"https://github.com/hardkernel/linux/pull/170","diff_url":"https://github.com/hardkernel/linux/pull/170.diff","patch_url":"https://github.com/hardkernel/linux/pull/170.patch","issue_url":"https://api.github.com/repos/hardkernel/linux/issues/170","number":170,"state":"open","locked":false,"title":"Fix Hardware RNG for ODROID C1","user":{"login":"gparent","id":370905,"avatar_url":"https://avatars.githubusercontent.com/u/370905?v=3","gravatar_id":"","url":"https://api.github.com/users/gparent","html_url":"https://github.com/gparent","followers_url":"https://api.github.com/users/gparent/followers","following_url":"https://api.github.com/users/gparent/following{/other_user}","gists_url":"https://api.github.com/users/gparent/gists{/gist_id}","starred_url":"https://api.github.com/users/gparent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gparent/subscriptions","organizations_url":"https://api.github.com/users/gparent/orgs","repos_url":"https://api.github.com/users/gparent/repos","events_url":"https://api.github.com/users/gparent/events{/privacy}","received_events_url":"https://api.github.com/users/gparent/received_events","type":"User","site_admin":false},"body":"Hello\r\n\r\nFrom what I understand, by commiting efa186ddc which disables CONFIG_PM_RUNTIME, the init routines for the HW RNG are neither defined nor (obviously) automatically ran by the PM system and therefore entropy validation fails when rngd tries to use the device.\r\n\r\nOn a typical start up of rngd, this leads to the following series of messages , as seen on [the forums](http://forum.odroid.com/viewtopic.php?f=117&t=19425), which understandably confuses poor user ctmme.\r\n\r\n```\r\nrngd 2-unofficial-mt.14 starting up...\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\nToo many consecutive bad blocks of data, check entropy source!\r\nThrottling down entropy source read speed...\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\nblock failed FIPS test: 0x17\r\n```\r\n\r\nMy pull request is two-fold:\r\n\r\n- It extracts the initialization/teardown code to separate functions matching the signature expected by `struct hwrng` callbacks, while keeping the power management code working the same way.\r\n- It sets the initialization and cleanup callback of that struct so the code is called even when CONFIG_PM_RUNTIME is undefined. I'm not sure cleanup is needed here.\r\n\r\nAs this is my first kernel patch and I'm in no way familiar with the power management systems, please review thoroughly. In particular I wonder if assigning .cleanup is needed, and I'm not 100% sure the two calls that are added in the resume/suspend functions are side-effect free.\r\n\r\nThis fixes #157","created_at":"2016-03-24T03:45:24Z","updated_at":"2016-03-24T03:45:24Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/hardkernel/linux/pulls/170/commits","review_comments_url":"https://api.github.com/repos/hardkernel/linux/pulls/170/comments","review_comment_url":"https://api.github.com/repos/hardkernel/linux/pulls/comments{/number}","comments_url":"https://api.github.com/repos/hardkernel/linux/issues/170/comments","statuses_url":"https://api.github.com/repos/hardkernel/linux/statuses/a94c2e6bb62d4eda9ba81f3e36d9c0e5605392d5","head":{"label":"gparent:odroidc-3.10.y","ref":"odroidc-3.10.y","sha":"a94c2e6bb62d4eda9ba81f3e36d9c0e5605392d5","user":{"login":"gparent","id":370905,"avatar_url":"https://avatars.githubusercontent.com/u/370905?v=3","gravatar_id":"","url":"https://api.github.com/users/gparent","html_url":"https://github.com/gparent","followers_url":"https://api.github.com/users/gparent/followers","following_url":"https://api.github.com/users/gparent/following{/other_user}","gists_url":"https://api.github.com/users/gparent/gists{/gist_id}","starred_url":"https://api.github.com/users/gparent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gparent/subscriptions","organizations_url":"https://api.github.com/users/gparent/orgs","repos_url":"https://api.github.com/users/gparent/repos","events_url":"https://api.github.com/users/gparent/events{/privacy}","received_events_url":"https://api.github.com/users/gparent/received_events","type":"User","site_admin":false},"repo":{"id":54530394,"name":"linux","full_name":"gparent/linux","owner":{"login":"gparent","id":370905,"avatar_url":"https://avatars.githubusercontent.com/u/370905?v=3","gravatar_id":"","url":"https://api.github.com/users/gparent","html_url":"https://github.com/gparent","followers_url":"https://api.github.com/users/gparent/followers","following_url":"https://api.github.com/users/gparent/following{/other_user}","gists_url":"https://api.github.com/users/gparent/gists{/gist_id}","starred_url":"https://api.github.com/users/gparent/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gparent/subscriptions","organizations_url":"https://api.github.com/users/gparent/orgs","repos_url":"https://api.github.com/users/gparent/repos","events_url":"https://api.github.com/users/gparent/events{/privacy}","received_events_url":"https://api.github.com/users/gparent/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/gparent/linux","description":"Linux kernel source tree","fork":true,"url":"https://api.github.com/repos/gparent/linux","forks_url":"https://api.github.com/repos/gparent/linux/forks","keys_url":"https://api.github.com/repos/gparent/linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/gparent/linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/gparent/linux/teams","hooks_url":"https://api.github.com/repos/gparent/linux/hooks","issue_events_url":"https://api.github.com/repos/gparent/linux/issues/events{/number}","events_url":"https://api.github.com/repos/gparent/linux/events","assignees_url":"https://api.github.com/repos/gparent/linux/assignees{/user}","branches_url":"https://api.github.com/repos/gparent/linux/branches{/branch}","tags_url":"https://api.github.com/repos/gparent/linux/tags","blobs_url":"https://api.github.com/repos/gparent/linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/gparent/linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/gparent/linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/gparent/linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/gparent/linux/statuses/{sha}","languages_url":"https://api.github.com/repos/gparent/linux/languages","stargazers_url":"https://api.github.com/repos/gparent/linux/stargazers","contributors_url":"https://api.github.com/repos/gparent/linux/contributors","subscribers_url":"https://api.github.com/repos/gparent/linux/subscribers","subscription_url":"https://api.github.com/repos/gparent/linux/subscription","commits_url":"https://api.github.com/repos/gparent/linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/gparent/linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/gparent/linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/gparent/linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/gparent/linux/contents/{+path}","compare_url":"https://api.github.com/repos/gparent/linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/gparent/linux/merges","archive_url":"https://api.github.com/repos/gparent/linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/gparent/linux/downloads","issues_url":"https://api.github.com/repos/gparent/linux/issues{/number}","pulls_url":"https://api.github.com/repos/gparent/linux/pulls{/number}","milestones_url":"https://api.github.com/repos/gparent/linux/milestones{/number}","notifications_url":"https://api.github.com/repos/gparent/linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/gparent/linux/labels{/name}","releases_url":"https://api.github.com/repos/gparent/linux/releases{/id}","deployments_url":"https://api.github.com/repos/gparent/linux/deployments","created_at":"2016-03-23T04:17:04Z","updated_at":"2016-03-23T04:22:31Z","pushed_at":"2016-03-24T03:31:04Z","git_url":"git://github.com/gparent/linux.git","ssh_url":"git@github.com:gparent/linux.git","clone_url":"https://github.com/gparent/linux.git","svn_url":"https://github.com/gparent/linux","homepage":"","size":1662827,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"odroid-3.0.y"}},"base":{"label":"hardkernel:odroidc-3.10.y","ref":"odroidc-3.10.y","sha":"7ab9b9a07ec7ba32730a099a36b427dad2e32782","user":{"login":"hardkernel","id":2086832,"avatar_url":"https://avatars.githubusercontent.com/u/2086832?v=3","gravatar_id":"","url":"https://api.github.com/users/hardkernel","html_url":"https://github.com/hardkernel","followers_url":"https://api.github.com/users/hardkernel/followers","following_url":"https://api.github.com/users/hardkernel/following{/other_user}","gists_url":"https://api.github.com/users/hardkernel/gists{/gist_id}","starred_url":"https://api.github.com/users/hardkernel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hardkernel/subscriptions","organizations_url":"https://api.github.com/users/hardkernel/orgs","repos_url":"https://api.github.com/users/hardkernel/repos","events_url":"https://api.github.com/users/hardkernel/events{/privacy}","received_events_url":"https://api.github.com/users/hardkernel/received_events","type":"User","site_admin":false},"repo":{"id":5321131,"name":"linux","full_name":"hardkernel/linux","owner":{"login":"hardkernel","id":2086832,"avatar_url":"https://avatars.githubusercontent.com/u/2086832?v=3","gravatar_id":"","url":"https://api.github.com/users/hardkernel","html_url":"https://github.com/hardkernel","followers_url":"https://api.github.com/users/hardkernel/followers","following_url":"https://api.github.com/users/hardkernel/following{/other_user}","gists_url":"https://api.github.com/users/hardkernel/gists{/gist_id}","starred_url":"https://api.github.com/users/hardkernel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hardkernel/subscriptions","organizations_url":"https://api.github.com/users/hardkernel/orgs","repos_url":"https://api.github.com/users/hardkernel/repos","events_url":"https://api.github.com/users/hardkernel/events{/privacy}","received_events_url":"https://api.github.com/users/hardkernel/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/hardkernel/linux","description":"Linux kernel source tree","fork":true,"url":"https://api.github.com/repos/hardkernel/linux","forks_url":"https://api.github.com/repos/hardkernel/linux/forks","keys_url":"https://api.github.com/repos/hardkernel/linux/keys{/key_id}","collaborators_url":"https://api.github.com/repos/hardkernel/linux/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/hardkernel/linux/teams","hooks_url":"https://api.github.com/repos/hardkernel/linux/hooks","issue_events_url":"https://api.github.com/repos/hardkernel/linux/issues/events{/number}","events_url":"https://api.github.com/repos/hardkernel/linux/events","assignees_url":"https://api.github.com/repos/hardkernel/linux/assignees{/user}","branches_url":"https://api.github.com/repos/hardkernel/linux/branches{/branch}","tags_url":"https://api.github.com/repos/hardkernel/linux/tags","blobs_url":"https://api.github.com/repos/hardkernel/linux/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/hardkernel/linux/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/hardkernel/linux/git/refs{/sha}","trees_url":"https://api.github.com/repos/hardkernel/linux/git/trees{/sha}","statuses_url":"https://api.github.com/repos/hardkernel/linux/statuses/{sha}","languages_url":"https://api.github.com/repos/hardkernel/linux/languages","stargazers_url":"https://api.github.com/repos/hardkernel/linux/stargazers","contributors_url":"https://api.github.com/repos/hardkernel/linux/contributors","subscribers_url":"https://api.github.com/repos/hardkernel/linux/subscribers","subscription_url":"https://api.github.com/repos/hardkernel/linux/subscription","commits_url":"https://api.github.com/repos/hardkernel/linux/commits{/sha}","git_commits_url":"https://api.github.com/repos/hardkernel/linux/git/commits{/sha}","comments_url":"https://api.github.com/repos/hardkernel/linux/comments{/number}","issue_comment_url":"https://api.github.com/repos/hardkernel/linux/issues/comments{/number}","contents_url":"https://api.github.com/repos/hardkernel/linux/contents/{+path}","compare_url":"https://api.github.com/repos/hardkernel/linux/compare/{base}...{head}","merges_url":"https://api.github.com/repos/hardkernel/linux/merges","archive_url":"https://api.github.com/repos/hardkernel/linux/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/hardkernel/linux/downloads","issues_url":"https://api.github.com/repos/hardkernel/linux/issues{/number}","pulls_url":"https://api.github.com/repos/hardkernel/linux/pulls{/number}","milestones_url":"https://api.github.com/repos/hardkernel/linux/milestones{/number}","notifications_url":"https://api.github.com/repos/hardkernel/linux/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/hardkernel/linux/labels{/name}","releases_url":"https://api.github.com/repos/hardkernel/linux/releases{/id}","deployments_url":"https://api.github.com/repos/hardkernel/linux/deployments","created_at":"2012-08-06T23:45:51Z","updated_at":"2016-03-24T03:14:48Z","pushed_at":"2016-03-20T22:24:34Z","git_url":"git://github.com/hardkernel/linux.git","ssh_url":"git@github.com:hardkernel/linux.git","clone_url":"https://github.com/hardkernel/linux.git","svn_url":"https://github.com/hardkernel/linux","homepage":"","size":1676897,"stargazers_count":219,"watchers_count":219,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":249,"mirror_url":null,"open_issues_count":17,"forks":249,"open_issues":17,"watchers":219,"default_branch":"odroid-3.0.y"}},"_links":{"self":{"href":"https://api.github.com/repos/hardkernel/linux/pulls/170"},"html":{"href":"https://github.com/hardkernel/linux/pull/170"},"issue":{"href":"https://api.github.com/repos/hardkernel/linux/issues/170"},"comments":{"href":"https://api.github.com/repos/hardkernel/linux/issues/170/comments"},"review_comments":{"href":"https://api.github.com/repos/hardkernel/linux/pulls/170/comments"},"review_comment":{"href":"https://api.github.com/repos/hardkernel/linux/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/hardkernel/linux/pulls/170/commits"},"statuses":{"href":"https://api.github.com/repos/hardkernel/linux/statuses/a94c2e6bb62d4eda9ba81f3e36d9c0e5605392d5"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":2,"additions":30,"deletions":13,"changed_files":1}}