--- linux/drivers/scsi/advansys.c Fri Nov 9 17:05:06 2001 +++ linux/drivers/scsi/advansys.cmin Sat Dec 22 22:36:53 2001 @@ -3626,6 +3626,8 @@ * released so an explicit sti() is done. The driver only needs interrupts * disabled when it acquires the per board lock. */ + +#if 0 #define ASC_UNLOCK_IO_REQUEST_LOCK \ { \ ulong flags; /* flags value not needed, cf. comment above. */ \ @@ -3639,6 +3641,16 @@ ulong flags; /* flags value not needed, cf. comment above. */ \ spin_lock_irqsave(&io_request_lock, flags); \ } +#else +#define ASC_UNLOCK_IO_REQUEST_LOCK +#define ASC_LOCK_IO_REQUEST_LOCK + +/* borrowed from sym53c8xx.c, but not yet used */ +#define ASC_LOCK_SCSI_DONE(host, flags) \ + spin_lock_irqsave(&((host)->host_lock), flags) +#define ASC_UNLOCK_SCSI_DONE(host, flags) \ + spin_unlock_irqrestore(&((host)->host_lock), flags) +#endif /* Asc Library return codes */ #define ASC_TRUE 1 @@ -6804,7 +6816,9 @@ slp = (struct scatterlist *) scp->request_buffer; for (sgcnt = 0; sgcnt < scp->use_sg; sgcnt++, slp++) { asc_sg_head.sg_list[sgcnt].addr = - cpu_to_le32(virt_to_bus(slp->address)); + cpu_to_le32(virt_to_bus(slp->address ? + (unsigned char *)slp->address : + (unsigned char *)page_address(slp->page) + slp->offset)); asc_sg_head.sg_list[sgcnt].bytes = cpu_to_le32(slp->length); ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512)); } @@ -7062,7 +7076,9 @@ for (i = 0; i < NO_OF_SG_PER_BLOCK; i++) { sg_block->sg_list[i].sg_addr = - cpu_to_le32(virt_to_bus(slp->address)); + cpu_to_le32(virt_to_bus(slp->address ? + (unsigned char *)slp->address : + (unsigned char *)page_address(slp->page) + slp->offset)); sg_block->sg_list[i].sg_count = cpu_to_le32(slp->length); ASC_STATS_ADD(scp->host, sg_xfer, ASC_CEILING(slp->length, 512));