Skip to content

Commit

Permalink
[SCSI] stex: add value check in hard reset routine
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Ed Lin authored and James Bottomley committed Dec 5, 2006
1 parent 4eea9dc commit 47c4f99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/scsi/stex.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 47c4f99

Please sign in to comment.