From: Ed Lin Date: Tue, 5 Dec 2006 01:49:31 +0000 (-0800) Subject: [SCSI] stex: add value check in hard reset routine X-Git-Tag: MMI-PSA29.97-13-9~44978^2~47^2~101^2~6 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=47c4f997c7bd9ab142c65950317232728b921aa0;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [SCSI] stex: add value check in hard reset routine During hard reset, an all-1 value from PCI_COMMAND should be invalid. Signed-off-by: Ed Lin Signed-off-by: James Bottomley --- diff --git a/drivers/scsi/stex.c b/drivers/scsi/stex.c index ea0d82461317..92dbac03c2e5 100644 --- a/drivers/scsi/stex.c +++ b/drivers/scsi/stex.c @@ -1041,7 +1041,7 @@ static void stex_hard_reset(struct st_hba *hba) for (i = 0; i < MU_MAX_DELAY_TIME; i++) { pci_read_config_word(hba->pdev, PCI_COMMAND, &pci_cmd); - if (pci_cmd & PCI_COMMAND_MASTER) + if (pci_cmd != 0xffff && (pci_cmd & PCI_COMMAND_MASTER)) break; msleep(1); }