]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit - drivers/scsi/hpsa.c
hpsa: notice all request_irq errors
authorRobert Elliott <elliott@hp.com>
Fri, 23 Jan 2015 22:41:51 +0000 (16:41 -0600)
committerJames Bottomley <JBottomley@Parallels.com>
Mon, 2 Feb 2015 17:57:36 +0000 (09:57 -0800)
commita4e17fc1cf64a6f93e1685dc4a32075dfb426082
treeeb8c51ea0084739be1bbfe4b4ef3ccd13b37a525
parentec42995263ec91acbef921df8c9bb692365687b6
hpsa: notice all request_irq errors

In MSI and MSI-X mode, where hpsa asks for more than one interrupt,
hpsa_request_irqs forgets if the first request_irq call failed
if later ones succeed.

It needs to exit the loop on any failure rather than continue,
freeing all irqs that were requested until that point.

Also, it needs to clear out the q numbers up to MAX_REPLY_QUEUES.
The same is true for the general hpsa_free_irqs function.

Tested with error injection of -ENOSYS on the 4th call:
[    9.277691]  injecting error in inj_request_irq: 1 4
[    9.277780] hpsa 0000:02:00.0: failed to get irq 35 for hpsa1
[   10.711623] scsi host1: Error handler scsi_eh_1 exiting
[   10.739170] hpsa: probe of 0000:02:00.0 failed with error -38

Reviewed-by: Scott Teel <scott.teel@pmcs.com>
Signed-off-by: Robert Elliott <elliott@hp.com>
Signed-off-by: Don Brace <don.brace@pmcs.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
drivers/scsi/hpsa.c