Revision 9ecfe875c4f311618cc918aded716017dcd2ddf1 authored by Karicheri, Muralidharan on 19 February 2016, 17:58:42 UTC, committed by David S. Miller on 22 February 2016, 03:03:15 UTC
The commit 899077791403 ("netcp: try to reduce type confusion in
descriptors") introduces a regression in Kernel 4.5-rc1 and it breaks
get/set_pad_info() functionality.

The TI NETCP driver uses pad0 and pad1 fields of knav_dma_desc to
store DMA/MEM buffer pointer and buffer size respectively. And in both
cases for Keystone 2 the pointer type size is 32 bit regardless of
LAPE enabled or not, because CONFIG_ARCH_DMA_ADDR_T_64BIT originally
is not expected to be defined.

Unfortunately, above commit changed buffer's pointers save/restore
code (get/set_pad_info()) and added intermediate conversation to u64
which works incorrectly on 32bit Keystone 2 and causes TI NETCP driver
crash in RX/TX path due to "Unable to handle kernel NULL pointer"
exception. This issue was reported and discussed in [1].

Hence, fix it by partially reverting above commit and restoring
get/set_pad_info() functionality as it was before.

[1] https://www.mail-archive.com/netdev@vger.kernel.org/msg95361.html
Cc: Wingman Kwok <w-kwok2@ti.com>
Cc: Mugunthan V N <mugunthanvnm@ti.com>
CC: David Laight <David.Laight@ACULAB.COM>
CC: Arnd Bergmann <arnd@arndb.de>
Reported-by: Franklin S Cooper Jr <fcooper@ti.com>
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 3301be3
Raw File
smsc_ece1099.txt
What is smsc-ece1099?
----------------------

The ECE1099 is a 40-Pin 3.3V Keyboard Scan Expansion
or GPIO Expansion device. The device supports a keyboard
scan matrix of 23x8. The device is connected to a Master
via the SMSC BC-Link interface or via the SMBus.
Keypad scan Input(KSI) and Keypad Scan Output(KSO) signals
are multiplexed with GPIOs.

Interrupt generation
--------------------

Interrupts can be generated by an edge detection on a GPIO
pin or an edge detection on one of the bus interface pins.
Interrupts can also be detected on the keyboard scan interface.
The bus interrupt pin (BC_INT# or SMBUS_INT#) is asserted if
any bit in one of the Interrupt Status registers is 1 and
the corresponding Interrupt Mask bit is also 1.

In order for software to determine which device is the source
of an interrupt, it should first read the Group Interrupt Status Register
to determine which Status register group is a source for the interrupt.
Software should read both the Status register and the associated Mask register,
then AND the two values together. Bits that are 1 in the result of the AND
are active interrupts. Software clears an interrupt by writing a 1 to the
corresponding bit in the Status register.

Communication Protocol
----------------------

- SMbus slave Interface
	The host processor communicates with the ECE1099 device
	through a series of read/write registers via the SMBus
	interface. SMBus is a serial communication protocol between
	a computer host and its peripheral devices. The SMBus data
	rate is 10KHz minimum to 400 KHz maximum

- Slave Bus Interface
	The ECE1099 device SMBus implementation is a subset of the
	SMBus interface to the host. The device is a slave-only SMBus device.
	The implementation in the device is a subset of SMBus since it
	only supports four protocols.

	The Write Byte, Read Byte, Send Byte, and Receive Byte protocols are the
	only valid SMBus protocols for the device.

- BC-LinkTM Interface
	The BC-Link is a proprietary bus that allows communication
	between a Master device and a Companion device. The Master
	device uses this serial bus to read and write registers
	located on the Companion device. The bus comprises three signals,
	BC_CLK, BC_DAT and BC_INT#. The Master device always provides the
	clock, BC_CLK, and the Companion device is the source for an
	independent asynchronous interrupt signal, BC_INT#. The ECE1099
	supports BC-Link speeds up to 24MHz.
back to top