On 04/08/2016 03:16 PM, Markus Armbruster wrote:
Please use a more descriptive title.  Suggest "megasas: Fix

Cao jin <caoj.f...@cn.fujitsu.com> writes:

msi_init returns non-zero value on both failure and success

This is a sentence, should end with a period.

Bug's impact?  Here's my guess.

msi_init() either succeeds and returns 0x50, or fails and returns a
negative errno.  If it succeeds, we mistakenly clear
MEGASAS_MASK_USE_MSI.  Its only use is in megasas_scsi_uninit(), via
megasas_use_msi().  There, we fail to msi_uninit() on unrealize due to
the bug.

I figure that's harmless if we destroy the device next.  This is the
common case.

If we don't destroy it, and then realize it again, msi_init() fails,

FYI: if realize it again, I guess msi_init() won`t be executed again, because megasas_use_msi() will fail first.

because there's no space at 0x50: the MSI capability we neglected to
delete is still there.  We report the problem to the user, then realize
the device anyway (I hate that, but it's a separate issue).


--
Yours Sincerely,

Cao jin



Reply via email to