r2650 - trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches

Sven Luther luther@costa.debian.org
Tue, 08 Mar 2005 17:48:16 +0100


Author: luther
Date: 2005-03-08 17:48:15 +0100 (Tue, 08 Mar 2005)
New Revision: 2650

Modified:
   trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-marvell.dpatch
Log:
Ah, now, had missed one last modification :/


Modified: trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-marvell.dpatch
===================================================================
--- trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-marvell.dpatch	2005-03-08 16:42:03 UTC (rev 2649)
+++ trunk/kernel/source/kernel-source-2.6.11-2.6.11/debian/patches/powerpc-pegasos-marvell.dpatch	2005-03-08 16:48:15 UTC (rev 2650)
@@ -11,9 +11,28 @@
 . $(dirname $0)/DPATCH
 
 @DPATCH@
+diff -urN kernel-source-2.6.11/arch/ppc/platforms/chrp_setup.c kernel-source-2.6.11-marvell/arch/ppc/platforms/chrp_setup.c
+--- kernel-source-2.6.11/arch/ppc/platforms/chrp_setup.c	2005-03-02 08:38:25.000000000 +0100
++++ kernel-source-2.6.11-marvell/arch/ppc/platforms/chrp_setup.c	2005-03-08 17:33:37.000000000 +0100
+@@ -217,7 +217,6 @@
+ 	}
+ }
+ 
+-
+ static void __init pegasos_set_l2cr(void)
+ {
+ 	struct device_node *np;
+@@ -244,6 +243,7 @@
+ 	}
+ }
+ 
++
+ void __init chrp_setup_arch(void)
+ {
+ 	struct device_node *device;
 diff -urN kernel-source-2.6.11/arch/ppc/platforms/Makefile kernel-source-2.6.11-marvell/arch/ppc/platforms/Makefile
 --- kernel-source-2.6.11/arch/ppc/platforms/Makefile	2005-03-02 08:38:33.000000000 +0100
-+++ kernel-source-2.6.11-marvell/arch/ppc/platforms/Makefile	2005-03-08 17:33:29.346601584 +0100
++++ kernel-source-2.6.11-marvell/arch/ppc/platforms/Makefile	2005-03-08 17:33:29.000000000 +0100
 @@ -12,7 +12,7 @@
  obj-$(CONFIG_PPC_PMAC)		+= pmac_pic.o pmac_setup.o pmac_time.o \
  					pmac_feature.o pmac_pci.o pmac_sleep.o \
@@ -25,7 +44,7 @@
  obj-$(CONFIG_NVRAM)		+= pmac_nvram.o
 diff -urN kernel-source-2.6.11/arch/ppc/platforms/mv643xx_eth_pegasos.c kernel-source-2.6.11-marvell/arch/ppc/platforms/mv643xx_eth_pegasos.c
 --- kernel-source-2.6.11/arch/ppc/platforms/mv643xx_eth_pegasos.c	1970-01-01 01:00:00.000000000 +0100
-+++ kernel-source-2.6.11-marvell/arch/ppc/platforms/mv643xx_eth_pegasos.c	2005-03-08 17:33:20.482949064 +0100
++++ kernel-source-2.6.11-marvell/arch/ppc/platforms/mv643xx_eth_pegasos.c	2005-03-08 17:33:20.000000000 +0100
 @@ -0,0 +1,163 @@
 +/*
 + *  arch/ppc/platforms/mv643xx_eth_pegasos.c
@@ -209,7 +228,7 @@
  	bool "MV-643XX Port 0"
 diff -urN kernel-source-2.6.11/drivers/net/mv643xx_eth.c kernel-source-2.6.11-marvell/drivers/net/mv643xx_eth.c
 --- kernel-source-2.6.11/drivers/net/mv643xx_eth.c	2005-03-02 08:38:01.000000000 +0100
-+++ kernel-source-2.6.11-marvell/drivers/net/mv643xx_eth.c	2005-03-08 09:21:11.000000000 +0100
++++ kernel-source-2.6.11-marvell/drivers/net/mv643xx_eth.c	2005-03-08 17:43:58.060022616 +0100
 @@ -1,5 +1,5 @@
  /*
 - * drivers/net/mv64340_eth.c - Driver for MV64340X ethernet ports
@@ -1019,7 +1038,7 @@
   *
   * OUTPUT:
   *	Interrupt coalescing mechanism value is set in MV-643xx chip.
-@@ -634,48 +639,53 @@
+@@ -634,48 +639,48 @@
   *
   */
  static unsigned int eth_port_set_tx_coal(unsigned int eth_port_num,
@@ -1066,12 +1085,7 @@
 -	err = request_irq(dev->irq, mv64340_eth_int_handler,
 -	                  SA_INTERRUPT | SA_SAMPLE_RANDOM, dev->name, dev);
 +	err = request_irq(dev->irq, mv643xx_eth_int_handler,
-+#ifdef CONFIG_PPC_MULTIPLATFORM
-+		((_machine == _MACH_chrp) && (_chrp_type == _CHRP_Pegasos) ? SA_SHIRQ : SA_INTERRUPT)
-+		| SA_SAMPLE_RANDOM, dev->name, dev);
-+#else
-+		SA_INTERRUPT | SA_SAMPLE_RANDOM, dev->name, dev);
-+#endif
++		SA_SHIRQ | SA_SAMPLE_RANDOM, dev->name, dev);
  
  	if (err) {
 -		printk(KERN_ERR "Can not assign IRQ number to MV64340_eth%d\n",
@@ -1087,7 +1101,7 @@
  		printk("%s: Error opening interface\n", dev->name);
  		err = -EBUSY;
  		goto out_free;
-@@ -698,66 +708,35 @@
+@@ -698,66 +703,35 @@
   * ether_init_rx_desc_ring - Curve a Rx chain desc list and buffer in memory.
   *
   * DESCRIPTION:
@@ -1168,7 +1182,7 @@
  	}
  
  	/* Save Rx desc pointer to driver struct. */
-@@ -766,293 +745,288 @@
+@@ -766,293 +740,288 @@
  
  	mp->rx_desc_area_size = rx_desc_num * sizeof(struct eth_rx_desc);
  
@@ -1422,14 +1436,14 @@
  
  	mp->tx_int_coal =
 -		eth_port_set_tx_coal (port_num, 133000000, MV64340_TX_COAL);  
-+		eth_port_set_tx_coal(port_num, 133000000, MV643XX_TX_COAL);
- 
+-
 -	/* Increase the Rx side buffer size */
 -
 -	MV_WRITE (MV64340_ETH_PORT_SERIAL_CONTROL_REG(port_num), (0x5 << 17) |
 -			(MV_READ(MV64340_ETH_PORT_SERIAL_CONTROL_REG(port_num))
 -					& 0xfff1ffff));
--
++		eth_port_set_tx_coal(port_num, 133000000, MV643XX_TX_COAL);
+ 
 -	/* Check Link status on phy */
 -	eth_port_read_smi_reg(port_num, 1, &phy_reg_data);
 -	if (!(phy_reg_data & 0x20))
@@ -1592,7 +1606,7 @@
  
  	free_irq(dev->irq, dev);
  	spin_unlock_irq(&mp->lock);
-@@ -1060,59 +1034,64 @@
+@@ -1060,59 +1029,64 @@
  	return 0;
  }
  
@@ -1683,7 +1697,7 @@
  		mp->rx_task.func(dev);
  		*budget -= work_done;
  		dev->quota -= work_done;
-@@ -1123,12 +1102,12 @@
+@@ -1123,12 +1097,12 @@
  	if (done) {
  		spin_lock_irqsave(&mp->lock, flags);
  		__netif_rx_complete(dev);
@@ -1701,7 +1715,7 @@
  		spin_unlock_irqrestore(&mp->lock, flags);
  	}
  
-@@ -1137,19 +1116,19 @@
+@@ -1137,19 +1111,19 @@
  #endif
  
  /*
@@ -1728,7 +1742,7 @@
  	struct net_device_stats *stats = &mp->stats;
  	ETH_FUNC_RET_STATUS status;
  	unsigned long flags;
-@@ -1157,119 +1136,195 @@
+@@ -1157,119 +1131,195 @@
  
  	if (netif_queue_stopped(dev)) {
  		printk(KERN_ERR
@@ -1898,24 +1912,6 @@
 +				printk("Tx resource error \n");
  		}
 +		stats->tx_bytes += pkt_info.byte_cnt;
-+
-+		/* Check for the remaining frags */
-+		for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
-+			skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
-+			pkt_info.l4i_chk = 0x0000;
-+			pkt_info.cmd_sts = 0x00000000;
-+
-+			/* Last Frag enables interrupt and frees the skb */
-+			if (frag == (skb_shinfo(skb)->nr_frags - 1)) {
-+				pkt_info.cmd_sts |= ETH_TX_ENABLE_INTERRUPT |
-+							ETH_TX_LAST_DESC;
-+				pkt_info.return_info = skb;
-+				mp->tx_ring_skbs++;
-+			} else {
-+				pkt_info.return_info = 0;
-+			}
-+			pkt_info.l4i_chk = 0;
-+			pkt_info.byte_cnt = this_frag->size;
  
 -                /* Check for the remaining frags */
 -                for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
@@ -1940,6 +1936,24 @@
 -                        pkt_info.buf_ptr = pci_map_page(NULL, this_frag->page,
 -                                        this_frag->page_offset,
 -                                        this_frag->size, PCI_DMA_TODEVICE);
++		/* Check for the remaining frags */
++		for (frag = 0; frag < skb_shinfo(skb)->nr_frags; frag++) {
++			skb_frag_t *this_frag = &skb_shinfo(skb)->frags[frag];
++			pkt_info.l4i_chk = 0x0000;
++			pkt_info.cmd_sts = 0x00000000;
++
++			/* Last Frag enables interrupt and frees the skb */
++			if (frag == (skb_shinfo(skb)->nr_frags - 1)) {
++				pkt_info.cmd_sts |= ETH_TX_ENABLE_INTERRUPT |
++							ETH_TX_LAST_DESC;
++				pkt_info.return_info = skb;
++				mp->tx_ring_skbs++;
++			} else {
++				pkt_info.return_info = 0;
++			}
++			pkt_info.l4i_chk = 0;
++			pkt_info.byte_cnt = this_frag->size;
++
 +			pkt_info.buf_ptr = dma_map_page(NULL, this_frag->page,
 +							this_frag->page_offset,
 +							this_frag->size,
@@ -1997,7 +2011,7 @@
  		 * Stop getting skb's from upper layers.
  		 * Getting skb's from upper layers will be enabled again after
  		 * packets are released.
-@@ -1277,7 +1332,6 @@
+@@ -1277,7 +1327,6 @@
  		netif_stop_queue(dev);
  
  	/* Update statistics and start of transmittion time */
@@ -2005,7 +2019,7 @@
  	stats->tx_packets++;
  	dev->trans_start = jiffies;
  
-@@ -1287,214 +1341,304 @@
+@@ -1287,214 +1336,304 @@
  }
  
  /*
@@ -2078,6 +2092,8 @@
 +	res = platform_get_resource(pdev, IORESOURCE_IRQ, 0);
 +	BUG_ON(!res);
 +	dev->irq = res->start;
++
++	mp->port_num = port_num;
  
 -	dev->open = mv64340_eth_open;
 -	dev->stop = mv64340_eth_stop;
@@ -2085,8 +2101,6 @@
 -	dev->get_stats = mv64340_eth_get_stats;
 -	dev->set_mac_address = mv64340_eth_set_mac_address;
 -	dev->set_multicast_list = mv64340_eth_set_rx_mode;
-+	mp->port_num = port_num;
-+
 +	dev->open = mv643xx_eth_open;
 +	dev->stop = mv643xx_eth_stop;
 +	dev->hard_start_xmit = mv643xx_eth_start_xmit;
@@ -2220,28 +2234,28 @@
 -		printk("TX TCP/IP Checksumming Supported  \n");
 +		printk(KERN_NOTICE "%s: TX TCP/IP Checksumming Supported\n",
 +								dev->name);
-+
+ 
+-	printk("RX TCP/UDP Checksum Offload ON, \n");
+-	printk("TX and RX Interrupt Coalescing ON \n");
 +#ifdef MV643XX_CHECKSUM_OFFLOAD_TX
 +	printk(KERN_NOTICE "%s: RX TCP/UDP Checksum Offload ON \n", dev->name);
 +#endif
  
--	printk("RX TCP/UDP Checksum Offload ON, \n");
--	printk("TX and RX Interrupt Coalescing ON \n");
+-#ifdef MV64340_NAPI
+-	printk("RX NAPI Enabled \n");
 +#ifdef MV643XX_COAL
 +	printk(KERN_NOTICE "%s: TX and RX Interrupt Coalescing ON \n",
 +								dev->name);
-+#endif
+ #endif
  
--#ifdef MV64340_NAPI
--	printk("RX NAPI Enabled \n");
+-	return dev;
 +#ifdef MV643XX_NAPI
 +	printk(KERN_NOTICE "%s: RX NAPI Enabled \n", dev->name);
- #endif
++#endif
  
--	return dev;
+-out_free_dev:
 +	return 0;
- 
--out_free_dev:
++
 +out:
  	free_netdev(dev);
  
@@ -2261,8 +2275,11 @@
  	free_netdev(dev);
 +	dev_set_drvdata(ddev, NULL);
 +	return 0;
-+}
-+
+ }
+ 
+-static struct net_device *mv64340_dev0;
+-static struct net_device *mv64340_dev1;
+-static struct net_device *mv64340_dev2;
 +static int mv643xx_eth_shared_probe(struct device *ddev)
 +{
 +	struct platform_device *pdev = to_platform_device(ddev);
@@ -2289,11 +2306,8 @@
 +	mv643xx_eth_shared_base = NULL;
 +
 +	return 0;
- }
- 
--static struct net_device *mv64340_dev0;
--static struct net_device *mv64340_dev1;
--static struct net_device *mv64340_dev2;
++}
++
 +static struct device_driver mv643xx_eth_driver = {
 +	.name = MV643XX_ETH_NAME,
 +	.bus = &platform_bus_type,
@@ -2418,7 +2432,7 @@
   *		- This low level driver is OS independent. Allocating memory for
   *		  the descriptor rings and buffers are not within the scope of
   *		  this driver.
-@@ -1511,12 +1655,12 @@
+@@ -1511,12 +1650,12 @@
   *		- PHY access and control API.
   *		- Port control register configuration API.
   *		- Full control over Unicast and Multicast MAC configurations.
@@ -2434,7 +2448,7 @@
   *		User information regarding port configuration has to be set
   *		prior to calling the port initialization routine.
   *
-@@ -1525,7 +1669,7 @@
+@@ -1525,7 +1664,7 @@
   *		access to DRAM and internal SRAM memory spaces.
   *
   *		Driver ring initialization
@@ -2443,7 +2457,7 @@
   *		within the scope of this driver. Thus, the user is required to
   *		allocate memory for the descriptors ring and buffers. Those
   *		memory parameters are used by the Rx and Tx ring initialization
-@@ -1533,49 +1677,50 @@
+@@ -1533,49 +1672,50 @@
   *		of a ring.
   *		Note: Pay special attention to alignment issues when using
   *		cached descriptors/buffers. In this phase the driver store
@@ -2514,7 +2528,7 @@
   *		It is the user responsibility to return this resource back
   *		to the Rx descriptor ring to enable the reuse of this source.
   *		Return Rx resource is done using the eth_rx_return_buff API.
-@@ -1596,27 +1741,21 @@
+@@ -1596,27 +1736,21 @@
   *
   *		EXTERNAL INTERFACE
   *
@@ -2552,7 +2566,7 @@
   *		cmd_sts		Tx/Rx descriptor command status.
   *		buf_ptr		Tx/Rx descriptor buffer pointer.
   *		return_info	Tx/Rx user resource return information.
-@@ -1625,70 +1764,44 @@
+@@ -1625,70 +1759,44 @@
  /* defines */
  /* SDMA command macros */
  #define ETH_ENABLE_TX_QUEUE(eth_port) \
@@ -2640,7 +2654,7 @@
  	mp->port_rx_queue_command = 0;
  	mp->port_tx_queue_command = 0;
  
-@@ -1706,77 +1819,73 @@
+@@ -1706,77 +1814,73 @@
   * eth_port_start - Start the Ethernet port activity.
   *
   * DESCRIPTION:
@@ -2713,17 +2727,15 @@
 -	MV_WRITE(MV64340_ETH_PORT_CONFIG_REG(eth_port_num),
 -		 mp->port_config);
 +	mv_write(MV643XX_ETH_PORT_CONFIG_REG(port_num), mp->port_config);
++
++	mv_write(MV643XX_ETH_PORT_CONFIG_EXTEND_REG(port_num),
++						mp->port_config_extend);
  
 -	MV_WRITE(MV64340_ETH_PORT_CONFIG_EXTEND_REG(eth_port_num),
 -		 mp->port_config_extend);
-+	mv_write(MV643XX_ETH_PORT_CONFIG_EXTEND_REG(port_num),
-+						mp->port_config_extend);
  
 -	MV_WRITE(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num),
 -		 mp->port_serial_control);
- 
--	MV_SET_REG_BITS(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num),
--			ETH_SERIAL_PORT_ENABLE);
 +	/* Increase the Rx side buffer size if supporting GigE */
 +	if (mp->port_serial_control & MV643XX_ETH_SET_GMII_SPEED_TO_1000)
 +		mv_write(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(port_num),
@@ -2731,7 +2743,9 @@
 +	else
 +		mv_write(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(port_num),
 +						mp->port_serial_control);
-+
+ 
+-	MV_SET_REG_BITS(MV64340_ETH_PORT_SERIAL_CONTROL_REG(eth_port_num),
+-			ETH_SERIAL_PORT_ENABLE);
 +	mv_write(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(port_num),
 +		mv_read(MV643XX_ETH_PORT_SERIAL_CONTROL_REG(port_num)) |
 +						MV643XX_ETH_SERIAL_PORT_ENABLE);
@@ -2758,7 +2772,7 @@
  }
  
  /*
-@@ -1786,29 +1895,29 @@
+@@ -1786,29 +1890,29 @@
   *		This function Set the port Ethernet MAC address.
   *
   * INPUT:
@@ -2797,7 +2811,7 @@
  
  	/* Accept frames of this address */
  	eth_port_uc_addr(eth_port_num, p_addr[5], ACCEPT_MAC_ADDR);
-@@ -1817,29 +1926,64 @@
+@@ -1817,29 +1921,64 @@
  }
  
  /*
@@ -2870,7 +2884,7 @@
  {
  	unsigned int unicast_reg;
  	unsigned int tbl_offset;
-@@ -1852,29 +1996,26 @@
+@@ -1852,29 +1991,26 @@
  
  	switch (option) {
  	case REJECT_MAC_ADDR:
@@ -2909,7 +2923,7 @@
  
  		break;
  
-@@ -1889,17 +2030,17 @@
+@@ -1889,17 +2025,17 @@
   * eth_port_init_mac_tables - Clear all entrance in the UC, SMC and OMC tables
   *
   * DESCRIPTION:
@@ -2932,7 +2946,7 @@
   */
  static void eth_port_init_mac_tables(unsigned int eth_port_num)
  {
-@@ -1907,18 +2048,16 @@
+@@ -1907,18 +2043,16 @@
  
  	/* Clear DA filter unicast table (Ex_dFUT) */
  	for (table_index = 0; table_index <= 0xC; table_index += 4)
@@ -2957,7 +2971,7 @@
  	}
  }
  
-@@ -1926,17 +2065,17 @@
+@@ -1926,17 +2060,17 @@
   * eth_clear_mib_counters - Clear all MIB counters
   *
   * DESCRIPTION:
@@ -2980,7 +2994,7 @@
   *
   */
  static void eth_clear_mib_counters(unsigned int eth_port_num)
-@@ -1944,72 +2083,155 @@
+@@ -1944,72 +2078,155 @@
  	int i;
  
  	/* Perform dummy reads from MIB counters */
@@ -3160,7 +3174,7 @@
  }
  
  /*
-@@ -2017,381 +2239,358 @@
+@@ -2017,381 +2234,358 @@
   *
   * DESCRIPTION:
   * 	This routine resets the chip by aborting any SDMA engine activity and
@@ -3733,7 +3747,7 @@
  	unsigned int command_status;
  
  	/* Do not process Tx ring in case of Tx ring resource error */
-@@ -2403,39 +2602,24 @@
+@@ -2403,39 +2597,24 @@
  	tx_desc_used = mp->tx_used_desc_q;
  	current_descriptor = &mp->p_tx_desc_area[tx_desc_curr];
  
@@ -3778,7 +3792,7 @@
  
  	/* Check for ring index overlap in the Tx desc ring */
  	if (tx_desc_curr == tx_desc_used) {
-@@ -2452,62 +2636,55 @@
+@@ -2452,62 +2631,55 @@
   *
   * DESCRIPTION:
   *	This routine returns the transmitted packet information to the caller.
@@ -3864,7 +3878,7 @@
  
  	/* Pass the packet information to the caller */
  	p_pkt_info->cmd_sts = command_status;
-@@ -2515,7 +2692,7 @@
+@@ -2515,7 +2687,7 @@
  	mp->tx_skb[tx_desc_used] = NULL;
  
  	/* Update the next descriptor to release. */
@@ -3873,7 +3887,7 @@
  
  	/* Any Tx return cancels the Tx resource error status */
  	mp->tx_resource_err = 0;
-@@ -2527,30 +2704,30 @@
+@@ -2527,30 +2699,30 @@
   * eth_port_receive - Get received information from Rx ring.
   *
   * DESCRIPTION:
@@ -3916,7 +3930,7 @@
  	unsigned int command_status;
  
  	/* Do not process Rx ring in case of Rx ring resource error */
-@@ -2565,6 +2742,7 @@
+@@ -2565,6 +2737,7 @@
  
  	/* The following parameters are used to save readings from memory */
  	command_status = p_rx_desc->cmd_sts;
@@ -3924,7 +3938,7 @@
  
  	/* Nothing to receive... */
  	if (command_status & (ETH_BUFFER_OWNED_BY_DMA))
-@@ -2577,18 +2755,17 @@
+@@ -2577,18 +2750,17 @@
  	p_pkt_info->l4i_chk = p_rx_desc->buf_size;
  
  	/* Clean the return info field to indicate that the packet has been */
@@ -3945,7 +3959,7 @@
  	return ETH_OK;
  }
  
-@@ -2596,27 +2773,27 @@
+@@ -2596,27 +2768,27 @@
   * eth_rx_return_buff - Returns a Rx buffer back to the Rx ring.
   *
   * DESCRIPTION:
@@ -3983,7 +3997,7 @@
  
  	/* Get 'used' Rx descriptor */
  	used_rx_desc = mp->rx_used_desc_q;
-@@ -2627,20 +2804,240 @@
+@@ -2627,20 +2799,240 @@
  	mp->rx_skb[used_rx_desc] = p_pkt_info->return_info;
  
  	/* Flush the write pipe */