* Sync up to trunk r55544.
[reactos.git] / drivers / storage / ide / uniata / todo.txt
1 1. use ScsiPortGetBusData() instead of HalGetBusData() to enumerate ...
2 PCI devices (8b )
3 2. create 2 channels on non-primary HBA (9 )
4 3. add BusMaster detection to ISA & ISA/PCI FindController() routines ...
5 I've decided to modify AtapiFindBusMasterController() for this ...
6 purpose (9 )
7 4. beautify sources ;)
8 5. add LBA support (8 )
9 6. return modified Cylinders in IDENTYFY_DATA to handle HDDs > 8Gb ...
10 properly (8 )
11 7. return good HDD size value for ...
12 a) IdeVerify() (8 )
13 b) SCSIOP_READ_CAPACITY (8 )
14 8. use READ_NATIVE_SIZE command to determine actual drive capacity (8a )
15 9. send FLUSH command to device (9 )
16 10. check (IO_WDx - 0x08) ports in AtapiFindBusMasterController() (+++)
17 11. use SelectDrive() instead of ScsiPortWritePortXXX() (9a )
18 12. remove obsolete AtapiFindPCIController() (9a )
19 13. make a separate routine AtapiInitController() for HBA ...
20 initialization (move there some parts of code from ...
21 AtapiFindBusMasterController() (---)
22 14. add feature enabling code to drive (re)init routine IdeHardReset() ...
23 AtapiHwInitialize() does all necessary staff (10+)
24 15, use AtapiInitController() in AtapiHwInitialize() (---)
25 16. remove obsolete FindBrokenController() and ...
26 AtapiFindNativeModeController() (10 )
27 17. move FindDevices() to id_probe.cpp (10 )
28 18. set HDD PIO modes if no DMA available (10 )
29 19. implement AtaCommand() (10 )
30 20. implement AtaPioMode() & AtaPio2Mode() (10 )
31 21. add some new ChipSets support from FBSD 4.5 (10a)
32 22. set Controller PIO timigs ...
33 a) via (11 ) ??
34 b) intel (+++)
35 c) AcerLabs Aladdin IV/V (23 )
36 23. update Identify block (11 )
37 24. add LBA-48 support (11 )
38 25. use AtapiCommand()/AtapiCommand48() instead of direct port I/O ...
39 a) for Read/Write/Identify (11 )
40 b) Set features, Smart, Set drive params (11c)
41 26. port/implement AtapiDmaInit() for well-known controllers (11 )
42 27. Beautify IdeReadWrite() (11c)
43 28. port/implement DMA-specific parts of interrupt handlers (12 )
44 29. request queueing (16b)
45 30. port/implement DMA-start routine (12 )
46 31. remove MODE_SENSE/SELECT 6<->10 translation. It'll improve ...
47 performance. (11a)
48 32. move InterruptService to DPC (via ScsiPortNotification()) (17 )
49 33. implement ATA_WAIT_INTR branch in AtapiCommand()/AtapiCommand48() (11b)
50 34. fix bugs in Identify structure (11b)
51 35. use normal Lba detection in IssueIdentify() (11b)
52 36. fix bug with default structure elements alignment ...
53 use pragma pack (1) (11c)
54 37. use ATA_WAIT_INTR in IdeReadWrite() for Write branch and ...
55 ATA_IMMEDIATE for Read one (11c)
56 38. update Identify dtructure (11c)
57 39. fix some size detection bugs in IssueIdentify() (11c)
58 40. don't forget setting ExpectingInterrupt flag before WriteBuffer() ...
59 on PIO transfer (12g)
60 41. try generic DMA for old devices instead of PIO default (12g)
61 42. clear 4 lower bits of AccessRange (12g)
62 43. reconstruct _Original_ ConfigInfo (not temporary) on Detect ...
63 phase (13 )
64 44. set 32-bit addressing for all bus types (13 )
65 45. handle invalid address value (-1) in AtapiDmaSetup() (13 )
66 46. add some new ChipSets support from FBSD 4.6 (13c)
67 47. add 'offset' parameter to AtapiGetIoRange() to allow claiming ...
68 different io-regions of the same PCI device by different ...
69 DeviceObjects (representing different channels of this device (13a)
70 48. claim both BusMaster io-regions on SimplexOnly controllers (+++)
71 49. add ATAPI DMA support (19 )
72 50. read 'PSS ID Number: Q133706' in NT DDK & implement Registry- ...
73 supplied params. Use a small hack instead: Argument2 is the ...
74 pointer to UNICODE_STRING we need (18a)
75 51. implement Reinitialize functionality (+++)
76 52. optimize DMA init (move similar parts of code to loops/functions ...
77 a) VIA/AMD/nVidia (13c)
78 b) Promise TX2 (13c)
79 c) Promise Ultra (23 )
80 d) ServerWorks (23 )
81 e) CMD 64x (+++)
82 f) SiS (+++)
83 g) AcerLabs Aladdin IV/V (+++)
84 h) Intel (+++)
85 i) Sil (23 )
86 j) HPT (23 )
87 53. use LogicalUnitExtension instead of xxx[Srb->TargetId] (14 )
88 54. use SrbExtension to manage queue (16b)
89 55. IdeReadWrite() should support non-zero initial offset in DataBuffer ...
90 to allow scatter/gather simulation, queueing & retries
91 56. keep 'dma_tab' in SrbExtension (16b)
92 57. never set SpecificLuExtensionSize to 0 (14a)
93 58. never call ScsiPortGetUncachedExtension() twice for the same HBA, ...
94 even if the 1st call failed. Use deviceExtension->HbaCtrlFlags & ...
95 HBAFLAGS_DMA_DISABLED to indicate such case (16 )
96 59. set deviceExtension->BaseIoAddressBM[1] properly for dual-channel ...
97 HBAs (it was equal to BaseIoAddressBM[0]) (16 )
98 60. set Channel properly in AtapiInterrupt__() for dual-channel HBAs ...
99 (lChannel was ignored) (16 )
100 61. initialize ConfigINfo members required by ...
101 ScsiPortGetUncachedExtension() _before_ call to AtapiDmaAlloc() (16 )
102 62. move SCSI-address-2-Channel/Device translation to macros. This ...
103 makes code more readable & flexible. (16 )
104 63. implement SCSI-bus - IDE-channel and ...
105 SCSI-TargetId - IDE-master/slave correspondance (using p.62) (16 )
106 64. set AutoRequestSense to TRUE (16a)
107 65. set inquiryData->CommandQueue to 1 (16a)
108 66. fill SenseInfoBufer in ...
109 a) IDE MapError() (16a)
110 b) IDE/ATAPI success (20d)
111 67. use AtaReq->ReqState to indicate request processing state (16b)
112 68. fill AtaReq->ReqState in all necessary places to reflect actual ...
113 request state (for optimizer) (18+)
114 69. fix bug with unconditional returning FALSE in AtapiInterrupt() (16c)
115 70. copy pointer to original AtaReq from Srb to InternalSrb (16c)
116 71. check input Srb value for NULL in AtapiRemoveRequest() (16c)
117 72. return from IssueIdentify loop if no error occured. Previous ...
118 versions have a bug: SUCCESS status was ignored & this caused ...
119 obsolet retries (16c)
120 73. clear CTRFLAGS_INTR_DISABLED flag in AtapiEnableInterrupts_Xxx() (17a)
121 74. use Sync Object to manage access to request queue (---)
122 75. remove AtapiEnableInterrupts_Xxx()-related code duplicates from ...
123 AtapiInterrupt__() (17a)
124 76. check calls to AtapiResetController() & related routines. ...
125 See p. 80, 81 (+++)
126 77. use ScsiPortNotification() with RequestTimerCall instead of ...
127 CallDis(En)ableInterrupts to allow servicing 2 channels in ...
128 parallel. See p.87 (---)
129 78. do not use DPC ISR for fast operations, like ...
130 a) DMA-completion (18 )
131 b) sending CDB to ATAPI devices (18a)
132 c) short ATAPI transfers (18a)
133 79. call both AtapiEnableInterrupts_X() & AtapiCallBack_X() on DSC ...
134 restrictive commands completion (18 )
135 80. invoke AtapiStartIo__() from ISR as callback to parform it's ...
136 execution at lower IRQL (19x)
137 81. invoke AtapiResetController() from ISR as callback to parform it's ...
138 execution at lower IRQL (19x)
139 82. do not use ScsiPortCompleteRequest() in AtapiResetController() ...
140 Use standard completion way with setting SenseData instead (18a)
141 83. reset single channel on normal (non-simplex-only) controllers in ...
142 AtapiResetController() (18a)
143 84. sort records in BMList on enumeration phase & simplify init loops ...
144 in DriverEntry() (18a)
145 85. fix bug with wrong numberChannels init for 2nd channel in ...
146 AtapiResetController() (18b)
147 86. implement channel-sensetive AtapiHwInitialize__() and use in in ...
148 AtapiResetController() & AtapiHwInitialize() (18+)
149 87. Due to SCSI-port restrictions we should Enable/Disable interruptys ...
150 for BOTH channels :((((. Implement this.... (19 )
151 88. Deprecate p.87. ;) It doesn't work. Solution: connect manually ...
152 created DeviceObject to the same interrupt & check in its ISR if ...
153 our device interrupted while original ISR/DPC processing ...
154 another channel's interrupt. (20 )
155 90. add error handling on additional DevObj init (20a)
156 91. deprecate p.80,81. We should acquire QueueSpinLock at DIRQL (+/-)
157 92. perform all possible request init on queueing stage even if we ...
158 can't send it to device immediately (use CMD_ACTION_XXX) ...
159 a) for IDE branch (20c)
160 b) for ATAPI branch (21a)
161 93. complete the following commands immediately: ...
162 SCSIOP_INQUIRY, SCSIOP_READ_CAPACITY, SCSIOP_REQUEST_SENSE (20c)
163 94. implement ABORT_COMMAND functionality (20d)
164 95. reorder incoming requests in AtapiQueueRequest() (21c)
165 96. make 2 modes for ResetController(): complete current & complete ...
166 all for p.94. (20d)
167 97. store queue size statistics in HW_CHANNEL (20d)
168 98. remove obsolete DPC code from AtapiInterrupt__() (20e)
169 99. store error rate in HW_CHANNEL (20e)
170 100.try falling back to PIO when DMA error occured (20e)
171 101.use Dma & Pio error rates to distinguish between BadBlock & ...
172 BadCable conditions, See also p.127, 128 (+++)
173 102.don't use HDD's algorithm of falling back to PIO for ATAPI (21 )
174 103.clear REQ_FLAG_DMA_OPERATION when falling back to PIO (21 )
175 104.set REQ_FLAG_REORDERABLE_CMD in IdeReadWrite() (21 )
176 105.store bcount along with lba in ATA_REQ on CMD_ACTION_PREPARE stage (21 )
177 106.do like p.105,104 in AtapiSendCommand for read/write ops (21 )
178 107.set operation type flag (Read/Write) in AtaReq on ...
179 CMD_ACTION_PREPARE stage (21b)
180 108.send comamnds to queue _after_ CMD_ACTION_PREPARE stage (21a)
181 109.fix bug (incorrect queue_size check) in p.108 (21b)
182 110.handle SRB_FLAGS_DISABLE_AUTOSENSE
183 111.handle Srb->QueueAction (21d)
184 112.check SRB_STATUS_AUTOSENSE_VALID usage policy (+++)
185 113.add support for hardware queueing/overlapped commands
186 114.handle immediate commands properly: don't initiate bus reset ...
187 while formatting CDRW (+++)
188 115.add hardware IDE RAID support
189 116.fix bug with data type missmatch in AtapiDmaInit(), ...
190 some VIA branches. This bug caused array boundary cross, leading ...
191 to system crash (22 )
192 117.default udmamode to 0 if there are no well-known devices found ...
193 in AtapiDmaInit(), VIA branch. (22 )
194 118.do not check RevID in AtapiFindDev if RevID == -1 (22 )
195 119.use best settings for newer RevIDs
196 120.fix signed/unsigned missmatch (i vs udmamode) in AtapiDmaInit(), ...
197 VIA branch (22 )
198 121.fix bug with incorrect UDMA init in VIA branch. use UDMA0+i ...
199 instead of UDMA0+udmamode (22a)
200 122.fall back to WDMA mode before PIO (22a)
201 123.use transfer speed slowdown algorithm when high error rate ...
202 detected (22a)
203 124.don't forget updating AtaReq->retry on R/W error (non-DMA) (22a)
204 125.fill AtaReq with ZEROs on TopLevel condition (22a)
205 126.fix bug in IdeVerify() with sending SectorCount to device before ...
206 call to AtaCommand48() and using 0 SectorCount in that call (22a)
207 127.store Error/Recover rate statistics in LunExtension (22a)
208 128.use p.127 for smart slowdown algorithm (22b)
209 129.use lChannel instead of phChannel for indexing in find-channel ...
210 loop in AtapiFindBusMasterController() (22b)
211 130.programm controller for lower speed in Ide/AtapiSendCommand(), not ...
212 in AtapiInterrupt__() (22b)
213 131.use AtapiDmaReinit() routine for p.131 (22b)
214 132.implement per-device queueing (23 )
215 134.add Sil, ICH4, Some HPT, PromiseTX2(133) support from 4.7 (23 )
216 135.fix wrong bit-shift bug in lba48 branch (23 )
217 136.update and sort BusMasterAdapters[] (23a)
218 137.fix bugs in AtapiTimerDpc() that caused incorrect handling of ...
219 DSC restrictive commands ...
220 a) call ScsiPortNotification(RequestTimerCall, ...) when we had ...
221 a 2nd request on entry only (23c)
222 b) check HwScsiTimer1 first to decide whether we have to go to ...
223 GetNextDpc (23c)
224 c) wrong condition check 'time <= DpcTime1' instead of ...
225 'time >= DpcTime1' (23c)
226 d) remove request from queue _before_ call to HwScsiTimer() (23c)
227 138.add support for Acard controllers (25 )
228 139.use some additional code for HP/Promise Dma Star/Stop (25 )
229 140.assign queueing priority for each device
230 141.assign BusMaster io-range to 1st channel only. (26e)
231 142.do not change bus type to PCI for legacy ISA-PCI controllers under ...
232 NT4 (28 )
233 143.implement Device/Vendor/Rev. filtering via registry keys (30+)
234 144.implement transfer mode control IOCTLs (28 )
235 145.set max. transfer length > 64k.
236 146.implement fix for miss-aligned user buffer
237 147.set chip-specific init/operation flags only once during ...
238 initialization and use them in future. Do not perform multiple ...
239 bus scans and other detections. (29a)
240 148.fix bug with miss-functioning Enable/Disable interrupt for (+++)
241 secondary channel (28 )
242 149.add serial-ATA support (29a)
243 150.add support for new controllers (SiS, Promise) (29a)
244 151.fix detection/init algorithms in order to avoid usage of ...
245 non-generic code for unknown chips (29a)
246 152.add support for >2 channels (29a)
247 153.improve Intr-detection loop. Start each time from next channel ...
248 for load-balance (29a)
249 154.add support for machines with >4G physical memory (38 )
250 155.add FreeBSD software RAID support
251 156.use http://www.winimage.com/readfi15.zip for performance checks
252 157.use IOCTL_SCSI_MINIPORT_IDENTIFY in atactl.exe to determine ...
253 PIO/DMA when no uniata.sys is installed (+++)
254 158.