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: <E7E8E31F-D443-44CC-98D1-3533312ECA5A@efacec.com>
Date:	Tue, 23 Oct 2012 09:56:35 +0000
From:	José Alexandre Ventura <jose.ventura@...cec.com>
To:	"<netdev@...r.kernel.org>" <netdev@...r.kernel.org>
CC:	Aníbal Almeida Pinto <anibal.pinto@...cec.com>
Subject: Re: SMSC LAN9512 PowerPC Linux Driver Problem


Hi,

I have made a modification to the smsc95xx.c and apparently it has fixed the tx checksum issue but I don't know if I have broken other things in the process.
I have also applied the MTU patch (9bbf556), because without it I couldn't send large files.

I have made the following alteration on smsc95xx.c:

	if (csum) {
		if (skb->len <= 45) {
			/* workaround - hardware tx checksum does not work
			 * properly with extremely small packets */
			long csstart = skb_checksum_start_offset(skb);
			__wsum calc = csum_partial(skb->data + csstart,
				skb->len - csstart, 0);
			*((__sum16 *)(skb->data + csstart
				+ skb->csum_offset)) = csum_fold(calc);

			csum = false;
		} else {
-			u32 csum_preamble = smsc95xx_calc_csum_preamble(skb);
+			u32 csum_preamble = cpu_to_le32( smsc95xx_calc_csum_preamble(skb) );
			skb_push(skb, 4);
			memcpy(skb->data, &csum_preamble, 4);
		}
	}

Could anyone please confirm that this fixes the problem without affecting the normal operation of the driver?

Best Regards,
José


On 09/10/2012, at 12:01, José Ventura <jose.ventura@...cec.com> wrote:

> 
> Hi,
> 
> I'm having problems with an SMSC EVB9512, based on the LAN9512 chip, when using with a PowerPC Chip. The Driver I'm using is the one already provided by Linux.
> I have tested the EVB9512 in two test configurations, both using a PowerPC:
> 
> First Test Configuration:
> - Custom Board with PowerPC Fresscale MPC8378  @ 667MHz
> - Linux Kernel 3.0.0
> - EVB9512 connected via USB
> 
> Problems with First Test Configuration:
> - nmap reports ports has filtered, even thought they are open
> - can't establish any connection, even a TCP socket
> - can ping the Board with other Devices without a problem
> 
> I have made more tests and found out that even though I can receive and send packages, my TX packages had incorrect TCP checksum.
> I then used ethtool to disable TX Checksum offloading and all my problems were solved. The problem with this 'fix' is that it uses more CPU and when under heavy load, I get an error and the ethernet port is shut.
> 
> 
> Second Configuration:
> - PowerBook G4 1.5GHz, 1.25MB DDR333
> - Ubuntu Live CD 12.04 LTS
> - EVB9512 connected via USB
> 
> Problems with second Configuration:
> - TX packets appears as errors in ifconfig
> - The powerbook is pinged from another machine without a problem but the PowerBook can't ping the other device
> 
> I have also tested the EVB9512 with a Custom Card with an OMAP L138 and also tested with a Toshiba Notebook with an Intel Core i5, both without any problems. This shows that it is not a problem with the EVB9512 itself because it works correctly with other architectures. I think the problems lies in the PowerPC driver of the LAN95xx.
> 
> 
> Best Regards,
> José Ventura
> 


--
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