patch-2.1.8 linux/drivers/block/promise.c
Next file: linux/drivers/block/triton.c
Previous file: linux/drivers/block/opti621.c
Back to the patch index
Back to the overall index
- Lines: 54
- Date:
Wed Nov 6 14:49:33 1996
- Orig file:
v2.1.7/linux/drivers/block/promise.c
- Orig date:
Sat Apr 20 11:28:29 1996
diff -u --recursive --new-file v2.1.7/linux/drivers/block/promise.c linux/drivers/block/promise.c
@@ -172,14 +172,16 @@
hwif->selectproc = second_hwif->selectproc = &promise_selectproc;
/* Shift the remaining interfaces down by one */
for (i=MAX_HWIFS-1 ; i > hwif->index+1 ; i--) {
+ ide_hwif_t *h = &ide_hwifs[i];
+
printk("Shifting i/f %d values to i/f %d\n",i-1,i);
- ide_hwifs[i].io_base = ide_hwifs[i-1].io_base;
- ide_hwifs[i].ctl_port = ide_hwifs[i-1].ctl_port;
- ide_hwifs[i].noprobe = ide_hwifs[i-1].noprobe;
+ ide_init_hwif_ports(h->io_ports, (h-1)->io_ports[IDE_DATA_OFFSET], NULL);
+ h->io_ports[IDE_CONTROL_OFFSET] = (h-1)->io_ports[IDE_CONTROL_OFFSET];
+ h->noprobe = (h-1)->noprobe;
}
second_hwif->is_promise2 = 1;
- second_hwif->io_base = hwif->io_base;
- second_hwif->ctl_port = hwif->ctl_port;
+ ide_init_hwif_ports(second_hwif->io_ports, hwif->io_ports[IDE_DATA_OFFSET], NULL);
+ second_hwif->io_ports[IDE_CONTROL_OFFSET] = hwif->io_ports[IDE_CONTROL_OFFSET];
second_hwif->irq = hwif->irq;
for (i=0; i<2 ; i++) {
hwif->drives[i].io_32bit = 3;
@@ -309,12 +311,11 @@
void do_promise_io (ide_drive_t *drive, struct request *rq)
{
unsigned long timeout;
- unsigned short io_base = HWIF(drive)->io_base;
byte stat;
if (rq->cmd == READ) {
ide_set_handler(drive, &promise_read_intr, WAIT_CMD);
- OUT_BYTE(PROMISE_READ, io_base+IDE_COMMAND_OFFSET);
+ OUT_BYTE(PROMISE_READ, IDE_COMMAND_REG);
/* The card's behaviour is odd at this point. If the data is
available, DRQ will be true, and no interrupt will be
generated by the card. If this is the case, we need to simulate
@@ -336,7 +337,7 @@
*/
return;
}
- if(IN_BYTE(io_base+IDE_SELECT_OFFSET) & 0x01)
+ if(IN_BYTE(IDE_SELECT_REG) & 0x01)
return;
udelay(1);
} while (jiffies < timeout);
@@ -345,7 +346,7 @@
return;
}
if (rq->cmd == WRITE) {
- OUT_BYTE(PROMISE_WRITE, io_base+IDE_COMMAND_OFFSET);
+ OUT_BYTE(PROMISE_WRITE, IDE_COMMAND_REG);
if (ide_wait_stat(drive, DATA_READY, drive->bad_wstat, WAIT_DRQ)) {
printk("%s: no DRQ after issuing PROMISE_WRITE\n", drive->name);
return;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov