From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: l16083@alunos.uevora.pt
Cc: linux-kernel@vger.kernel.org, axboe@suse.de
Subject: Re: Can't compile Symbios 53c416 SCSI support
Date: Mon, 28 Jan 2002 04:41:21 +0300 [thread overview]
Message-ID: <20020128044121.033ce18e.johnpol@2ka.mipt.ru> (raw)
In-Reply-To: <20020128043833.659e7102.johnpol@2ka.mipt.ru>
In-Reply-To: <20020127201213.A7091@bleach> <20020128043833.659e7102.johnpol@2ka.mipt.ru>
[-- Attachment #1: Type: text/plain, Size: 116 bytes --]
> So i hope this patch will help a bit in this direction.
Ooops, forgot to attach.
Evgeniy Polyakov ( s0mbre ).
[-- Attachment #2: drivers_scsi_sym53c416.diff --]
[-- Type: application/octet-stream, Size: 4066 bytes --]
--- ./linux.orig/drivers/scsi/sym53c416.c Mon Jan 28 04:17:26 2002
+++ ./linux/drivers/scsi/sym53c416.c Mon Jan 28 04:26:48 2002
@@ -337,6 +337,7 @@
static void sym53c416_intr_handle(int irq, void *dev_id, struct pt_regs *regs)
{
+ struct Scsi_Host *dev = dev_id;
int base = 0;
int i;
unsigned long flags = 0;
@@ -359,11 +360,11 @@
}
/* Now we have the base address and we can start handling the interrupt */
- spin_lock_irqsave(&io_request_lock,flags);
+ spin_lock_irqsave(&dev->host_lock,flags);
status_reg = inb(base + STATUS_REG);
pio_int_reg = inb(base + PIO_INT_REG);
int_reg = inb(base + INT_REG);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&dev->host_lock, flags);
/* First, we handle error conditions */
if(int_reg & SCI) /* SCSI Reset */
@@ -371,9 +372,9 @@
printk(KERN_DEBUG "sym53c416: Reset received\n");
current_command->SCp.phase = idle;
current_command->result = DID_RESET << 16;
- spin_lock_irqsave(&io_request_lock, flags);
+ spin_lock_irqsave(&dev->host_lock, flags);
current_command->scsi_done(current_command);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&dev->host_lock, flags);
return;
}
if(int_reg & ILCMD) /* Illegal Command */
@@ -381,9 +382,9 @@
printk(KERN_WARNING "sym53c416: Illegal Command: 0x%02x.\n", inb(base + COMMAND_REG));
current_command->SCp.phase = idle;
current_command->result = DID_ERROR << 16;
- spin_lock_irqsave(&io_request_lock, flags);
+ spin_lock_irqsave(&dev->host_lock, flags);
current_command->scsi_done(current_command);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&dev->host_lock, flags);
return;
}
if(status_reg & GE) /* Gross Error */
@@ -391,9 +392,9 @@
printk(KERN_WARNING "sym53c416: Controller reports gross error.\n");
current_command->SCp.phase = idle;
current_command->result = DID_ERROR << 16;
- spin_lock_irqsave(&io_request_lock, flags);
+ spin_lock_irqsave(&dev->host_lock, flags);
current_command->scsi_done(current_command);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&dev->host_lock, flags);
return;
}
if(status_reg & PE) /* Parity Error */
@@ -401,9 +402,9 @@
printk(KERN_WARNING "sym53c416:SCSI parity error.\n");
current_command->SCp.phase = idle;
current_command->result = DID_PARITY << 16;
- spin_lock_irqsave(&io_request_lock, flags);
+ spin_lock_irqsave(&dev->host_lock, flags);
current_command->scsi_done(current_command);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&dev->host_lock, flags);
return;
}
if(pio_int_reg & (CE | OUE))
@@ -411,9 +412,9 @@
printk(KERN_WARNING "sym53c416: PIO interrupt error.\n");
current_command->SCp.phase = idle;
current_command->result = DID_ERROR << 16;
- spin_lock_irqsave(&io_request_lock, flags);
+ spin_lock_irqsave(&dev->host_lock, flags);
current_command->scsi_done(current_command);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&dev->host_lock, flags);
return;
}
if(int_reg & DIS) /* Disconnect */
@@ -423,9 +424,9 @@
else
current_command->result = (current_command->SCp.Status & 0xFF) | ((current_command->SCp.Message & 0xFF) << 8) | (DID_OK << 16);
current_command->SCp.phase = idle;
- spin_lock_irqsave(&io_request_lock, flags);
+ spin_lock_irqsave(&dev->host_lock, flags);
current_command->scsi_done(current_command);
- spin_unlock_irqrestore(&io_request_lock, flags);
+ spin_unlock_irqrestore(&dev->host_lock, flags);
return;
}
/* Now we handle SCSI phases */
@@ -719,7 +720,7 @@
cli();
/* FIXME: Request_irq with CLI is not safe */
/* Request for specified IRQ */
- if(request_irq(hosts[i].irq, sym53c416_intr_handle, 0, ID, NULL))
+ if(request_irq(hosts[i].irq, sym53c416_intr_handle, 0, ID, shpnt))
{
restore_flags(flags);
printk(KERN_ERR "sym53c416: Unable to assign IRQ %d\n", hosts[i].irq);
next prev parent reply other threads:[~2002-01-28 1:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-01-27 20:12 Can't compile Symbios 53c416 SCSI support Paulo Andre'
2002-01-28 1:38 ` Evgeniy Polyakov
2002-01-28 1:41 ` Evgeniy Polyakov [this message]
2002-01-28 1:58 ` Paulo Andre'
2002-01-28 1:54 ` Paulo Andre'
-- strict thread matches above, loose matches on Subject: below --
2002-01-28 4:58 Douglas Gilbert
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=20020128044121.033ce18e.johnpol@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=axboe@suse.de \
--cc=l16083@alunos.uevora.pt \
--cc=linux-kernel@vger.kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox