diff options
| author | Nathan Dabney <smurf@osdl.org> | 2002-04-23 09:44:17 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2002-04-23 09:44:17 -0700 |
| commit | 4f6101d7f725b227729ca6617985c4eabf26b49b (patch) | |
| tree | 542731ff60ffcc0758a406802739a3792bbfc5aa | |
| parent | 9e13714a59d65207e421efdb641c5ea62612fca2 (diff) | |
[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 ;-)
| -rw-r--r-- | drivers/scsi/megaraid.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/scsi/megaraid.c b/drivers/scsi/megaraid.c index 05aa504ff3d8..fc7b32cf97a3 100644 --- a/drivers/scsi/megaraid.c +++ b/drivers/scsi/megaraid.c @@ -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; } |
