All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] staging: et131x: Further tidy up of 131x_pci_setup()
@ 2011-08-29 17:42 Mark Einon
  2011-08-29 17:42 ` [PATCH 2/6] MAINAINERS: Add details for drivers/staging/et131x Mark Einon
                   ` (4 more replies)
  0 siblings, 5 replies; 9+ messages in thread
From: Mark Einon @ 2011-08-29 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: greg, devel, linux-kernel, o.hartmann, Mark Einon

* Removed unused bool variable.
* Eliminated mid-function returns, used gotos instead

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et131x_initpci.c |   58 ++++++++++++++----------------
 drivers/staging/et131x/et131x_netdev.c  |    2 +-
 2 files changed, 28 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index 072cfb5..813a72f 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -512,10 +512,6 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
 
 	struct et131x_adapter *adapter;
 
-	/* Setup the fundamental net_device and private adapter structure
-	 * elements  */
-	SET_NETDEV_DEV(netdev, &pdev->dev);
-
 	/* Allocate private adapter struct and copy in relevant information */
 	adapter = netdev_priv(netdev);
 	adapter->pdev = pci_dev_get(pdev);
@@ -579,33 +575,29 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
 static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 			       const struct pci_device_id *ent)
 {
-	int result = -EBUSY;
+	int result;
 	int pm_cap;
-	bool pci_using_dac;
 	struct net_device *netdev;
 	struct et131x_adapter *adapter;
 
 	/* Enable the device via the PCI subsystem */
-	if (pci_enable_device(pdev) != 0) {
-		dev_err(&pdev->dev,
-			"pci_enable_device() failed\n");
-		return -EIO;
+	result = pci_enable_device(pdev);
+	if (result) {
+		dev_err(&pdev->dev, "pci_enable_device() failed\n");
+		goto err_out;
 	}
 
 	/* Perform some basic PCI checks */
 	if (!(pci_resource_flags(pdev, 0) & IORESOURCE_MEM)) {
-		dev_err(&pdev->dev,
-			  "Can't find PCI device's base address\n");
+		dev_err(&pdev->dev, "Can't find PCI device's base address\n");
 		goto err_disable;
 	}
 
 	if (pci_request_regions(pdev, DRIVER_NAME)) {
-		dev_err(&pdev->dev,
-			"Can't get PCI resources\n");
+		dev_err(&pdev->dev, "Can't get PCI resources\n");
 		goto err_disable;
 	}
 
-	/* Enable PCI bus mastering */
 	pci_set_master(pdev);
 
 	/* Query PCI for Power Mgmt Capabilities
@@ -614,7 +606,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	 * needed?
 	 */
 	pm_cap = pci_find_capability(pdev, PCI_CAP_ID_PM);
-	if (pm_cap == 0) {
+	if (!pm_cap) {
 		dev_err(&pdev->dev,
 			  "Cannot find Power Management capabilities\n");
 		result = -EIO;
@@ -623,37 +615,42 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 
 	/* Check the DMA addressing support of this device */
 	if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(64))) {
-		pci_using_dac = true;
-
 		result = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64));
-		if (result != 0) {
+		if (result) {
 			dev_err(&pdev->dev,
-				  "Unable to obtain 64 bit DMA for consistent allocations\n");
+			  "Unable to obtain 64 bit DMA for consistent allocations\n");
 			goto err_release_res;
 		}
 	} else if (!pci_set_dma_mask(pdev, DMA_BIT_MASK(32))) {
-		pci_using_dac = false;
+		result = pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
+		if (result) {
+			dev_err(&pdev->dev,
+			  "Unable to obtain 32 bit DMA for consistent allocations\n");
+			goto err_release_res;
+		}
 	} else {
-		dev_err(&pdev->dev,
-			"No usable DMA addressing method\n");
+		dev_err(&pdev->dev, "No usable DMA addressing method\n");
 		result = -EIO;
 		goto err_release_res;
 	}
 
 	/* Allocate netdev and private adapter structs */
 	netdev = et131x_device_alloc();
-	if (netdev == NULL) {
+	if (!netdev) {
 		dev_err(&pdev->dev, "Couldn't alloc netdev struct\n");
 		result = -ENOMEM;
 		goto err_release_res;
 	}
+
+	SET_NETDEV_DEV(netdev, &pdev->dev);
+
 	adapter = et131x_adapter_init(netdev, pdev);
 	/* Initialise the PCI setup for the device */
 	et131x_pci_init(adapter, pdev);
 
 	/* Map the bus-relative registers to system virtual memory */
 	adapter->regs = pci_ioremap_bar(pdev, 0);
-	if (adapter->regs == NULL) {
+	if (!adapter->regs) {
 		dev_err(&pdev->dev, "Cannot map device registers\n");
 		result = -ENOMEM;
 		goto err_free_dev;
@@ -670,7 +667,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 
 	/* Allocate DMA memory */
 	result = et131x_adapter_memory_alloc(adapter);
-	if (result != 0) {
+	if (result) {
 		dev_err(&pdev->dev, "Could not alloc adapater memory (DMA)\n");
 		goto err_iounmap;
 	}
@@ -678,9 +675,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	/* Init send data structures */
 	et131x_init_send(adapter);
 
-	/*
-	 * Set up the task structure for the ISR's deferred handler
-	 */
+	/* Set up the task structure for the ISR's deferred handler */
 	INIT_WORK(&adapter->task, et131x_isr_handler);
 
 	/* Copy address into the net_device struct */
@@ -699,8 +694,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	/* Initialize link state */
 	netif_carrier_off(adapter->netdev);
 
-	/* Initialize variable for counting how long we do not have
-							link status */
+	/* Init variable for counting how long we do not have link status */
 	adapter->boot_coma = 0;
 
 	/* We can enable interrupts now
@@ -723,6 +717,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	 */
 	pci_set_drvdata(pdev, netdev);
 	pci_save_state(adapter->pdev);
+
 	return result;
 
 err_mem_free:
@@ -736,6 +731,7 @@ err_release_res:
 	pci_release_regions(pdev);
 err_disable:
 	pci_disable_device(pdev);
+err_out:
 	return result;
 }
 
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c
index 7555a24..20df145 100644
--- a/drivers/staging/et131x/et131x_netdev.c
+++ b/drivers/staging/et131x/et131x_netdev.c
@@ -687,7 +687,7 @@ struct net_device *et131x_device_alloc(void)
 	/* Alloc net_device and adapter structs */
 	netdev = alloc_etherdev(sizeof(struct et131x_adapter));
 
-	if (netdev == NULL) {
+	if (!netdev) {
 		printk(KERN_ERR "et131x: Alloc of net_device struct failed\n");
 		return NULL;
 	}
-- 
1.7.6


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

* [PATCH 2/6] MAINAINERS: Add details for drivers/staging/et131x
  2011-08-29 17:42 [PATCH 1/6] staging: et131x: Further tidy up of 131x_pci_setup() Mark Einon
@ 2011-08-29 17:42 ` Mark Einon
  2011-08-29 17:42 ` [PATCH 3/6] staging: et131x: Remove unused xcvr_id in struct ce_stats Mark Einon
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Mark Einon @ 2011-08-29 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: greg, devel, linux-kernel, o.hartmann, Mark Einon

Adding myself as a maintainer for this driver, as I appear to have been the only interested party for some time.
Not sure if Olaf Hartman is still interested? So will leave it up to him to add his name to the list.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 MAINTAINERS |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/MAINTAINERS b/MAINTAINERS
index 1a8cc60..4f00a54 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -6172,6 +6172,11 @@ M:	David Rowe <david@rowetel.com>
 S:	Odd Fixes
 F:	drivers/staging/echo/
 
+STAGING - ET131X NETWORK DRIVER
+M:	Mark Einon <mark.einon@gmail.com>
+S:	Odd Fixes
+F:	drivers/staging/et131x/
+
 STAGING - FLARION FT1000 DRIVERS
 M:	Marek Belisko <marek.belisko@gmail.com>
 S:	Odd Fixes
-- 
1.7.6


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

* [PATCH 3/6] staging: et131x: Remove unused xcvr_id in struct ce_stats
  2011-08-29 17:42 [PATCH 1/6] staging: et131x: Further tidy up of 131x_pci_setup() Mark Einon
  2011-08-29 17:42 ` [PATCH 2/6] MAINAINERS: Add details for drivers/staging/et131x Mark Einon
@ 2011-08-29 17:42 ` Mark Einon
  2011-08-29 17:42 ` [PATCH 4/6] staging: et131x: Remove redundant replica loopback code Mark Einon
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 9+ messages in thread
From: Mark Einon @ 2011-08-29 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: greg, devel, linux-kernel, o.hartmann, Mark Einon

xcvr_id holds the phy ID which is stored but never used in the driver.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et1310_phy.c     |    4 ----
 drivers/staging/et131x/et131x_adapter.h |    1 -
 2 files changed, 0 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c
index c845c27..21e0704 100644
--- a/drivers/staging/et131x/et1310_phy.c
+++ b/drivers/staging/et131x/et1310_phy.c
@@ -242,7 +242,6 @@ int et131x_xcvr_find(struct et131x_adapter *adapter)
 	u8 xcvr_addr;
 	u16 idr1;
 	u16 idr2;
-	u32 xcvr_id;
 
 	/* We need to get xcvr id and address we just get the first one */
 	for (xcvr_addr = 0; xcvr_addr < 32; xcvr_addr++) {
@@ -254,10 +253,7 @@ int et131x_xcvr_find(struct et131x_adapter *adapter)
 			     (u8) offsetof(struct mi_regs, idr2),
 			     &idr2);
 
-		xcvr_id = (u32) ((idr1 << 16) | idr2);
-
 		if (idr1 != 0 && idr1 != 0xffff) {
-			adapter->stats.xcvr_id = xcvr_id;
 			adapter->stats.xcvr_addr = xcvr_addr;
 			return 0;
 		}
diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
index 762e07c..b03460b 100644
--- a/drivers/staging/et131x/et131x_adapter.h
+++ b/drivers/staging/et131x/et131x_adapter.h
@@ -115,7 +115,6 @@ struct ce_stats {
 
 	/* Transceiver state informations. */
 	u8		xcvr_addr;
-	u32		xcvr_id;
 
 	/* Tx Statistics. */
 	u32		tx_underflows;
-- 
1.7.6


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

* [PATCH 4/6] staging: et131x: Remove redundant replica loopback code
  2011-08-29 17:42 [PATCH 1/6] staging: et131x: Further tidy up of 131x_pci_setup() Mark Einon
  2011-08-29 17:42 ` [PATCH 2/6] MAINAINERS: Add details for drivers/staging/et131x Mark Einon
  2011-08-29 17:42 ` [PATCH 3/6] staging: et131x: Remove unused xcvr_id in struct ce_stats Mark Einon
@ 2011-08-29 17:42 ` Mark Einon
  2011-08-30 10:08   ` Dan Carpenter
  2011-08-29 17:42 ` [PATCH 5/6] staging: et131x: Remove module_param et131x_speed_set Mark Einon
  2011-08-29 17:42 ` [PATCH 6/6] staging: et131x: Use phy-device, mii_bus and ethtool_ops Mark Einon
  4 siblings, 1 reply; 9+ messages in thread
From: Mark Einon @ 2011-08-29 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: greg, devel, linux-kernel, o.hartmann, Mark Einon

A mechanism used to set the phy in loopback mode is not present in the driver, making associated checks and variables redundant. Removing them.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et1310_address_map.h |    6 +++---
 drivers/staging/et131x/et1310_rx.c          |   11 -----------
 drivers/staging/et131x/et131x_adapter.h     |    4 ----
 drivers/staging/et131x/et131x_isr.c         |   16 +++++++---------
 4 files changed, 10 insertions(+), 27 deletions(-)

diff --git a/drivers/staging/et131x/et1310_address_map.h b/drivers/staging/et131x/et1310_address_map.h
index 410677e..38ec56c 100644
--- a/drivers/staging/et131x/et1310_address_map.h
+++ b/drivers/staging/et131x/et1310_address_map.h
@@ -1,6 +1,6 @@
 /*
  * Agere Systems Inc.
- * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs
+ * 10/100/1000 Base-T Ethernet Driver for the ET1310 and ET131x series MACs
  *
  * Copyright © 2005 Agere Systems Inc.
  * All rights reserved.
@@ -149,7 +149,7 @@
  * GLOBAL Module of JAGCore Address Mapping
  * Located at address 0x0000
  */
-struct global_regs {			/* Location: */
+struct global_regs {				/* Location: */
 	u32 txq_start_addr;			/*  0x0000 */
 	u32 txq_end_addr;			/*  0x0004 */
 	u32 rxq_start_addr;			/*  0x0008 */
@@ -163,7 +163,7 @@ struct global_regs {			/* Location: */
 	u32 sw_reset;				/*  0x0028 */
 	u32 slv_timer;				/*  0x002C */
 	u32 msi_config;				/*  0x0030 */
-	u32 loopback;			/*  0x0034 */
+	u32 loopback;				/*  0x0034 */
 	u32 watchdog_timer;			/*  0x0038 */
 };
 
diff --git a/drivers/staging/et131x/et1310_rx.c b/drivers/staging/et131x/et1310_rx.c
index e6458db..f50420c 100644
--- a/drivers/staging/et131x/et1310_rx.c
+++ b/drivers/staging/et131x/et1310_rx.c
@@ -988,17 +988,6 @@ static struct rfd *nic_rx_pkts(struct et131x_adapter *adapter)
 	}
 
 	if (len) {
-		if (adapter->replica_phy_loopbk == 1) {
-			buf = rx_local->fbr[ring_index]->virt[buff_index];
-
-			if (memcmp(&buf[6], adapter->addr, ETH_ALEN) == 0) {
-				if (memcmp(&buf[42], "Replica packet",
-					   ETH_HLEN)) {
-					adapter->replica_phy_loopbk_passfail = 1;
-				}
-			}
-		}
-
 		/* Determine if this is a multicast packet coming in */
 		if ((word0 & ALCATEL_MULTICAST_PKT) &&
 		    !(word0 & ALCATEL_BROADCAST_PKT)) {
diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
index b03460b..508cc63 100644
--- a/drivers/staging/et131x/et131x_adapter.h
+++ b/drivers/staging/et131x/et131x_adapter.h
@@ -222,10 +222,6 @@ struct et131x_adapter {
 	/* Rx Memory Variables */
 	struct rx_ring rx_ring;
 
-	/* Loopback specifics */
-	u8 replica_phy_loopbk;		/* Replica Enable */
-	u8 replica_phy_loopbk_passfail;	/* Replica Enable Pass/Fail */
-
 	/* Stats */
 	struct ce_stats stats;
 
diff --git a/drivers/staging/et131x/et131x_isr.c b/drivers/staging/et131x/et131x_isr.c
index 7cfd213..4d75690 100644
--- a/drivers/staging/et131x/et131x_isr.c
+++ b/drivers/staging/et131x/et131x_isr.c
@@ -389,17 +389,15 @@ void et131x_isr_handler(struct work_struct *work)
 					(uint8_t) offsetof(struct mi_regs, isr),
 					&myisr);
 
-			if (!adapter->replica_phy_loopbk) {
-				et131x_mii_read(adapter,
-				       (uint8_t) offsetof(struct mi_regs, bmsr),
-				       &bmsr_data);
+			et131x_mii_read(adapter,
+			       (uint8_t) offsetof(struct mi_regs, bmsr),
+			       &bmsr_data);
 
-				bmsr_ints = adapter->bmsr ^ bmsr_data;
-				adapter->bmsr = bmsr_data;
+			bmsr_ints = adapter->bmsr ^ bmsr_data;
+			adapter->bmsr = bmsr_data;
 
-				/* Do all the cable in / cable out stuff */
-				et131x_mii_check(adapter, bmsr_data, bmsr_ints);
-			}
+			/* Do all the cable in / cable out stuff */
+			et131x_mii_check(adapter, bmsr_data, bmsr_ints);
 		}
 
 		/* Let's move on to the TxMac */
-- 
1.7.6


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

* [PATCH 5/6] staging: et131x: Remove module_param et131x_speed_set
  2011-08-29 17:42 [PATCH 1/6] staging: et131x: Further tidy up of 131x_pci_setup() Mark Einon
                   ` (2 preceding siblings ...)
  2011-08-29 17:42 ` [PATCH 4/6] staging: et131x: Remove redundant replica loopback code Mark Einon
@ 2011-08-29 17:42 ` Mark Einon
  2011-08-29 17:42 ` [PATCH 6/6] staging: et131x: Use phy-device, mii_bus and ethtool_ops Mark Einon
  4 siblings, 0 replies; 9+ messages in thread
From: Mark Einon @ 2011-08-29 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: greg, devel, linux-kernel, o.hartmann, Mark Einon

Manual setting of speed/duplex will be achieved using ethtool.
Remove the driver specific module_param that also does this.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/et131x_initpci.c |   50 +-----------------------------
 1 files changed, 2 insertions(+), 48 deletions(-)

diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index 813a72f..a184ac1 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -1,6 +1,6 @@
 /*
  * Agere Systems Inc.
- * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs
+ * 10/100/1000 Base-T Ethernet Driver for the ET1310 and ET131x series MACs
  *
  * Copyright © 2005 Agere Systems Inc.
  * All rights reserved.
@@ -97,30 +97,6 @@
 #define INTERNAL_MEM_SIZE       0x400	/* 1024 of internal memory */
 #define INTERNAL_MEM_RX_OFFSET  0x1FF	/* 50%   Tx, 50%   Rx */
 
-/* Defines for Parameter Default/Min/Max vaules */
-#define PARM_SPEED_DUPLEX_MIN   0
-#define PARM_SPEED_DUPLEX_MAX   5
-
-/* Module parameter for manual speed setting
- * Set Link speed and dublex manually (0-5)  [0]
- *  1 : 10Mb   Half-Duplex
- *  2 : 10Mb   Full-Duplex
- *  3 : 100Mb  Half-Duplex
- *  4 : 100Mb  Full-Duplex
- *  5 : 1000Mb Full-Duplex
- *  0 : Auto Speed Auto Duplex // default
- */
-static u32 et131x_speed_set;
-module_param(et131x_speed_set, uint, 0);
-MODULE_PARM_DESC(et131x_speed_set,
-		"Set Link speed and dublex manually (0-5)  [0]\n"
-		"1 : 10Mb   Half-Duplex\n"
-		"2 : 10Mb   Full-Duplex\n"
-		"3 : 100Mb  Half-Duplex\n"
-		"4 : 100Mb  Full-Duplex\n"
-		"5 : 1000Mb Full-Duplex\n"
-		"0 : Auto Speed Auto Dublex");
-
 /**
  * et131x_hwaddr_init - set up the MAC Address on the ET1310
  * @adapter: pointer to our private adapter structure
@@ -531,29 +507,12 @@ static struct et131x_adapter *et131x_adapter_init(struct net_device *netdev,
 	spin_lock_init(&adapter->fbr_lock);
 	spin_lock_init(&adapter->phy_lock);
 
-	/* Parse configuration parameters into the private adapter struct */
-	if (et131x_speed_set)
-		dev_info(&adapter->pdev->dev,
-			"Speed set manually to : %d\n", et131x_speed_set);
-
-	adapter->speed_duplex = et131x_speed_set;
+	adapter->speed_duplex = 0; /* Auto Speed Auto Duplex */
 	adapter->registry_jumbo_packet = 1514;	/* 1514-9216 */
 
 	/* Set the MAC address to a default */
 	memcpy(adapter->addr, default_mac, ETH_ALEN);
 
-	/* Decode speed_duplex
-	 *
-	 * Set up as if we are auto negotiating always and then change if we
-	 * go into force mode
-	 *
-	 * If we are the 10/100 device, and gigabit is somehow requested then
-	 * knock it down to 100 full.
-	 */
-	if (adapter->pdev->device == ET131X_PCI_DEVICE_ID_FAST &&
-	    adapter->speed_duplex == 5)
-		adapter->speed_duplex = 4;
-
 	adapter->ai_force_speed = speed[adapter->speed_duplex];
 	adapter->ai_force_duplex = duplex[adapter->speed_duplex];	/* Auto FDX */
 
@@ -790,11 +749,6 @@ static struct pci_driver et131x_driver = {
  */
 static int __init et131x_init_module(void)
 {
-	if (et131x_speed_set < PARM_SPEED_DUPLEX_MIN ||
-	    et131x_speed_set > PARM_SPEED_DUPLEX_MAX) {
-		printk(KERN_WARNING "et131x: invalid speed setting ignored.\n");
-		et131x_speed_set = 0;
-	}
 	return pci_register_driver(&et131x_driver);
 }
 
-- 
1.7.6


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

* [PATCH 6/6] staging: et131x: Use phy-device, mii_bus and ethtool_ops
  2011-08-29 17:42 [PATCH 1/6] staging: et131x: Further tidy up of 131x_pci_setup() Mark Einon
                   ` (3 preceding siblings ...)
  2011-08-29 17:42 ` [PATCH 5/6] staging: et131x: Remove module_param et131x_speed_set Mark Einon
@ 2011-08-29 17:42 ` Mark Einon
  4 siblings, 0 replies; 9+ messages in thread
From: Mark Einon @ 2011-08-29 17:42 UTC (permalink / raw)
  To: gregkh; +Cc: greg, devel, linux-kernel, o.hartmann, Mark Einon

Adding some basic ethtool ops and supporting functionality using a phy device.

Signed-off-by: Mark Einon <mark.einon@gmail.com>
---
 drivers/staging/et131x/Makefile         |    1 +
 drivers/staging/et131x/et1310_phy.c     |   45 ++++++++--
 drivers/staging/et131x/et1310_phy.h     |    4 +-
 drivers/staging/et131x/et131x.h         |    6 ++
 drivers/staging/et131x/et131x_adapter.h |    3 +-
 drivers/staging/et131x/et131x_ethtool.c |   71 +++++++++++++++
 drivers/staging/et131x/et131x_initpci.c |  147 +++++++++++++++++++++++++++----
 drivers/staging/et131x/et131x_netdev.c  |    7 +-
 8 files changed, 254 insertions(+), 30 deletions(-)
 create mode 100644 drivers/staging/et131x/et131x_ethtool.c

diff --git a/drivers/staging/et131x/Makefile b/drivers/staging/et131x/Makefile
index dfcd2bf..5ea0272 100644
--- a/drivers/staging/et131x/Makefile
+++ b/drivers/staging/et131x/Makefile
@@ -11,5 +11,6 @@ et131x-y :=	et1310_eeprom.o \
 		et1310_rx.o \
 		et1310_tx.o \
 		et131x_initpci.o \
+		et131x_ethtool.o \
 		et131x_isr.o \
 		et131x_netdev.o
diff --git a/drivers/staging/et131x/et1310_phy.c b/drivers/staging/et131x/et1310_phy.c
index 21e0704..5e21a18 100644
--- a/drivers/staging/et131x/et1310_phy.c
+++ b/drivers/staging/et131x/et1310_phy.c
@@ -1,6 +1,6 @@
 /*
  * Agere Systems Inc.
- * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs
+ * 10/100/1000 Base-T Ethernet Driver for the ET1310 and ET131x series MACs
  *
  * Copyright * 2005 Agere Systems Inc.
  * All rights reserved.
@@ -82,6 +82,7 @@
 #include <linux/if_arp.h>
 #include <linux/ioport.h>
 #include <linux/random.h>
+#include <linux/phy.h>
 
 #include "et1310_phy.h"
 
@@ -93,6 +94,40 @@
 
 #include "et131x.h"
 
+int et131x_mdio_read(struct mii_bus *bus, int phy_addr, int reg)
+{
+	struct net_device *netdev = bus->priv;
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+	u16 value;
+	int ret;
+
+	ret = et131x_phy_mii_read(adapter, phy_addr, reg, &value);
+
+	if (ret < 0)
+		return ret;
+	else
+		return value;
+}
+
+int et131x_mdio_write(struct mii_bus *bus, int phy_addr, int reg, u16 value)
+{
+	struct net_device *netdev = bus->priv;
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+
+	/* mii_write always uses the same phy_addr, xcvr_addr */
+	return et131x_mii_write(adapter, reg, value);
+}
+
+int et131x_mdio_reset(struct mii_bus *bus)
+{
+	struct net_device *netdev = bus->priv;
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+
+	et1310_phy_reset(adapter);
+
+	return 0;
+}
+
 /**
  * et131x_phy_mii_read - Read from the PHY through the MII Interface on the MAC
  * @adapter: pointer to our private adapter structure
@@ -107,7 +142,7 @@ int et131x_phy_mii_read(struct et131x_adapter *adapter, u8 xcvr_addr,
 {
 	struct mac_regs __iomem *mac = &adapter->regs->mac;
 	int status = 0;
-	u32 delay;
+	u32 delay = 0;
 	u32 mii_addr;
 	u32 mii_cmd;
 	u32 mii_indicator;
@@ -124,9 +159,6 @@ int et131x_phy_mii_read(struct et131x_adapter *adapter, u8 xcvr_addr,
 	/* Set up the register we need to read from on the correct PHY */
 	writel(MII_ADDR(xcvr_addr, xcvr_reg), &mac->mii_mgmt_addr);
 
-	/* Kick the read cycle off */
-	delay = 0;
-
 	writel(0x1, &mac->mii_mgmt_cmd);
 
 	do {
@@ -176,7 +208,7 @@ int et131x_mii_write(struct et131x_adapter *adapter, u8 xcvr_reg, u16 value)
 	struct mac_regs __iomem *mac = &adapter->regs->mac;
 	int status = 0;
 	u8 xcvr_addr = adapter->stats.xcvr_addr;
-	u32 delay;
+	u32 delay = 0;
 	u32 mii_addr;
 	u32 mii_cmd;
 	u32 mii_indicator;
@@ -195,7 +227,6 @@ int et131x_mii_write(struct et131x_adapter *adapter, u8 xcvr_reg, u16 value)
 
 	/* Add the value to write to the registers to the mac */
 	writel(value, &mac->mii_mgmt_ctrl);
-	delay = 0;
 
 	do {
 		udelay(50);
diff --git a/drivers/staging/et131x/et1310_phy.h b/drivers/staging/et131x/et1310_phy.h
index 6b38a3e..8e9404e 100644
--- a/drivers/staging/et131x/et1310_phy.h
+++ b/drivers/staging/et131x/et1310_phy.h
@@ -121,8 +121,8 @@ struct mi_regs {
 	u8 imr;		/* Interrupt Mask Reg(Reg 0x18) */
 	u8 isr;		/* Interrupt Status Reg(Reg 0x19) */
 	u8 psr;		/* PHY Status Reg(Reg 0x1A) */
-	u8 lcr1;		/* LED Control 1 Reg(Reg 0x1B) */
-	u8 lcr2;		/* LED Control 2 Reg(Reg 0x1C) */
+	u8 lcr1;	/* LED Control 1 Reg(Reg 0x1B) */
+	u8 lcr2;	/* LED Control 2 Reg(Reg 0x1C) */
 	u8 mi_res4[3];	/* Future use by MI working group(Reg 0x1D - 0x1F) */
 };
 
diff --git a/drivers/staging/et131x/et131x.h b/drivers/staging/et131x/et131x.h
index 91fafc0..9dee7bc 100644
--- a/drivers/staging/et131x/et131x.h
+++ b/drivers/staging/et131x/et131x.h
@@ -116,6 +116,10 @@ int32_t et131x_mii_write(struct et131x_adapter *adapter,
 void et131x_mii_check(struct et131x_adapter *pAdapter,
 		      u16 bmsr, u16 bmsr_ints);
 
+int et131x_mdio_read(struct mii_bus *bus, int phy_addr, int reg);
+int et131x_mdio_write(struct mii_bus *bus, int phy_addr, int reg, u16 value);
+int et131x_mdio_reset(struct mii_bus *bus);
+
 /* et1310_rx.c */
 int et131x_rx_dma_memory_alloc(struct et131x_adapter *adapter);
 void et131x_rx_dma_memory_free(struct et131x_adapter *adapter);
@@ -145,3 +149,5 @@ void et131x_handle_send_interrupt(struct et131x_adapter *adapter);
 void et131x_free_busy_send_packets(struct et131x_adapter *adapter);
 int et131x_send_packets(struct sk_buff *skb, struct net_device *netdev);
 
+/* et131x_ethtool.c */
+void et131x_set_ethtool_ops(struct net_device *netdev);
diff --git a/drivers/staging/et131x/et131x_adapter.h b/drivers/staging/et131x/et131x_adapter.h
index 508cc63..dbb14fe 100644
--- a/drivers/staging/et131x/et131x_adapter.h
+++ b/drivers/staging/et131x/et131x_adapter.h
@@ -144,7 +144,8 @@ struct ce_stats {
 struct et131x_adapter {
 	struct net_device *netdev;
 	struct pci_dev *pdev;
-
+	struct mii_bus *mii_bus;
+	struct phy_device *phydev;
 	struct work_struct task;
 
 	/* Flags that indicate current state of the adapter */
diff --git a/drivers/staging/et131x/et131x_ethtool.c b/drivers/staging/et131x/et131x_ethtool.c
new file mode 100644
index 0000000..d980ad6
--- /dev/null
+++ b/drivers/staging/et131x/et131x_ethtool.c
@@ -0,0 +1,71 @@
+/*
+ *  Copyright (C) 2011 Mark Einon
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *
+ *  Mark Einon <mark.einon@gmail.com>
+ */
+#include "et131x_version.h"
+#include "et131x_defs.h"
+
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/netdevice.h>
+#include <linux/ethtool.h>
+#include <linux/phy.h>
+#include <linux/pci.h>
+
+#include "et131x_adapter.h"
+#include "et131x.h"
+
+static int et131x_get_settings(struct net_device *netdev,
+			       struct ethtool_cmd *cmd)
+{
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+
+	return phy_ethtool_gset(adapter->phydev, cmd);
+}
+
+static int et131x_set_settings(struct net_device *netdev,
+			       struct ethtool_cmd *cmd)
+{
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+
+	return phy_ethtool_sset(adapter->phydev, cmd);
+}
+
+#define ET131X_DRVINFO_LEN 32 /* value from ethtool.h */
+static void et131x_get_drvinfo(struct net_device *netdev,
+			       struct ethtool_drvinfo *info)
+{
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+
+	strncpy(info->driver, DRIVER_NAME, ET131X_DRVINFO_LEN);
+	strncpy(info->version, DRIVER_VERSION_STRING, ET131X_DRVINFO_LEN);
+	strncpy(info->bus_info, pci_name(adapter->pdev), ET131X_DRVINFO_LEN);
+}
+
+static struct ethtool_ops et131x_ethtool_ops = {
+        .get_settings = et131x_get_settings,
+        .set_settings = et131x_set_settings,
+        .get_drvinfo = et131x_get_drvinfo,
+        .get_link = ethtool_op_get_link,
+};
+
+void et131x_set_ethtool_ops(struct net_device *netdev)
+{
+	SET_ETHTOOL_OPS(netdev, &et131x_ethtool_ops);
+}
+
diff --git a/drivers/staging/et131x/et131x_initpci.c b/drivers/staging/et131x/et131x_initpci.c
index a184ac1..fbbef76 100644
--- a/drivers/staging/et131x/et131x_initpci.c
+++ b/drivers/staging/et131x/et131x_initpci.c
@@ -80,6 +80,7 @@
 
 #include <linux/netdevice.h>
 #include <linux/etherdevice.h>
+#include <linux/phy.h>
 #include <linux/skbuff.h>
 #include <linux/if_arp.h>
 #include <linux/ioport.h>
@@ -329,7 +330,7 @@ void et131x_configure_global_regs(struct et131x_adapter *adapter)
  */
 int et131x_adapter_setup(struct et131x_adapter *adapter)
 {
-	int status = 0;
+	int status;
 
 	/* Configure the JAGCore */
 	et131x_configure_global_regs(adapter);
@@ -351,7 +352,7 @@ int et131x_adapter_setup(struct et131x_adapter *adapter)
 	/* Move the following code to Timer function?? */
 	status = et131x_xcvr_find(adapter);
 
-	if (status != 0)
+	if (status)
 		dev_warn(&adapter->pdev->dev, "Could not find the xcvr\n");
 
 	/* Prepare the TRUEPHY library. */
@@ -471,6 +472,80 @@ void et131x_adapter_memory_free(struct et131x_adapter *adapter)
 	et131x_rx_dma_memory_free(adapter);
 }
 
+static void et131x_adjust_link(struct net_device *netdev)
+{
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+	struct  phy_device *phydev = adapter->phydev;
+	struct address_map __iomem *iomem = adapter->regs;
+
+	u32 pm_csr;
+	u16 bmsr_ints;
+	u16 bmsr_data;
+
+	/* If we are in coma mode, we need to disable it. */
+	pm_csr = readl(&iomem->global.pm_csr);
+	if (pm_csr & ET_PM_PHY_SW_COMA) {
+		/*
+		 * Check to see if we are in coma mode and if
+		 * so, disable it because we will not be able
+		 * to read PHY values until we are out.
+		 */
+		et1310_disable_phy_coma(adapter);
+	}
+
+	et131x_mii_read(adapter,
+	       (uint8_t) offsetof(struct mi_regs, bmsr),
+	       &bmsr_data);
+
+	bmsr_ints = adapter->bmsr ^ bmsr_data;
+	adapter->bmsr = bmsr_data;
+
+	/* Do all the cable in / cable out stuff */
+	et131x_mii_check(adapter, bmsr_data, bmsr_ints);
+
+	phy_print_status(phydev);
+}
+
+int et131x_mii_probe(struct net_device *netdev)
+{
+	struct et131x_adapter *adapter = netdev_priv(netdev);
+	struct  phy_device *phydev = NULL;
+
+	phydev = phy_find_first(adapter->mii_bus);
+	if (!phydev) {
+		dev_err(&adapter->pdev->dev, "no PHY found\n");
+		return -ENODEV;
+	}
+
+	phydev = phy_connect(netdev, dev_name(&phydev->dev),
+			&et131x_adjust_link, 0, PHY_INTERFACE_MODE_MII);
+
+	if(IS_ERR(phydev)) {
+		dev_err(&adapter->pdev->dev, "Could not attach to PHY\n");
+		return PTR_ERR(phydev);
+	}
+
+	phydev->supported &= (SUPPORTED_10baseT_Half
+                                | SUPPORTED_10baseT_Full
+                                | SUPPORTED_100baseT_Half
+                                | SUPPORTED_100baseT_Full
+                                | SUPPORTED_Autoneg
+                                | SUPPORTED_MII
+                                | SUPPORTED_TP);
+
+	if (adapter->pdev->device != ET131X_PCI_DEVICE_ID_FAST)
+		phydev->supported |= SUPPORTED_1000baseT_Full;
+
+        phydev->advertising = phydev->supported;
+        adapter->phydev = phydev;
+
+        dev_info(&adapter->pdev->dev, "attached PHY driver [%s] "
+                "(mii_bus:phy_addr=%s)\n",
+                phydev->drv->name, dev_name(&phydev->dev));
+
+        return 0;
+}
+
 /**
  * et131x_adapter_init
  * @adapter: pointer to the private adapter struct
@@ -538,8 +613,8 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	int pm_cap;
 	struct net_device *netdev;
 	struct et131x_adapter *adapter;
+	int ii;
 
-	/* Enable the device via the PCI subsystem */
 	result = pci_enable_device(pdev);
 	if (result) {
 		dev_err(&pdev->dev, "pci_enable_device() failed\n");
@@ -602,8 +677,10 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	}
 
 	SET_NETDEV_DEV(netdev, &pdev->dev);
+	et131x_set_ethtool_ops(netdev);
 
 	adapter = et131x_adapter_init(netdev, pdev);
+
 	/* Initialise the PCI setup for the device */
 	et131x_pci_init(adapter, pdev);
 
@@ -650,11 +727,43 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	adapter->error_timer.function = et131x_error_timer_handler;
 	adapter->error_timer.data = (unsigned long)adapter;
 
-	/* Initialize link state */
-	netif_carrier_off(adapter->netdev);
-
 	/* Init variable for counting how long we do not have link status */
 	adapter->boot_coma = 0;
+	et1310_disable_phy_coma(adapter);
+
+	/* Setup the mii_bus struct */
+	adapter->mii_bus = mdiobus_alloc();
+	if (!adapter->mii_bus) {
+		dev_err(&pdev->dev, "Alloc of mii_bus struct failed\n");
+		goto err_mem_free;
+	}
+
+	adapter->mii_bus->name = "et131x_eth_mii";
+	snprintf(adapter->mii_bus->id, MII_BUS_ID_SIZE, "%x",
+		(adapter->pdev->bus->number << 8) | adapter->pdev->devfn);
+	adapter->mii_bus->priv = netdev;
+	adapter->mii_bus->read = et131x_mdio_read;
+	adapter->mii_bus->write = et131x_mdio_write;
+	adapter->mii_bus->reset = et131x_mdio_reset;
+	adapter->mii_bus->irq = kmalloc(sizeof(int)*PHY_MAX_ADDR, GFP_KERNEL);
+        if (!adapter->mii_bus->irq) {
+                dev_err(&pdev->dev, "mii_bus irq allocation failed\n");
+		goto err_mdio_free;
+        }
+
+        for (ii = 0; ii < PHY_MAX_ADDR; ii++)
+                adapter->mii_bus->irq[ii] = PHY_POLL;
+
+        if (mdiobus_register(adapter->mii_bus)) {
+                dev_err(&pdev->dev, "failed to register MII bus\n");
+		mdiobus_free(adapter->mii_bus);
+		goto err_mdio_free_irq;
+        }
+
+	if (et131x_mii_probe(netdev)) {
+                dev_err(&pdev->dev, "failed to probe MII bus\n");
+		goto err_mdio_unregister;
+	}
 
 	/* We can enable interrupts now
 	 *
@@ -667,7 +776,7 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 	result = register_netdev(netdev);
 	if (result != 0) {
 		dev_err(&pdev->dev, "register_netdev() failed\n");
-		goto err_mem_free;
+		goto err_mdio_unregister;
 	}
 
 	/* Register the net_device struct with the PCI subsystem. Save a copy
@@ -679,6 +788,12 @@ static int __devinit et131x_pci_setup(struct pci_dev *pdev,
 
 	return result;
 
+err_mdio_unregister:
+	mdiobus_unregister(adapter->mii_bus);
+err_mdio_free_irq:
+	kfree(adapter->mii_bus->irq);
+err_mdio_free:
+	mdiobus_free(adapter->mii_bus);
 err_mem_free:
 	et131x_adapter_memory_free(adapter);
 err_iounmap:
@@ -704,20 +819,18 @@ err_out:
  */
 static void __devexit et131x_pci_remove(struct pci_dev *pdev)
 {
-	struct net_device *netdev;
-	struct et131x_adapter *adapter;
+	struct net_device *netdev = pci_get_drvdata(pdev);
+	struct et131x_adapter *adapter = netdev_priv(netdev);
 
-	/* Retrieve the net_device pointer from the pci_dev struct, as well
-	 * as the private adapter struct
-	 */
-	netdev = pci_get_drvdata(pdev);
-	adapter = netdev_priv(netdev);
-
-	/* Perform device cleanup */
 	unregister_netdev(netdev);
+	mdiobus_unregister(adapter->mii_bus);
+	kfree(adapter->mii_bus->irq);
+	mdiobus_free(adapter->mii_bus);
+
 	et131x_adapter_memory_free(adapter);
 	iounmap(adapter->regs);
-	pci_dev_put(adapter->pdev);
+	pci_dev_put(pdev);
+
 	free_netdev(netdev);
 	pci_release_regions(pdev);
 	pci_disable_device(pdev);
diff --git a/drivers/staging/et131x/et131x_netdev.c b/drivers/staging/et131x/et131x_netdev.c
index 20df145..ce21433 100644
--- a/drivers/staging/et131x/et131x_netdev.c
+++ b/drivers/staging/et131x/et131x_netdev.c
@@ -1,6 +1,6 @@
 /*
  * Agere Systems Inc.
- * 10/100/1000 Base-T Ethernet Driver for the ET1301 and ET131x series MACs
+ * 10/100/1000 Base-T Ethernet Driver for the ET1310 and ET131x series MACs
  *
  * Copyright © 2005 Agere Systems Inc.
  * All rights reserved.
@@ -82,6 +82,7 @@
 #include <linux/skbuff.h>
 #include <linux/if_arp.h>
 #include <linux/ioport.h>
+#include <linux/phy.h>
 
 #include "et1310_phy.h"
 #include "et1310_tx.h"
@@ -167,6 +168,8 @@ int et131x_open(struct net_device *netdev)
 
 	adapter->flags |= fMP_ADAPTER_INTERRUPT_IN_USE;
 
+	phy_start(adapter->phydev);
+
 	/* We're ready to move some data, so start the queue */
 	netif_start_queue(netdev);
 	return result;
@@ -699,8 +702,6 @@ struct net_device *et131x_device_alloc(void)
 	netdev->watchdog_timeo = ET131X_TX_TIMEOUT;
 	netdev->netdev_ops     = &et131x_netdev_ops;
 
-	/* netdev->ethtool_ops        = &et131x_ethtool_ops; */
-
 	/* Poll? */
 	/* netdev->poll               = &et131x_poll; */
 	/* netdev->poll_controller    = &et131x_poll_controller; */
-- 
1.7.6


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

* Re: [PATCH 4/6] staging: et131x: Remove redundant replica loopback code
  2011-08-29 17:42 ` [PATCH 4/6] staging: et131x: Remove redundant replica loopback code Mark Einon
@ 2011-08-30 10:08   ` Dan Carpenter
  2011-08-30 10:17     ` Alan Cox
  0 siblings, 1 reply; 9+ messages in thread
From: Dan Carpenter @ 2011-08-30 10:08 UTC (permalink / raw)
  To: Mark Einon; +Cc: gregkh, devel, linux-kernel, o.hartmann

This patch was sent with git-send-email but it's in base64 encoding.

Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: base64

Why did that happen?

I'm in mutt and if I use decode-save then I can apply the patch, but
if I just pipe the patch to my scripts then it doesn't work.  Do
other mutt users have a trick for handling base64 patches?

regards,
dan carpenter

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

* Re: [PATCH 4/6] staging: et131x: Remove redundant replica loopback code
  2011-08-30 10:08   ` Dan Carpenter
@ 2011-08-30 10:17     ` Alan Cox
  2011-08-30 10:31       ` Mark Einon
  0 siblings, 1 reply; 9+ messages in thread
From: Alan Cox @ 2011-08-30 10:17 UTC (permalink / raw)
  To: Dan Carpenter; +Cc: Mark Einon, gregkh, devel, linux-kernel, o.hartmann

On Tue, 30 Aug 2011 13:08:34 +0300
Dan Carpenter <error27@gmail.com> wrote:

> This patch was sent with git-send-email but it's in base64 encoding.
> 
> Content-Type: text/plain; charset="utf-8"
> Content-Transfer-Encoding: base64
> 
> Why did that happen?

Presumably it got re-encoded because a mail system in the path between
him and you decided it was traversing a 7bit path and helpfully
reprocessed it to avoid corruption.

If your mailer can't automatically handle utf-8/base64 perhaps you need a
better one ;)

Alan

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

* Re: [PATCH 4/6] staging: et131x: Remove redundant replica loopback code
  2011-08-30 10:17     ` Alan Cox
@ 2011-08-30 10:31       ` Mark Einon
  0 siblings, 0 replies; 9+ messages in thread
From: Mark Einon @ 2011-08-30 10:31 UTC (permalink / raw)
  To: Alan Cox; +Cc: Dan Carpenter, gregkh, devel, linux-kernel, o.hartmann

On 30 August 2011 11:17, Alan Cox <alan@lxorguk.ukuu.org.uk> wrote:
> On Tue, 30 Aug 2011 13:08:34 +0300
> Dan Carpenter <error27@gmail.com> wrote:
>
>> This patch was sent with git-send-email but it's in base64 encoding.
>>
>> Content-Type: text/plain; charset="utf-8"
>> Content-Transfer-Encoding: base64
>>
>> Why did that happen?
>
> Presumably it got re-encoded because a mail system in the path between
> him and you decided it was traversing a 7bit path and helpfully
> reprocessed it to avoid corruption.
>
> If your mailer can't automatically handle utf-8/base64 perhaps you need a
> better one ;)

Maybe not - now you mention it, when git send-email got to this
particular patch, it did ask me if I wanted to use UTF-8, which it's
never done before.
I'm not aware of anything unusual I did with this patch set, but i've
just done a format-patch and git send-email again to get:

git send-email --to=mark.einon@gmail.com
0004-staging-et131x-Remove-redundant-replica-loopback-cod.patch
0004-staging-et131x-Remove-redundant-replica-loopback-cod.patch
The following files are 8bit, but do not declare a Content-Transfer-Encoding.
    0004-staging-et131x-Remove-redundant-replica-loopback-cod.patch
Which 8bit encoding should I declare [UTF-8]?

Not sure how that's happened.

Mark

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

end of thread, other threads:[~2011-08-30 10:31 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-08-29 17:42 [PATCH 1/6] staging: et131x: Further tidy up of 131x_pci_setup() Mark Einon
2011-08-29 17:42 ` [PATCH 2/6] MAINAINERS: Add details for drivers/staging/et131x Mark Einon
2011-08-29 17:42 ` [PATCH 3/6] staging: et131x: Remove unused xcvr_id in struct ce_stats Mark Einon
2011-08-29 17:42 ` [PATCH 4/6] staging: et131x: Remove redundant replica loopback code Mark Einon
2011-08-30 10:08   ` Dan Carpenter
2011-08-30 10:17     ` Alan Cox
2011-08-30 10:31       ` Mark Einon
2011-08-29 17:42 ` [PATCH 5/6] staging: et131x: Remove module_param et131x_speed_set Mark Einon
2011-08-29 17:42 ` [PATCH 6/6] staging: et131x: Use phy-device, mii_bus and ethtool_ops Mark Einon

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.