diff options
author | David Gwynne <dlg@cvs.openbsd.org> | 2010-09-14 01:39:45 +0000 |
---|---|---|
committer | David Gwynne <dlg@cvs.openbsd.org> | 2010-09-14 01:39:45 +0000 |
commit | e608ae4fa52e5c4c7fa3bb2cd69920040d244dcf (patch) | |
tree | 41895d40c09d2f90c144664a525a4c01bf88e028 /lib | |
parent | 83869b13d617de819b3677377ce544704d8a1364 (diff) |
the openings member of scsi_link is the maximum number of commands that a
scsi device can have in flight. instead of counting users of openings on
the bus by taking away from the openings value, count the number of
pending commands on the bus in a new pending variable.
this lets us know how many outstanding commands there are. we can then use
that to make sure that all commands a device has generated get completed
before detaching the device. this helps avoid resource leaks and use after
frees.
tested by me on pci ehci/umass, fc mpi, and sas mpi.
tested by jakemsr on cardbus ohci umass.
it found issues in sas mpi which were fixed as a result of this diff.
ok krw@
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions