Bug 64141

Summary: [BISECTED]3w-9xxx times out if MSI disabled during enumeration
Product: SCSI Drivers Reporter: Bjorn Helgaas (bjorn)
Component: OtherAssignee: scsi_drivers-other
Status: NEW ---    
Severity: normal CC: alan
Priority: P1    
Hardware: All   
OS: Linux   
URL: http://lkml.kernel.org/r/alpine.LNX.2.00.1308271141080.2077@pobox.suse.cz
Kernel Version: 3.0 Tree: Mainline
Regression: Yes
Attachments: dmesg log
lspci -vv

Description Bjorn Helgaas 2013-10-31 20:45:00 UTC
Created attachment 112991 [details]
dmesg log

Apparently there's a non-public SUSE bug report for this.  Jiri Kosina reported it here [1].

Starting with d5dea7d95 ("PCI: msi: Disable msi interrupts when we initialize a
pci device"), 3w-9xxx times out because the device doesn't respond:

  3w-9xxx 0000:08:00.0: PCI INT A -> GSI 32 (level, low) -> IRQ 32
  3w-9xxx: scsi4: Found a 3ware 9000 Storage Controller at 0xbad00000, IRQ: 32.
  scsi 4:0:0:0: WARNING: (0x06:0x002C): Command (0x12) timed out, resetting card.

Reverting d5dea7d95 makes the device work properly.  Full dmesg log attached.

[1] http://lkml.kernel.org/r/alpine.LNX.2.00.1308271141080.2077@pobox.suse.cz
Comment 1 Bjorn Helgaas 2013-10-31 20:46:05 UTC
Created attachment 113001 [details]
lspci -vv
Comment 2 Bjorn Helgaas 2014-06-03 22:58:59 UTC
I think this is a 3w-9xxx driver defect, so I'm reassigning to SCSI.  Here's my rationale (from the email thread mentioned above):

  ... twa_probe() looks strange to me.  The other drivers I looked at
  do all their PCI initialization before the scsi_host_alloc() /
  scsi_add_host() / scsi_scan_host() stuff.  But twa_probe() has PCI
  stuff scattered around between those three SCSI calls.  In particular,
  it does the MSI setup way down near the end, after scsi_add_host(),
  which seems like just the sort of thing that could explain this problem.

Let me know if this seems like the wrong thing to do.