Windows System Software -- Consulting, Training, Development -- Unique Expertise, Guaranteed Results

Before Posting...
Please check out the Community Guidelines in the Announcements and Administration Category.

Acquiring PHY for a SAS drive

Gary_Little-3Gary_Little-3 Member Posts: 1,208
I've got a task that requires that I have the PHY for a SAS disk. Is the PHY for a SAS drive available via the IOCTL_STORAGE or WMI interfaces? I can use the IOCTL_SCSI_MINIPORT interface to send native commands to the HBA and find the PHY, but if it can be acquired by using an existing IOCTL , I'd rather use it.

Gary G. Little

Comments

  • Maxim_S._ShatskihMaxim_S._Shatskih Member Posts: 10,396
    Can SCSI pass-through help?

    Also IOCTL_STORAGE_QUERY_PROPERTY is a possibility.

    --
    Maxim S. Shatskih
    Windows DDK MVP
    xxxxx@storagecraft.com
    http://www.storagecraft.com

    "Gary G. Little" <xxxxx@comcast.net> wrote in message news:xxxxx@ntdev...
    I've got a task that requires that I have the PHY for a SAS disk. Is the PHY for a SAS drive available via the IOCTL_STORAGE or WMI interfaces? I can use the IOCTL_SCSI_MINIPORT interface to send native commands to the HBA and find the PHY, but if it can be acquired by using an existing IOCTL, I'd rather use it.

    Gary G. Little
  • Gary_Little-3Gary_Little-3 Member Posts: 1,208
    Max,

    Taking a quick glance at IOCTL_STORAGE_QUERY_PROPERTY I don't see PHY in any of t he returned information. Was there something you found, or know of, that I may have missed?

    I'm currently looking at a very complex query using IOCTL_SCSI_MINIPORT and multiple LSI MPI messages to search and find the PHY. To do that I've got to have such things as WWN and other driver unique information. I'm hoping that a couple of SCSI pass-through requests might return a known information structure with the PHY contained there-in. I did find the PHY in a structure called MS_SMHBA_SAS_PHY, and I am currently checking to see what magic is needed to get that structure, if it is even possible, in user mode.

    Gary G. Little

    ----- Original Message -----
    From: "Maxim S. Shatskih"
    To: "Windows System Software Devs Interest List"
    Sent: Wednesday, February 2, 2011 10:27:22 AM
    Subject: Re:[ntdev] Acquiring PHY for a SAS drive

    Can SCSI pass-through help?

    Also IOCTL_STORAGE_QUERY_PROPERTY is a possibility.

    --
    Maxim S. Shatskih
    Windows DDK MVP
    xxxxx@storagecraft.com
    http://www.storagecraft.com

    "Gary G. Little" wrote in message news:xxxxx@ntdev...
    I've got a task that requires that I have the PHY for a SAS disk. Is the PHY for a SAS drive available via the IOCTL_STORAGE or WMI interfaces? I can use the IOCTL_SCSI_MINIPORT interface to send native commands to the HBA and find the PHY, but if it can be acquired by using an existing IOCTL, I'd rather use it.

    Gary G. Little

    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  • Alex_GrigAlex_Grig Member Posts: 3,238
    What OS you need to support? SM_API will give you that under Win7/2008R2. Maybe also under Win2008/Vista.

    See hbaapi.h
  • Gary_Little-3Gary_Little-3 Member Posts: 1,208
    WinXP SP3 right now.

    Gary G. Little

    ----- Original Message -----
    From: xxxxx@broadcom.com
    To: "Windows System Software Devs Interest List"
    Sent: Wednesday, February 2, 2011 3:22:25 PM
    Subject: RE:[ntdev] Acquiring PHY for a SAS drive

    What OS you need to support? SM_API will give you that under Win7/2008R2. Maybe also under Win2008/Vista.

    See hbaapi.h


    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  • Alex_GrigAlex_Grig Member Posts: 3,238
    Does the SAS HBA driver support MS SM-API WMI classes?
  • Gary_Little-3Gary_Little-3 Member Posts: 1,208
    It's an LSI SAS controller, and I must support XP SP3. Add to that, that the company currently only uses VS 2010 Express, which does not support ATL, needed for WMI, so it looks ominously like it's IOCTL_SCSI_MINIPORT.

    Gary G. Little

    ----- Original Message -----
    From: xxxxx@broadcom.com
    To: "Windows System Software Devs Interest List"
    Sent: Wednesday, February 2, 2011 5:18:12 PM
    Subject: RE:[ntdev] Acquiring PHY for a SAS drive

    Does the SAS HBA driver support MS SM-API WMI classes?

    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  • Bill_WandelBill_Wandel Member - All Emails Posts: 222
    Why do you need ATL for WMI? Isn't a compiler and the SDK good enough?



    Bill Wandel



    From: xxxxx@lists.osr.com
    [mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
    Sent: Wednesday, February 02, 2011 7:42 PM
    To: Windows System Software Devs Interest List
    Subject: Re: [ntdev] Acquiring PHY for a SAS drive



    It's an LSI SAS controller, and I must support XP SP3. Add to that, that the
    company currently only uses VS 2010 Express, which does not support ATL,
    needed for WMI, so it looks ominously like it's IOCTL_SCSI_MINIPORT.

    Gary G. Little

    ----- Original Message -----
    From: xxxxx@broadcom.com
    To: "Windows System Software Devs Interest List" <xxxxx@lists.osr.com>
    Sent: Wednesday, February 2, 2011 5:18:12 PM
    Subject: RE:[ntdev] Acquiring PHY for a SAS drive

    Does the SAS HBA driver support MS SM-API WMI classes?

    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at
    http://www.osronline.com/page.cfm?name=ListServer


    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at
    http://www.osronline.com/page.cfm?name=ListServer
  • Maxim_S._ShatskihMaxim_S._Shatskih Member Posts: 10,396
    Use WDK for builds, it contains some ATL.

    Also it is possible to use WMI just by using classes from "comdef.h" which is IIRC in any VS.

    --
    Maxim S. Shatskih
    Windows DDK MVP
    xxxxx@storagecraft.com
    http://www.storagecraft.com

    "Gary G. Little" <xxxxx@comcast.net> wrote in message news:xxxxx@ntdev...
    It's an LSI SAS controller, and I must support XP SP3. Add to that, that the company currently only uses VS 2010 Express, which does not support ATL, needed for WMI, so it looks ominously like it's IOCTL_SCSI_MINIPORT.

    Gary G. Little

    ----- Original Message -----
    From: xxxxx@broadcom.com
    To: "Windows System Software Devs Interest List" <xxxxx@lists.osr.com>
    Sent: Wednesday, February 2, 2011 5:18:12 PM
    Subject: RE:[ntdev] Acquiring PHY for a SAS drive

    Does the SAS HBA driver support MS SM-API WMI classes?

    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  • Gary_Little-3Gary_Little-3 Member Posts: 1,208
    Nope, not at all Bill. It's a missing header file that kills the build; atlbase.h. It's available in my VS 2010 Professional on my laptop, but not on my work laptop with Express. I'll follow Max's suggestion and use the WDK files and see, though from my study last night, this may only get to the PHY if I'm on Win 7 and have the MS SM-API WMI classes available.

    Gary G. Little

    ----- Original Message -----
    From: "Bill Wandel"
    To: "Windows System Software Devs Interest List"
    Sent: Wednesday, February 2, 2011 6:49:50 PM
    Subject: RE: [ntdev] Acquiring PHY for a SAS drive

    Why do you need ATL for WMI? Isn't a compiler and the SDK good enough?



    Bill Wandel



    From: xxxxx@lists.osr.com
    [mailto:xxxxx@lists.osr.com] On Behalf Of Gary G. Little
    Sent: Wednesday, February 02, 2011 7:42 PM
    To: Windows System Software Devs Interest List
    Subject: Re: [ntdev] Acquiring PHY for a SAS drive



    It's an LSI SAS controller, and I must support XP SP3. Add to that, that the
    company currently only uses VS 2010 Express, which does not support ATL,
    needed for WMI, so it looks ominously like it's IOCTL_SCSI_MINIPORT.

    Gary G. Little

    ----- Original Message -----
    From: xxxxx@broadcom.com
    To: "Windows System Software Devs Interest List"
    Sent: Wednesday, February 2, 2011 5:18:12 PM
    Subject: RE:[ntdev] Acquiring PHY for a SAS drive

    Does the SAS HBA driver support MS SM-API WMI classes?

    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at
    http://www.osronline.com/page.cfm?name=ListServer


    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at
    http://www.osronline.com/page.cfm?name=ListServer



    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
  • Alex_GrigAlex_Grig Member Posts: 3,238
    If your HBA driver supports MS SMI classes, you can simply call functions in hbaapi.h in Win7. But older miniport drivers written fror XP may not support them.
  • Gary_Little-3Gary_Little-3 Member Posts: 1,208
    Greg,

    No documentation, anywhere that I can find, and the resulting DLL refuses to run on an XP system. So, it's back to Plan B, build LSI messages and send them via the IOCTL_SCSI_MINIPORT. Thanks for the thoughts, Greg and Max. I found some things that I want to try on Win 7.

    Gary G. Little

    ----- Original Message -----
    From: xxxxx@broadcom.com
    To: "Windows System Software Devs Interest List"
    Sent: Thursday, February 3, 2011 9:51:36 AM
    Subject: RE:[ntdev] Acquiring PHY for a SAS drive

    If your HBA driver supports MS SMI classes, you can simply call functions in hbaapi.h in Win7. But older miniport drivers written fror XP may not support them.

    ---
    NTDEV is sponsored by OSR

    For our schedule of WDF, WDM, debugging and other seminars visit:
    http://www.osr.com/seminars

    To unsubscribe, visit the List Server section of OSR Online at http://www.osronline.com/page.cfm?name=ListServer
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Upcoming OSR Seminars
Writing WDF Drivers 25 Feb 2019 OSR Seminar Space
Developing Minifilters 8 April 2019 OSR Seminar Space