From: Jens Axboe <axboe@suse.de>
To: Rich Baum <richbaum@acm.org>
Cc: linux-kernel@vger.kernel.org, campbell@torque.net
Subject: Re: [PATCH][RFC] Allow drivers/scsi/imm.c to compile in 2.5.1pre6
Date: Sat, 8 Dec 2001 15:02:27 +0100 [thread overview]
Message-ID: <20011208140227.GA11567@suse.de> (raw)
In-Reply-To: <29EB5FE64EF@coral.indstate.edu>
In-Reply-To: <29EB5FE64EF@coral.indstate.edu>
[-- Attachment #1: Type: text/plain, Size: 431 bytes --]
On Fri, Dec 07 2001, Rich Baum wrote:
> The attached patch fixes compile errors in imm.c in 2.5.1pre6. At boot it
> will detect the drive however if a disk is in the drive I get an oops (see
> oops1.log). If there is no disk it will boot just fine.
Two problems:
- detect() is not run with lock held anymore
- use of ->address is deprecated
Please try attached patch -- it's a quickie, so no guarentees :-)
--
Jens Axboe
[-- Attachment #2: imm-1 --]
[-- Type: text/plain, Size: 2385 bytes --]
--- /opt/kernel/linux-2.5.1-pre7/drivers/scsi/imm.c Sun Sep 30 15:26:07 2001
+++ drivers/scsi/imm.c Sat Dec 8 08:58:55 2001
@@ -124,11 +124,6 @@
int i, nhosts, try_again;
struct parport *pb;
- /*
- * unlock to allow the lowlevel parport driver to probe
- * the irqs
- */
- spin_unlock_irq(&io_request_lock);
pb = parport_enumerate();
printk("imm: Version %s\n", IMM_VERSION);
@@ -137,7 +132,6 @@
if (!pb) {
printk("imm: parport reports no devices.\n");
- spin_lock_irq(&io_request_lock);
return 0;
}
retry_entry:
@@ -163,7 +157,6 @@
"pardevice is owning the port for too longtime!\n",
i);
parport_unregister_device (imm_hosts[i].dev);
- spin_lock_irq(&io_request_lock);
return 0;
}
}
@@ -219,13 +212,11 @@
}
if (nhosts == 0) {
if (try_again == 1) {
- spin_lock_irq(&io_request_lock);
return 0;
}
try_again = 1;
goto retry_entry;
} else {
- spin_lock_irq (&io_request_lock);
return 1; /* return number of hosts detected */
}
}
@@ -834,7 +825,7 @@
if (cmd->SCp.buffers_residual--) {
cmd->SCp.buffer++;
cmd->SCp.this_residual = cmd->SCp.buffer->length;
- cmd->SCp.ptr = cmd->SCp.buffer->address;
+ cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset;
/*
* Make sure that we transfer even number of bytes
@@ -897,6 +888,7 @@
{
imm_struct *tmp = (imm_struct *) data;
Scsi_Cmnd *cmd = tmp->cur_cmd;
+ struct Scsi_Host *host = cmd->host;
unsigned long flags;
if (!cmd) {
@@ -948,10 +940,10 @@
if (cmd->SCp.phase > 0)
imm_pb_release(cmd->host->unique_id);
- spin_lock_irqsave(&io_request_lock, flags);
+ spin_lock_irqsave(&host->host_lock, flags);
tmp->cur_cmd = 0;
cmd->scsi_done(cmd);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&host->host_lock, flags);
return;
}
@@ -1008,7 +1000,7 @@
/* if many buffers are available, start filling the first */
cmd->SCp.buffer = (struct scatterlist *) cmd->request_buffer;
cmd->SCp.this_residual = cmd->SCp.buffer->length;
- cmd->SCp.ptr = cmd->SCp.buffer->address;
+ cmd->SCp.ptr = page_address(cmd->SCp.buffer->page) + cmd->SCp.buffer->offset;
} else {
/* else fill the only available buffer */
cmd->SCp.buffer = NULL;
next prev parent reply other threads:[~2001-12-08 14:02 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-12-08 2:45 [PATCH][RFC] Allow drivers/scsi/imm.c to compile in 2.5.1pre6 Rich Baum
2001-12-08 14:02 ` Jens Axboe [this message]
2001-12-08 14:06 ` Jens Axboe
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=20011208140227.GA11567@suse.de \
--to=axboe@suse.de \
--cc=campbell@torque.net \
--cc=linux-kernel@vger.kernel.org \
--cc=richbaum@acm.org \
/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.