- Timestamp:
- Oct 11, 2010 10:10:16 AM (14 years ago)
- svn:sync-xref-src-repo-rev:
- 66551
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Storage/DevAHCI.cpp
r33031 r33035 2802 2802 } 2803 2803 2804 static uint32_t ataChecksum(void* ptr, size_t count) 2805 { 2806 uint8_t u8Sum = 0xa5, *p = (uint8_t*)ptr; 2807 size_t i; 2808 2809 for (i = 0; i < count; i++) 2810 { 2811 u8Sum += *p++; 2812 } 2813 2814 return (uint8_t)-(int32_t)u8Sum; 2815 } 2816 2804 2817 static int ahciIdentifySS(PAHCIPort pAhciPort, void *pvBuf) 2805 2818 { … … 2872 2885 p[75] = RT_H2LE_U16(31); /* We support 32 commands */ 2873 2886 p[76] = RT_H2LE_U16((1 << 8) | (1 << 2)); /* Native command queuing and Serial ATA Gen2 (3.0 Gbps) speed supported */ 2887 2888 uint32_t uCsum = ataChecksum(p, 510); 2889 p[255] = RT_H2LE_U16(0xa5 | (uCsum << 8)); /* Integrity word */ 2874 2890 2875 2891 return VINF_SUCCESS;
Note:
See TracChangeset
for help on using the changeset viewer.