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-Url: https://git.stricted.de/?a=commitdiff_plain;h=47c4f997c7bd9ab142c65950317232728b921aa0;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.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); }