lsi-scsi: Revalidate the I/O BAR before each request

The driver caches the I/O base of the controller at init time.  An OS
or an offline diagnostic which owns the bus may re-size and re-assign
the PCI BARs, or temporarily clear PCI_COMMAND_IO, and later call the
firmware for boot I/O again (IODC ENTRY_IO).  With I/O decoding off,
the port accesses go nowhere, reads return 0xff and the request fails
without ever reaching the chip; with a moved BAR the firmware talks to
the old address.

Re-read BAR0 before each request and re-enable I/O space and bus
mastering if they are off.  The BAR is only read, never rewritten, so
if the guest moved it, the driver follows.

Signed-off-by: Craig Lalley <mr_lalley@yahoo.com>
Signed-off-by: Helge Deller <deller@gmx.de>
1 file changed