History | View | Annotate | Download (61.6 kB)
lsi: use QTAILQ for lsi_queue
Replace the funky array logic for queued commands with standardqemu list functions. Also rename lsi_queue to lsi_request.
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi: have lsi_request for the whole life time of the request.
Right now lsi_request is allocated when a request is queued and releasedwhen a request is unqueued. With this patch applied the lsi_request iskept for the whole lifetime of the scsi request....
lsi: move current_dev into lsi_request
lsi: move dma_len+dma_buf into lsi_request
lsi: pass lsi_request to lsi_reselect
All callers of lsi_reselect have a lsi_request struct at hand anyway.So just pass it directly instead of having lsi_reselect search for itusing the tag.
Merge remote branch 'mst/for_anthony' into staging
Fix Sparse warning: dubious: !x & y
Signed-off-by: Blue Swirl <blauwirbel@gmail.com>
lsi: symbolic names for pci registers
No functional changes. I verified that the generated binarydoes not change.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>Acked-by: Juan Quintela <quintela@redhat.com>Acked-by: Glauber Costa <glommer@gmail.com>
Fix compile error when LSI_DEBUG is defined
This patch fixes the follow error when LSI_DEBUG is set.
CC libhw64/lsi53c895a.occ1: warnings being treated as errorsqemu/hw/lsi53c895a.c: In function 'lsi_io_mapfunc':qemu/hw/lsi53c895a.c:1932: error: format '%08x' expects type 'unsigned int', but argument 2 has type 'pcibus_t'...
savevm: Port to qdev.vmsd all devices that have qdev
Signed-off-by: Juan Quintela <quintela@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi53c895a: Use alternative address when already reselected
See SCRIPTS, 3.2.17 SELECT.
Signed-off-by: Laszlo Ast <laszlo.ast@siemens-enterprise.com>Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi53c895a: Implement IRQ on reselection
The critical part of this change is how to deal with simultaneaousgeneration of interrupts. The only (normal) case when this happens inthe emulation is near simultaneous reselection + selection. If selectioncomes first, there is no problem, since the target attempting...
lsi53c895a: Whitespace and typo fixes
lsi53c895a: Add support for LSI53C700 Family Compatibility bit
lsi53c895a: Fix message code of DISCONNECT
See SCSI-2, 6.5 Message system description/message codes.
lsi53c895a: Fix SDID in SELECT ID command
See SCRIPTS Programming Guide, 3.2.17 SELECT.
pci: pci.h cleanup: move out stuff not in pci.c
pci.h declares some functions which aren'tdefined in pci.h. Clean up moving thingsto appropriate headers, and update all users.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
pci: introduce pcibus_t to represent pci bus address/size instead of uint32_t
This patch is preliminary for 64 bit BAR support.Introduce dedicated type, pcibus_t, to represent pci bus address/sizeinstead of uint32_t.Later this type will be changed to uint64_t....
pci: s/PCI_ADDRESS_SPACE_/PCI_BASE_ADDRESS_SPACE_/ to match pci_regs.h
make constants for pci base address match pci_regs.h byrenaming PCI_ADDRESS_SPACE_xxx to PCI_BASE_ADDRESS_SPACE_xxx.
Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>Acked-by: Michael S. Tsirkin <mst@redhat.com>...
scsi: move scsi.h -> esp.h
scsi: move scsi-disk.h -> scsi.h
lsi_scsi: port to vmstate
hotplug: fix "pci_add storage if=scsi"
Explicitly add the drive to the bus of the newly created scsi adapterinstead of hoping that scsi_bus_legacy_handle_cmdline() picks it upcorrectly.
pci: move unregister from PCIDevice to PCIDeviceInfo
One more cleanup while being at it ;)
switch scsi bus to inplace allocation.
Revert "Get rid of _t suffix"
In the very least, a change like this requires discussion on the list.
The naming convention is goofy and it causes a massive merge problem. Somethinglike this must be presented on the list first so people can provide input...
Get rid of _t suffix
Some not so obvious bits, slirp and Xen were left alone for the timebeing.
Signed-off-by: malc <av1474@comtv.ru>
qdev/scsi: add scsi bus support to qdev, convert drivers.
Adding scsi disks via -device works now, i.e. you can do:
-drive id=sda,if=none,......
lsi53c895a: remove pointless cast from void *
lsi53c895a: use DO_UPCAST to cast from PCIDevice
lsi53c895a: rename PCIDevice field from pci_dev to dev (consistence)
lsi53c895a: LSIState is a DeviceHost
Go figure.
qdev: add return value to init() callbacks.
Sorry folks, but it has to be. One more of these invasive qdev patches.
We have a serious design bug in the qdev interface: device initcallbacks can't signal failure because the init() callback has noreturn value. This patch fixes it....
Make CPURead/WriteFunc structure 'const'
Add save/restore support to the LSI logic SCSI device model.
This patch requires "Handle BH's queued by AIO completions inqemu_aio_flush()" to work reliably. The combination of those twopatches survived 300+ migrations with heavy IO load running in the...
qdev: update pci device registration.
Makes pci_qdev_register take a PCIDeviceInfo struct instead of a bunchof parameters. Also adds config_read and config_write callbacks toPCIDeviceInfo, so drivers needing these can be converted to the qdevdevice API too....
lsi53c895a: Implement write access to DMA Byte Counter
Adds CASE_SET_REG24 and fixes the following errors:
lsi_scsi: error: Unhandled writeb 0x24 = 0x0lsi_scsi: error: Unhandled writeb 0x25 = 0x0
Signed-off-by: Sebastian Herbszt <herbszt@gmx.de>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Rename pci_register_io_region() to pci_register_bar()
This function is used to manage a PCI BAR, so make the more genericpci_register_io_region() available to other uses.
Signed-off-by: Avi Kivity <avi@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
lsi53c895a: Implement Scratch Byte Register
Fixes the following errors:
lsi_scsi: error: Unhandled writeb 0x3a = 0x0lsi_scsi: error: readb 0x3a
lsi53c895a: Implement read and write access to DMA Next Address
lsi_scsi: error: Unhandled writeb 0x28 = 0x0lsi_scsi: error: Unhandled writeb 0x29 = 0x0lsi_scsi: error: Unhandled writeb 0x2a = 0x0lsi_scsi: error: Unhandled writeb 0x2b = 0x0...
Remove io_index argument from cpu_register_io_memory()
The parameter is always zero except when registering the three internalio regions (ROM, unassigned, notdirty). Remove the parameter to reducethe API's power, thus facilitating future change.
Signed-off-by: Avi Kivity <avi@redhat.com>...
Compile fdc, escc and SCSI controllers only once
LSI SCSI qdev conversion
Signed-off-by: Paul Brook <paul@codesourcery.com>
Replace gcc variadic macro extension with C99 version
lsi: add ISTAT1 register read (Ryan Harper)
SLES10 SP2 installer complains when probing a scsi disk and exits qemuwhen failing to read one of the registers.
lsi_scsi: error: readb 0x15
--Ryan HarperSoftware Engineer; Linux Technology CenterIBM Corp., Austin, Tx...
qemu: LSI SCSI and e1000 unregister callbacks (Marcelo Tosatti)
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)
Record PCIDev on the BlockDriverState structure to locate for releaseon hot-removal.
Signed-off-by: Marcelo Tosatti <mtosatti@redhat.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Add and use #defines for PCI device classes
This patch adds and uses #defines for PCI device classes and subclases,using a new pci_config_set_class() function, similar to the recentlyadded pci_config_set_vendor_id() and pci_config_set_device_id().
Change since v1: fixed compilation of hw/sun4u.c...
Define PCI vendor and device IDs in pci.h (Stuart Brady)
This patch defines PCI vendor and device IDs in pci.h (matching thosefrom 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()...
LSI53C895A: Introduce CASE_GET_REG24
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 newlines
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)
This patch adds support for 64-bit Block Move instructions. There are multiplemodes for 64-bit Block moves, direct, indirect, and table indirect. This patchimplements Direct and Table indirect moves which are needed by 64-bit windows...
LSI53C895A: Rename dmbs register to dbms (Ryan Harper)
Register name should be: Dynamic Block Move Selector (dbms) according to page 215 of the LSI 53C895A Technical Manual1.
1. http://www.lsi.com/DistributionSystem/AssetDocument/files/docs/techdocs/storage_stand_prod/SCSIControllers/lsi53c895a_tech_manual.pdf...
LSI53C895A: Handle empty SCRIPTS opcode (Justin Chevrier)
Basically after each DMA transfer the Openserver driver would issue anempty (0) SCRIPTS opcode. As the opcode is essentially a NOP it has nosecond DWORD and therefore the DSP should only be incremented by 4 bytes...
LSI53C895A: Remove current_dma_len hack
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)
TARGET_FMT_plx includes a % for you. This fixes the following warning whencompiling with LSI_DEBUG enabled.
Signed-off-by: Ryan Harper <ryanh@us.ibm.com>Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>...
Add 40-bit DMA support to LSI scsi emulation (Ryan Harper)
This patch fixes Linux machines configured with > 4G of ram and using aSCSI 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).
After going through the debug log and scratching my head for quite sometime. I found the following:
The problem was with this block move:
lsi_scsi: SCRIPTS dsp=0fae8e50 opcode 01000028 arg 00f63c40...
Add comment to windows SCSI hack.
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)
Raise UDC (Unexpected Disconnect) when a large enough number ofinstructions 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...
Add qemu_realloc(), by Gerd Hoffmann.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@4986 c046a42c-6fe2-441c-8c8c-71466251a162
Real SCSI device passthrough (v4), by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3851 c046a42c-6fe2-441c-8c8c-71466251a162
SCSI cleanup, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3797 c046a42c-6fe2-441c-8c8c-71466251a162
Add -drive parameter, by Laurent Vivier.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3759 c046a42c-6fe2-441c-8c8c-71466251a162
Break up vl.h.
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 files
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3173 c046a42c-6fe2-441c-8c8c-71466251a162
Fix length mismatch condition, by Wang Cheng Yeh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2735 c046a42c-6fe2-441c-8c8c-71466251a162
Typo fix, by Wang Cheng Yeh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2713 c046a42c-6fe2-441c-8c8c-71466251a162
Another lsi53c895a patch, by Wang Cheng Yeh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2699 c046a42c-6fe2-441c-8c8c-71466251a162
Unify IRQ handling.
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.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2580 c046a42c-6fe2-441c-8c8c-71466251a162
SCSI fixes, by Wang Cheng Yeh.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2504 c046a42c-6fe2-441c-8c8c-71466251a162
SCSI TCQ support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2139 c046a42c-6fe2-441c-8c8c-71466251a162
SCSI and USB async IO support.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2107 c046a42c-6fe2-441c-8c8c-71466251a162
PCI SCSI HBA emulation.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@1946 c046a42c-6fe2-441c-8c8c-71466251a162