Re: Patch Review

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

 



On Mon, 12 Jan 2009, Michael Ellerman wrote:

And as far as the message, is the content really invalid? The comment
says "standard PCI ROMs" start with "55 AA", which makes it sound like
that's a normal value to find.

Thanks for all your help; I agree with pretty much everything you've said, except this. According to the Mindshare book on PCI, the ROM header always begins with the bytes 0x55 0xAA. It describes them as "ROM Signature byte 1" and "ROM Signature byte 2". You'll note that at this point in the code:
-	image = rom, therefore image - rom = 0
-	The code breaks out of the loop at this point
-	The return value will hence be 0, which (according to previous
	discussion on this list) indicates an error.

So, basically, if it doesn't find 0x55, it returns an error. Should future ROMs not begin with 0x55, the code will need to be modified anyway, so there's no reason not to put something there. But I agree that the "Invalid ROM" message would be sufficient at that point, and the pci-sysfs stuff should go elsewhere.

	:)

---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayland@xxxxxxxxxxxxx    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----

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

[Index of Archives]     [DMA Engine]     [Linux Coverity]     [Linux USB]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Greybus]

  Powered by Linux