* Re: 2.5.3-pre3 (resending with .config info) -- pcilynx.c:638: In function `mem_open': invalid operands to binary &
2002-01-23 1:48 2.5.3-pre3 (resending with .config info) -- pcilynx.c:638: In function `mem_open': invalid operands to binary & Miles Lane
@ 2002-01-23 4:09 ` Evgeniy Polyakov
2002-01-23 4:33 ` Evgeniy Polyakov
0 siblings, 1 reply; 3+ messages in thread
From: Evgeniy Polyakov @ 2002-01-23 4:09 UTC (permalink / raw)
To: Miles Lane; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1424 bytes --]
On 22 Jan 2002 17:48:17 -0800
Miles Lane <miles@megapathdsl.net> wrote:
> Oops. Forgot to include the relevant .config info last time.
> Here it is.
>
> gcc -D__KERNEL__ -I/usr/src/linux/include -Wall -Wstrict-prototypes
> -Wno-trigraphs -O2 -fomit-frame-pointer -fno-strict-aliasing -fno-common
> -pipe -mpreferred-stack-boundary=2 -march=athlon -DMODULE -c -o
> pcilynx.o pcilynx.c pcilynx.c: In function `mem_open':
> pcilynx.c:638: invalid operands to binary &
> pcilynx.c:650: `num_of_cards' undeclared (first use in this function)
> pcilynx.c:650: (Each undeclared identifier is reported only once
> pcilynx.c:650: for each function it appears in.)
> pcilynx.c:650: `cards' undeclared (first use in this function)
> pcilynx.c: In function `aux_poll':
> pcilynx.c:721: `cards' undeclared (first use in this function)
> make[2]: *** [pcilynx.o] Error 1
> make[2]: Leaving directory `/usr/src/linux/drivers/ieee1394'
>
> CONFIG_IEEE1394=m
> CONFIG_IEEE1394_PCILYNX=m
> CONFIG_IEEE1394_PCILYNX_LOCALRAM=y
> CONFIG_IEEE1394_PCILYNX_PORTS=y
Try this patch, but it is given WITHOUT ANY WARRANTY.
I even cann't test to compile it.
And there is not ieee card here.
So, it was wrote with luck and common sense.
I hope it will help you.
P.S. Here is also patch for video1394 and remap_page_range.
P.P.S. If this is full bullshit... then i apologize and go learning Linux
kernel again...
Evgeniy Polyakov ( s0mbre ).
[-- Attachment #2: ieee1394_video1394.patch --]
[-- Type: application/octet-stream, Size: 1276 bytes --]
--- ./drivers/ieee1394/video1394.c~ Tue Jan 22 05:11:08 2002
+++ ./drivers/ieee1394/video1394.c Wed Jan 23 07:04:58 2002
@@ -844,8 +844,9 @@
reg_write(ohci, OHCI1394_IsoXmitIntMaskSet, 1<<d->ctx);
}
-static int do_iso_mmap(struct ti_ohci *ohci, struct dma_iso_ctx *d,
- const char *adr, unsigned long size)
+static int do_iso_mmap(struct vm_area_struct *vma, struct ti_ohci *ohci,
+ struct dma_iso_ctx *d,
+ const char *adr, unsigned long size)
{
unsigned long start=(unsigned long) adr;
unsigned long page,pos;
@@ -865,7 +866,7 @@
pos=(unsigned long) d->buf;
while (size > 0) {
page = kvirt_to_pa(pos);
- if (remap_page_range(start, page, PAGE_SIZE, PAGE_SHARED))
+ if (remap_page_range(vma, start, page, PAGE_SIZE, PAGE_SHARED))
return -EAGAIN;
start+=PAGE_SIZE;
pos+=PAGE_SIZE;
@@ -1406,7 +1407,7 @@
if (video->current_ctx == NULL) {
PRINT(KERN_ERR, ohci->id, "Current iso context not set");
} else
- res = do_iso_mmap(ohci, video->current_ctx,
+ res = do_iso_mmap(vma, ohci, video->current_ctx,
(char *)vma->vm_start,
(unsigned long)(vma->vm_end-vma->vm_start));
unlock_kernel();
[-- Attachment #3: ieee1394_pcilynx.patch --]
[-- Type: application/octet-stream, Size: 802 bytes --]
--- /tmp/pcilynx.c Wed Jan 23 05:54:38 2002
+++ ./pcilynx.c Wed Jan 23 06:49:50 2002
@@ -55,9 +55,15 @@
#define PRINTD(level, card, fmt, args...) do {} while (0)
#endif
+#define MAX_NUM_OF_CARDS 10 /*
+ * How do you think,
+ * can anyone has such amount of cards
+ * in one computer?
+ */
static struct hpsb_host_driver *lynx_driver;
-static unsigned int card_id;
+static unsigned int card_id, num_of_cards;
+struct ti_lynx cards[MAX_NUM_OF_CARDS];
/*
* PCL handling functions.
@@ -1509,6 +1515,11 @@
hpsb_add_host(host);
lynx->state = is_host;
+
+ if (num_of_cards < MAX_NUM_OF_CARDS)
+ cards[num_of_cards++] = host->hostdata;
+ else
+ FAIL("Too many cards[ %d ]... Impossible...\n", num_of_cards);
return 0;
#undef FAIL
^ permalink raw reply [flat|nested] 3+ messages in thread