diff options
| author | mycroft <mycroft@NetBSD.org> | 2003-09-23 09:19:22 +0000 |
|---|---|---|
| committer | mycroft <mycroft@NetBSD.org> | 2003-09-23 09:19:22 +0000 |
| commit | f9d629fb934420ba7069d098914ac45ef9eda29d (patch) | |
| tree | 63aff812c48dc131dc9e43b7c01ba6cda6b47cc2 /sys/dev | |
| parent | 5a696d0850d2225767665e80f0b221b463a73439 (diff) | |
Fix more probe delay and/or failure problems:
1) Don't wait for DRQ on an IDENTIFY command -- if it's not set when we see
BSY clear, abort the command and ignore the drive. (Do this by testing
for DRQ in the read/write cases in __wdccommand_intr().)
2) Don't wait for DRQ to deassert when we finish an IDENTIFY (or any other
non-block command that reads data) -- we don't do this for block I/O, and
empirically it doesn't clear on my CF cards at all, causing a pointless 1s
delay.
3) Add comments to some of the delay()s, and add missing ones in wdcreset()
and the WDCC_RECAL in the so-called "pre-ATA" probe.
4) Slightly simplify the reset sequence -- we were doing an extra I/O.
5) Modify the register writability test to make sure that registers are not
overlapped -- this can happen in some weird cases with a missing device 1.
6) Check the error register value after the reset -- if it's not 01h or 81h,
as appropriate (see ATA spec), punt.
Tested with a number of ATA-only, ATAPI-only, mixed ATA-ATAPI, CF, and IDE
disk configurations.
Also remove the SINGLE_DRIVE nonsense again.
Diffstat (limited to 'sys/dev')
| -rw-r--r-- | sys/dev/ata/ata.c | 10 | ||||
| -rw-r--r-- | sys/dev/ic/wdc.c | 117 | ||||
| -rw-r--r-- | sys/dev/ic/wdcvar.h | 3 | ||||
| -rw-r--r-- | sys/dev/isa/wdc_isa.c | 7 | ||||
| -rw-r--r-- | sys/dev/pci/pciide.c | 6 | ||||
| -rw-r--r-- | sys/dev/pcmcia/wdc_pcmcia.c | 5 |
6 files changed, 65 insertions, 83 deletions
diff --git a/sys/dev/ata/ata.c b/sys/dev/ata/ata.c index 161fd66aa3e..3e3dd643053 100644 --- a/sys/dev/ata/ata.c +++ b/sys/dev/ata/ata.c @@ -1,4 +1,4 @@ -/* $NetBSD: ata.c,v 1.18 2003/01/27 21:27:52 bouyer Exp $ */ +/* $NetBSD: ata.c,v 1.19 2003/09/23 09:19:22 mycroft Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. * @@ -29,7 +29,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.18 2003/01/27 21:27:52 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: ata.c,v 1.19 2003/09/23 09:19:22 mycroft Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -87,12 +87,12 @@ ata_get_params(drvp, flags, prms) if (drvp->drive_flags & DRIVE_ATA) { wdc_c.r_command = WDCC_IDENTIFY; wdc_c.r_st_bmask = WDCS_DRDY; - wdc_c.r_st_pmask = WDCS_DRQ; + wdc_c.r_st_pmask = 0; wdc_c.timeout = 3000; /* 3s */ } else if (drvp->drive_flags & DRIVE_ATAPI) { wdc_c.r_command = ATAPI_IDENTIFY_DEVICE; wdc_c.r_st_bmask = 0; - wdc_c.r_st_pmask = WDCS_DRQ; + wdc_c.r_st_pmask = 0; wdc_c.timeout = 10000; /* 10s */ } else { WDCDEBUG_PRINT(("wdc_ata_get_parms: no disks\n"), @@ -162,7 +162,7 @@ ata_set_mode(drvp, mode, flags) wdc_c.r_st_pmask = 0; wdc_c.r_precomp = WDSF_SET_MODE; wdc_c.r_count = mode; - wdc_c.flags = AT_READ | flags; + wdc_c.flags = flags; wdc_c.timeout = 1000; /* 1s */ if (wdc_exec_command(drvp, &wdc_c) != WDC_COMPLETE) return CMD_AGAIN; diff --git a/sys/dev/ic/wdc.c b/sys/dev/ic/wdc.c index f92799dc9c2..759a8626db3 100644 --- a/sys/dev/ic/wdc.c +++ b/sys/dev/ic/wdc.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc.c,v 1.130 2003/09/21 11:56:40 enami Exp $ */ +/* $NetBSD: wdc.c,v 1.131 2003/09/23 09:19:23 mycroft Exp $ */ /* * Copyright (c) 1998, 2001 Manuel Bouyer. All rights reserved. @@ -70,7 +70,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.130 2003/09/21 11:56:40 enami Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc.c,v 1.131 2003/09/23 09:19:23 mycroft Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -193,7 +193,6 @@ wdcprobe(chp) u_int8_t st0, st1, sc, sn, cl, ch; u_int8_t ret_value = 0x03; u_int8_t drive; - int found; /* * Sanity check to see if the wdc channel responds at all. @@ -206,14 +205,14 @@ wdcprobe(chp) chp->wdc->select(chp,0); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM); - delay(10); + delay(10); /* 400ns delay */ st0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status); if (chp->wdc && (chp->wdc->cap & WDC_CAPABILITY_SELECT)) chp->wdc->select(chp,1); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM | 0x10); - delay(10); + delay(10); /* 400ns delay */ st1 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status); WDCDEBUG_PRINT(("%s:%d: before reset, st0=0x%x, st1=0x%x\n", @@ -232,14 +231,14 @@ wdcprobe(chp) bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_cyl_lo, - 0x01); + 0x02); if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, - wd_cyl_lo) != 0x01) + wd_cyl_lo) != 0x02) ret_value &= ~0x01; bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_cyl_lo, - 0x02); + 0x01); if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, - wd_cyl_lo) != 0x02) + wd_cyl_lo) != 0x01) ret_value &= ~0x01; bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sector, 0x01); @@ -251,6 +250,9 @@ wdcprobe(chp) if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_sector) != 0x02) ret_value &= ~0x01; + if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, + wd_cyl_lo) != 0x01) + ret_value &= ~0x01; } /* Register writability test, drive 1. */ @@ -260,14 +262,14 @@ wdcprobe(chp) bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM | 0x10); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_cyl_lo, - 0x01); + 0x02); if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, - wd_cyl_lo) != 0x01) + wd_cyl_lo) != 0x02) ret_value &= ~0x02; bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_cyl_lo, - 0x02); + 0x01); if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, - wd_cyl_lo) != 0x02) + wd_cyl_lo) != 0x01) ret_value &= ~0x02; bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sector, 0x01); @@ -279,6 +281,9 @@ wdcprobe(chp) if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_sector) != 0x02) ret_value &= ~0x02; + if (bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, + wd_cyl_lo) != 0x01) + ret_value &= ~0x02; } if (ret_value == 0) @@ -291,16 +296,13 @@ wdcprobe(chp) /* assert SRST, wait for reset to complete */ bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM); - delay(10); - bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, - WDCTL_RST | WDCTL_IDS); - DELAY(1000); + delay(10); /* 400ns delay */ bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, - WDCTL_IDS); - delay(1000); + WDCTL_RST | WDCTL_IDS | WDCTL_4BIT); + delay(2000); (void) bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_error); bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT); - delay(10); + delay(10); /* 400ns delay */ ret_value = __wdcwait_reset(chp, ret_value); WDCDEBUG_PRINT(("%s:%d: after reset, ret_value=0x%d\n", @@ -317,30 +319,14 @@ wdcprobe(chp) * something here assume it's ATA or OLD. Ghost will be killed later in * attach routine. */ - found = 0; for (drive = 0; drive < 2; drive++) { if ((ret_value & (0x01 << drive)) == 0) continue; - if (1 < ++found && chp->wdc != NULL && - (chp->wdc->cap & WDC_CAPABILITY_SINGLE_DRIVE)) { - /* - * Ignore second drive if WDC_CAPABILITY_SINGLE_DRIVE - * is set. - * - * Some CF Card (for ex. IBM MicroDrive and SanDisk) - * doesn't seem to implement drive select command. In - * this case, you can't eliminate ghost drive properly. - */ - WDCDEBUG_PRINT(("%s:%d:%d: ignored.\n", - chp->wdc->sc_dev.dv_xname, - chp->channel, drive), DEBUG_PROBE); - break; - } if (chp->wdc && chp->wdc->cap & WDC_CAPABILITY_SELECT) chp->wdc->select(chp,drive); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM | (drive << 4)); - delay(10); + delay(10); /* 400ns delay */ /* Save registers contents */ sc = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_seccnt); sn = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_sector); @@ -459,7 +445,7 @@ wdc_channel_attach(chp) chp->wdc->select(chp,i); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM | (i << 4)); - delay(10); + delay(10); /* 400ns delay */ bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_error, 0x58); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, @@ -474,11 +460,6 @@ wdc_channel_attach(chp) chp->channel, i), DEBUG_PROBE); chp->ch_drive[i].drive_flags &= ~DRIVE_OLD; } - if (chp->wdc->cap & WDC_CAPABILITY_SELECT) - chp->wdc->select(chp,i); - bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, - WDSD_IBM | (i << 4)); - delay(100); if (wait_for_ready(chp, 10000) != 0) { WDCDEBUG_PRINT(("%s:%d:%d: not ready\n", chp->wdc->sc_dev.dv_xname, @@ -488,6 +469,7 @@ wdc_channel_attach(chp) } bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_command, WDCC_RECAL); + delay(10); /* 400ns delay */ if (wait_for_ready(chp, 10000) != 0) { WDCDEBUG_PRINT(("%s:%d:%d: WDCC_RECAL failed\n", chp->wdc->sc_dev.dv_xname, @@ -851,15 +833,13 @@ wdcreset(chp, verb) chp->wdc->select(chp,0); bus_space_write_1(chp->cmd_iot, chp->cmd_ioh, wd_sdh, WDSD_IBM); /* master */ + delay(10); /* 400ns delay */ bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, - WDCTL_RST | WDCTL_IDS); - delay(1000); - bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, - WDCTL_IDS); - delay(1000); + WDCTL_RST | WDCTL_IDS | WDCTL_4BIT); + delay(2000); (void) bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_error); - bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, - WDCTL_4BIT); + bus_space_write_1(chp->ctl_iot, chp->ctl_ioh, wd_aux_ctlr, WDCTL_4BIT); + delay(10); /* 400ns delay */ drv_mask1 = (chp->ch_drive[0].drive_flags & DRIVE) ? 0x01:0x00; drv_mask1 |= (chp->ch_drive[1].drive_flags & DRIVE) ? 0x02:0x00; @@ -882,7 +862,7 @@ __wdcwait_reset(chp, drv_mask) int drv_mask; { int timeout; - u_int8_t st0, st1; + u_int8_t st0, er0, st1, er1; #ifdef WDCDEBUG u_int8_t sc0, sn0, cl0, ch0; u_int8_t sc1, sn1, cl1, ch1; @@ -895,6 +875,7 @@ __wdcwait_reset(chp, drv_mask) WDSD_IBM); /* master */ delay(10); st0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status); + er0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_error); #ifdef WDCDEBUG sc0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_seccnt); sn0 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_sector); @@ -907,6 +888,7 @@ __wdcwait_reset(chp, drv_mask) WDSD_IBM | 0x10); /* slave */ delay(10); st1 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status); + er1 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_error); #ifdef WDCDEBUG sc1 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_seccnt); sn1 = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_sector); @@ -940,6 +922,10 @@ __wdcwait_reset(chp, drv_mask) if (st1 & WDCS_BSY) drv_mask &= ~0x02; end: + if (er0 != 0x01 && er0 != 0x81) + drv_mask &= ~0x01; + if (er1 != 0x01) + drv_mask &= ~0x02; WDCDEBUG_PRINT(("%s:%d:0: after reset, sc=0x%x sn=0x%x " "cl=0x%x ch=0x%x\n", chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe", @@ -949,9 +935,9 @@ end: chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe", chp->channel, sc1, sn1, cl1, ch1), DEBUG_PROBE); - WDCDEBUG_PRINT(("%s:%d: wdcwait_reset() end, st0=0x%x, st1=0x%x\n", + WDCDEBUG_PRINT(("%s:%d: wdcwait_reset() end, st0=0x%x er0=0x%x, st1=0x%x er1=0x%x\n", chp->wdc ? chp->wdc->sc_dev.dv_xname : "wdcprobe", chp->channel, - st0, st1), DEBUG_PROBE); + st0, er0, st1, er1), DEBUG_PROBE); return drv_mask; } @@ -977,7 +963,7 @@ wdcwait(chp, mask, bits, timeout) for (;;) { chp->ch_status = status = bus_space_read_1(chp->cmd_iot, chp->cmd_ioh, wd_status); - if ((status & WDCS_BSY) == 0 && (status & mask) == bits) + if ((status & (WDCS_BSY | mask)) == bits) break; if (++time > timeout) { WDCDEBUG_PRINT(("wdcwait: timeout (time=%d), " @@ -1469,28 +1455,27 @@ again: * in its initial state */ if (wdcwait(chp, wdc_c->r_st_bmask | WDCS_DRQ, - wdc_c->r_st_bmask, (irq == 0) ? wdc_c->timeout : 0) != 0) { + wdc_c->r_st_bmask, (irq == 0) ? wdc_c->timeout : 0)) { if (irq && (xfer->c_flags & C_TIMEOU) == 0) return 0; /* IRQ was not for us */ wdc_c->flags |= AT_TIMEOU; - __wdccommand_done(chp, xfer); - return 1; } - wdc_c->flags |= AT_DONE; - __wdccommand_done(chp, xfer); - return 1; + goto out; } if (wdcwait(chp, wdc_c->r_st_pmask, wdc_c->r_st_pmask, (irq == 0) ? wdc_c->timeout : 0)) { if (irq && (xfer->c_flags & C_TIMEOU) == 0) return 0; /* IRQ was not for us */ wdc_c->flags |= AT_TIMEOU; - __wdccommand_done(chp, xfer); - return 1; + goto out; } if (chp->wdc->cap & WDC_CAPABILITY_IRQACK) chp->wdc->irqack(chp); if (wdc_c->flags & AT_READ) { + if ((chp->ch_status & WDCS_DRQ) == 0) { + wdc_c->flags |= AT_TIMEOU; + goto out; + } if (chp->ch_drive[xfer->drive].drive_flags & DRIVE_CAP32) { bus_space_read_multi_4(chp->data32iot, chp->data32ioh, 0, (u_int32_t*)data, bcount >> 2); @@ -1502,10 +1487,11 @@ again: wd_data, (u_int16_t *)data, bcount >> 1); /* at this point the drive should be in its initial state */ wdc_c->flags |= AT_XFDONE; - if (wdcwait(chp, wdc_c->r_st_bmask | WDCS_DRQ, - wdc_c->r_st_bmask, 100) != 0) - wdc_c->flags |= AT_TIMEOU; } else if (wdc_c->flags & AT_WRITE) { + if ((chp->ch_status & WDCS_DRQ) == 0) { + wdc_c->flags |= AT_TIMEOU; + goto out; + } if (chp->ch_drive[xfer->drive].drive_flags & DRIVE_CAP32) { bus_space_write_multi_4(chp->data32iot, chp->data32ioh, 0, (u_int32_t*)data, bcount >> 2); @@ -1525,6 +1511,7 @@ again: goto again; } } +out: __wdccommand_done(chp, xfer); return 1; } diff --git a/sys/dev/ic/wdcvar.h b/sys/dev/ic/wdcvar.h index 24f09425d88..75df5edfd28 100644 --- a/sys/dev/ic/wdcvar.h +++ b/sys/dev/ic/wdcvar.h @@ -1,4 +1,4 @@ -/* $NetBSD: wdcvar.h,v 1.38 2003/09/21 11:14:01 bouyer Exp $ */ +/* $NetBSD: wdcvar.h,v 1.39 2003/09/23 09:19:23 mycroft Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -103,7 +103,6 @@ struct wdc_softc { /* Per controller state */ #define WDC_CAPABILITY_NO_EXTRA_RESETS 0x0100 /* only reset once */ #define WDC_CAPABILITY_PREATA 0x0200 /* ctrl can be a pre-ata one */ #define WDC_CAPABILITY_IRQACK 0x0400 /* callback to ack interrupt */ -#define WDC_CAPABILITY_SINGLE_DRIVE 0x0800 /* Don't probe second drive */ #define WDC_CAPABILITY_NOIRQ 0x1000 /* Controller never interrupts */ #define WDC_CAPABILITY_SELECT 0x2000 /* Controller selects target */ #define WDC_CAPABILITY_RAID 0x4000 /* Controller "supports" RAID */ diff --git a/sys/dev/isa/wdc_isa.c b/sys/dev/isa/wdc_isa.c index b5f10a86c0c..35e69cd4d33 100644 --- a/sys/dev/isa/wdc_isa.c +++ b/sys/dev/isa/wdc_isa.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_isa.c,v 1.33 2003/09/21 11:14:02 bouyer Exp $ */ +/* $NetBSD: wdc_isa.c,v 1.34 2003/09/23 09:19:24 mycroft Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.33 2003/09/21 11:14:02 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.34 2003/09/23 09:19:24 mycroft Exp $"); #include <sys/param.h> #include <sys/systm.h> @@ -59,7 +59,6 @@ __KERNEL_RCSID(0, "$NetBSD: wdc_isa.c,v 1.33 2003/09/21 11:14:02 bouyer Exp $"); /* options passed via the 'flags' config keyword */ #define WDC_OPTIONS_32 0x01 /* try to use 32bit data I/O */ -#define WDC_OPTIONS_SINGLE_DRIVE 0x02 /* Don't probe second drive */ #define WDC_OPTIONS_ATA_NOSTREAM 0x04 #define WDC_OPTIONS_ATAPI_NOSTREAM 0x08 @@ -182,8 +181,6 @@ wdc_isa_attach(parent, self, aux) sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_PREATA; if (wdc_cf_flags & WDC_OPTIONS_32) sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA32; - if (wdc_cf_flags & WDC_OPTIONS_SINGLE_DRIVE) - sc->sc_wdcdev.cap |= WDC_CAPABILITY_SINGLE_DRIVE; if (wdc_cf_flags & WDC_OPTIONS_ATA_NOSTREAM) sc->sc_wdcdev.cap |= WDC_CAPABILITY_ATA_NOSTREAM; if (wdc_cf_flags & WDC_OPTIONS_ATAPI_NOSTREAM) diff --git a/sys/dev/pci/pciide.c b/sys/dev/pci/pciide.c index c01d6d8513a..25ed4a0295e 100644 --- a/sys/dev/pci/pciide.c +++ b/sys/dev/pci/pciide.c @@ -1,4 +1,4 @@ -/* $NetBSD: pciide.c,v 1.204 2003/09/21 11:30:43 bouyer Exp $ */ +/* $NetBSD: pciide.c,v 1.205 2003/09/23 09:19:24 mycroft Exp $ */ /* @@ -76,7 +76,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.204 2003/09/21 11:30:43 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: pciide.c,v 1.205 2003/09/23 09:19:24 mycroft Exp $"); #ifndef WDCDEBUG #define WDCDEBUG @@ -2521,7 +2521,7 @@ apollo_sata_chip_map(sc, pa) sc->sc_wdcdev.channels = sc->wdc_chanarray; sc->sc_wdcdev.nchannels = PCIIDE_NUM_CHANNELS; sc->sc_wdcdev.cap |= WDC_CAPABILITY_DATA16 | WDC_CAPABILITY_DATA32 | - WDC_CAPABILITY_MODE | WDC_CAPABILITY_SINGLE_DRIVE; + WDC_CAPABILITY_MODE; sc->sc_wdcdev.set_modes = sata_setup_channel; for (channel = 0; channel < sc->sc_wdcdev.nchannels; channel++) { diff --git a/sys/dev/pcmcia/wdc_pcmcia.c b/sys/dev/pcmcia/wdc_pcmcia.c index 7615a59b94f..2af996d7389 100644 --- a/sys/dev/pcmcia/wdc_pcmcia.c +++ b/sys/dev/pcmcia/wdc_pcmcia.c @@ -1,4 +1,4 @@ -/* $NetBSD: wdc_pcmcia.c,v 1.57 2003/09/21 11:14:04 bouyer Exp $ */ +/* $NetBSD: wdc_pcmcia.c,v 1.58 2003/09/23 09:19:25 mycroft Exp $ */ /*- * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.57 2003/09/21 11:14:04 bouyer Exp $"); +__KERNEL_RCSID(0, "$NetBSD: wdc_pcmcia.c,v 1.58 2003/09/23 09:19:25 mycroft Exp $"); #include <sys/param.h> #include <sys/device.h> @@ -360,7 +360,6 @@ wdc_pcmcia_attach(parent, self, aux) } sc->wdc_channel.data32iot = sc->wdc_channel.cmd_iot; sc->wdc_channel.data32ioh = sc->wdc_channel.cmd_ioh; - sc->sc_wdcdev.cap |= WDC_CAPABILITY_SINGLE_DRIVE; sc->sc_wdcdev.PIO_cap = 0; sc->wdc_chanlist[0] = &sc->wdc_channel; sc->sc_wdcdev.channels = sc->wdc_chanlist; |
