- Fix a couple of bugs in the uniata ATA code spotted by bearwindows. ICH8/ICH9/ICH10 should be supported now.

svn path=/trunk/; revision=43075
This commit is contained in:
Aleksey Bragin 2009-09-18 22:25:34 +00:00
parent 056eed5ceb
commit 13ebb47cf4

View file

@ -1040,6 +1040,13 @@ UniataFindBusMasterController(
ConfigInfo->AlignmentMask = 0x00000003;
MasterDev = IsMasterDev(&pciData);
if(MasterDev) {
KdPrint2((PRINT_PREFIX "MasterDev (1)\n"));
deviceExtension->NumberChannels = 1;
}
found = UniataChipDetect(HwDeviceExtension, &pciData, i, ConfigInfo, &simplexOnly);
KdPrint2((PRINT_PREFIX "ForceSimplex = %d\n", simplexOnly));
KdPrint2((PRINT_PREFIX "HwFlags = %x\n (0)", deviceExtension->HwFlags));
@ -1091,14 +1098,6 @@ UniataFindBusMasterController(
deviceExtension->UseDpc = FALSE;
}
MasterDev = IsMasterDev(&pciData);
if(MasterDev) {
KdPrint2((PRINT_PREFIX "MasterDev (1)\n"));
deviceExtension->MasterDev = TRUE;
deviceExtension->NumberChannels = 1;
}
if(MasterDev) {
if((WinVer_Id() <= WinVer_NT) && AltInit && FirstMasterOk) {
// this is the 2nd attempt to init this controller by OUR driver
@ -1242,7 +1241,7 @@ UniataFindBusMasterController(
deviceExtension->UseDpc = FALSE;
}
if(simplexOnly || !MasterDev /*|| (WinVer_Id() > WinVer_NT)*/) {
if(simplexOnly && MasterDev /*|| (WinVer_Id() > WinVer_NT)*/) {
if(deviceExtension->NumberChannels < 2) {
KdPrint2((PRINT_PREFIX "set NumberChannels = 2\n"));
deviceExtension->NumberChannels = 2;