]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[SCSI] stex: add value check in hard reset routine
authorEd Lin <ed.lin@promise.com>
Tue, 5 Dec 2006 01:49:31 +0000 (17:49 -0800)
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>
Tue, 5 Dec 2006 17:32:30 +0000 (11:32 -0600)
During hard reset, an all-1 value from PCI_COMMAND should be invalid.

Signed-off-by: Ed Lin <ed.lin@promise.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
drivers/scsi/stex.c

index ea0d82461317e6961d38f58bb298417970c3964c..92dbac03c2e54c20f701983bad9efb6cd332e4f5 100644 (file)
@@ -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);
        }