netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978.
@ 2004-08-09 23:17 Don Fry
  0 siblings, 0 replies; 3+ messages in thread
From: Don Fry @ 2004-08-09 23:17 UTC (permalink / raw)
  To: tsbogend, jgarzik, netdev

This patch adds a module parameter to select HomePNA mode of operation
for the 79C978 version of the pcnet32.  Tested ia32.

signed-off-by: Patrick Simmons <psimmons@flash.net>
signed-off-by: Don Fry <brazilnut@us.ibm.com>

--- linux-2.4.27/drivers/net/ints.pcnet32.c	Mon Aug  9 15:41:52 2004
+++ linux-2.4.27/drivers/net/pcnet32.c	Mon Aug  9 15:42:04 2004
@@ -22,8 +22,8 @@
  *************************************************************************/
 
 #define DRV_NAME	"pcnet32"
-#define DRV_VERSION	"1.30f"
-#define DRV_RELDATE	"06.16.2004"
+#define DRV_VERSION	"1.30g"
+#define DRV_RELDATE	"06.22.2004"
 #define PFX		DRV_NAME ": "
 
 static const char *version =
@@ -137,6 +137,7 @@ static const char pcnet32_gstrings_test[
 #define MAX_UNITS 8	/* More are supported, limit only on options */
 static int options[MAX_UNITS];
 static int full_duplex[MAX_UNITS];
+static int homepna[MAX_UNITS];
 
 /*
  *				Theory of Operation
@@ -250,6 +251,8 @@ static int full_duplex[MAX_UNITS];
  * v1.30f  16 Jun 2004 Don Fry cleanup IRQ to allow 0 and 1 for PCI,
  * 	   expanding on suggestions from Ralf Baechle <ralf@linux-mips.org>,
  * 	   and Brian Murphy <brian@murphy.dk>.
+ * v1.30g  22 Jun 2004 Patrick Simmons <psimmons@flash.net> added option
+ *	   homepna for selecting HomePNA mode for PCNet/Home 79C978.
  */
 
 
@@ -1083,15 +1086,17 @@ pcnet32_probe1(unsigned long ioaddr, int
 	fdx = 1;
 	/*
 	 * This is based on specs published at www.amd.com.  This section
-	 * assumes that a card with a 79C978 wants to go into 1Mb HomePNA
-	 * mode.  The 79C978 can also go into standard ethernet, and there
-	 * probably should be some sort of module option to select the
-	 * mode by which the card should operate
+	 * assumes that a card with a 79C978 wants to go into standard
+	 * ethernet mode.  The 79C978 can also go into 1Mb HomePNA mode,
+	 * and the module option homepna=1 can select this instead.
 	 */
-	/* switch to home wiring mode */
 	media = a->read_bcr(ioaddr, 49);
+	media &= ~3;		/* default to 10Mb ethernet */
+	if (cards_found < MAX_UNITS && homepna[cards_found])
+	    media |= 1; 	/* switch to home wiring mode */
 	if (pcnet32_debug & NETIF_MSG_PROBE)
-	    printk(KERN_DEBUG PFX "media reset to %#x.\n",  media);
+	    printk(KERN_DEBUG PFX "media set to %dMbit mode.\n", 
+		    (media & 1) ? 1 : 10);
 	a->write_bcr(ioaddr, 49, media);
 	break;
     case 0x2627:
@@ -2255,6 +2260,9 @@ MODULE_PARM(options, "1-" __MODULE_STRIN
 MODULE_PARM_DESC(options, DRV_NAME " initial option setting(s) (0-15)");
 MODULE_PARM(full_duplex, "1-" __MODULE_STRING(MAX_UNITS) "i");
 MODULE_PARM_DESC(full_duplex, DRV_NAME " full duplex setting(s) (1)");
+/* Module Parameter for HomePNA cards added by Patrick Simmons, 2004 */
+MODULE_PARM(homepna,"1-" __MODULE_STRING(MAX_UNITS) "i");
+MODULE_PARM_DESC(homepna, DRV_NAME " mode for 79C978 cards (1 for HomePNA, 0 for Ethernet, default Ethernet");
 
 MODULE_AUTHOR("Thomas Bogendoerfer");
 MODULE_DESCRIPTION("Driver for PCnet32 and PCnetPCI based ethercards");

-- 
Don Fry
brazilnut@us.ibm.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978.
  2005-02-03 22:45 pointers in the sk_buff structure sudeep list
@ 2005-02-04  0:42 ` Richard Hobbs
  2005-02-04 18:45   ` Don Fry
  0 siblings, 1 reply; 3+ messages in thread
From: Richard Hobbs @ 2005-02-04  0:42 UTC (permalink / raw)
  To: netdev


I am trying to set up a hybrid network, part wired, part wireless and part
homePNA (the building has some very thick walls and remote computers that can be
reached by existing telephone wires). I am using Fedora core 3 with the 2.6.10
kernel.  I have  checked the pcnet32.c code and the patch 4 2.4.27 appears to be
there. 

I load the pcnet32 module using:
modprobe -v pcnet32 homepna=1

I get reply:
insmod /lib/modules/2.6.10-1.741_FC3/kernel/drivers/net/pcnet32.ko homepna=1

Looks good.

I then try to configure the network through the systems settings interface:
eth0 is a e100 ethernet to my router/modem that is OK.
Disconnecting eth0 to avoid any conflicts.

eth1 should be the AMD79c978 card. Connecting with the telephone wire

I set eth1 as an ethernet (I don't see an option for phoneline network)
I have tried DHCP get the response on activating the network:
Determining IP information for eth1 failed; no link present. Check cable.

I have tried a static IP address, card activates but no device is detected at
the modem/router.

If I unload the module and reload without the homepna option, the card works
fine with a standard ethernet cable.

Any suggestions please.

Thanks
Richard Hobbs

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978.
  2005-02-04  0:42 ` [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978 Richard Hobbs
@ 2005-02-04 18:45   ` Don Fry
  0 siblings, 0 replies; 3+ messages in thread
From: Don Fry @ 2005-02-04 18:45 UTC (permalink / raw)
  To: Richard Hobbs; +Cc: netdev

Richard,

2.6.10 has the driver to support the 79c978 card in homepna mode.  I
have only used the card in a point-to-point configuration when in
homepna mode, because all I have is two cards (no modem/router).

When you bring up the card with homepna=1, if you look in
/var/log/messages it should indicate the speed at which the card is
operating.  In my system I see:

pcnet32: media set to 1Mbit mode.
pcnet32: PCnet/Home 79C978 at 0x252c00, 00 90 00 05 dd 27 assigned IRQ 201.
eth8: registered as PCnet/Home 79C978
pcnet32: 8 cards_found.

With the cards cabled together I see link detected using ethtool.

# ethtool eth8
Settings for eth8:
        Current message level: 0x00000007 (7)
        Link detected: yes

On Fri, Feb 04, 2005 at 12:42:07AM +0000, Richard Hobbs wrote:
> 
> I am trying to set up a hybrid network, part wired, part wireless and part
> homePNA (the building has some very thick walls and remote computers that can be
> reached by existing telephone wires). I am using Fedora core 3 with the 2.6.10
> kernel.  I have  checked the pcnet32.c code and the patch 4 2.4.27 appears to be
> there. 
> 
> I load the pcnet32 module using:
> modprobe -v pcnet32 homepna=1
> 
> I get reply:
> insmod /lib/modules/2.6.10-1.741_FC3/kernel/drivers/net/pcnet32.ko homepna=1
> 
> Looks good.
> 
> I then try to configure the network through the systems settings interface:
> eth0 is a e100 ethernet to my router/modem that is OK.
> Disconnecting eth0 to avoid any conflicts.
> 
> eth1 should be the AMD79c978 card. Connecting with the telephone wire
> 
> I set eth1 as an ethernet (I don't see an option for phoneline network)
> I have tried DHCP get the response on activating the network:
> Determining IP information for eth1 failed; no link present. Check cable.
> 
> I have tried a static IP address, card activates but no device is detected at
> the modem/router.
> 
> If I unload the module and reload without the homepna option, the card works
> fine with a standard ethernet cable.
> 
> Any suggestions please.
> 
> Thanks
> Richard Hobbs

-- 
Don Fry
brazilnut@us.ibm.com

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2005-02-04 18:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-09 23:17 [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978 Don Fry
  -- strict thread matches above, loose matches on Subject: below --
2005-02-03 22:45 pointers in the sk_buff structure sudeep list
2005-02-04  0:42 ` [PATCH 4 2.4.27] pcnet32: Add HomePNA parameter for 79C978 Richard Hobbs
2005-02-04 18:45   ` Don Fry

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).