[PATCH] 2.1.15 & MCA

Klaus Kudielka (oe1kib@oe1xtu.ampr.org)
Sun, 15 Dec 1996 20:56:47 +0000


This is a multi-part message in MIME format.

--------------135F5C7B770AA64C1AB1C84
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Hi,

just found another minor MCA-specific bug. This patch replaces the one I
posted earlier.

--
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/

--------------135F5C7B770AA64C1AB1C84 Content-Type: text/plain; charset=us-ascii; name="patch-2.1.15-mca" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="patch-2.1.15-mca"

diff -u --recursive linux-2.1.15/arch/i386/boot/setup.S linux/arch/i386/boot/setup.S --- linux-2.1.15/arch/i386/boot/setup.S Sat Mar 30 18:58:57 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/arch/i386/kernel/ksyms.c linux/arch/i386/kernel/ksyms.c --- linux-2.1.15/arch/i386/kernel/ksyms.c Sun Dec 15 20:04:23 1996 +++ linux/arch/i386/kernel/ksyms.c Sun Dec 15 19:26:57 1996 @@ -17,6 +17,7 @@ #include <linux/symtab_begin.h> /* platform dependent support */ X(EISA_bus), + X(MCA_bus), X(wp_works_ok), X(__verify_write), X(dump_thread), Only in linux-2.1.15/drivers/net: new_tunnel.c diff -u --recursive linux-2.1.15/drivers/scsi/ibmmca.c linux/drivers/scsi/ibmmca.c --- linux-2.1.15/drivers/scsi/ibmmca.c Sun Dec 15 20:04:32 1996 +++ linux/drivers/scsi/ibmmca.c Sun Dec 15 19:36:15 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(buf); scb.sys_buf_length = 255; - scb.tsb_adr = virt_to_bus((unsigned long) &tsb); + scb.tsb_adr = virt_to_bus(&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(&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(buf); scb.sys_buf_length = 8; - scb.tsb_adr = virt_to_bus((unsigned long) &tsb); + scb.tsb_adr = virt_to_bus(&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(&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(&(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(&(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(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(scb), IM_SCB | ldn); return 0; }

--------------135F5C7B770AA64C1AB1C84--