lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <47C346E2.10908@garzik.org>
Date:	Mon, 25 Feb 2008 17:53:22 -0500
From:	Jeff Garzik <jeff@...zik.org>
To:	Alan Cox <alan@...rguk.ukuu.org.uk>
CC:	Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
	torvalds@...l.org, "Cai, Crane" <Crane.Cai@....com>
Subject: Re: GAK!!!! Re: PCI: AMD SATA IDE mode quirk

Alan Cox wrote:
>>     Signed-off-by: Crane Cai <crane.cai@....com>
>>     Acked-by: Jeff Garzik <jeff@...zik.org>
>>     Signed-off-by: Greg Kroah-Hartman <gregkh@...e.de>
> 
> Vomitted-upon-by: Alan Cox <alan@...hat.com>
> 
>> -	if ((pdev->class >> 8) == PCI_CLASS_STORAGE_IDE) {
>> -		u8 tmp;
>> +	/* set sb600/sb700/sb800 sata to ahci mode */
>> +	u8 tmp;
>>  
>> +	pci_read_config_byte(pdev, PCI_CLASS_DEVICE, &tmp);
>> +	if (tmp == 0x01) {
> 
> CLASS_DEVICE is cached in pdev->class so why not simply do:
> 
> 	if (pdev->class & (1 << 8))

I agree.  I [obviously] missed this when I ack'd, mainly ack'ing the 
overall change.

BIOS certainly may modify that PCI config register, but that's before 
the kernel boots.  So, using pdev->class is fine.

	Jeff



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ