lkml.org 
[lkml]   [1996]   [Dec]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectPatch against 2.1.15 for IBMMCA SCSI

With the following patch 2.1.15 finally compiles and runs ok on my
PS/2 model 95.

diff -u --recursive linux-2.1.15.orig/arch/i386/boot/setup.S
linux/arch/i386/boot/setup.S
--- linux-2.1.15.orig/arch/i386/boot/setup.S Sat Dec 14 01:34:19 1996
+++ linux/arch/i386/boot/setup.S Sat Dec 14 01:09:27 1996
@@ -294,6 +294,23 @@
stosb
is_disk1:

+! Get System Configuration Parameters from BIOS
+
+ mov ax, #0xc000
+ int 0x15 ! int 0x15: system-configuration
parameters
+ push es ! es:bx points to system description
vector
+ pop ds
+ mov ax,cs ! aka #SETUPSEG
+ sub ax,#DELTA_INITSEG ! aka #INITSEG
+ mov es, ax
+ mov si, bx ! ds:si points to system description
vector
+ mov di, #0x220 ! es:di points to sys_desc_table struct
+ cld
+ mov cx, (si) ! Byte count of data that follows
+ add cx, #2 ! The count itself is included
+ rep
+ movsb
+
! Check for PS/2 pointing device

mov ax,cs ! aka #SETUPSEG
diff -u --recursive linux-2.1.15.orig/drivers/scsi/ibmmca.c
linux/drivers/scsi/ibmmca.c
--- linux-2.1.15.orig/drivers/scsi/ibmmca.c Sat Dec 14 01:34:11 1996
+++ linux/drivers/scsi/ibmmca.c Sat Dec 14 01:26:01 1996
@@ -590,13 +590,13 @@
scb.command = IM_DEVICE_INQUIRY_CMD;
scb.enable = IM_READ_CONTROL | IM_SUPRESS_EXCEPTION_SHORT;
/* I think this virt_to_bus is needed.. ??? AC */
- scb.sys_buf_adr = virt_to_bus((unsigned long) buf);
+ scb.sys_buf_adr = virt_to_bus((void *) buf);
scb.sys_buf_length = 255;
- scb.tsb_adr = virt_to_bus((unsigned long) &tsb);
+ scb.tsb_adr = virt_to_bus((void *) &tsb);

/*issue scb to passed ldn, and busy wait for interrupt */
got_interrupt = 0;
- issue_cmd (virt_to_bus((unsigned long)) &scb, IM_SCB | ldn);
+ issue_cmd (virt_to_bus((void *) &scb), IM_SCB | ldn);
while (!got_interrupt)
barrier ();

@@ -627,13 +627,13 @@
/*fill scb with read capacity command */
scb.command = IM_READ_CAPACITY_CMD;
scb.enable = IM_READ_CONTROL;
- scb.sys_buf_adr = virt_to_bus((unsigned long) buf);
+ scb.sys_buf_adr = virt_to_bus((void *) buf);
scb.sys_buf_length = 8;
- scb.tsb_adr = virt_to_bus((unsigned long) &tsb);
+ scb.tsb_adr = virt_to_bus((void *) &tsb);

/*issue scb to passed ldn, and busy wait for interrupt */
got_interrupt = 0;
- issue_cmd (virt_to_bus((unsigned long) &scb), IM_SCB | ldn);
+ issue_cmd (virt_to_bus((void *) &scb), IM_SCB | ldn);
while (!got_interrupt)
barrier ();

@@ -740,7 +740,7 @@
/*fill scb information independent of the scsi command */
scb = &(ld[ldn].scb);
scb->enable = IM_REPORT_TSB_ONLY_ON_ERROR;
- scb->tsb_adr = virt_to_bus((unsigned long) &(ld[ldn].tsb));
+ scb->tsb_adr = virt_to_bus((void *) &(ld[ldn].tsb));
if (cmd->use_sg)
{
int i = cmd->use_sg;
@@ -749,16 +749,16 @@
panic ("IBM MCA SCSI: scatter-gather list too long.\n");
while (--i >= 0)
{
- ld[ldn].sge[i].address = virt_to_bus(sl[i].address);
+ ld[ldn].sge[i].address = (void *) virt_to_bus(sl[i].address);
ld[ldn].sge[i].byte_length = sl[i].length;
}
scb->enable |= IM_POINTER_TO_LIST;
- scb->sys_buf_adr = virt_to_bus((unsigned long)
&(ld[ldn].sge[0]));
+ scb->sys_buf_adr = virt_to_bus((void *) &(ld[ldn].sge[0]));
scb->sys_buf_length = cmd->use_sg * sizeof (struct im_sge);
}
else
{
- scb->sys_buf_adr = virt_to_bus((unsigned long)
cmd->request_buffer);
+ scb->sys_buf_adr = virt_to_bus((void *) cmd->request_buffer);
scb->sys_buf_length = cmd->request_bufflen;
}

@@ -833,7 +833,7 @@
}

/*issue scb command, and return */
- issue_cmd (virt_to_bus((unsigned long) scb), IM_SCB | ldn);
+ issue_cmd (virt_to_bus((void *) scb), IM_SCB | ldn);
return 0;
}

--
Klaus Kudielka OE1KIB Peter Jordanstr. 165, A-1180 Wien, AUSTRIA
oe1kib@oe1xtu.ampr.org http://oe1xtu.ampr.org/~oe1kib/
http://asterix.nt.tuwien.ac.at/~oe1kib/

\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.047 / U:3.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site