Project

General

Profile

Feature #12930

scsa2usb needs some serious cleanup

Added by Joshua M. Clulow about 1 month ago. Updated about 1 month ago.

Status:
New
Priority:
Normal
Category:
driver - device drivers
Start date:
Due date:
% Done:

0%

Estimated time:
Difficulty:
Medium
Tags:
Gerrit CR:

Description

There is a lot of the arcane in scsa2usb. We should clean up:

  • There is a relatively baroque debug logging infrastructure which is of course relatively useless unless you are running DEBUG bits. 90% of these messages are easily achieved (and with vast additional flexibility) using DTrace FBT probes. In the handful of cases where an FBT probe would not make it easy to see a particular value, we should add some SDT probes.
  • There is a bunch of "test code" that complicates several critical routines in service of a test harness that it does not seem likely we will ever have. This should all just come out.
  • There are also ample opportunities to clean up, including smatch, GCC warning, cstyle, and clarity issues.
  • Finally, there are a number of very intricate quantities in the command object (scsa2usb) that track transfer lengths, residues, offsets in buffers, etc. These could use some comments, and possibly SDT probes to make it clear when they are being changed.

I'd like to keep this work relatively separate from additional bug fixes or improvements like the pending #12929.


Related issues

Related to illumos gate - Bug #12929: scsa2usb should ignore dubious residue in command status wrapperNew

Actions

History

#1

Updated by Joshua M. Clulow about 1 month ago

  • Related to Bug #12929: scsa2usb should ignore dubious residue in command status wrapper added
#2

Updated by Joshua M. Clulow about 1 month ago

  • Description updated (diff)

Also available in: Atom PDF