pcid: Remove method to get the current feature status
Devices should never change the feature status behind the back of the driver, so storing the current status after setting it is fine. Drivers should reset all state when they start to recover from a crashed driver, so they shouldn't need to get the current feature status at startup either.
This commit is contained in:
@@ -194,7 +194,6 @@ pub enum PcidClientRequest {
|
||||
RequestFeatures,
|
||||
RequestCapabilities,
|
||||
EnableFeature(PciFeature),
|
||||
FeatureStatus(PciFeature),
|
||||
FeatureInfo(PciFeature),
|
||||
SetFeatureInfo(SetFeatureInfo),
|
||||
ReadConfig(u16),
|
||||
@@ -295,13 +294,6 @@ impl PcidServerHandle {
|
||||
other => Err(PcidClientHandleError::InvalidResponse(other)),
|
||||
}
|
||||
}
|
||||
pub fn feature_status(&mut self, feature: PciFeature) -> Result<FeatureStatus> {
|
||||
self.send(&PcidClientRequest::FeatureStatus(feature))?;
|
||||
match self.recv()? {
|
||||
PcidClientResponse::FeatureStatus(feat, status) if feat == feature => Ok(status),
|
||||
other => Err(PcidClientHandleError::InvalidResponse(other)),
|
||||
}
|
||||
}
|
||||
pub fn enable_feature(&mut self, feature: PciFeature) -> Result<()> {
|
||||
self.send(&PcidClientRequest::EnableFeature(feature))?;
|
||||
match self.recv()? {
|
||||
|
||||
Reference in New Issue
Block a user