From: "David C. Hansen" <haveblue@us.ibm.com>
To: Jens Axboe <axboe@suse.de>
Cc: "Martin A. Brooks" <martin@jtrix.com>, linux-kernel@vger.kernel.org
Subject: Re: 2.5.1pre6 compile error
Date: Fri, 07 Dec 2001 13:48:57 -0800 [thread overview]
Message-ID: <3C113949.2050102@us.ibm.com> (raw)
In-Reply-To: <1007722213.24166.2.camel@unhygienix> <20011207145206.GH12017@suse.de>
[-- Attachment #1: Type: text/plain, Size: 910 bytes --]
Jens Axboe wrote:
>On Fri, Dec 07 2001, Martin A. Brooks wrote:
>
>>gcc -D__KERNEL__ -I/home/martin/kernel-a-day-club/linux/include -Wall
>>-Wstrict-prototypes -Wno-trigraphs -O2 -fomit-frame-pointer
>>-fno-strict-aliasing -fno-common -pipe -mpreferred-stack-boundary=2
>>-march=i686 -c -o ps2esdi.o ps2esdi.c
>>ps2esdi.c: In function `do_ps2esdi_request':
>>ps2esdi.c:498: switch quantity not an integer
>>ps2esdi.c:500: warning: unreachable code at beginning of switch
>>statement
>>make[3]: *** [ps2esdi.o] Error 1
>>
>Please take a look at the rq->cmd -> rq->flags changes. Then understand
>them. Then fix ps2 and send me a diff, thanks.
>
Jens,
It looks like in the rest of the code, you replaced CURRENT->cmd with
rq_data_dir(CURRENT). I've attached a patch that does this for
ps2esdi.c. Those old PS/2 machines are real workhorses. I still have a
few of them running.
--
Dave
[-- Attachment #2: ps2esdi_cmd_fix.patch --]
[-- Type: text/plain, Size: 1727 bytes --]
--- linux-2.5.1-pre6/drivers/block/ps2esdi.c Fri Nov 30 17:40:03 2001
+++ linux/drivers/block/ps2esdi.c Fri Dec 7 11:22:29 2001
@@ -466,10 +466,10 @@
sti();
#if 0
- printk("%s:got request. device : %d minor : %d command : %d sector : %ld count : %ld, buffer: %p\n",
+ printk("%s:got request. device : %d minor : %d flags : %d sector : %ld count : %ld, buffer: %p\n",
DEVICE_NAME,
CURRENT_DEV, MINOR(CURRENT->rq_dev),
- CURRENT->cmd, CURRENT->sector,
+ rq_data_dir(CURRENT), CURRENT->sector,
CURRENT->current_nr_sectors, CURRENT->buffer);
#endif
@@ -485,17 +485,17 @@
(CURRENT->sector + CURRENT->current_nr_sectors <=
ps2esdi[MINOR(CURRENT->rq_dev)].nr_sects)) {
#if 0
- printk("%s:got request. device : %d minor : %d command : %d sector : %ld count : %ld\n",
+ printk("%s:got request. device : %d minor : %d flags : %d sector : %ld count : %ld\n",
DEVICE_NAME,
CURRENT_DEV, MINOR(CURRENT->rq_dev),
- CURRENT->cmd, CURRENT->sector,
+ rq_data_dir(CURRENT), CURRENT->sector,
CURRENT->current_nr_sectors);
#endif
block = CURRENT->sector;
count = CURRENT->current_nr_sectors;
- switch (CURRENT->cmd) {
+ switch (rq_data_dir(CURRENT)) {
case READ:
ps2esdi_readwrite(READ, CURRENT_DEV, block, count);
break;
@@ -850,7 +850,7 @@
switch (int_ret_code & 0x0f) {
case INT_TRANSFER_REQ:
ps2esdi_prep_dma(CURRENT->buffer, CURRENT->current_nr_sectors,
- (CURRENT->cmd == READ)
+ ( rq_data_dir(CURRENT) == READ)
? MCA_DMA_MODE_16 | MCA_DMA_MODE_WRITE | MCA_DMA_MODE_XFER
: MCA_DMA_MODE_16 | MCA_DMA_MODE_READ);
outb(CTRL_ENABLE_DMA | CTRL_ENABLE_INTR, ESDI_CONTROL);
prev parent reply other threads:[~2001-12-07 21:50 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-07 10:50 2.5.1pre6 compile error Martin A. Brooks
2001-12-07 14:52 ` Jens Axboe
2001-12-07 14:55 ` Martin A. Brooks
2001-12-07 21:48 ` David C. Hansen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3C113949.2050102@us.ibm.com \
--to=haveblue@us.ibm.com \
--cc=axboe@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=martin@jtrix.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.