diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 14:23:17 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 14:23:17 -0400 |
commit | 6adc74b7d03c06a8e15d51fe33c3d924ada9271a (patch) | |
tree | 84b934ed223e0c4aa4f6233b38eea0f8e50f00ef /drivers/ata/sata_sx4.c | |
parent | c9059598ea8981d02356eead3188bf7fa4d717b8 (diff) | |
parent | 517d3cc15b36392e518abab6bacbb72089658313 (diff) |
Merge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jgarzik/libata-dev:
[libata] ata_piix: Enable parallel scan
sata_nv: use hardreset only for post-boot probing
[libata] ahci: Restore SB600 SATA controller 64 bit DMA
ata_piix: Remove stale comment
ata_piix: Turn on hotplugging support for older chips
ahci: misc cleanups for EM stuff
[libata] get rid of ATA_MAX_QUEUE loop in ata_qc_complete_multiple() v2
sata_sil: enable 32-bit PIO
sata_sx4: speed up ECC initialization
libata-sff: avoid byte swapping in ata_sff_data_xfer()
[libata] ahci: use less error-prone array initializers
Diffstat (limited to 'drivers/ata/sata_sx4.c')
-rw-r--r-- | drivers/ata/sata_sx4.c | 11 |
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 { | |||
193 | PDC_TIMER_MASK_INT, | 193 | PDC_TIMER_MASK_INT, |
194 | }; | 194 | }; |
195 | 195 | ||
196 | #define ECC_ERASE_BUF_SZ (128 * 1024) | ||
196 | 197 | ||
197 | struct pdc_port_priv { | 198 | struct pdc_port_priv { |
198 | u8 dimm_buf[(ATA_PRD_SZ * ATA_MAX_PRD) + 512]; | 199 | u8 dimm_buf[(ATA_PRD_SZ * ATA_MAX_PRD) + 512]; |
@@ -1280,7 +1281,6 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) | |||
1280 | { | 1281 | { |
1281 | int speed, size, length; | 1282 | int speed, size, length; |
1282 | u32 addr, spd0, pci_status; | 1283 | u32 addr, spd0, pci_status; |
1283 | u32 tmp = 0; | ||
1284 | u32 time_period = 0; | 1284 | u32 time_period = 0; |
1285 | u32 tcount = 0; | 1285 | u32 tcount = 0; |
1286 | u32 ticks = 0; | 1286 | u32 ticks = 0; |
@@ -1395,14 +1395,17 @@ static unsigned int pdc20621_dimm_init(struct ata_host *host) | |||
1395 | pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, | 1395 | pdc20621_i2c_read(host, PDC_DIMM0_SPD_DEV_ADDRESS, |
1396 | PDC_DIMM_SPD_TYPE, &spd0); | 1396 | PDC_DIMM_SPD_TYPE, &spd0); |
1397 | if (spd0 == 0x02) { | 1397 | if (spd0 == 0x02) { |
1398 | void *buf; | ||
1398 | VPRINTK("Start ECC initialization\n"); | 1399 | VPRINTK("Start ECC initialization\n"); |
1399 | addr = 0; | 1400 | addr = 0; |
1400 | length = size * 1024 * 1024; | 1401 | length = size * 1024 * 1024; |
1402 | buf = kzalloc(ECC_ERASE_BUF_SZ, GFP_KERNEL); | ||
1401 | while (addr < length) { | 1403 | while (addr < length) { |
1402 | pdc20621_put_to_dimm(host, (void *) &tmp, addr, | 1404 | pdc20621_put_to_dimm(host, buf, addr, |
1403 | sizeof(u32)); | 1405 | ECC_ERASE_BUF_SZ); |
1404 | addr += sizeof(u32); | 1406 | addr += ECC_ERASE_BUF_SZ; |
1405 | } | 1407 | } |
1408 | kfree(buf); | ||
1406 | VPRINTK("Finish ECC initialization\n"); | 1409 | VPRINTK("Finish ECC initialization\n"); |
1407 | } | 1410 | } |
1408 | return 0; | 1411 | return 0; |