Driver Problems? Questions? Issues?
Put OSR's experience to work for you! Contact us for assistance with:
  • Creating the right design for your requirements
  • Reviewing your existing driver code
  • Analyzing driver reliability/performance issues
  • Custom training mixed with consulting and focused directly on your specific areas of interest/concern.
Check us out. OSR, the Windows driver experts.

Monthly Seminars at OSR Headquarters

East Coast USA
Windows Internals and SW Drivers, Dulles (Sterling) VA, 9 April 2018

Writing WDF Drivers I: Core Concepts, Manchester, NH, 7 May 2018

Kernel Debugging & Crash Analysis for Windows, Manchester, NH, 21 May 2018


Go Back   OSR Online Lists > ntdev
Welcome, Guest
You must login to post to this list
  Message 1 of 1  
07 Jan 18 15:54
ntdev member 176608
xxxxxx@taec.toshiba.com
Join Date:
Posts To This List: 1
Storport driver HwFindAdapter.

Hello All, Hi All, I am modifying the Virtual miniport driver code into a storport miniport driver for a commerically available SAS HBA. The following two steps work as expected: 1. INF file modification according to the hardware details - the driver files get installed on Win 7 and Windows registry reflects the correct details. 2. Driver entry routine is called and returns success. Issues and questions: 1. For HwFindAdapter(), function has been modified to look like below:- HwFindAdapter(IN PVOID PDevExt, IN PVOID PHwContext, IN PVOID PBusInformation, IN PCHAR PArgumentString, IN OUT PPORT_CONFIGURATION_INFORMATION PConfigInfo, IN PBOOLEAN PBAgain) Values filled in as reported by WinDbg is shown below: HwFindAdapter(void * PDevExt = 0x8d19b00c, void * PHwContext = 0x00000000, void * PBusInformation = 0x00000000, char * PArgumentString = 0x8d19bd28 "PlaceHolder=0;", struct _PORT_CONFIGURATION_INFORMATION * PConfigInfo = 0x8d193a88, unsigned char * PBAgain = 0x80786683 "") Questions: 1) What can cause PHwContext, PBusInformation values to be 0x00000? How can I fix it? 2) IoRegisterdeviceInterface() at the end of HwFindAdapter function is failing since. PHwContext is 0x00000 The call is modified to be : status = IoRegisterDeviceInterface((PDEVICE_OBJECT) PHwContext, &GUID_DEVCLASS_SCSIADAPTER,NULL,&pDevExt->DeviceInterface); 3) Since it is a commecial HBA, how do I get the memory map and capabilities values from the BAR. I am getting BAR as follows: pDevExt->RegisterBase = (unsigned int *)StorPortGetDeviceBase(pDevExt, PConfigInfo->AdapterInterfaceType, PConfigInfo->SystemIoBusNumber, AccessRange->RangeStart, AccessRange->RangeLength, (BOOLEAN)!AccessRange->RangeInMemory); pDevExt->RegisterBasePhys = AccessRange->RangeStart.LowPart; How can I get HBA capabilities from this? Thanks for your help.
Posting Rules  
You may not post new threads
You may not post replies
You may not post attachments
You must login to OSR Online AND be a member of the ntdev list to be able to post.

All times are GMT -5. The time now is 06:23.


Copyright ©2015, OSR Open Systems Resources, Inc.
Based on vBulletin Copyright ©2000 - 2005, Jelsoft Enterprises Ltd.
Modified under license