On 29/06/2010, at 12:20 PM, J.C. Roberts wrote:
> dlg,
>
> It took me weeks and a few failed attempts with various disk
> manufacturers, but it's done, and we have victory!
>
> The value from the modified atactl output for reg 106: 4000
>
> Finally it seems we have a disk that is properly showing us 4k sectors
> rather than lying. I kind of guessed this disk might be correct
> considering the performance drop in 512b benchmarks compared to 4k and
> larger benchmarks.
>
> I won't be home for a week, but if you can't find a Crucial C300
> locally in .au, let me know and I'll deal with it.
unfortunately 0x4000 doesnt mean the physical block size is 4k. it means that
the low bits of that field are a valid representation of the block size.
0x4000 is saying there is a 1:1 map from physical to logical blocks.
see atascsi.h:
u_int16_t p2l_sect; /* 106 */
#define ATA_ID_P2L_SECT_MASK 0xc000
#define ATA_ID_P2L_SECT_VALID 0x4000
#define ATA_ID_P2L_SECT_SET 0x2000
#define ATA_ID_P2L_SECT_SIZESET 0x1000
#define ATA_ID_P2L_SECT_SIZE 0x000f
169 is cool though ;)
u_int16_t data_set_mgmt; /* 169 */
#define ATA_ID_DATA_SET_MGMT_TRIM 0x0001
dlg
>
> jcr
>
> Model: C300-CTFDDAC256MAG, Rev: 0001, Serial #: 0000000010150000C87C
> Device type: ATA, fixed
> Cylinders: 16383, heads: 16, sec/track: 63, total sectors: 500118192
> Device capabilities:
> ATA standby timer values
> IORDY operation
> IORDY disabling
> Device supports the following standards:
> ATA-4 ATA-5 ATA-6 ATA-7 ATA-8
> Device supports the following command sets:
> NOP command
> READ BUFFER command
> WRITE BUFFER command
> Host Protected Area feature set
> Read look-ahead
> Write cache
> Power Management feature set
> Security Mode feature set
> SMART feature set
> Flush Cache Ext command
> Flush Cache command
> Device Configuration Overlay feature set
> 48bit address feature set
> Set Max security extension commands
> Power-up in standby feature set
> Advanced Power Management feature set
> DOWNLOAD MICROCODE command
> IDLE IMMEDIATE with UNLOAD FEATURE
> SMART self-test
> SMART error logging
> Device has enabled the following command sets/features:
> NOP command
> READ BUFFER command
> WRITE BUFFER command
> Host Protected Area feature set
> Read look-ahead
> Write cache
> Power Management feature set
> SMART feature set
> Flush Cache Ext command
> Flush Cache command
> Device Configuration Overlay feature set
> 48bit address feature set
> DOWNLOAD MICROCODE command
> 0: 0x045a
> 1: 0x3fff
> 2: 0x0000
> 3: 0x0010
> 4: 0x7e00
> 5: 0x0000
> 6: 0x003f
> 7: 0x03d3
> 8: 0xfdd0
> 9: 0x0000
> 10: 0x3030
> 11: 0x3030
> 12: 0x3030
> 13: 0x3030
> 14: 0x3031
> 15: 0x3531
> 16: 0x3030
> 17: 0x3030
> 18: 0x3843
> 19: 0x4337
> 20: 0x0000
> 21: 0x0000
> 22: 0x0000
> 23: 0x3030
> 24: 0x3130
> 25: 0x0000
> 26: 0x0000
> 27: 0x3343
> 28: 0x3030
> 29: 0x432d
> 30: 0x4654
> 31: 0x4444
> 32: 0x4341
> 33: 0x3532
> 34: 0x4d36
> 35: 0x4741
> 36: 0x0000
> 37: 0x0000
> 38: 0x0000
> 39: 0x0000
> 40: 0x0000
> 41: 0x0000
> 42: 0x0000
> 43: 0x0000
> 44: 0x0000
> 45: 0x0000
> 46: 0x0000
> 47: 0x8010
> 48: 0x4000
> 49: 0x2f00
> 50: 0x4000
> 51: 0x0000
> 52: 0x0000
> 53: 0x0007
> 54: 0x3fff
> 55: 0x0010
> 56: 0x003f
> 57: 0x32b0
> 58: 0x1dcf
> 59: 0x0110
> 60: 0xffff
> 61: 0x0fff
> 62: 0x0000
> 63: 0x0007
> 64: 0x0003
> 65: 0x0078
> 66: 0x0078
> 67: 0x0078
> 68: 0x0078
> 69: 0x0000
> 70: 0x0000
> 71: 0x0000
> 72: 0x0000
> 73: 0x0000
> 74: 0x0000
> 75: 0x001f
> 76: 0x070e
> 77: 0x0000
> 78: 0x004c
> 79: 0x0040
> 80: 0x01f0
> 81: 0x0028
> 82: 0x746b
> 83: 0x7d29
> 84: 0x6173
> 85: 0x7469
> 86: 0xbc01
> 87: 0x6163
> 88: 0x407f
> 89: 0x0005
> 90: 0x0005
> 91: 0x00fe
> 92: 0x0000
> 93: 0x0000
> 94: 0x0000
> 95: 0x0040
> 96: 0x0100
> 97: 0x0100
> 98: 0x0000
> 99: 0x0001
> 100: 0x32b0
> 101: 0x1dcf
> 102: 0x0000
> 103: 0x0000
> 104: 0x0100
> 105: 0x0000
> 106: 0x4000
> 107: 0x0000
> 108: 0x5075
> 109: 0x00a1
> 110: 0x7cc8
> 111: 0x0000
> 112: 0x0000
> 113: 0x0000
> 114: 0x0000
> 115: 0x0000
> 116: 0x0000
> 117: 0x0000
> 118: 0x0000
> 119: 0x401e
> 120: 0x401c
> 121: 0x0000
> 122: 0x0000
> 123: 0x0000
> 124: 0x0000
> 125: 0x0000
> 126: 0x0000
> 127: 0x0000
> 128: 0x0029
> 129: 0x3030
> 130: 0x3031
> 131: 0x2e45
> 132: 0x312e
> 133: 0x3030
> 134: 0x0000
> 135: 0x0000
> 136: 0x0000
> 137: 0x3334
> 138: 0x3639
> 139: 0x2020
> 140: 0x2020
> 141: 0x3342
> 142: 0x4c36
> 143: 0x0000
> 144: 0x0000
> 145: 0x0000
> 146: 0x0000
> 147: 0x0000
> 148: 0x0000
> 149: 0x0000
> 150: 0x0000
> 151: 0x0000
> 152: 0x0000
> 153: 0x0000
> 154: 0x0000
> 155: 0x0000
> 156: 0x0000
> 157: 0x0000
> 158: 0x0000
> 159: 0x0000
> 160: 0x0000
> 161: 0x0000
> 162: 0x0000
> 163: 0x0000
> 164: 0x0000
> 165: 0x0000
> 166: 0x0000
> 167: 0x0000
> 168: 0x0000
> 169: 0x0001
> 170: 0x0000
> 171: 0x0000
> 172: 0x0000
> 173: 0x0000
> 174: 0x0000
> 175: 0x0000
> 176: 0x0000
> 177: 0x0000
> 178: 0x0000
> 179: 0x0000
> 180: 0x0000
> 181: 0x0000
> 182: 0x0000
> 183: 0x0000
> 184: 0x0000
> 185: 0x0000
> 186: 0x0000
> 187: 0x0000
> 188: 0x0000
> 189: 0x0000
> 190: 0x0000
> 191: 0x0000
> 192: 0x0000
> 193: 0x0000
> 194: 0x0000
> 195: 0x0000
> 196: 0x0000
> 197: 0x0000
> 198: 0x0000
> 199: 0x0000
> 200: 0x0000
> 201: 0x0000
> 202: 0x0000
> 203: 0x0000
> 204: 0x0000
> 205: 0x0000
> 206: 0x003d
> 207: 0x0000
> 208: 0x0000
> 209: 0x4000
> 210: 0x0000
> 211: 0x0000
> 212: 0x0000
> 213: 0x0000
> 214: 0x0000
> 215: 0x0000
> 216: 0x0000
> 217: 0x0001
> 218: 0x0000
> 219: 0x0000
> 220: 0x0000
> 221: 0x0000
> 222: 0x0000
> 223: 0x0000
> 224: 0x0000
> 225: 0x0000
> 226: 0x0000
> 227: 0x0000
> 228: 0x0000
> 229: 0x0000
> 230: 0x0000
> 231: 0x0000
> 232: 0x0000
> 233: 0x0000
> 234: 0x0001
> 235: 0x00ff
> 236: 0x0000
> 237: 0x0000
> 238: 0x0000
> 239: 0x0000
> 240: 0x0000
> 241: 0x0000
> 242: 0x0000
> 243: 0x0000
> 244: 0x0000
> 245: 0x0000
> 246: 0x0000
> 247: 0x0000
> 248: 0x0000
> 249: 0x0000
> 250: 0x0000
> 251: 0x0000
> 252: 0x0000
> 253: 0x0000
> 254: 0x0000
> 255: 0x57a5
>
>
>
>
> --
> The OpenBSD Journal - http://www.undeadly.org