{"action":"created","comment":{"url":"https://api.github.com/repos/virtium/vtStor/pulls/comments/48329819","id":48329819,"diff_hunk":"@@ -30,33 +30,124 @@ namespace vtStor\n namespace Protocol\r\n {\r\n \r\n+const U8  SG_ATA_LBA48 = 0x01; // Extend 48 bit\r\n+\r\n+//! Structure for send Ata command pass through SG drivers\r\n+enum class eSgAtaPassThough16\r\n+{\r\n+    SgInterfaceId       = 'S',  // 'S' for SCSI generic\r\n+    SgAtaPassThough     = 0x85, // Send Ata command pass through SG drivers\r\n+    SgCdbLengh          = 16,   // Command Descriptor Block length\r\n+    MaxSenseDataLength  = 32,   // Max of Sense Data Length\r\n+};\r\n+\r\n+enum class eTransferLenghValue\r\n+{\r\n+    NoDataTranfer         = 0x0, // No data is transferred\r\n+    SpecInFeature         = 0x1, // The transfer length is specified in the FEATURE field\r\n+    SpecInSectorCount     = 0x2, // The transfer length is specified in the SECTOR COUNT field\r\n+};\r\n+\r\n+//! Specifies the number of bytes to transfer or the number of blocks to transfer\r\n+enum class eByteBlockBit\r\n+{\r\n+    TransferByteMode   = 0, // Transfer the number of bytes specified in the transfer lengh field\r\n+    TransferSectorMode = 1, // Transfer the number of blocks specified in the transfer lengh field\r\n+};\r\n+\r\n+enum class eTransferDirection\r\n+{\r\n+    TransferToDevice   = 0,\r\n+    TransferFromDevice = 1,\r\n+};\r\n+\r\n+enum class eCheckCondition\r\n+{\r\n+    ErrorTerminate  = 0,\r\n+    CommonTerminate = 1,\r\n+};\r\n+\r\n+enum class eATAProtocolField\r\n+{\r\n+    HardReset                   = 0,\r\n+    SRST                        = 1,\r\n+    NonData                     = 3,\r\n+    PIO_Data_In                 = 4,\r\n+    PIO_Data_Out                = 5,\r\n+    DMA                         = 6,\r\n+    DMA_Queued                  = 7,\r\n+    DeviceDiagnostic            = 8,\r\n+    DeviceReset                 = 9,\r\n+    UDMA_Data_In                = 10,\r\n+    UDMA_Data_Out               = 11,\r\n+    FPDMA                       = 12,\r\n+    ResponseInformation         = 15,\r\n+};\r\n+\r\n+//! Using bit filed\r","path":"vtStorAtaProtocol/Platform/Linux/ProtocolAtaPassThrough.h","position":null,"original_position":74,"commit_id":"5861221980a4c0b4ad268d9088c90533971c3513","original_commit_id":"118bd8fed2c6fa04e3833a638192671b32363e75","user":{"login":"MaiChiemMinh","id":15210308,"avatar_url":"https://avatars.githubusercontent.com/u/15210308?v=3","gravatar_id":"","url":"https://api.github.com/users/MaiChiemMinh","html_url":"https://github.com/MaiChiemMinh","followers_url":"https://api.github.com/users/MaiChiemMinh/followers","following_url":"https://api.github.com/users/MaiChiemMinh/following{/other_user}","gists_url":"https://api.github.com/users/MaiChiemMinh/gists{/gist_id}","starred_url":"https://api.github.com/users/MaiChiemMinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaiChiemMinh/subscriptions","organizations_url":"https://api.github.com/users/MaiChiemMinh/orgs","repos_url":"https://api.github.com/users/MaiChiemMinh/repos","events_url":"https://api.github.com/users/MaiChiemMinh/events{/privacy}","received_events_url":"https://api.github.com/users/MaiChiemMinh/received_events","type":"User","site_admin":false},"body":"fixed","created_at":"2015-12-23T08:55:50Z","updated_at":"2015-12-23T08:55:50Z","html_url":"https://github.com/virtium/vtStor/pull/50#discussion_r48329819","pull_request_url":"https://api.github.com/repos/virtium/vtStor/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/virtium/vtStor/pulls/comments/48329819"},"html":{"href":"https://github.com/virtium/vtStor/pull/50#discussion_r48329819"},"pull_request":{"href":"https://api.github.com/repos/virtium/vtStor/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/virtium/vtStor/pulls/50","id":54335921,"html_url":"https://github.com/virtium/vtStor/pull/50","diff_url":"https://github.com/virtium/vtStor/pull/50.diff","patch_url":"https://github.com/virtium/vtStor/pull/50.patch","issue_url":"https://api.github.com/repos/virtium/vtStor/issues/50","number":50,"state":"open","locked":false,"title":"Issue ata commands","user":{"login":"MaiChiemMinh","id":15210308,"avatar_url":"https://avatars.githubusercontent.com/u/15210308?v=3","gravatar_id":"","url":"https://api.github.com/users/MaiChiemMinh","html_url":"https://github.com/MaiChiemMinh","followers_url":"https://api.github.com/users/MaiChiemMinh/followers","following_url":"https://api.github.com/users/MaiChiemMinh/following{/other_user}","gists_url":"https://api.github.com/users/MaiChiemMinh/gists{/gist_id}","starred_url":"https://api.github.com/users/MaiChiemMinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaiChiemMinh/subscriptions","organizations_url":"https://api.github.com/users/MaiChiemMinh/orgs","repos_url":"https://api.github.com/users/MaiChiemMinh/repos","events_url":"https://api.github.com/users/MaiChiemMinh/events{/privacy}","received_events_url":"https://api.github.com/users/MaiChiemMinh/received_events","type":"User","site_admin":false},"body":"- Issue Ata command to Drives","created_at":"2015-12-22T06:01:34Z","updated_at":"2015-12-23T08:55:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd040fe188a57d06e461dc02f3938fde33acfbde","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/virtium/vtStor/pulls/50/commits","review_comments_url":"https://api.github.com/repos/virtium/vtStor/pulls/50/comments","review_comment_url":"https://api.github.com/repos/virtium/vtStor/pulls/comments{/number}","comments_url":"https://api.github.com/repos/virtium/vtStor/issues/50/comments","statuses_url":"https://api.github.com/repos/virtium/vtStor/statuses/5861221980a4c0b4ad268d9088c90533971c3513","head":{"label":"MaiChiemMinh:Issue_ATA_Commands","ref":"Issue_ATA_Commands","sha":"5861221980a4c0b4ad268d9088c90533971c3513","user":{"login":"MaiChiemMinh","id":15210308,"avatar_url":"https://avatars.githubusercontent.com/u/15210308?v=3","gravatar_id":"","url":"https://api.github.com/users/MaiChiemMinh","html_url":"https://github.com/MaiChiemMinh","followers_url":"https://api.github.com/users/MaiChiemMinh/followers","following_url":"https://api.github.com/users/MaiChiemMinh/following{/other_user}","gists_url":"https://api.github.com/users/MaiChiemMinh/gists{/gist_id}","starred_url":"https://api.github.com/users/MaiChiemMinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaiChiemMinh/subscriptions","organizations_url":"https://api.github.com/users/MaiChiemMinh/orgs","repos_url":"https://api.github.com/users/MaiChiemMinh/repos","events_url":"https://api.github.com/users/MaiChiemMinh/events{/privacy}","received_events_url":"https://api.github.com/users/MaiChiemMinh/received_events","type":"User","site_admin":false},"repo":{"id":45511669,"name":"vtStor","full_name":"MaiChiemMinh/vtStor","owner":{"login":"MaiChiemMinh","id":15210308,"avatar_url":"https://avatars.githubusercontent.com/u/15210308?v=3","gravatar_id":"","url":"https://api.github.com/users/MaiChiemMinh","html_url":"https://github.com/MaiChiemMinh","followers_url":"https://api.github.com/users/MaiChiemMinh/followers","following_url":"https://api.github.com/users/MaiChiemMinh/following{/other_user}","gists_url":"https://api.github.com/users/MaiChiemMinh/gists{/gist_id}","starred_url":"https://api.github.com/users/MaiChiemMinh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MaiChiemMinh/subscriptions","organizations_url":"https://api.github.com/users/MaiChiemMinh/orgs","repos_url":"https://api.github.com/users/MaiChiemMinh/repos","events_url":"https://api.github.com/users/MaiChiemMinh/events{/privacy}","received_events_url":"https://api.github.com/users/MaiChiemMinh/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/MaiChiemMinh/vtStor","description":"This is a library (or set of libraries) to allow easy access and communication to storage devices.","fork":true,"url":"https://api.github.com/repos/MaiChiemMinh/vtStor","forks_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/forks","keys_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/teams","hooks_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/hooks","issue_events_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/issues/events{/number}","events_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/events","assignees_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/assignees{/user}","branches_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/branches{/branch}","tags_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/tags","blobs_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/git/refs{/sha}","trees_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/statuses/{sha}","languages_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/languages","stargazers_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/stargazers","contributors_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/contributors","subscribers_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/subscribers","subscription_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/subscription","commits_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/commits{/sha}","git_commits_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/git/commits{/sha}","comments_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/comments{/number}","issue_comment_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/issues/comments{/number}","contents_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/contents/{+path}","compare_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/merges","archive_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/downloads","issues_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/issues{/number}","pulls_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/pulls{/number}","milestones_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/milestones{/number}","notifications_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/labels{/name}","releases_url":"https://api.github.com/repos/MaiChiemMinh/vtStor/releases{/id}","created_at":"2015-11-04T03:00:36Z","updated_at":"2015-11-04T03:00:37Z","pushed_at":"2015-12-23T08:53:46Z","git_url":"git://github.com/MaiChiemMinh/vtStor.git","ssh_url":"git@github.com:MaiChiemMinh/vtStor.git","clone_url":"https://github.com/MaiChiemMinh/vtStor.git","svn_url":"https://github.com/MaiChiemMinh/vtStor","homepage":"","size":1113,"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":"master"}},"base":{"label":"virtium:master","ref":"master","sha":"0466c02b8c43164cfb21054803cf48acca96f428","user":{"login":"virtium","id":11761410,"avatar_url":"https://avatars.githubusercontent.com/u/11761410?v=3","gravatar_id":"","url":"https://api.github.com/users/virtium","html_url":"https://github.com/virtium","followers_url":"https://api.github.com/users/virtium/followers","following_url":"https://api.github.com/users/virtium/following{/other_user}","gists_url":"https://api.github.com/users/virtium/gists{/gist_id}","starred_url":"https://api.github.com/users/virtium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtium/subscriptions","organizations_url":"https://api.github.com/users/virtium/orgs","repos_url":"https://api.github.com/users/virtium/repos","events_url":"https://api.github.com/users/virtium/events{/privacy}","received_events_url":"https://api.github.com/users/virtium/received_events","type":"Organization","site_admin":false},"repo":{"id":33378855,"name":"vtStor","full_name":"virtium/vtStor","owner":{"login":"virtium","id":11761410,"avatar_url":"https://avatars.githubusercontent.com/u/11761410?v=3","gravatar_id":"","url":"https://api.github.com/users/virtium","html_url":"https://github.com/virtium","followers_url":"https://api.github.com/users/virtium/followers","following_url":"https://api.github.com/users/virtium/following{/other_user}","gists_url":"https://api.github.com/users/virtium/gists{/gist_id}","starred_url":"https://api.github.com/users/virtium/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/virtium/subscriptions","organizations_url":"https://api.github.com/users/virtium/orgs","repos_url":"https://api.github.com/users/virtium/repos","events_url":"https://api.github.com/users/virtium/events{/privacy}","received_events_url":"https://api.github.com/users/virtium/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/virtium/vtStor","description":"This is a library (or set of libraries) to allow easy access and communication to storage devices.","fork":false,"url":"https://api.github.com/repos/virtium/vtStor","forks_url":"https://api.github.com/repos/virtium/vtStor/forks","keys_url":"https://api.github.com/repos/virtium/vtStor/keys{/key_id}","collaborators_url":"https://api.github.com/repos/virtium/vtStor/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/virtium/vtStor/teams","hooks_url":"https://api.github.com/repos/virtium/vtStor/hooks","issue_events_url":"https://api.github.com/repos/virtium/vtStor/issues/events{/number}","events_url":"https://api.github.com/repos/virtium/vtStor/events","assignees_url":"https://api.github.com/repos/virtium/vtStor/assignees{/user}","branches_url":"https://api.github.com/repos/virtium/vtStor/branches{/branch}","tags_url":"https://api.github.com/repos/virtium/vtStor/tags","blobs_url":"https://api.github.com/repos/virtium/vtStor/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/virtium/vtStor/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/virtium/vtStor/git/refs{/sha}","trees_url":"https://api.github.com/repos/virtium/vtStor/git/trees{/sha}","statuses_url":"https://api.github.com/repos/virtium/vtStor/statuses/{sha}","languages_url":"https://api.github.com/repos/virtium/vtStor/languages","stargazers_url":"https://api.github.com/repos/virtium/vtStor/stargazers","contributors_url":"https://api.github.com/repos/virtium/vtStor/contributors","subscribers_url":"https://api.github.com/repos/virtium/vtStor/subscribers","subscription_url":"https://api.github.com/repos/virtium/vtStor/subscription","commits_url":"https://api.github.com/repos/virtium/vtStor/commits{/sha}","git_commits_url":"https://api.github.com/repos/virtium/vtStor/git/commits{/sha}","comments_url":"https://api.github.com/repos/virtium/vtStor/comments{/number}","issue_comment_url":"https://api.github.com/repos/virtium/vtStor/issues/comments{/number}","contents_url":"https://api.github.com/repos/virtium/vtStor/contents/{+path}","compare_url":"https://api.github.com/repos/virtium/vtStor/compare/{base}...{head}","merges_url":"https://api.github.com/repos/virtium/vtStor/merges","archive_url":"https://api.github.com/repos/virtium/vtStor/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/virtium/vtStor/downloads","issues_url":"https://api.github.com/repos/virtium/vtStor/issues{/number}","pulls_url":"https://api.github.com/repos/virtium/vtStor/pulls{/number}","milestones_url":"https://api.github.com/repos/virtium/vtStor/milestones{/number}","notifications_url":"https://api.github.com/repos/virtium/vtStor/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/virtium/vtStor/labels{/name}","releases_url":"https://api.github.com/repos/virtium/vtStor/releases{/id}","created_at":"2015-04-03T19:21:31Z","updated_at":"2015-05-06T18:57:23Z","pushed_at":"2015-12-23T08:53:46Z","git_url":"git://github.com/virtium/vtStor.git","ssh_url":"git@github.com:virtium/vtStor.git","clone_url":"https://github.com/virtium/vtStor.git","svn_url":"https://github.com/virtium/vtStor","homepage":"","size":1325,"stargazers_count":1,"watchers_count":1,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":6,"mirror_url":null,"open_issues_count":6,"forks":6,"open_issues":6,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/virtium/vtStor/pulls/50"},"html":{"href":"https://github.com/virtium/vtStor/pull/50"},"issue":{"href":"https://api.github.com/repos/virtium/vtStor/issues/50"},"comments":{"href":"https://api.github.com/repos/virtium/vtStor/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/virtium/vtStor/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/virtium/vtStor/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/virtium/vtStor/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/virtium/vtStor/statuses/5861221980a4c0b4ad268d9088c90533971c3513"}}}}