git: kernel - Fix CAM peripheral error handling

Matthew Dillon dillon at crater.dragonflybsd.org
Sun Feb 4 11:18:13 PST 2018


commit a9f09b75787c7fb9d408ac052485f6111364454d
Author: Matthew Dillon <dillon at apollo.backplane.com>
Date:   Sun Feb 4 11:13:03 2018 -0800

    kernel - Fix CAM peripheral error handling
    
    * cam_periph.c was bcopy()ing the *ENTIRE* saved ccb back to the
      original when working through certain error results.  This completely
      destroys linked list entry fields.
    
    * Refactor by hacking a restore_ccb() function which does not copy
      over the link list entry fields or the callout structure.
    
    * Fixes panics with CDs, particularly audio CDs, and can also fix
      other panics.
    
      Panics are related to situations where an AHCI error or errors occur
      while multiple CCBs are queued.
    
    * Also always initialize the state tracking field for various scsi
      periphals to ensure that stale data does not result in improper
      processing in scsi/*.c's *done() functions.
    
    Reported-by: htse

Summary of changes:
 sys/bus/cam/cam_ccb.h        |  3 +++
 sys/bus/cam/cam_periph.c     | 47 ++++++++++++++++++++++++++++++++++---------
 sys/bus/cam/scsi/scsi_cd.c   | 11 +++++++++-
 sys/bus/cam/scsi/scsi_ch.c   | 12 +++++++++++
 sys/bus/cam/scsi/scsi_da.c   |  9 +++++++++
 sys/bus/cam/scsi/scsi_pass.c |  7 +++++++
 sys/bus/cam/scsi/scsi_sa.c   | 48 +++++++++++++++++++++++++++++++++-----------
 sys/bus/cam/scsi/scsi_sg.c   |  9 +++++++--
 8 files changed, 122 insertions(+), 24 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/a9f09b75787c7fb9d408ac052485f6111364454d


-- 
DragonFly BSD source repository


More information about the Commits mailing list