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: v2.6.20-rc1~34^2~20^2~41^2~6 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=47c4f997c7bd9ab142c65950317232728b921aa0;p=linux-2.6 [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 ea0d824613..92dbac03c2 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); }