summaryrefslogtreecommitdiffstats
path: root/drivers/ata/sata_sx4.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/ata/sata_sx4.c')
-rw-r--r--drivers/ata/sata_sx4.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/ata/sata_sx4.c b/drivers/ata/sata_sx4.c
index eb05a3c82a9e..bbcf970068ad 100644
--- a/drivers/ata/sata_sx4.c
+++ b/drivers/ata/sata_sx4.c
@@ -193,6 +193,7 @@ enum {
PDC_TIMER_MASK_INT,
};
+#define ECC_ERASE_BUF_SZ (128 * 1024)
struct pdc_port_priv {
u8 dimm_buf[(ATA_PRD_SZ * ATA_MAX_PRD) + 512];
@@ -1280,7 +1281,6 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
{
int speed, size, length;
u32 addr, spd0, pci_status;
- u32 tmp = 0;
u32 time_period = 0;
u32 tcount = 0;
u32 ticks = 0;
@@ -1395,14 +1395,17 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host)
pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS,
PDC_DIMM_SPD_TYPE, &spd0);
if (spd0 == 0x02) {
+ void *buf;
VPRINTK("Start ECC initialization\n");
addr = 0;
length = size * 1024 * 1024;
+ buf = kzalloc(ECC_ERASE_BUF_SZ, GFP_KERNEL);
while (addr < length) {
- pdc20621_put_to_dimm(host, (void *) &tmp, addr,
- sizeof(u32));
- addr += sizeof(u32);
+ pdc20621_put_to_dimm(host, buf, addr,
+ ECC_ERASE_BUF_SZ);
+ addr += ECC_ERASE_BUF_SZ;
}
+ kfree(buf);
VPRINTK("Finish ECC initialization\n");
}
return 0;
/span>Merge tag 'tee-drv-async-supplicant-for-v4.16' of https://git.linaro.org/peop...Arnd Bergmann 2017-12-15tee: shm: inline tee_shm_get_id()Volodymyr Babchuk 2017-12-15tee: use reference counting for tee_contextVolodymyr Babchuk 2017-12-15tee: optee: enable dynamic SHM supportVolodymyr Babchuk 2017-12-15tee: optee: add optee-specific shared pool implementationVolodymyr Babchuk 2017-12-15tee: optee: store OP-TEE capabilities in private dataVolodymyr Babchuk 2017-12-15tee: optee: add registered buffers handling into RPC callsVolodymyr Babchuk 2017-12-15tee: optee: add registered shared parameters handlingVolodymyr Babchuk 2017-12-15tee: optee: add shared buffer registration functionsVolodymyr Babchuk 2017-12-15tee: optee: add page list manipulation functionsVolodymyr Babchuk 2017-12-15tee: optee: Update protocol definitionsVolodymyr Babchuk 2017-12-15tee: add register user memoryJens Wiklander 2017-12-15tee: flexible shared memory pool creationJens Wiklander 2017-11-29optee: support asynchronous supplicant requestsJens Wiklander 2017-11-29tee: add TEE_IOCTL_PARAM_ATTR_METAJens Wiklander 2017-11-29tee: add tee_param_is_memref() for driver useJens Wiklander 2017-11-29optee: fix invalid of_node_put() in optee_driver_init()Jens Wiklander 2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman 2017-08-04tee: optee: sync with new naming of interruptsDavid Wang 2017-08-04tee: indicate privileged dev in gen_capsJens Wiklander 2017-08-04tee: optee: interruptible RPC sleeptiger-yu99 2017-08-04tee: optee: add const to tee_driver_ops and tee_desc structuresBhumika Goyal 2017-08-04tee: tee_shm: Constify dma_buf_ops structures.Arvind Yadav 2017-08-04tee: optee: fix uninitialized symbol 'parg'Jens Wiklander 2017-05-18Merge tag 'v4.12-rc1' into fixesOlof Johansson 2017-05-10tee: add ARM_SMCCC dependencyArnd Bergmann 2017-05-10Merge tag 'armsoc-tee' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/a...Linus Torvalds 2017-03-10tee: add OP-TEE driverJens Wiklander 2017-03-09tee: generic TEE subsystemJens Wiklander