From: Evgeniy Polyakov <johnpol@2ka.mipt.ru>
To: brak@waste.org
Cc: linux-kernel@vger.kernel.org, lnz@dandelion.com, davej@suse.de
Subject: Re: PROBLEM: 2.5.3 DAC960 won't compile
Date: Sat, 2 Feb 2002 06:42:55 +0300 [thread overview]
Message-ID: <20020202064255.54394976.johnpol@2ka.mipt.ru> (raw)
In-Reply-To: <20020202062116.7b4fb074.johnpol@2ka.mipt.ru>
In-Reply-To: <Pine.LNX.4.44.0202011752200.7986-100000@waste.org> <20020202062116.7b4fb074.johnpol@2ka.mipt.ru>
[-- Attachment #1: Type: text/plain, Size: 260 bytes --]
> On Fri, 1 Feb 2002 17:54:18 -0600 (CST)
> Brak <brak@waste.org> wrote:
>
> >
> > When compiling the 2.5.3 kernel it errors out on the DAC960
> >
Ooops, a little mistake.
There is no one now.
Good luck.
> > --
> > -brak
Evgeniy Polyakov ( s0mbre ).
[-- Attachment #2: drivers_block_DAC960.diff --]
[-- Type: application/octet-stream, Size: 8954 bytes --]
--- ./linux.orig/drivers/block/DAC960.c Tue Jan 1 04:56:19 2002
+++ ./linux/drivers/block/DAC960.c Sat Feb 2 06:13:08 2002
@@ -306,9 +306,9 @@
static void DAC960_WaitForCommand(DAC960_Controller_T *Controller)
{
- spin_unlock_irq(&Controller->RequestQueue->queue_lock);
+ spin_unlock_irq(Controller->RequestQueue->queue_lock);
__wait_event(Controller->CommandWaitQueue, Controller->FreeCommands);
- spin_lock_irq(&Controller->RequestQueue->queue_lock);
+ spin_lock_irq(Controller->RequestQueue->queue_lock);
}
@@ -1944,8 +1944,9 @@
/*
Initialize the I/O Request Queue.
*/
+ spin_lock_init(Controller->queue_lock);
RequestQueue = BLK_DEFAULT_QUEUE(MajorNumber);
- blk_init_queue(RequestQueue, DAC960_RequestFunction);
+ blk_init_queue(RequestQueue, DAC960_RequestFunction, Controller->RequestQueue->queue_lock);
RequestQueue->queuedata = Controller;
blk_queue_max_hw_segments(RequestQueue,
Controller->DriverScatterGatherLimit);
@@ -1957,9 +1958,6 @@
Initialize the Disk Partitions array, Partition Sizes array, Block Sizes
array, and Max Sectors per Request array.
*/
- for (MinorNumber = 0; MinorNumber < DAC960_MinorCount; MinorNumber++)
- Controller->MaxSectorsPerRequest[MinorNumber] =
- Controller->MaxBlocksPerCommand;
Controller->GenericDiskInfo.part = Controller->DiskPartitions;
Controller->GenericDiskInfo.sizes = Controller->PartitionSizes;
blksize_size[MajorNumber] = Controller->BlockSizes;
@@ -2066,10 +2064,11 @@
{
if (Controller->FirmwareType == DAC960_V1_Controller)
{
+ Controller->KernelDevice = mk_kdev(DAC960_MajorNumber(controller->ControllerNumber),
+ DAC960_MinorNumber(LogicalDriveNumber, 0));
if (LogicalDriveNumber > Controller->LogicalDriveCount - 1) return;
register_disk(&Controller->GenericDiskInfo,
- DAC960_KernelDevice(Controller->ControllerNumber,
- LogicalDriveNumber, 0),
+ Controller->KernelDevice,
DAC960_MaxPartitions,
&DAC960_BlockDeviceOperations,
Controller->V1.LogicalDriveInformation
@@ -2080,9 +2079,9 @@
DAC960_V2_LogicalDeviceInfo_T *LogicalDeviceInfo =
Controller->V2.LogicalDeviceInformation[LogicalDriveNumber];
if (LogicalDeviceInfo == NULL) return;
+
register_disk(&Controller->GenericDiskInfo,
- DAC960_KernelDevice(Controller->ControllerNumber,
- LogicalDriveNumber, 0),
+ Controller->KernelDevice,
DAC960_MaxPartitions,
&DAC960_BlockDeviceOperations,
LogicalDeviceInfo->ConfigurableDeviceSize);
@@ -2742,17 +2741,17 @@
if (bio_data(BufferHeader) == LastDataEndPointer)
{
ScatterGatherList[SegmentNumber-1].SegmentByteCount +=
- bio_size(BufferHeader);
- LastDataEndPointer += bio_size(BufferHeader);
+ BufferHeader->bi_size;
+ LastDataEndPointer += BufferHeader->bi_size;
}
else
{
ScatterGatherList[SegmentNumber].SegmentDataPointer =
Virtual_to_Bus32(bio_data(BufferHeader));
ScatterGatherList[SegmentNumber].SegmentByteCount =
- bio_size(BufferHeader);
+ BufferHeader->bi_zize;
LastDataEndPointer = bio_data(BufferHeader) +
- bio_size(BufferHeader);
+ BufferHeader->bi_size;
if (SegmentNumber++ > Controller->DriverScatterGatherLimit)
panic("DAC960: Scatter/Gather Segment Overflow\n");
}
@@ -2833,17 +2832,17 @@
if (bio_data(BufferHeader) == LastDataEndPointer)
{
ScatterGatherList[SegmentNumber-1].SegmentByteCount +=
- bio_size(BufferHeader);
- LastDataEndPointer += bio_size(BufferHeader);
+ BufferHeader->bi_size;
+ LastDataEndPointer += BufferHeader->bi_size;
}
else
{
ScatterGatherList[SegmentNumber].SegmentDataPointer =
Virtual_to_Bus64(bio_data(BufferHeader));
ScatterGatherList[SegmentNumber].SegmentByteCount =
- bio_size(BufferHeader);
+ BufferHeader->bi_size;
LastDataEndPointer = bio_data(BufferHeader) +
- bio_size(BufferHeader);
+ BufferHeader->bi_size;
if (SegmentNumber++ > Controller->DriverScatterGatherLimit)
panic("DAC960: Scatter/Gather Segment Overflow\n");
}
@@ -2945,7 +2944,7 @@
if (SuccessfulIO)
set_bit(BIO_UPTODATE, &BufferHeader->bi_flags);
blk_finished_io(bio_sectors(BufferHeader));
- BufferHeader->bi_end_io(BufferHeader);
+ BufferHeader->bi_end_io(BufferHeader, bio_sectors(BufferHeader));
}
@@ -3061,7 +3060,7 @@
Command->CommandType = DAC960_WriteRetryCommand;
CommandMailbox->Type5.CommandOpcode = DAC960_V1_Write;
}
- Command->BlockCount = bio_size(BufferHeader) >> DAC960_BlockSizeBits;
+ Command->BlockCount = (BufferHeader->bi_size) >> DAC960_BlockSizeBits;
CommandMailbox->Type5.LD.TransferLength = Command->BlockCount;
CommandMailbox->Type5.BusAddress =
Virtual_to_Bus32(bio_data(BufferHeader));
@@ -3110,9 +3109,9 @@
DAC960_V1_CommandMailbox_T *CommandMailbox =
&Command->V1.CommandMailbox;
Command->BlockNumber +=
- bio_size(BufferHeader) >> DAC960_BlockSizeBits;
+ (BufferHeader->bi_size) >> DAC960_BlockSizeBits;
Command->BlockCount =
- bio_size(NextBufferHeader) >> DAC960_BlockSizeBits;
+ (NextBufferHeader->bi_size) >> DAC960_BlockSizeBits;
Command->BufferHeader = NextBufferHeader;
CommandMailbox->Type5.LD.TransferLength = Command->BlockCount;
CommandMailbox->Type5.LogicalBlockAddress = Command->BlockNumber;
@@ -4158,7 +4157,7 @@
if (CommandType == DAC960_ReadCommand)
Command->CommandType = DAC960_ReadRetryCommand;
else Command->CommandType = DAC960_WriteRetryCommand;
- Command->BlockCount = bio_size(BufferHeader) >> DAC960_BlockSizeBits;
+ Command->BlockCount = (BufferHeader->bi_size) >> DAC960_BlockSizeBits;
CommandMailbox->SCSI_10.CommandControlBits
.AdditionalScatterGatherListMemory = false;
CommandMailbox->SCSI_10.DataTransferSize =
@@ -4214,9 +4213,9 @@
if (NextBufferHeader != NULL)
{
Command->BlockNumber +=
- bio_size(BufferHeader) >> DAC960_BlockSizeBits;
+ (BufferHeader->bi_size) >> DAC960_BlockSizeBits;
Command->BlockCount =
- bio_size(NextBufferHeader) >> DAC960_BlockSizeBits;
+ (NextBufferHeader->bi_size) >> DAC960_BlockSizeBits;
Command->BufferHeader = NextBufferHeader;
CommandMailbox->SCSI_10.DataTransferSize =
Command->BlockCount << DAC960_BlockSizeBits;
@@ -5299,7 +5298,7 @@
DAC960_ComputeGenericDiskInfo(Controller);
DAC960_RegisterDisk(Controller, LogicalDriveNumber);
}
- if (Controller->GenericDiskInfo.sizes[MINOR(Inode->i_rdev)] == 0)
+ if (Controller->GenericDiskInfo.sizes[minor(Inode->i_rdev)] == 0)
return -ENXIO;
/*
Increment Controller and Logical Drive Usage Counts.
@@ -5536,11 +5535,11 @@
while (Controller->V1.DirectCommandActive[DCDB.Channel]
[DCDB.TargetID])
{
- spin_unlock_irq(&Controller->RequestQueue->queue_lock);
+ spin_unlock_irq(Controller->RequestQueue->queue_lock);
__wait_event(Controller->CommandWaitQueue,
!Controller->V1.DirectCommandActive
[DCDB.Channel][DCDB.TargetID]);
- spin_lock_irq(&Controller->RequestQueue->queue_lock);
+ spin_lock_irq(Controller->RequestQueue->queue_lock);
}
Controller->V1.DirectCommandActive[DCDB.Channel]
[DCDB.TargetID] = true;
--- ./linux.orig/drivers/block/DAC960.h Fri Jan 4 00:51:36 2002
+++ ./linux/drivers/block/DAC960.h Sat Feb 2 05:54:00 2002
@@ -2363,6 +2363,7 @@
boolean SuppressEnclosureMessages;
Timer_T MonitoringTimer;
GenericDiskInfo_T GenericDiskInfo;
+ KernelDevice_T KernelDevice;
DAC960_Command_T *FreeCommands;
unsigned char *CombinedStatusBuffer;
unsigned char *CurrentStatusBuffer;
@@ -2508,7 +2509,7 @@
void DAC960_AcquireControllerLock(DAC960_Controller_T *Controller,
ProcessorFlags_T *ProcessorFlags)
{
- spin_lock_irqsave(&Controller->RequestQueue->queue_lock, *ProcessorFlags);
+ spin_lock_irqsave(Controller->RequestQueue->queue_lock, *ProcessorFlags);
}
@@ -2520,7 +2521,7 @@
void DAC960_ReleaseControllerLock(DAC960_Controller_T *Controller,
ProcessorFlags_T *ProcessorFlags)
{
- spin_unlock_irqrestore(&Controller->RequestQueue->queue_lock, *ProcessorFlags);
+ spin_unlock_irqrestore(Controller->RequestQueue->queue_lock, *ProcessorFlags);
}
@@ -2557,7 +2558,7 @@
void DAC960_AcquireControllerLockIH(DAC960_Controller_T *Controller,
ProcessorFlags_T *ProcessorFlags)
{
- spin_lock_irqsave(&Controller->RequestQueue->queue_lock, *ProcessorFlags);
+ spin_lock_irqsave(Controller->RequestQueue->queue_lock, *ProcessorFlags);
}
@@ -2570,7 +2571,7 @@
void DAC960_ReleaseControllerLockIH(DAC960_Controller_T *Controller,
ProcessorFlags_T *ProcessorFlags)
{
- spin_unlock_irqrestore(&Controller->RequestQueue->queue_lock, *ProcessorFlags);
+ spin_unlock_irqrestore(Controller->RequestQueue->queue_lock, *ProcessorFlags);
}
prev parent reply other threads:[~2002-02-02 3:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-02-01 23:54 Brak
2002-02-02 3:21 ` Evgeniy Polyakov
2002-02-02 9:56 ` Jens Axboe
2002-02-02 3:42 ` Evgeniy Polyakov [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=20020202064255.54394976.johnpol@2ka.mipt.ru \
--to=johnpol@2ka.mipt.ru \
--cc=brak@waste.org \
--cc=davej@suse.de \
--cc=linux-kernel@vger.kernel.org \
--cc=lnz@dandelion.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®