[Bug 4501] PCMCIA Card not powered on - CardBus bridge: Ricoh Co Ltd RL5c476 II (rev ac)

bugme-daemon at osdl.org bugme-daemon at osdl.org
Sun Apr 24 15:53:56 EDT 2005


------- Additional Comments From rmk at arm.linux.org.uk  2005-04-24 12:53 -------
Does cardbus-signedness actually fix anything?

Let's look more closely at this.

- PCI_BASE_ADDRESS_MEM_MASK is defined in linux/pci.h as ~0x0fUL - an unsigned
long constant.

- pci_size() takes an unsigned long third argument - which is compatible with
what is being passed.

- pci_size() uses this in a logical expression with a u32, and a u32 result.

For any 32-bit unsigned long, this patch makes no changes what so ever.
For any 64-bit unsigned long, this patch doesn't change the expected outcome of
this code because 64-bit & 32-bit == 32-bit.

If it is the case (which I don't think) that this existing code is buggy, then
the code following the usage of pci_size() is also buggy - it's doing the same
as above, except putting the result in a 64-bit (in the 64-bit unsigned long case).

Therefore, I recommend against this particular patch.

------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the linux-pcmcia mailing list