[SeaBIOS] [PATCH 00/17] Block driver command dispatch cleanup

Kevin O'Connor kevin at koconnor.net
Tue Jul 7 21:26:04 CEST 2015


This series implements some code reorganization in an attempt to
simplify the disk driver command dispatch system.  The series should
have no user-visible changes - it's mostly just code reorg.

At the end of the series, the command dispatch for "scsi style"
devices is removed in favor of a single dispatch system for all
drives.

The series also makes the supported runtime modes (ie, 32bit or 16bit)
of drivers more explicit.

This series is also available at:
  https://github.com/KevinOConnor/seabios/tree/testing

-Kevin


Kevin O'Connor (17):
  block: Split process_op() command dispatch up into multiple functions
  block: Introduce default_process_op() with common command handling
    codes
  block: Route scsi style commands through 'struct disk_op_s'
  blockcmd: Introduce scsi_fill_cmd()
  ata: Handle ATA ATAPI drives directly via 'struct disk_op_s' requests
  ahci: Handle AHCI ATAPI drives directly via 'struct disk_op_s'
    requests
  usb-msc: Handle USB drives directly via 'struct disk_op_s' requests
  usb-uas: Handle USB drives directly via 'struct disk_op_s' requests
  lsi-scsi: Handle LSI drives directly via 'struct disk_op_s' requests
  esp-scsi: Handle ESP drives directly via 'struct disk_op_s' requests
  megasas: Handle Megasas drives directly via 'struct disk_op_s'
    requests
  virtio-scsi: Handle virtio drives directly via 'struct disk_op_s'
    requests
  pvscsi: Move pvscsi_fill_req() code into pvscsi_cmd()
  pvscsi: Handle pvscsi drives directly via 'struct disk_op_s' requests
  blockcmd: Remove unused scsi_process_op() and cdb_cmd_data()
  blockcmd: Convert cdb_is_read() to scsi_is_read()
  block: Rename process_XXX_op() functions to XXX_process_op()

 src/block.c          | 152 +++++++++++++++++++++++++++++++--------------------
 src/block.h          |  14 ++++-
 src/cdrom.c          |  15 ++---
 src/hw/ahci.c        |  29 ++++------
 src/hw/ahci.h        |   4 +-
 src/hw/ata.c         |  17 +++---
 src/hw/ata.h         |   5 +-
 src/hw/blockcmd.c    | 138 +++++++++++++++-------------------------------
 src/hw/blockcmd.h    |   4 +-
 src/hw/esp-scsi.c    |  33 +++++------
 src/hw/esp-scsi.h    |   2 +-
 src/hw/floppy.c      |   2 +-
 src/hw/lsi-scsi.c    |  32 +++++------
 src/hw/lsi-scsi.h    |   2 +-
 src/hw/megasas.c     |  12 ++--
 src/hw/megasas.h     |   2 +-
 src/hw/pvscsi.c      |  62 ++++++++-------------
 src/hw/pvscsi.h      |   2 +-
 src/hw/ramdisk.c     |   8 +--
 src/hw/sdcard.c      |  12 +---
 src/hw/usb-msc.c     |  14 +++--
 src/hw/usb-msc.h     |   2 +-
 src/hw/usb-uas.c     |   6 +-
 src/hw/usb-uas.h     |   2 +-
 src/hw/virtio-blk.c  |  12 +---
 src/hw/virtio-blk.h  |   2 +-
 src/hw/virtio-scsi.c |  37 +++++--------
 src/hw/virtio-scsi.h |   2 +-
 src/util.h           |   8 +--
 29 files changed, 283 insertions(+), 349 deletions(-)

-- 
1.9.3




More information about the SeaBIOS mailing list