PDA

Archiv verlassen und diese Seite im Standarddesign anzeigen : pcmica / yenta Speicher vergrössern



xbdbx
24.08.06, 13:05
Hallo,

ich versuche ein Trident pcmica VGA Karte mit dem akt. Kernel (2.6.17.10) zum laufen zu bringen. Die Karte ist auch als VTBook bekannt. Ich habe auch schon die Beta Treiber vom Hersteller versucht, doch leider sind die Anpassungen dort nur für die alten Kernel versionen vom 2.4 und 2.6.

Hier ein Auszug:

PATCH THE CARDBUS KERNEL MODULE
If you have a kernel different than 2.4.22-1.2129.nptl provided by Fedora Core 1 or kernel 2.6 provided by Suse 9.1, you may need to patch the kernel module, build and install it. This fix does not need to rebuild the entire kernel, only one single module.

Check resource allocation failure
After plugging VTBook, we get the following messages in system log (check it by typing dmesg into shell); if you don't see the "Failed" strings like these, you don't need patch.
cs: cb_alloc(bus 6): vendor 0x1023, device 0x9960
PCI: Failed to allocate resource 0(22000000-213fffff) for 06:00.0
PCI: Failed to allocate resource 2(22000000-213fffff) for 06:00.0
PCI: Failed to allocate resource 3(21400000-213fffff) for 06:00.0
PCI: Enabling device 06:00.0 (0000 -> 0002)
cs: cb_free(bus 6)
We can check the bad allocation status using lspci utility:
Region 0: [virtual] Memory at 22000000 (32-bit, non-prefetchable)
Region 1: Memory at 21000000 (32-bit, non-prefetchable) [size=4M]
Region 2: [virtual] Memory at 22000000 (32-bit, non-prefetchable)
Region 3: [virtual] Memory at 21400000 (32-bit, non-prefetchable)
You can see that only register map is properly assigned.

Linux usually reserves only 4MB of prefetchable memory and 4MB of non-prefetchable memory on a single cardbus bridge. These values are not enough for VTBook. Kernel 2.6.0 introduced a dynamic size policy: 1/8 of bridge space is reserved to each device from a maximum of 4MB to a minimum of 16KB.

The source code is available in linux-2.x.y/drivers/pcmcia/yenta_socket.c (born from the fusion of files pci_socket.c e yenta.c).

We need to disable this dynamic policy and set a fixed value of 128MB or another value large enough to include all needed maps (32MB+32MB+4MB+32K).

Fix kernel module
Locate the file yenta_socket.c by typing: locate yenta_socket.c and open it with a text editor. Find the costant BRIDGE_SIZE_MAX and change it from its value to 128*1024*1024. This value can be fine tuned. We are sure that this value works on all machines.

If your version of yenta code has the following code, be sure to have the fixed value align = size = BRIDGE_SIZE_MAX; by typing:
#if 0
if (size > avail/8) {
size=(avail+1)/8;
/* round size down to next power of 2 */
i = 0;
while ((size /= 2) != 0)
i++;
size = 1 << i;
}
if (size < BRIDGE_SIZE_MIN)
size = BRIDGE_SIZE_MIN;
align = size;
#endif

After install and reload, we can check the correct allocation status using lspci again:
Region 0: Memory at 40000000 (32-bit, non-prefetchable) [disabled] [size=32M]
Region 1: Memory at 44000000 (32-bit, non-prefetchable) [disabled] [size=4M]
Region 2: Memory at 42000000 (32-bit, non-prefetchable) [disabled] [size=32M]
Region 3: Memory at 44400000 (32-bit, non-prefetchable) [disabled] [size=32K]
All resources are listed as non-prefetchable; This report is the correct one. Be sure to get it.


Hier die Stelle wie ich sie abgeänder habe:

#define BRIDGE_MEM_MAX 128*1024*1024
#define BRIDGE_MEM_ACC 128*1024
#define BRIDGE_MEM_MIN 16*1024

#define BRIDGE_IO_MAX 512
#define BRIDGE_IO_ACC 256
#define BRIDGE_IO_MIN 32

#ifndef PCIBIOS_MIN_CARDBUS_IO
#define PCIBIOS_MIN_CARDBUS_IO PCIBIOS_MIN_IO
#endif

static int yenta_search_one_res(struct resource *root, struct resource *res,
u32 min)
{
u32 align, size, start, end;
printk(KERN_ERR "res->flags: %lu | IORESOURCE_IO: %d\n", res->flags, IORESOURCE_IO);

if (res->flags & IORESOURCE_IO) {
align = 1024;
size = BRIDGE_IO_MAX;
start = PCIBIOS_MIN_CARDBUS_IO;
end = ~0U;
} else {
unsigned long avail = root->end - root->start;
int i;
align= size = BRIDGE_MEM_MAX;
printk(KERN_ERR "HACK in use with size = %u\n",size);
#if 0
if (size > avail/8) {
size=(avail+1)/8;
/* round size down to next power of 2 */
i = 0;
while ((size /= 2) != 0)
i++;
size = 1 << i;
}
if (size < min)
size = min;
align = size;
#endif
start = PCIBIOS_MIN_MEM;
end = ~0U;
}



doch leider hat sich bis jetzt nix verändert. Nicht mal meine zusätzlichen Ausgaben kommen.:confused:

Hier der lspci -v Ausschnitt

0000:00:0a.0 CardBus bridge: O2 Micro, Inc. OZ6933/711E1 CardBus/SmartCardBus Controller (rev 01)
Subsystem: Universal Scientific Ind.: Unknown device 21d1
Flags: bus master, stepping, slow devsel, latency 168, IRQ 11
Memory at 2c000000 (32-bit, non-prefetchable) [size=4K]
Bus: primary=00, secondary=02, subordinate=05, sec-latency=176
Memory window 0: 20000000-21fff000 (prefetchable)
Memory window 1: 22000000-23fff000
I/O window 0: 00001000-000010ff
I/O window 1: 00001400-000014ff
16-bit legacy interface ports at 0001


Ich hoffe das einer von euch da noch eine Idee hat
Danke schon mal im vorraus
xbdbx

quinte17
28.08.06, 10:57
er kann dem device den treiber nicht zuordnen. Unknown device 21d1...
Man müsste dem treiber sagen, dass diese device-id zu ihm gehört. wo genau dass ist kann ich dir leider nicht sagen, dazu habe ich zu wenig ahnung.
vielleicht bringt es dich aber in die richtige richtung zum suchen

greetz