Re: qla_wxyz pci_set_mwi question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Apr 12, 2007 at 10:20:38AM -0700, Andrew Vasquez wrote:
> No, the current logic doesn't make much sense at all, initialization
> should not continue if MWI is not set... I'll queue-up something like
> the patch below for our next batch-of-qla2xxx-updates.

Why should it fail?  If there's a platform which can't support a
cacheline size that the qla2xyz card can handle, it should be able to
happily fall back to doing plain writes instead of MWIs.  IMO, it should
just call pci_set_mwi() and ignore the result.

>  	pci_set_master(ha->pdev);
> -	mwi = 0;
> -	if (pci_set_mwi(ha->pdev))
> -		mwi = PCI_COMMAND_INVALIDATE;
> +	if (pci_set_mwi(ha->pdev) < 0)
> +		return QLA_FUNCTION_FAILED;
>  
>  	pci_read_config_word(ha->pdev, PCI_COMMAND, &w);
> -	w |= mwi | (PCI_COMMAND_PARITY | PCI_COMMAND_SERR);
> +	w |= PCI_COMMAND_PARITY | PCI_COMMAND_SERR;
>  	pci_write_config_word(ha->pdev, PCI_COMMAND, w);

However, setting the msi bit here was redundant.  pci_set_mwi() already
sets the PCI_COMMAND_INVALIDATE bit.

-
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux