linux_dsm_epyc7002/sound/isa
David Flater 1338fc97d0 ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too small
v2:  Fixed result still wrong in the case of 512 KiB DRAM.  Oops.

Applicable to 3.5.3 mainline.

In emu8000.c, size_dram determines the amount of memory on the sound card by
doing write/readback tests starting at 512 KiB and incrementing by 512 KiB.
On success, detected_size is updated to the successful address and testing
continues.  On failure, the loop is immediately exited.  The resulting
detected_size is 512 KiB too small except in two special cases:

1. If there is no memory, the initial 0 value of detected_size is used, which
   is correct.
2. If the address space wraps around, detected_size is updated before the
   bailout, so the result is correct.

The patch corrects all cases and was tested with an AWE64 Gold.  Before:
  EMU8000 [0x620]: 3584 Kb on-board memory detected
  asfxload 4GMGSMT.SF2 (4174814 B) fails.
After:
  EMU8000 [0x620]: 4096 Kb on-board memory detected
  asfxload 4GMGSMT.SF2 succeeds.

I do not have a card with 512 KiB to test with, but by forcibly enabling the
added conditional I verified on the AWE64 Gold that it detects 512 KiB
(successfully reading from the first memory location) and does not hang the
card.

C.f. Bug 46451 https://bugzilla.kernel.org/show_bug.cgi?id=46451

Signed-off-by: David Flater <dave@flaterco.com>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
2012-08-28 19:58:12 +02:00
..
ad1816a ALSA: snd-ad1816a: Implement suspend/resume 2012-08-20 11:12:56 +02:00
ad1848 ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
cs423x ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
es1688 ALSA: es1688 - freeup resources on init failure 2012-07-30 10:11:14 +02:00
galaxy ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
gus ALSA: print small buffers via %*ph[C] 2012-08-06 11:09:50 +02:00
msnd ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
opti9xx ALSA: isa: Move snd_legacy_find_free_ioport to initval.h 2012-08-03 12:57:44 +02:00
sb ALSA: emu8000: fix emu8000 DRAM sized 512 KiB too small 2012-08-28 19:58:12 +02:00
wavefront ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
wss ALSA: wss_lib: Fix resume on Yamaha OPL3-SAx 2012-07-16 11:24:05 +02:00
adlib.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
als100.c ALSA: snd-als100: fix suspend/resume 2012-08-21 07:29:40 +02:00
azt2320.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
cmi8328.c ALSA: cmi8328: Fix build error with CONFIG_GAMEPORT=n 2012-08-24 07:54:16 +02:00
cmi8330.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
es18xx.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
Kconfig ALSA: introduce snd-cmi8328: C-Media CMI8328 driver 2012-08-21 07:30:46 +02:00
Makefile ALSA: introduce snd-cmi8328: C-Media CMI8328 driver 2012-08-21 07:30:46 +02:00
opl3sa2.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
sc6000.c ALSA: module_param: make bool parameters really bool 2011-12-19 10:34:41 +01:00
sscape.c ALSA: sound/isa/sscape.c: add missing resource-release code 2012-04-10 08:42:07 +02:00