1. 26 5月, 2012 1 次提交
  2. 24 5月, 2012 1 次提交
    • S
      es1370: Fix debug code · f8687bab
      Stefan Weil 提交于
      When DEBUG_ES1370 is defined, the compiler shows these warnings:
      
      hw/es1370.c: In function ?es1370_update_voices?:
      hw/es1370.c:414: warning: format ?%d? expects type ?int?, but argument 3 has type ?size_t?
      hw/es1370.c: In function ?es1370_writel?:
      hw/es1370.c:582: warning: format ?%d? expects type ?int?, but argument 3 has type ?long int?
      hw/es1370.c:592: warning: format ?%d? expects type ?int?, but argument 3 has type ?long int?
      hw/es1370.c:609: warning: format ?%d? expects type ?int?, but argument 3 has type ?long int?
      hw/es1370.c: In function ?es1370_readl?:
      hw/es1370.c:751: warning: suggest braces around empty body in an ?if? statement
      
      Fix the format strings and add the missing braces.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      f8687bab
  3. 22 5月, 2012 8 次提交
  4. 19 5月, 2012 2 次提交
  5. 14 5月, 2012 6 次提交
  6. 12 5月, 2012 4 次提交
  7. 08 5月, 2012 2 次提交
  8. 07 5月, 2012 14 次提交
    • H
      hw/ac97: Mask out the EAPD bit on Powerdown Ctrl/Stat writes · 847c25d0
      Hans de Goede 提交于
      The Linux AC97 driver tests this bit to decide wether or not to show
      an External amplifier toggle control.
      
      This patch was also tested with a Windows XP guest without any issues.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      847c25d0
    • H
      hw/ac97: Mask out unused bits of volume controls · 7873bfb8
      Hans de Goede 提交于
      The Linux ac97 drivers does a number of register read/write tests to
      see how much resolution a volume control actually has.
      
      This patch takes this into account by masking out any bits written to
      a volume control reg which should not be there according to the spec.
      
      After this the Linux ac97 driver correctly uses a range of 0 - 0x1f for
      the PCM out volume, as stated in the spec, and we can fix the FIXME
      in update_combined_volume_out().
      
      This patch was also tested with a Windows XP guest without any issues.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      7873bfb8
    • H
      hw/ac97: Use AC97_Record_Gain_Mute not AC97_Line_In_Volume_Mute · f94e9b9b
      Hans de Goede 提交于
      After commit 19677a38:
      "hw/ac97: add support for volume control"
      
      We are (correctly) using AC97_Record_Gain_Mute and not AC97_Line_In_Volume_Mute
      for recording volume, but various places in hw/ac97 were still assumimg that
      we are using AC97_Line_In_Volume_Mute for record volume control, this patch
      fixes this.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      f94e9b9b
    • H
      hw/ac97: Make a bunch of mixer registers read only · d044be37
      Hans de Goede 提交于
      The Linux ac97 driver tries to see if optional things like video input
      volume control are available in 2 ways:
      1) See if the mute bit is set after reset, if it is no further tests are done
      2) If the mute bit is not set it does a write/read test of the mute bit
      
      This patch changes our ac97 to conform to what the Linux driver expects, it
      initializes registers for things which we don't emulate to 0 (so the mute bit
      is not set) and makes them read only.
      
      This causes Linux to now longer show the following (functionless)
      controls in alsamixer:
      
      Master Mono vol + mute
      3d Control toggle
      PCM out pre / post 3d select
      Surround toggle
      CD vol + mute
      Mic vol + mute
      Mic boost toggle
      Mic mic1 / mic2 select
      Video vol + mute
      Phone vol + mute
      Beep mono vol + mute
      Aux vol + mute
      Mono "output mic" / "mix" select
      Sigmatel 4 speaker stereo toggle
      Sigmatel ADC 6Db att toggle
      Sigmatel DAC 6Db att toggle
      
      This patch was also tested with a Windows XP guest and there it also makes
      a number of functionless mixer controls go away.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      d044be37
    • H
      hw/ac97: Fix log message in mixer_load · a4e652eb
      Hans de Goede 提交于
      Fix a small copy and paste error in logging.
      Signed-off-by: NHans de Goede <hdegoede@redhat.com>
      Signed-off-by: Nmalc <av1474@comtv.ru>
      a4e652eb
    • S
      scsi: Add assertion for use-after-free errors · 68bd348a
      Stefan Weil 提交于
      The QEMU emulation which is currently used with Raspberry PI images
      (qemu-system-arm -M versatilepb ...) accesses memory which was freed.
      
      Valgrind output (extract):
      
      ==17857== Invalid write of size 4
      ==17857==    at 0x24EB06: scsi_req_unref (scsi-bus.c:1273)
      ==17857==    by 0x24FFAE: scsi_read_complete (scsi-disk.c:277)
      ==17857==    by 0x152ACC: bdrv_co_em_bh (block.c:3363)
      ==17857==    by 0x13D49C: qemu_bh_poll (async.c:71)
      ==17857==    by 0x211A8C: main_loop_wait (main-loop.c:503)
      ==17857==    by 0x207954: main_loop (vl.c:1555)
      ==17857==    by 0x20E9C9: main (vl.c:3653)
      ==17857==  Address 0x1c54383c is 12 bytes inside a block of size 260 free'd
      ==17857==    at 0x4824B3A: free (vg_replace_malloc.c:366)
      ==17857==    by 0x20ADFA: free_and_trace (vl.c:2250)
      ==17857==    by 0x4899FC5: g_free (in /lib/libglib-2.0.so.0.2400.1)
      ==17857==    by 0x24EB3B: scsi_req_unref (scsi-bus.c:1277)
      ==17857==    by 0x24F003: scsi_req_complete (scsi-bus.c:1383)
      ==17857==    by 0x25022A: scsi_read_data (scsi-disk.c:334)
      ==17857==    by 0x24EB9F: scsi_req_continue (scsi-bus.c:1289)
      ==17857==    by 0x1C7787: lsi_do_dma (lsi53c895a.c:575)
      ==17857==    by 0x1C8CDA: lsi_execute_script (lsi53c895a.c:1147)
      ==17857==    by 0x1C74EA: lsi_resume_script (lsi53c895a.c:510)
      ==17857==    by 0x1C7ECD: lsi_transfer_data (lsi53c895a.c:746)
      ==17857==    by 0x24EC90: scsi_req_data (scsi-bus.c:1307)
      
      (There are some more similar messages.)
      
      This patch adds an assertion which also detects those errors:
      
      Calling scsi_req_unref is not allowed when the previous call
      of that function has decremented refcount to 0, because in this
      case req was freed.
      Signed-off-by: NStefan Weil <sw@weilnetz.de>
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      68bd348a
    • P
      scsi: remove useless debug messages · 2a92fbff
      Paolo Bonzini 提交于
      Optional inquiry information is declared obsolete in the latest versions
      of the standard; invalid CDBs or unsupported VPD pages are supported
      can be diagnosed with trace_scsi_inquiry.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      2a92fbff
    • P
      scsi: set VALID bit to 0 in fixed format sense data · 77e4743c
      Paolo Bonzini 提交于
      The INFORMATION field (bytes 3..6) is never set by QEMU, so the VALID
      bit must be 0.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      77e4743c
    • P
      scsi: do not require a minimum allocation length for REQUEST SENSE · e5f38ff6
      Paolo Bonzini 提交于
      The requirements on the REQUEST SENSE buffer size are not in my copy of SPC
      (SPC-4 r27) and not observed by LIO.  Rip them out.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      e5f38ff6
    • P
      scsi: do not require a minimum allocation length for INQUIRY · 3c3d8a95
      Paolo Bonzini 提交于
      The requirements on the INQUIRY buffer size are not in my copy of SPC
      (SPC-4 r27) and not observed by LIO.  Rip them out.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      3c3d8a95
    • P
      scsi: parse 16-byte tape CDBs · 065c2599
      Paolo Bonzini 提交于
      The transfer length for these commands is different from the transfer
      length of the corresponding disk commands, so parse it specially.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      065c2599
    • P
      scsi: do not report bogus overruns for commands in the 0x00-0x1F range · f62d0594
      Paolo Bonzini 提交于
      Interpreting cdb[4] == 0 as a request to transfer 256 blocks is only
      needed for READ_6 and WRITE_6.  No other command in that range needs
      that special-casing, and the resulting overrun breaks scsi-testsuite's
      attempt to use command 2 as a known-invalid command.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      f62d0594
    • P
      scsi-disk: add dpofua property · da8365db
      Paolo Bonzini 提交于
      Linux expects REQ_FUA to be advertised only if WRITE+FUA is faster than
      WRITE+SYNCHRONIZE CACHE, so we should not set the DPOFUA bit.  However,
      it is useful to have it for testing purposes, so add a qdev property to
      set it.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      da8365db
    • P
      scsi: change "removable" field to host many features · bfe3d7ac
      Paolo Bonzini 提交于
      It is pointless to add a uint32_t field for every new feature.
      Since we will need a new feature soon, convert accesses to "removable"
      to look at bit 0 only.
      Signed-off-by: NPaolo Bonzini <pbonzini@redhat.com>
      bfe3d7ac
  9. 04 5月, 2012 2 次提交