none
Detect RAID controller connected on PCI slot RRS feed

  • Question

  • Hi i am woking on RAID controller and i want to detect my RAID and display the information of RAID controller on console. I am new to WDk. During R&D i found that to detect RAID card i need to access PCI configuration space resistors. I just want to know right approach to detect RAID controller. Please help me how can i read RAID information(such as model no, port no).....
    Saturday, July 12, 2014 12:46 PM

Answers

All replies

  • Well accessing the PCI configuration space registers is definitely not it, doing this leads to subtle crashes that may not appear to be your driver and take forever to debug.  

    From your driver you have two approaches that can help.  First IoGetDeviceProperty can give you the Hardware ID (and other information) which may be all you need.  The other approach is to use IRP_MN_READ_CONFIG to read the configuration space.  There is a good paper (though old) at http://www.hollistech.com/Resources/Misc%20articles/getbusdata.doc that describes how this works.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Saturday, July 12, 2014 1:18 PM
  • Hi i am woking on RAID controller and i want to detect my RAID and display the information of RAID controller on console. I am new to WDk. During R&D i found that to detect RAID card i need to access PCI configuration space resistors. I just want to know right approach to detect RAID controller. Please help me how can i read RAID information(such as model no, port no).....

    Given the rise of Storage Spaces and ZFS there is less need for a RAID card.

    You can check device IDs and consult a list of known RAID cards


    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Saturday, July 12, 2014 1:33 PM
  • Well since the OP asked about working with a RAID controller, I don't see where ZFS (which is Linux) or Storage Spaces which are basically software raid with all its problems makes any sense.  There is still a lot of reasons to support RAID controllers, and hopefully the OP can do a good job on such support.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Saturday, July 12, 2014 1:40 PM
  • Well since the OP asked about working with a RAID controller, I don't see where ZFS (which is Linux) or Storage Spaces which are basically software raid with all its problems makes any sense.  There is still a lot of reasons to support RAID controllers, and hopefully the OP can do a good job on such support.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    I have worked with RAID cards for so long ...... My old PCI RAID card is very obsolete but it works. 

    not too many vendors to contend with. windows has drivers for most cards on the desktop and server distributions so much of the hard work is already done.

    designing a RAID card requires some logic on the card itself to do the RAID calculations, that requires some sophisticated development hardware and test boards

    then the interface over the PCI Express is needed.

    each slot is can be enumerated and its device ID read, that is done by the BIOS


    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Saturday, July 12, 2014 1:52 PM
  • There have never been a lot of RAID vendors, but RAID is far from dead including the fact the NVME which may well be the future of storage supports it in the standard.  Having been working with RAID and storage for over 20 years it unlikely a that software solutions will ever completely replace RAID, and therefore there will be new RAID controllers and the need for new drivers.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Saturday, July 12, 2014 1:57 PM
  • I have looked at a few high-end cards, with SSD in mind, and the cards I can afford seem to be under powered

    most cards are using PCI Express 3.0 x8 but most servers are still using PCI Express 2.0 or even the 1.1 version.

    SSD are now faster than SATA desktop speeds. This is the biggest concern I have identified.

    so 16 channels will be a big bottleneck



    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Saturday, July 12, 2014 2:05 PM
  • guys actually i have silicon image RAID controller and two hard disks connected with that controller. My main motive here is to send SMART commands to those HDDs which are connected with RAID controller using DeviceIoControl( ). So now i want to know after getting RAID info with IoGetDeviceProperty() how i will sent ATA commands to get SMART data to HDD which is connected to RAID controler.

    Saturday, July 12, 2014 3:05 PM
  • That really depends on the RAID controller.  How you send a command to an indivual disk can be highly dependant on the hardware/software mix.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Saturday, July 12, 2014 11:14 PM
  • Could you please give me little idea to send SMART commands. I want to send first idenify device(0xEC) command to HDD..
    Sunday, July 13, 2014 5:49 AM
  • Could you please give me little idea to send SMART commands. I want to send first idenify device(0xEC) command to HDD..

    SMART is a read only register on a given hard disk. It can be obtained along with other data using IDENT which will provide a 512 byte record with lots of information

    this sort of stuff is usually handled by the BIOS

    4K sectors mean now 2 sizes of disk transfer area are now needed


    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Sunday, July 13, 2014 1:56 PM
  • Well if the controller and driver support it you can use the SMART_SEND_DRIVE_COMMAND IOCTL see http://msdn.microsoft.com/en-us/library/windows/hardware/ff566206(v=vs.85).aspx   But as I said in the previous post, this really depends on what the software and controller support.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Sunday, July 13, 2014 2:12 PM
  • And assuming the controller doesn't support it?  Where does one get that information?
    Tuesday, July 29, 2014 4:59 PM
  • You need to ask the controller manufacturer what their hardware and driver support.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Tuesday, July 29, 2014 5:15 PM
  • You need to ask the controller manufacturer what their hardware and driver support.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    another idea is the ASPI interface, check with adaptec manuals


    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Tuesday, July 29, 2014 6:30 PM
  • That does assume an Adaptec controller, and an older OS.  As far as I know, that died with XP (and not even good support on Server 2003). 


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Tuesday, July 29, 2014 6:40 PM
  • That does assume an Adaptec controller, and an older OS.  As far as I know, that died with XP (and not even good support on Server 2003). 


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    SPTD is a SCSI passthrough that is used by the virtual CD program Daemon Tools

    ATAPI was expanded for optical disks

    SCSI is still around with RAID cards and Fiber Channel, and SCSI Express is coming next

    Mostly with Linux I see this sort of stuff


    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Wednesday, July 30, 2014 12:26 PM
  • SCSI is around for a lot of things, including the interface protocal for the disk and CD drivers to the underlying controller driver.   Saying mostly with Linux stuff indicates a serious lack of knowledge of the windows kernel, just about every block device goes through SCSI protocol at some point.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    Wednesday, July 30, 2014 12:49 PM
  • SCSI is around for a lot of things, including the interface protocal for the disk and CD drivers to the underlying controller driver.   Saying mostly with Linux stuff indicates a serious lack of knowledge of the windows kernel, just about every block device goes through SCSI protocol at some point.


    Don Burn Windows Filesystem and Driver Consulting Website: http://www.windrvr.com

    I have used kernel32 is many projects, as part of the Win32 API

    mostly for utility stuff like how much RAM does is available etc

    http://www.geoffchappell.com/studies/windows/win32/kernel32/api/


    Corsair Carbide 300R with window
    Corsair TX850V2 70A@12V
    Asus M5A99FX PRO R2.0 CFX/SLI
    AMD Phenom II 965 C3 Black Edition @ 4.0 GHz
    G.SKILL RipjawsX DDR3-2133 8 GB
    EVGA GTX 6600 Ti FTW Signature 2(Gk104 Kepler)
    Asus PA238QR IPS LED HDMI DP 1080p
    ST2000DM001 & Windows 8.1 Enterprise x64
    Microsoft Wireless Desktop 2000
    Wacom Bamboo CHT470M
    Place your rig specifics into your signature like I have, makes it 100x easier to understand!

    Hardcore Games Legendary is the Only Way to Play!

    Wednesday, July 30, 2014 1:03 PM