Commit 4f6101d7 authored by Nathan Dabney's avatar Nathan Dabney Committed by Linus Torvalds

[PATCH] MegaRAID - compile fix for 2.5.9

  This fixes compile errors.  It has been tested with a weekend of Bonnie++ 8GB
runs on a RAID0 setup at the OSDL.  This was built against and tested on 2.5.8
and applies cleanly to 2.5.9.

  LSI told me they have a version 2.0 of the driver in development but
it would be really nice to have the dang thing working now ;-)
parent 9e13714a
......@@ -526,6 +526,7 @@
#include "sd.h"
#include "scsi.h"
#include "hosts.h"
#include <scsi/scsicam.h>
#include "megaraid.h"
......@@ -1107,10 +1108,11 @@ static void mega_cmd_done (mega_host_config * megaCfg, mega_scb * pScb, int stat
status = 0xF0;
}
#endif
if (SCpnt->cmnd[0] == INQUIRY && !islogical) {
if ( SCpnt->use_sg ) {
sgList = (struct scatterlist *)SCpnt->request_buffer;
memcpy(&c, sgList[0].address, 0x1);
memcpy(&c, cpu_to_le32(sg_dma_address(&sgList[0])), 0x1);
} else {
memcpy(&c, SCpnt->request_buffer, 0x1);
}
......@@ -4557,9 +4559,11 @@ static int megadev_ioctl (struct inode *inode, struct file *filep,
#endif
IO_LOCK_T;
if (!inode || !(dev = inode->i_rdev))
if (!inode)
return -EINVAL;
dev = inode->i_rdev;
if (_IOC_TYPE (cmd) != MEGAIOC_MAGIC)
return (-EINVAL);
......@@ -5104,16 +5108,16 @@ mega_del_logdrv(mega_host_config *this_hba, int logdrv)
* Stop sending commands to the controller, queue them internally.
* When deletion is complete, ISR will flush the queue.
*/
IO_LOCK;
IO_LOCK(this_hba->host);
this_hba->quiescent = 1;
IO_UNLOCK;
IO_UNLOCK(this_hba->host);
while( this_hba->qPcnt ) {
sleep_on_timeout( &wq, 1*HZ ); /* sleep for 1s */
}
rval = mega_do_del_logdrv(this_hba, logdrv);
IO_LOCK;
IO_LOCK(this_hba->host);
/*
* Attach the internal queue to the pending queue
*/
......@@ -5158,7 +5162,7 @@ mega_del_logdrv(mega_host_config *this_hba, int logdrv)
}
this_hba->quiescent = 0;
IO_UNLOCK;
IO_UNLOCK(this_hba->host);
return rval;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment