| Line 691... |
Line 691... |
| 691 |
def storage_read_sectors_md(self, volume, sector, count, addr):
|
691 |
def storage_read_sectors_md(self, volume, sector, count, addr):
|
| 692 |
""" Read sectors from as storage device """
|
692 |
""" Read sectors from as storage device """
|
| 693 |
self.logger.debug("Reading %d sectors from disk at volume %d, sector %d to memory at 0x%X\n" % (count, volume, sector, addr))
|
693 |
self.logger.debug("Reading %d sectors from disk at volume %d, sector %d to memory at 0x%X\n" % (count, volume, sector, addr))
|
| 694 |
result = self.lib.monitorcommand(struct.pack("<IIQIIII", 28, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
694 |
result = self.lib.monitorcommand(struct.pack("<IIQIIII", 28, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
| 695 |
self.logger.debug("Read sectors, result: 0x%X\n" % result.rc)
|
695 |
self.logger.debug("Read sectors, result: 0x%X\n" % result.rc)
|
| 696 |
self.logger.info(".");
|
- |
|
| 697 |
# if result.rc > 0x80000000:
|
696 |
if result.rc > 0x80000000:
|
| 698 |
# raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, result.rc))
|
697 |
raise DeviceError("storage_read_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, result.rc))
|
| 699 |
|
698 |
|
| 700 |
@command(timeout = 50000)
|
699 |
@command(timeout = 50000)
|
| 701 |
def storage_write_sectors_md(self, volume, sector, count, addr):
|
700 |
def storage_write_sectors_md(self, volume, sector, count, addr):
|
| 702 |
""" Read sectors from as storage device """
|
701 |
""" Read sectors from as storage device """
|
| 703 |
self.logger.debug("Writing %d sectors from memory at 0x%X to disk at volume %d, sector %d\n" % (count, addr, volume, sector))
|
702 |
self.logger.debug("Writing %d sectors from memory at 0x%X to disk at volume %d, sector %d\n" % (count, addr, volume, sector))
|
| 704 |
result = self.lib.monitorcommand(struct.pack("<IIQIIII", 29, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
703 |
result = self.lib.monitorcommand(struct.pack("<IIQIIII", 29, volume, sector, count, addr, 0, 0), "III", ("rc", None, None))
|
| 705 |
self.logger.debug("Wrote sectors, result: 0x%X\n" % result.rc)
|
704 |
self.logger.debug("Wrote sectors, result: 0x%X\n" % result.rc)
|
| 706 |
self.logger.info(".");
|
- |
|
| 707 |
# if result.rc > 0x80000000:
|
705 |
if result.rc > 0x80000000:
|
| 708 |
# raise DeviceError("storage_write_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, result.rc))
|
706 |
raise DeviceError("storage_write_sectors_md(volume=%d, sector=%d, count=%d, addr=0x%08X) failed with RC 0x%08X" % (volume, sector, count, addr, result.rc))
|
| 709 |
|
707 |
|
| 710 |
@command(timeout = 30000)
|
708 |
@command(timeout = 30000)
|
| 711 |
def fat_enable_flushing(self, state):
|
709 |
def fat_enable_flushing(self, state):
|
| 712 |
""" Enables/disables flushing the FAT cache after every transaction """
|
710 |
""" Enables/disables flushing the FAT cache after every transaction """
|
| 713 |
if state != 0: self.logger.debug("Enabling FAT flushing\n")
|
711 |
if state != 0: self.logger.debug("Enabling FAT flushing\n")
|