mirror of
https://github.com/Telecominfraproject/OpenNetworkLinux.git
synced 2025-12-25 17:27:01 +00:00
Enable/Disable ISMT driver through module parameter.
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
diff -urpN a/drivers/i2c/busses/i2c-ismt.c b/drivers/i2c/busses/i2c-ismt.c
|
||||
--- a/drivers/i2c/busses/i2c-ismt.c 2016-12-21 02:12:49.589201206 +0000
|
||||
+++ b/drivers/i2c/busses/i2c-ismt.c 2016-12-21 02:15:03.973204122 +0000
|
||||
@@ -200,6 +200,11 @@ MODULE_PARM_DESC(bus_speed, "Bus Speed i
|
||||
module_param(delay, uint, S_IRUGO);
|
||||
MODULE_PARM_DESC(delay, "Delay in microsecs before access (1000 by default)");
|
||||
|
||||
+/* Enable/Disable driver */
|
||||
+static unsigned int enable = 1;
|
||||
+module_param(enable, uint, S_IRUGO);
|
||||
+MODULE_PARM_DESC(enable, "Enable or disable the ISMT driver (enabled by default)");
|
||||
+
|
||||
/**
|
||||
* __ismt_desc_dump() - dump the contents of a specific descriptor
|
||||
*/
|
||||
@@ -852,6 +857,11 @@ ismt_probe(struct pci_dev *pdev, const s
|
||||
struct ismt_priv *priv;
|
||||
unsigned long start, len;
|
||||
|
||||
+ if(!enable) {
|
||||
+ dev_warn(&pdev->dev, "module is disabled.\n");
|
||||
+ return -ENODEV;
|
||||
+ }
|
||||
+
|
||||
priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL);
|
||||
if (!priv)
|
||||
return -ENOMEM;
|
||||
@@ -13,3 +13,4 @@ driver-arista-piix4-mux-patch.patch
|
||||
3.16-fs-overlayfs.patch
|
||||
driver-igb-version-5.3.54.patch
|
||||
driver-support-intel-igb-bcm5461X-phy.patch
|
||||
driver-i2c-bus-intel-ismt-enable-param.patch
|
||||
|
||||
Reference in New Issue
Block a user