summaryrefslogtreecommitdiffstats
path: root/hw/lsi53c895a.c
Commit message (Collapse)AuthorAgeFilesLines
* lsi: add ISTAT1 register read (Ryan Harper)aliguori2009-03-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SLES10 SP2 installer complains when probing a scsi disk and exits qemu when failing to read one of the registers. lsi_scsi: error: readb 0x15 -- Ryan Harper Software Engineer; Linux Technology Center IBM Corp., Austin, Tx ryanh@us.ibm.com diffstat output: lsi53c895a.c | 2 ++ 1 files changed, 2 insertions(+) Signed-off-by: Ryan Harper <ryanh@us.ibm.com> --- Subject: [PATCH] lsi: add ISTAT1 register read From: Ryan Harper <ryanh@us.ibm.com> Cc: kvm@vger.kernel.org SLES10 SP2 installer complains when probing a scsi disk and exits qemu when failing to read one of the registers. lsi_scsi: error: readb 0x15 Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6688 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: LSI SCSI and e1000 unregister callbacks (Marcelo Tosatti)aliguori2009-02-111-0/+13
| | | | | | | | Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6605 c046a42c-6fe2-441c-8c8c-71466251a162
* qemu: record devfn on block driver instance (Marcelo Tosatti)aliguori2009-02-111-0/+2
| | | | | | | | | | | Record PCIDev on the BlockDriverState structure to locate for release on hot-removal. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6597 c046a42c-6fe2-441c-8c8c-71466251a162
* Add and use #defines for PCI device classesblueswir12009-02-011-1/+1
| | | | | | | | | | | | | This patch adds and uses #defines for PCI device classes and subclases, using a new pci_config_set_class() function, similar to the recently added pci_config_set_vendor_id() and pci_config_set_device_id(). Change since v1: fixed compilation of hw/sun4u.c Signed-off-by: Stuart Brady <stuart.brady@gmail.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6491 c046a42c-6fe2-441c-8c8c-71466251a162
* Define PCI vendor and device IDs in pci.h (Stuart Brady)aliguori2009-01-261-9/+10
| | | | | | | | | | | | | | | This patch defines PCI vendor and device IDs in pci.h (matching those from Linux's pci_ids.h), and uses those definitions where appropriate. Change from v1: Introduces pci_config_set_vendor_id() / pci_config_set_device_id() accessors as suggested by Anthony Liguori. Signed-off-by: Stuart Brady <stuart.brady@gmail.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6442 c046a42c-6fe2-441c-8c8c-71466251a162
* LSI53C895A: Introduce CASE_GET_REG24aurel322009-01-141-6/+7
| | | | | | | | CASE_GET_REG32 is already defined in lsi53c895a.c; introduce CASE_GET_REG24. (Sebastian Herbszt) git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6311 c046a42c-6fe2-441c-8c8c-71466251a162
* Remove unnecessary trailing newlinesblueswir12008-12-131-1/+0Star
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6000 c046a42c-6fe2-441c-8c8c-71466251a162
* Add 64-bit Block Move support (Direct & Table Indirect) (Ryan Harper)aliguori2008-12-101-3/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for 64-bit Block Move instructions. There are multiple modes for 64-bit Block moves, direct, indirect, and table indirect. This patch implements Direct and Table indirect moves which are needed by 64-bit windows and SYM_CONF_DMA_ADDRESSING_MODE=2 for the Linux sym53c8xx_2 driver respectively. Two helper functions are included to check which mode the guest is using. For 64-bit direct moves, we fetch a 3rd DWORD and store the value in the DBMS register. For Table Indirect moves, we look into the table for which register contains the upper 32-bits of the 64-bit address. This selector value indicates which register to pull the value from and into dnad64 register. Finally, lsi_do_dma is updated to use the approriate register to build a 64-bit DMA address if required. With this patch, Windows XP x64, 2003 SP2 x64, can now install to scsi devices. Linux SYM_CONF_DMA_ADDRESSING_MODE=2 need a quirk fixup in Patch 4 to function properly. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5969 c046a42c-6fe2-441c-8c8c-71466251a162
* LSI53C895A: Rename dmbs register to dbms (Ryan Harper)aliguori2008-12-101-4/+4
| | | | | | | | | | | | | | Register name should be: Dynamic Block Move Selector (dbms) according to page 215 of the LSI 53C895A Technical Manual[1]. 1. http://www.lsi.com/DistributionSystem/AssetDocument/files/docs/techdocs/storage_stand_prod/SCSIControllers/lsi53c895a_tech_manual.pdf Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5968 c046a42c-6fe2-441c-8c8c-71466251a162
* LSI53C895A: Handle empty SCRIPTS opcode (Justin Chevrier)balrog2008-12-071-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Basically after each DMA transfer the Openserver driver would issue an empty (0) SCRIPTS opcode. As the opcode is essentially a NOP it has no second DWORD and therefore the DSP should only be incremented by 4 bytes instead of the 8 bytes we currently do. Here's a snippet of the log: lsi_scsi: Data ready tag=0x100d9 len=16384 ... lsi_scsi: SCRIPTS dsp=068c5e50 opcode 01000400 arg 07a09000 lsi_scsi: DMA addr=0x07a09000 len=1024 lsi_scsi: SCRIPTS dsp=068c5e58 opcode 00000000 arg 01000400 lsi_scsi: Wrong phase got 1 expected 0 Note the 2nd DWORD after the empty opcode; the next opcode in the DMA transfer sequence. As can be expected the address after that has the next DMA address to use. After the attached patch the DMA transfer is able to complete successfully: lsi_scsi: SCRIPTS dsp=068c5e50 opcode 01000400 arg 07a0d000 lsi_scsi: DMA addr=0x07a0d000 len=1024 lsi_scsi: SCRIPTS dsp=068c5e5c opcode 01000400 arg 07a0d400 lsi_scsi: DMA addr=0x07a0d400 len=1024 ... Tested againsted Openserver 5.0.5 and Debian ARM. Signed-off-by: Justin Chevrier <address@hidden> Acked-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Andrzej Zaborowski <andrew.zaborowski@intel.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5902 c046a42c-6fe2-441c-8c8c-71466251a162
* LSI53C895A: Remove current_dma_len hackbalrog2008-12-071-1/+0Star
| | | | | | | | | Signed-off-by: Justin Chevrier <address@hidden> Acked-by: Ryan Harper <ryanh@us.ibm.com> Acked-by: Chris Wright <chrisw@sous-sol.org> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5901 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix typo when using TARGET_FMT_plx and LSI_DEBUG (Ryan Harper)aliguori2008-11-201-1/+1
| | | | | | | | | | | | TARGET_FMT_plx includes a % for you. This fixes the following warning when compiling with LSI_DEBUG enabled. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5760 c046a42c-6fe2-441c-8c8c-71466251a162
* Add 40-bit DMA support to LSI scsi emulation (Ryan Harper)aliguori2008-11-181-4/+32
| | | | | | | | | | | | This patch fixes Linux machines configured with > 4G of ram and using a SCSI device. Signed-off-by: Ryan Harper <ryanh@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5750 c046a42c-6fe2-441c-8c8c-71466251a162
* Implement LSI53C895A quirks exposed by OpenServer (Justin Chevrier).balrog2008-11-121-2/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | After going through the debug log and scratching my head for quite some time. I found the following: The problem was with this block move: lsi_scsi: SCRIPTS dsp=0fae8e50 opcode 01000028 arg 00f63c40 lsi_scsi: DMA addr=0x00f63c40 len=36 The number of bytes to be transferred (len) should be 40 which corresponds to the block transfer of length 0x28 (from opcode 01000028). Instead we have a length of 36 (0x24). The code responsible for this is (in 'lsi_do_dma'): if (count > s->current_dma_len) count = s->current_dma_len; Basically we're overwriting the length 40 with the value 36 which I think we just left over in that variable from an earlier transfer. In my patch below I initialize s->current_dma_len to s->dbc before we begin the DMA transfer during Data In phase. The attached patch gets Openserver 5.0.5 past the hardware detection (and it lists the hard drive to boot, woohoo). It appears to stop a little while later (doesn't seem SCSI related), but it's been so long since I've booted Openserver I'm not sure what's supposted to happen after the HW detection using the boot/root disks. Props go to Craig Ringer for the initial post and the code that he posted some of which is in this patch. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5706 c046a42c-6fe2-441c-8c8c-71466251a162
* Add comment to windows SCSI hack.pbrook2008-09-221-0/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5295 c046a42c-6fe2-441c-8c8c-71466251a162
* LSI SCSI: raise UDC on infinite loop (Marcelo Tosatti)aliguori2008-09-221-2/+8
| | | | | | | | | | | | | | | | | | | | | | | | | Raise UDC (Unexpected Disconnect) when a large enough number of instructions has been executed by the SCRIPTS processor. This "solution" is much simpler than temporarily interrupting execution. This remedies the situation with Windows which downloads SCRIPTS code that busy loops on guest main memory. Their drivers _do_ handle UDC appropriately (at least XP and 2003). It would be nicer to actually detect infinite loops, but until then, this bandaid seems acceptable. Since the situation seems to be rare enough, raise the number of instructions to 10000 (previously 1000). Three people other than myself had success with this patch. Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5293 c046a42c-6fe2-441c-8c8c-71466251a162
* Add qemu_realloc(), by Gerd Hoffmann.ths2008-08-061-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
* Real SCSI device passthrough (v4), by Laurent Vivier.ths2007-12-241-1/+7
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3851 c046a42c-6fe2-441c-8c8c-71466251a162
* SCSI cleanup, by Laurent Vivier.ths2007-12-101-14/+27
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3797 c046a42c-6fe2-441c-8c8c-71466251a162
* Add -drive parameter, by Laurent Vivier.ths2007-12-021-3/+0Star
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162
* Break up vl.h.pbrook2007-11-171-1/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3674 c046a42c-6fe2-441c-8c8c-71466251a162
* find -type f | xargs sed -i 's/[\t ]$//g' # on most filesths2007-09-161-4/+4
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
* Fix length mismatch condition, by Wang Cheng Yeh.ths2007-04-281-2/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2735 c046a42c-6fe2-441c-8c8c-71466251a162
* Typo fix, by Wang Cheng Yeh.ths2007-04-221-5/+5
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2713 c046a42c-6fe2-441c-8c8c-71466251a162
* Another lsi53c895a patch, by Wang Cheng Yeh.ths2007-04-181-0/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2699 c046a42c-6fe2-441c-8c8c-71466251a162
* Unify IRQ handling.pbrook2007-04-071-1/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2635 c046a42c-6fe2-441c-8c8c-71466251a162
* Random bug fixes from code inspection, by Wang Cheng Yeh.ths2007-04-021-0/+1
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2580 c046a42c-6fe2-441c-8c8c-71466251a162
* SCSI fixes, by Wang Cheng Yeh.ths2007-03-191-3/+3
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2504 c046a42c-6fe2-441c-8c8c-71466251a162
* SCSI TCQ support.pbrook2006-08-291-99/+368
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2139 c046a42c-6fe2-441c-8c8c-71466251a162
* SCSI and USB async IO support.pbrook2006-08-121-28/+52
| | | | git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2107 c046a42c-6fe2-441c-8c8c-71466251a162
* PCI SCSI HBA emulation.pbrook2006-05-301-0/+1571
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1946 c046a42c-6fe2-441c-8c8c-71466251a162