Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issuing SCSI commands at probe time.



Folks,

I'm working on a device driver that needs to issue a GET_CONFIGURATION command at probe time, to determine whether or not the device is a suitable candidate for matching.

Unfortunately, issuing SCSI commands from within the probe routine causes a kernel panic.

I tried returning false from start, to indicate that the device is unsuitable, but that seems to have a fairly high footprint on the system (CreateStorageServiceNub ends up being called before I have a chance issue the GET_CONFIGURATION command). I also noticed that stop was never called, but if I call it when I'm going to fail start, the system kernel panics a minute or two after it is booted.

bool com_softarch_BD_SCSIPeripheralDevice::start(IOService* provider)
{
if (super::start(provider))
{
if (this->SAI_supports_BD_Read_Profile()) // Issues a GET_CONFIGURATION command.
{
return true;
}


    // this->stop(provider);	// !!! Causes a delayed kernel panic.
  }

  return false;
}

I'd really like to get this out of the start routine - is there a way that I can safely issue the GET_CONFIGURATION command from my probe routine?

Thanks,

Ron Aldrich
Software Architects, Inc.

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-drivers mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/darwin-drivers/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.