Hi Guys,
Found this great site:
http://alter.org.ua/soft/win/uni_ata/index.php?lang=en&
His driver is compatible from NT4-XP and I think it would be useful to us.
Best regards, Alex Ionescu
It does look good. My PCI IDE Controller is listed as working, and to have the drives available on first-boot would be great.
It would also bring ready SATA Support to ROS, as well as reinforce LBA48 support.
If you can get the source ported to ROS, it'll do wonders.
On 6/4/05, Alex Ionescu ionucu@videotron.ca wrote:
Hi Guys,
Found this great site:
http://alter.org.ua/soft/win/uni_ata/index.php?lang=en&
His driver is compatible from NT4-XP and I think it would be useful to us.
Best regards, Alex Ionescu _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
What licence is this code under? I cant see any mention in the source or website, we should make sure it is ok to use in ReactOS first before we go and use it...
Jonathan Wilson wrote:
What licence is this code under? I cant see any mention in the source or website, we should make sure it is ok to use in ReactOS first before we go and use it...
I'm sure we can ask him to GPL it, if it's not already. His code seems FOSS friendly. We would credit him of course.
Best regards, Alex Ionescu
Hi, I have already contacted author about a month ago, and really he is glad to make this driver work together with ReactOS. I asked about the license, AFAI could understand it isn't GPL, but it isn't any license really. So he said he allows and would be glad if this could be used in ReactOS.
I wanted to try this driver for a long time, but unfortunately didn't have time, so I have 0 idea if it works in ReactOS or not :-).
WBR, Aleksey Bragin.
----- Original Message ----- From: "Alex Ionescu" ionucu@videotron.ca To: "ReactOS Development List" ros-dev@reactos.com Sent: Saturday, June 04, 2005 4:27 AM Subject: Re: [ros-dev] Univesal ATA Driver + Source
Jonathan Wilson wrote:
What licence is this code under? I cant see any mention in the source or website, we should make sure it is ok to use in ReactOS first before we go and use it...
I'm sure we can ask him to GPL it, if it's not already. His code seems FOSS friendly. We would credit him of course.
Best regards, Alex Ionescu _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Jonathan Wilson wrote:
What licence is this code under? I cant see any mention in the source or website, we should make sure it is ok to use in ReactOS first before we go and use it...
I looked at the source and all I see is this,
/*++
Copyright (c) 2002-2005 Alexandr A. Telyatnikov (Alter)
Module Name: atapi.h
Abstract: This file contains IDE, ATA, ATAPI and SCSI Miniport definitions and function prototypes.
Author: Alexander A. Telyatnikov (Alter)
Environment: kernel mode only
Notes:
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Revision History:
Some definitions were taken from standard ATAPI.SYS sources from NT4 DDK by Mike Glass (MGlass)
Some definitions were taken from FreeBSD 4.3-4.6 ATA driver by Søren Schmidt, Copyright (c) 1998,1999,2000,2001
Code was changed/updated by Alter, Copyright (c) 2002-2004
--*/
And this from the todo.txt,
156.use http://www.winimage.com/readfi15.zip for performance checks
TwoTailedFox wrote:
It does look good. My PCI IDE Controller is listed as working, and to have the drives available on first-boot would be great.
It would also bring ready SATA Support to ROS, as well as reinforce LBA48 support.
If you can get the source ported to ROS, it'll do wonders.
It's a Windows driver, so there's no "porting" involved. That's the whole point of ReactOS, really.
Best regards, Alex Ionescu
Alex Ionescu wrote:
Hi Guys,
Found this great site:
http://alter.org.ua/soft/win/uni_ata/index.php?lang=en&
His driver is compatible from NT4-XP and I think it would be useful to us.
Best regards, Alex Ionescu _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Hi,
for using this driver or improving our atapi driver we need to implement some more functions in scsiport. The stoppers are ScsiPortValidateRange and ScsiPortGetDeviceBase at the moment. The atapi or uata driver can't detect if an ide controller is already recognized by the driver itself or another driver. Some time ago I've modified atapi a little bit. Now atapi does handle more than one ide controller.
- Hartmut
Index: drivers/storage/atapi/atapi.c =================================================================== --- drivers/storage/atapi/atapi.c (Revision 15763) +++ drivers/storage/atapi/atapi.c (Arbeitskopie) @@ -123,7 +123,15 @@ ULONG Dummy; } UNIT_EXTENSION, *PUNIT_EXTENSION;
-PCI_SLOT_NUMBER LastSlotNumber; +#if 1 +/* + * FIXME: + * ScsiPortGetDeviceBase must check if a resource is already in use. + * This needs to implement IoReportResourceUsage or IoReportResourceForDetection. + */ +ULONG CommandPortArray[64]; +ULONG CommandPortCount = 0; +#endif
#ifdef ENABLE_NATIVE_PCI typedef struct _PCI_NATIVE_CONTROLLER @@ -388,8 +396,6 @@ InitData.DeviceId = 0; InitData.DeviceIdLength = 0;
- LastSlotNumber.u.AsULONG = 0xFFFFFFFF; - Status = ScsiPortInitialize(DriverObject, RegistryPath, &InitData, @@ -437,6 +443,27 @@ #ifdef ENABLE_DMA ULONG Length; #endif +#if 1 + /* + * FIXME: + * ScsiPortGetDeviceBase must check if a resource is already in use. + * This needs to implement IoReportResourceUsage or IoReportResourceForDetection. + */ + ULONG i; + + for (i = 0; i < CommandPortCount; i++) + { + if (CommandPortArray[i] == CommandPortBase) + { + break; + } + } + if (i < CommandPortCount || + CommandPortCount >= 64) + { + return FALSE; + } +#endif IoAddress = ScsiPortConvertUlongToPhysicalAddress(CommandPortBase); IoBase = ScsiPortGetDeviceBase((PVOID)DevExt, InterfaceType, @@ -534,6 +561,14 @@ { ConfigInfo->AtdiskSecondaryClaimed = TRUE; } +#if 1 + /* + * FIXME: + * ScsiPortGetDeviceBase must check if a resource is already in use. + * This needs to implement IoReportResourceUsage or IoReportResourceForDetection. + */ + CommandPortArray[CommandPortCount++] = CommandPortBase; +#endif return TRUE; }
@@ -600,10 +635,10 @@ } }
- DPRINT("%x %x\n", PciConfig.BaseClass, PciConfig.SubClass); - if (PciConfig.BaseClass == 0x01 && - PciConfig.SubClass == 0x01) // && -// (PciConfig.ProgIf & 0x05) == 0) + DPRINT("%x %x %x\n", PciConfig.BaseClass, PciConfig.SubClass, PciConfig.ProgIf); + if (PciConfig.BaseClass == PCI_CLASS_MASS_STORAGE_CTLR && + PciConfig.SubClass == PCI_SUBCLASS_MSC_IDE_CTLR && + (PciConfig.ProgIf & 0x05) == 0) { /* both channels are in compatibility mode */ DPRINT("Bus %1lu Device %2lu Func %1lu VenID 0x%04hx DevID 0x%04hx\n", @@ -799,9 +834,30 @@ break; } } - if (Count < sizeof(PciNativeController)/sizeof(PCI_NATIVE_CONTROLLER)) + if (PciConfig.BaseClass == 0x01) { - /* We have found a known native pci ide controller */ + DPRINT("Bus %1lu Device %2lu Func %1lu VenID 0x%04hx DevID 0x%04hx\n", + ConfigInfo->SystemIoBusNumber, + SlotNumber.u.bits.DeviceNumber, + SlotNumber.u.bits.FunctionNumber, + PciConfig.VendorID, + PciConfig.DeviceID); + DPRINT("BaseClass %02x, SubClass %02x, ProgIF %02x\n", PciConfig.BaseClass, PciConfig.SubClass, PciConfig.ProgIf); + DPRINT("BaseAddresses[0] %08x\n", PciConfig.u.type0.BaseAddresses[0]); + DPRINT("BaseAddresses[1] %08x\n", PciConfig.u.type0.BaseAddresses[1]); + DPRINT("BaseAddresses[2] %08x\n", PciConfig.u.type0.BaseAddresses[2]); + DPRINT("BaseAddresses[3] %08x\n", PciConfig.u.type0.BaseAddresses[3]); + DPRINT("BaseAddresses[4] %08x\n", PciConfig.u.type0.BaseAddresses[4]); + DPRINT("BaseAddresses[5] %08x\n", PciConfig.u.type0.BaseAddresses[5]); + DPRINT("InterruptLine %d\n", PciConfig.u.type0.InterruptLine); + } + + if (Count < sizeof(PciNativeController)/sizeof(PCI_NATIVE_CONTROLLER) || + (PciConfig.BaseClass == PCI_CLASS_MASS_STORAGE_CTLR && + PciConfig.SubClass == PCI_SUBCLASS_MSC_IDE_CTLR && + (PciConfig.ProgIf & 0x05) == 0x05)) + { + /* We have found a known or a native pci ide controller */ if ((PciConfig.ProgIf & 0x80) && (PciConfig.u.type0.BaseAddresses[4] & PCI_ADDRESS_IO_SPACE)) { DPRINT("Found IDE Bus Master controller!\n"); @@ -818,35 +874,19 @@ ConfigInfo->MaximumNumberOfTargets = 2; ConfigInfo->MaximumTransferLength = 0x10000; /* max 64Kbyte */
- /* FIXME: - We must not store and use the last tested slot number. If there is a recall - to the some device and we will claim the primary channel again than the call - to ScsiPortGetDeviceBase in AtapiClaimHwResource will fail and we can try to - claim the secondary channel. - */ ChannelFound = FALSE; - if (LastSlotNumber.u.AsULONG != SlotNumber.u.AsULONG) + /* try to claim primary channel */ + if ((PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_SPACE) && + (PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_SPACE)) { - /* try to claim primary channel */ - if ((PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_SPACE) && - (PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_SPACE)) - { - /* primary channel is enabled */ - ChannelFound = AtapiClaimHwResources(DevExt, - ConfigInfo, - PCIBus, - PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_ADDRESS_MASK, - PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_ADDRESS_MASK, - BusMasterBasePort, - PciConfig.u.type0.InterruptLine); - if (ChannelFound) - { - AtapiFindDevices(DevExt, ConfigInfo); - *Again = TRUE; - ConfigInfo->SlotNumber = LastSlotNumber.u.AsULONG = SlotNumber.u.AsULONG; - return SP_RETURN_FOUND; - } - } + /* primary channel is enabled */ + ChannelFound = AtapiClaimHwResources(DevExt, + ConfigInfo, + PCIBus, + PciConfig.u.type0.BaseAddresses[0] & PCI_ADDRESS_IO_ADDRESS_MASK, + PciConfig.u.type0.BaseAddresses[1] & PCI_ADDRESS_IO_ADDRESS_MASK, + BusMasterBasePort, + PciConfig.u.type0.InterruptLine); } if (!ChannelFound) { @@ -862,21 +902,20 @@ PciConfig.u.type0.BaseAddresses[3] & PCI_ADDRESS_IO_ADDRESS_MASK, BusMasterBasePort ? BusMasterBasePort + 8 : 0, PciConfig.u.type0.InterruptLine); - if (ChannelFound) - { - AtapiFindDevices(DevExt, ConfigInfo); - *Again = FALSE; - LastSlotNumber.u.AsULONG = 0xFFFFFFFF; - return SP_RETURN_FOUND; - } } } + if (ChannelFound) + { + AtapiFindDevices(DevExt, ConfigInfo); + *Again = TRUE; + ConfigInfo->SlotNumber = SlotNumber.u.AsULONG; + return SP_RETURN_FOUND; + } } } StartFunctionNumber = 0; } *Again = FALSE; - LastSlotNumber.u.AsULONG = 0xFFFFFFFF; DPRINT("AtapiFindNativePciController() done!\n");
return(SP_RETURN_NOT_FOUND);
Hartmut Birr wrote:
Alex Ionescu wrote:
Hi Guys,
Found this great site:
http://alter.org.ua/soft/win/uni_ata/index.php?lang=en&
His driver is compatible from NT4-XP and I think it would be useful to us.
Best regards, Alex Ionescu _______________________________________________ Ros-dev mailing list Ros-dev@reactos.com http://reactos.com:8080/mailman/listinfo/ros-dev
Hi,
for using this driver or improving our atapi driver we need to implement some more functions in scsiport. The stoppers are ScsiPortValidateRange and ScsiPortGetDeviceBase at the moment. The atapi or uata driver can't detect if an ide controller is already recognized by the driver itself or another driver. Some time ago I've modified atapi a little bit. Now atapi does handle more than one ide controller.
- Hartmut
One more thing! For those who may be interested in hacking atapi!
Do not break ATA removable drive support! If anyone/you are going to make changes to atapi, anyone/you better have real hardware and a IOMEGA or like ZIP drive! We have to test all possibilities!
Seriously, B^| James
James Tabor wrote:
Hartmut Birr wrote:
Hi,
for using this driver or improving our atapi driver we need to implement some more functions in scsiport. The stoppers are ScsiPortValidateRange and ScsiPortGetDeviceBase at the moment. The atapi or uata driver can't detect if an ide controller is already recognized by the driver itself or another driver. Some time ago I've modified atapi a little bit. Now atapi does handle more than one ide controller.
- Hartmut
One more thing! For those who may be interested in hacking atapi!
Do not break ATA removable drive support! If anyone/you are going to make changes to atapi, anyone/you better have real hardware and a IOMEGA or like ZIP drive! We have to test all possibilities!
Seriously, B^| James
Hi,
I've a iomeaga Zip250 drive ;-) .
- Hartmut
Hartmut Birr wrote:
James Tabor wrote:
Hartmut Birr wrote:
Hi,
for using this driver or improving our atapi driver we need to implement some more functions in scsiport. The stoppers are ScsiPortValidateRange and ScsiPortGetDeviceBase at the moment. The atapi or uata driver can't detect if an ide controller is already recognized by the driver itself or another driver. Some time ago I've modified atapi a little bit. Now atapi does handle more than one ide controller.
- Hartmut
One more thing! For those who may be interested in hacking atapi!
Do not break ATA removable drive support! If anyone/you are going to make changes to atapi, anyone/you better have real hardware and a IOMEGA or like ZIP drive! We have to test all possibilities!
Seriously, B^| James
Hi,
I've a iomeaga Zip250 drive ;-) .
- Hartmut
Hi! I thought you had one, I remember back when testing you had a zip drive.
It's a sticky point for me, I have to use both of my zips' for testing ros. Basic building of apps and copy files stuff. He! When someone says ATA or atapi, my back starts to hurt.
The email was not meant for you BTW. Thanks, James