{"action":"created","comment":{"url":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/comments/55729023","id":55729023,"diff_hunk":"@@ -147,6 +151,13 @@ CUSBRequest::QueryInterface(\n     return STATUS_UNSUCCESSFUL;\n }\n \n+VOID\n+CUSBRequest::GetDoubleBuffer(PVOID DoubleBuffer, ULONG DoublePhysBuffer)\n+{\n+    m_DoubleBuffer     = DoubleBuffer;\n+    m_DoublePhysBuffer = DoublePhysBuffer;\n+}\n+","path":"reactos/drivers/usb/usbehci/usb_request.cpp","position":28,"original_position":28,"commit_id":"af644b28811ffd1a8fdfbe37eac6d331f82e1ccb","original_commit_id":"af644b28811ffd1a8fdfbe37eac6d331f82e1ccb","user":{"login":"learn-more","id":610685,"avatar_url":"https://avatars.githubusercontent.com/u/610685?v=3","gravatar_id":"","url":"https://api.github.com/users/learn-more","html_url":"https://github.com/learn-more","followers_url":"https://api.github.com/users/learn-more/followers","following_url":"https://api.github.com/users/learn-more/following{/other_user}","gists_url":"https://api.github.com/users/learn-more/gists{/gist_id}","starred_url":"https://api.github.com/users/learn-more/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/learn-more/subscriptions","organizations_url":"https://api.github.com/users/learn-more/orgs","repos_url":"https://api.github.com/users/learn-more/repos","events_url":"https://api.github.com/users/learn-more/events{/privacy}","received_events_url":"https://api.github.com/users/learn-more/received_events","type":"User","site_admin":false},"body":"Should those variables also be initialized in CUSBRequest::InitializeWithSetupPacket ?","created_at":"2016-03-10T18:49:37Z","updated_at":"2016-03-10T18:49:37Z","html_url":"https://github.com/AmineKhaldi/reactos/pull/2#discussion_r55729023","pull_request_url":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2","_links":{"self":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/comments/55729023"},"html":{"href":"https://github.com/AmineKhaldi/reactos/pull/2#discussion_r55729023"},"pull_request":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2"}}},"pull_request":{"url":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2","id":62366181,"html_url":"https://github.com/AmineKhaldi/reactos/pull/2","diff_url":"https://github.com/AmineKhaldi/reactos/pull/2.diff","patch_url":"https://github.com/AmineKhaldi/reactos/pull/2.patch","issue_url":"https://api.github.com/repos/AmineKhaldi/reactos/issues/2","number":2,"state":"open","locked":false,"title":"Usb drivers","user":{"login":"vgalnt","id":17290914,"avatar_url":"https://avatars.githubusercontent.com/u/17290914?v=3","gravatar_id":"","url":"https://api.github.com/users/vgalnt","html_url":"https://github.com/vgalnt","followers_url":"https://api.github.com/users/vgalnt/followers","following_url":"https://api.github.com/users/vgalnt/following{/other_user}","gists_url":"https://api.github.com/users/vgalnt/gists{/gist_id}","starred_url":"https://api.github.com/users/vgalnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgalnt/subscriptions","organizations_url":"https://api.github.com/users/vgalnt/orgs","repos_url":"https://api.github.com/users/vgalnt/repos","events_url":"https://api.github.com/users/vgalnt/events{/privacy}","received_events_url":"https://api.github.com/users/vgalnt/received_events","type":"User","site_admin":false},"body":"My changes consist of two groups of commits and single (and independent) commits.\r\n\r\nThe first group is a double buffering for OHCI and EHCI drivers.\r\nThe second group is an error handling for USB mass storage devices (driver USBSTOR).\r\n\r\nI offer TEMPORARILY, while not resolved a problem call functions MmGetPhysicalAddress() to use the double buffer.\r\nI.e. allocate in addition continuous area memory (m_DoubleBuffer = MmAllocateContiguousMemory (m_DoubleBufferLen, HighestAddress) ;). As this buffer continuous call MmGetPhysicalAddress() will be made only once: m_DoublePhysBuffer = MmGetPhysicalAddress (m_DoubleBuffer).LowPart;. Depending on a direction of transfer the data is copied from MDL buffers (m_TransferBufferMDL) to m_DoubleBuffer or on the contrary. The main operation is conducted with m_DoubleBuffer.\r\nWhen the problem with call function MmGetPhysicalAddress() will be solved, it will be necessary to delete branching code only. Proceeding from these reasons, I DID NOT REPLACE a functional, but ADDED it. An example: additional function BuildBulkInterruptDataTransferQueueHead() (\\drivers\\usb\\usbehci\\usb_request.cpp). It is used instead of three functions: BuildBulkInterruptTransferQueueHead(), BuildTransferDescriptorChain() and InitDescriptor(). These three functions could be deleted. But I did not begin to do it for the reason described above.\r\nSimilar and for OHCI driver. For UHCI driver double buffering is not necessary, there errors are not present.\r\nThus double buffering solves a problem of call function MmGetPhysicalAddress(). This problem actually does impossible usage USB mass storage devices (EHCI and OHCI controlers).\r\nI tested about one month operation of the modified drivers in VirtualBox, and also on real HW. Result positive. That is already today, without waiting solves of the above described problem (a question - when it will be solved?), it is possible to use USB flash sticks, USB-HDD ... etc.\r\n\r\nOther problem in USB - not complete support of error handling for data storage devices (USBSTOR driver). To this class of devices there corresponds the specification \"USB Mass Storage Class. Bulk-Only Transport. Revision 1.0\". USB host supports access to devices through the commands originally developed for devices which use the Interface of small computer systems (SCSI). Look a file \\drivers\\usb\\usbstor\\scsi.c. \r\nIn structure Command Status Wrapper (CSW) there is a field bCSWStatus. bCSWStatus the field specifies, whether the command without an error was completed. Value 0x01 means an error, and the host should immediately issue a REQUEST SENSE SCSI command to receive the information on the status. At present it has not been implemented in USBSTOR driver. I had been made additions and some changes to implement it.\r\nAmong mine commits is HACKs (as a rule - time delays). They have been found experimentally.\r\nI want to select especially HACK time delays for 2 seconds for PnP the manager. It does not solve problems, but is harmless. I do not think that it is problem - to wait for 2 seconds simply. You know that PnP the manager is not ideal. Also as well as USB drivers. This HACK solves at once some problems and adds possibility of booting from USB, an also USB keyboard should work at settup (last I not tested).\r\n","created_at":"2016-03-10T10:12:05Z","updated_at":"2016-03-10T18:49:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e21d5dacec69aa83f8078501784f6baf05e1fed7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2/commits","review_comments_url":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2/comments","review_comment_url":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/AmineKhaldi/reactos/issues/2/comments","statuses_url":"https://api.github.com/repos/AmineKhaldi/reactos/statuses/af644b28811ffd1a8fdfbe37eac6d331f82e1ccb","head":{"label":"vgalnt:usb-drivers","ref":"usb-drivers","sha":"af644b28811ffd1a8fdfbe37eac6d331f82e1ccb","user":{"login":"vgalnt","id":17290914,"avatar_url":"https://avatars.githubusercontent.com/u/17290914?v=3","gravatar_id":"","url":"https://api.github.com/users/vgalnt","html_url":"https://github.com/vgalnt","followers_url":"https://api.github.com/users/vgalnt/followers","following_url":"https://api.github.com/users/vgalnt/following{/other_user}","gists_url":"https://api.github.com/users/vgalnt/gists{/gist_id}","starred_url":"https://api.github.com/users/vgalnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgalnt/subscriptions","organizations_url":"https://api.github.com/users/vgalnt/orgs","repos_url":"https://api.github.com/users/vgalnt/repos","events_url":"https://api.github.com/users/vgalnt/events{/privacy}","received_events_url":"https://api.github.com/users/vgalnt/received_events","type":"User","site_admin":false},"repo":{"id":52142486,"name":"reactos","full_name":"vgalnt/reactos","owner":{"login":"vgalnt","id":17290914,"avatar_url":"https://avatars.githubusercontent.com/u/17290914?v=3","gravatar_id":"","url":"https://api.github.com/users/vgalnt","html_url":"https://github.com/vgalnt","followers_url":"https://api.github.com/users/vgalnt/followers","following_url":"https://api.github.com/users/vgalnt/following{/other_user}","gists_url":"https://api.github.com/users/vgalnt/gists{/gist_id}","starred_url":"https://api.github.com/users/vgalnt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vgalnt/subscriptions","organizations_url":"https://api.github.com/users/vgalnt/orgs","repos_url":"https://api.github.com/users/vgalnt/repos","events_url":"https://api.github.com/users/vgalnt/events{/privacy}","received_events_url":"https://api.github.com/users/vgalnt/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/vgalnt/reactos","description":"ReactOS Mirror","fork":true,"url":"https://api.github.com/repos/vgalnt/reactos","forks_url":"https://api.github.com/repos/vgalnt/reactos/forks","keys_url":"https://api.github.com/repos/vgalnt/reactos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/vgalnt/reactos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/vgalnt/reactos/teams","hooks_url":"https://api.github.com/repos/vgalnt/reactos/hooks","issue_events_url":"https://api.github.com/repos/vgalnt/reactos/issues/events{/number}","events_url":"https://api.github.com/repos/vgalnt/reactos/events","assignees_url":"https://api.github.com/repos/vgalnt/reactos/assignees{/user}","branches_url":"https://api.github.com/repos/vgalnt/reactos/branches{/branch}","tags_url":"https://api.github.com/repos/vgalnt/reactos/tags","blobs_url":"https://api.github.com/repos/vgalnt/reactos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/vgalnt/reactos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/vgalnt/reactos/git/refs{/sha}","trees_url":"https://api.github.com/repos/vgalnt/reactos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/vgalnt/reactos/statuses/{sha}","languages_url":"https://api.github.com/repos/vgalnt/reactos/languages","stargazers_url":"https://api.github.com/repos/vgalnt/reactos/stargazers","contributors_url":"https://api.github.com/repos/vgalnt/reactos/contributors","subscribers_url":"https://api.github.com/repos/vgalnt/reactos/subscribers","subscription_url":"https://api.github.com/repos/vgalnt/reactos/subscription","commits_url":"https://api.github.com/repos/vgalnt/reactos/commits{/sha}","git_commits_url":"https://api.github.com/repos/vgalnt/reactos/git/commits{/sha}","comments_url":"https://api.github.com/repos/vgalnt/reactos/comments{/number}","issue_comment_url":"https://api.github.com/repos/vgalnt/reactos/issues/comments{/number}","contents_url":"https://api.github.com/repos/vgalnt/reactos/contents/{+path}","compare_url":"https://api.github.com/repos/vgalnt/reactos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/vgalnt/reactos/merges","archive_url":"https://api.github.com/repos/vgalnt/reactos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/vgalnt/reactos/downloads","issues_url":"https://api.github.com/repos/vgalnt/reactos/issues{/number}","pulls_url":"https://api.github.com/repos/vgalnt/reactos/pulls{/number}","milestones_url":"https://api.github.com/repos/vgalnt/reactos/milestones{/number}","notifications_url":"https://api.github.com/repos/vgalnt/reactos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/vgalnt/reactos/labels{/name}","releases_url":"https://api.github.com/repos/vgalnt/reactos/releases{/id}","deployments_url":"https://api.github.com/repos/vgalnt/reactos/deployments","created_at":"2016-02-20T07:38:57Z","updated_at":"2016-02-20T07:40:33Z","pushed_at":"2016-03-10T16:24:44Z","git_url":"git://github.com/vgalnt/reactos.git","ssh_url":"git@github.com:vgalnt/reactos.git","clone_url":"https://github.com/vgalnt/reactos.git","svn_url":"https://github.com/vgalnt/reactos","homepage":null,"size":310601,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"AmineKhaldi:master","ref":"master","sha":"3a132cdd5eed9c43bc0fbdde799743e3e56c15f2","user":{"login":"AmineKhaldi","id":352225,"avatar_url":"https://avatars.githubusercontent.com/u/352225?v=3","gravatar_id":"","url":"https://api.github.com/users/AmineKhaldi","html_url":"https://github.com/AmineKhaldi","followers_url":"https://api.github.com/users/AmineKhaldi/followers","following_url":"https://api.github.com/users/AmineKhaldi/following{/other_user}","gists_url":"https://api.github.com/users/AmineKhaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/AmineKhaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmineKhaldi/subscriptions","organizations_url":"https://api.github.com/users/AmineKhaldi/orgs","repos_url":"https://api.github.com/users/AmineKhaldi/repos","events_url":"https://api.github.com/users/AmineKhaldi/events{/privacy}","received_events_url":"https://api.github.com/users/AmineKhaldi/received_events","type":"User","site_admin":false},"repo":{"id":53401840,"name":"reactos","full_name":"AmineKhaldi/reactos","owner":{"login":"AmineKhaldi","id":352225,"avatar_url":"https://avatars.githubusercontent.com/u/352225?v=3","gravatar_id":"","url":"https://api.github.com/users/AmineKhaldi","html_url":"https://github.com/AmineKhaldi","followers_url":"https://api.github.com/users/AmineKhaldi/followers","following_url":"https://api.github.com/users/AmineKhaldi/following{/other_user}","gists_url":"https://api.github.com/users/AmineKhaldi/gists{/gist_id}","starred_url":"https://api.github.com/users/AmineKhaldi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AmineKhaldi/subscriptions","organizations_url":"https://api.github.com/users/AmineKhaldi/orgs","repos_url":"https://api.github.com/users/AmineKhaldi/repos","events_url":"https://api.github.com/users/AmineKhaldi/events{/privacy}","received_events_url":"https://api.github.com/users/AmineKhaldi/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AmineKhaldi/reactos","description":"ReactOS Mirror","fork":true,"url":"https://api.github.com/repos/AmineKhaldi/reactos","forks_url":"https://api.github.com/repos/AmineKhaldi/reactos/forks","keys_url":"https://api.github.com/repos/AmineKhaldi/reactos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AmineKhaldi/reactos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AmineKhaldi/reactos/teams","hooks_url":"https://api.github.com/repos/AmineKhaldi/reactos/hooks","issue_events_url":"https://api.github.com/repos/AmineKhaldi/reactos/issues/events{/number}","events_url":"https://api.github.com/repos/AmineKhaldi/reactos/events","assignees_url":"https://api.github.com/repos/AmineKhaldi/reactos/assignees{/user}","branches_url":"https://api.github.com/repos/AmineKhaldi/reactos/branches{/branch}","tags_url":"https://api.github.com/repos/AmineKhaldi/reactos/tags","blobs_url":"https://api.github.com/repos/AmineKhaldi/reactos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AmineKhaldi/reactos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AmineKhaldi/reactos/git/refs{/sha}","trees_url":"https://api.github.com/repos/AmineKhaldi/reactos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AmineKhaldi/reactos/statuses/{sha}","languages_url":"https://api.github.com/repos/AmineKhaldi/reactos/languages","stargazers_url":"https://api.github.com/repos/AmineKhaldi/reactos/stargazers","contributors_url":"https://api.github.com/repos/AmineKhaldi/reactos/contributors","subscribers_url":"https://api.github.com/repos/AmineKhaldi/reactos/subscribers","subscription_url":"https://api.github.com/repos/AmineKhaldi/reactos/subscription","commits_url":"https://api.github.com/repos/AmineKhaldi/reactos/commits{/sha}","git_commits_url":"https://api.github.com/repos/AmineKhaldi/reactos/git/commits{/sha}","comments_url":"https://api.github.com/repos/AmineKhaldi/reactos/comments{/number}","issue_comment_url":"https://api.github.com/repos/AmineKhaldi/reactos/issues/comments{/number}","contents_url":"https://api.github.com/repos/AmineKhaldi/reactos/contents/{+path}","compare_url":"https://api.github.com/repos/AmineKhaldi/reactos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AmineKhaldi/reactos/merges","archive_url":"https://api.github.com/repos/AmineKhaldi/reactos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AmineKhaldi/reactos/downloads","issues_url":"https://api.github.com/repos/AmineKhaldi/reactos/issues{/number}","pulls_url":"https://api.github.com/repos/AmineKhaldi/reactos/pulls{/number}","milestones_url":"https://api.github.com/repos/AmineKhaldi/reactos/milestones{/number}","notifications_url":"https://api.github.com/repos/AmineKhaldi/reactos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AmineKhaldi/reactos/labels{/name}","releases_url":"https://api.github.com/repos/AmineKhaldi/reactos/releases{/id}","deployments_url":"https://api.github.com/repos/AmineKhaldi/reactos/deployments","created_at":"2016-03-08T09:59:36Z","updated_at":"2016-03-08T10:01:05Z","pushed_at":"2016-03-10T16:43:07Z","git_url":"git://github.com/AmineKhaldi/reactos.git","ssh_url":"git@github.com:AmineKhaldi/reactos.git","clone_url":"https://github.com/AmineKhaldi/reactos.git","svn_url":"https://github.com/AmineKhaldi/reactos","homepage":null,"size":320231,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2"},"html":{"href":"https://github.com/AmineKhaldi/reactos/pull/2"},"issue":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/issues/2"},"comments":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/issues/2/comments"},"review_comments":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2/comments"},"review_comment":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/pulls/2/commits"},"statuses":{"href":"https://api.github.com/repos/AmineKhaldi/reactos/statuses/af644b28811ffd1a8fdfbe37eac6d331f82e1ccb"}}}}