lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1209732735-24443-4-git-send-email-nskamat@ti.com>
Date:	Fri,  2 May 2008 07:52:15 -0500
From:	Nishant Kamat <nskamat@...com>
To:	netdev@...r.kernel.org
Cc:	Nishant Kamat <nskamat@...com>
Subject: [PATCH 3/3] NET: SMC911X: Add support for OMAP LDP platform

This patch adds support for OMAP LDP platform to smc911x driver.

Signed-off-by: Nishant Kamat <nskamat@...com>
---
 drivers/net/Kconfig   |    2 +-
 drivers/net/smc911x.c |    9 ++++++---
 drivers/net/smc911x.h |    5 +++++
 3 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/drivers/net/Kconfig b/drivers/net/Kconfig
index 015e163..49752d0 100644
--- a/drivers/net/Kconfig
+++ b/drivers/net/Kconfig
@@ -955,7 +955,7 @@ config SMC911X
 	tristate "SMSC LAN911[5678] support"
 	select CRC32
 	select MII
-	depends on ARCH_PXA || SH_MAGIC_PANEL_R2
+	depends on ARCH_PXA || SH_MAGIC_PANEL_R2 || ARCH_OMAP34XX
 	help
 	  This is a driver for SMSC's LAN911x series of Ethernet chipsets
 	  including the new LAN9115, LAN9116, LAN9117, and LAN9118.
diff --git a/drivers/net/smc911x.c b/drivers/net/smc911x.c
index 00b9b3e..14a0e3a 100644
--- a/drivers/net/smc911x.c
+++ b/drivers/net/smc911x.c
@@ -2136,7 +2136,7 @@ static int smc911x_drv_probe(struct platform_device *pdev)
 		ret = -ENODEV;
 		goto out;
 	}
-
+#ifndef SMC_MEM_RESERVED
 	/*
 	 * Request the regions.
 	 */
@@ -2144,7 +2144,7 @@ static int smc911x_drv_probe(struct platform_device *pdev)
 		 ret = -EBUSY;
 		 goto out;
 	}
-
+#endif
 	ndev = alloc_etherdev(sizeof(struct smc911x_local));
 	if (!ndev) {
 		printk("%s: could not allocate device.\n", CARDNAME);
@@ -2172,7 +2172,9 @@ static int smc911x_drv_probe(struct platform_device *pdev)
 release_both:
 		free_netdev(ndev);
 release_1:
+#ifndef SMC_MEM_RESERVED
 		release_mem_region(res->start, SMC911X_IO_EXTENT);
+#endif
 out:
 		printk("%s: not found (%d).\n", CARDNAME, ret);
 	}
@@ -2211,8 +2213,9 @@ static int smc911x_drv_remove(struct platform_device *pdev)
 #endif
 	iounmap((void *)ndev->base_addr);
 	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+#ifndef SMC_MEM_RESERVED
 	release_mem_region(res->start, SMC911X_IO_EXTENT);
-
+#endif
 	free_netdev(ndev);
 	return 0;
 }
diff --git a/drivers/net/smc911x.h b/drivers/net/smc911x.h
index a416c61..aed2121 100644
--- a/drivers/net/smc911x.h
+++ b/drivers/net/smc911x.h
@@ -43,6 +43,11 @@
   #define SMC_USE_16BIT		0
   #define SMC_USE_32BIT		1
   #define SMC_IRQ_SENSE		IRQF_TRIGGER_LOW
+#elif defined(CONFIG_MACH_OMAP_LDP)
+  #define SMC_USE_16BIT		0
+  #define SMC_USE_32BIT		1
+  #define SMC_IRQ_SENSE		IRQF_TRIGGER_LOW
+  #define SMC_MEM_RESERVED	1
 #endif
 
 
-- 
1.5.3.2

--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ