aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/hpsa.c
diff options
context:
space:
mode:
authorStephen M. Cameron <scameron@beardog.cce.hp.com>2012-05-01 11:42:14 -0500
committerJames Bottomley <JBottomley@Parallels.com>2012-05-10 09:09:20 +0100
commite754b42424e0bd5949f47118f71720c42b93c6e0 (patch)
tree5c0a5fb348bf3dc9a5a7fd7fd1d0ad39dbedf92e /drivers/scsi/hpsa.c
parent[SCSI] hpsa: call pci_disable_device on driver unload (diff)
downloadlinux-dev-e754b42424e0bd5949f47118f71720c42b93c6e0.tar.xz
linux-dev-e754b42424e0bd5949f47118f71720c42b93c6e0.zip
[SCSI] hpsa: do not skip disabled devices
There was code to skip "disabled" devices which was intended to skip devices disabled in the BIOS, but it really just checks to see if the device can write to host memory, which this is disabled by pci_disable_device on driver unload, so this check has the effect of preventing subsequent load of the driver. And devices disabled in the BIOS don't show up at all anyway, so this check never made any sense to begin with, and should be removed. Signed-off-by: Stephen M. Cameron <scameron@beardog.cce.hp.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
Diffstat (limited to 'drivers/scsi/hpsa.c')
-rw-r--r--drivers/scsi/hpsa.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/drivers/scsi/hpsa.c b/drivers/scsi/hpsa.c
index 732ae3dc0449..8075c54bac03 100644
--- a/drivers/scsi/hpsa.c
+++ b/drivers/scsi/hpsa.c
@@ -3705,14 +3705,6 @@ static int __devinit hpsa_lookup_board_id(struct pci_dev *pdev, u32 *board_id)
return ARRAY_SIZE(products) - 1; /* generic unknown smart array */
}
-static inline bool hpsa_board_disabled(struct pci_dev *pdev)
-{
- u16 command;
-
- (void) pci_read_config_word(pdev, PCI_COMMAND, &command);
- return ((command & PCI_COMMAND_MEMORY) == 0);
-}
-
static int __devinit hpsa_pci_find_memory_BAR(struct pci_dev *pdev,
unsigned long *memory_bar)
{
@@ -3929,11 +3921,6 @@ static int __devinit hpsa_pci_init(struct ctlr_info *h)
h->product_name = products[prod_index].product_name;
h->access = *(products[prod_index].access);
- if (hpsa_board_disabled(h->pdev)) {
- dev_warn(&h->pdev->dev, "controller appears to be disabled\n");
- return -ENODEV;
- }
-
pci_disable_link_state(h->pdev, PCIE_LINK_STATE_L0S |
PCIE_LINK_STATE_L1 | PCIE_LINK_STATE_CLKPM);