android_kernel_xiaomi_sdm845/arch/powerpc/sysdev/bestcomm
Grant Likely 622882455a powerpc/mpc5200: Bugfix on handling variable sized buffer descriptors
The buffer descriptors for the ATA BestComm task are larger than the
current definition for bcom_bd.  This causes problems because the
various bcom_... functions dereference the buffer descriptor pointer
by using the array operator which doesn't work when the buffer
descriptors are a different size.

This patch adds the bcom_get_bd() function which uses the value in
bcom_task.bd_size to calculate the offset into the BD table.  This
patch also changes the definition of bcom_bd to specify a data size
of 0 instead of 1 so that it will never work if anyone attempts to
dereference the bd list as an array (as opposed to something that
might work even though it is wrong).

Finally, this patch moves the definition of bcom_bd up in the file
to eliminate a forward declaration.

Based on patch originally written by Tim Yamin.

Signed-off-by: Tim Yamin <plasm@roo.me.uk>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
2008-12-21 02:54:27 -07:00
..
ata.c [POWERPC] bestcomm: ATA task support 2007-10-16 17:09:42 -06:00
ata.h [POWERPC] bestcomm: ATA task support 2007-10-16 17:09:42 -06:00
bcom_ata_task.c [POWERPC] bestcomm: ATA task support 2007-10-16 17:09:42 -06:00
bcom_fec_rx_task.c [POWERPC] bestcomm: FEC task support 2007-10-16 17:09:49 -06:00
bcom_fec_tx_task.c [POWERPC] bestcomm: FEC task support 2007-10-16 17:09:49 -06:00
bcom_gen_bd_rx_task.c [POWERPC] bestcomm: GenBD task support 2007-10-16 17:09:56 -06:00
bcom_gen_bd_tx_task.c [POWERPC] bestcomm: GenBD task support 2007-10-16 17:09:56 -06:00
bestcomm_priv.h [POWERPC] bestcomm: core bestcomm support for Freescale MPC5200 2007-10-16 17:09:34 -06:00
bestcomm.c powerpc/mpc5200: fix compile warnings in bestcomm driver 2008-07-12 12:10:53 -06:00
bestcomm.h powerpc/mpc5200: Bugfix on handling variable sized buffer descriptors 2008-12-21 02:54:27 -07:00
fec.c [POWERPC] bestcomm: FEC task support 2007-10-16 17:09:49 -06:00
fec.h [POWERPC] bestcomm: FEC task support 2007-10-16 17:09:49 -06:00
gen_bd.c removed unused #include <linux/version.h>'s 2008-08-23 12:14:12 -07:00
gen_bd.h powerpc/mpc5200: Add PSC helpers for bestcomm engine 2008-07-12 12:10:53 -06:00
Kconfig powerpc/mpc5200: fix bestcomm Kconfig dependencies 2008-11-13 22:37:27 -07:00
Makefile [POWERPC] bestcomm: GenBD task support 2007-10-16 17:09:56 -06:00
sram.c powerpc/mpc5200: fix compile warnings in bestcomm driver 2008-07-12 12:10:53 -06:00
sram.h [POWERPC] bestcomm: core bestcomm support for Freescale MPC5200 2007-10-16 17:09:34 -06:00