fdc.c (39312) | fdc.c (40565) |
---|---|
1/* 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Copyright (c) 1993, 1994 by --- 29 unchanged lines hidden (view full) --- 38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 43 * SUCH DAMAGE. 44 * 45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 | 1/* 2 * Copyright (c) 1990 The Regents of the University of California. 3 * All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Don Ahn. 7 * 8 * Copyright (c) 1993, 1994 by --- 29 unchanged lines hidden (view full) --- 38 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 39 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 40 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 41 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 42 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 43 * SUCH DAMAGE. 44 * 45 * from: @(#)fd.c 7.4 (Berkeley) 5/25/91 |
46 * $Id: fd.c,v 1.122 1998/09/15 08:15:28 gibbs Exp $ | 46 * $Id: fd.c,v 1.123 1998/09/15 22:07:24 gibbs Exp $ |
47 * 48 */ 49 50#include "ft.h" 51#if NFT < 1 52#undef NFDC 53#endif 54#include "fd.h" --- 161 unchanged lines hidden (view full) --- 216static timeout_t fd_turnoff; 217static timeout_t fd_motor_on; 218static void fd_turnon(fdu_t); 219static void fdc_reset(fdc_p); 220static int fd_in(fdcu_t, int *); 221static void fdstart(fdcu_t); 222static timeout_t fd_iotimeout; 223static timeout_t fd_pseudointr; | 47 * 48 */ 49 50#include "ft.h" 51#if NFT < 1 52#undef NFDC 53#endif 54#include "fd.h" --- 161 unchanged lines hidden (view full) --- 216static timeout_t fd_turnoff; 217static timeout_t fd_motor_on; 218static void fd_turnon(fdu_t); 219static void fdc_reset(fdc_p); 220static int fd_in(fdcu_t, int *); 221static void fdstart(fdcu_t); 222static timeout_t fd_iotimeout; 223static timeout_t fd_pseudointr; |
224static ointhand2_t fdintr; |
|
224static int fdstate(fdcu_t, fdc_p); 225static int retrier(fdcu_t); 226static int fdformat(dev_t, struct fd_formb *, struct proc *); 227 228static int enable_fifo(fdc_p fdc); 229 230static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */ 231 --- 303 unchanged lines hidden (view full) --- 535 struct isa_device *fdup; 536 int ic_type = 0; 537#ifdef DEVFS 538 int mynor; 539 int typemynor; 540 int typesize; 541#endif 542 | 225static int fdstate(fdcu_t, fdc_p); 226static int retrier(fdcu_t); 227static int fdformat(dev_t, struct fd_formb *, struct proc *); 228 229static int enable_fifo(fdc_p fdc); 230 231static int fifo_threshold = 8; /* XXX: should be accessible via sysctl */ 232 --- 303 unchanged lines hidden (view full) --- 536 struct isa_device *fdup; 537 int ic_type = 0; 538#ifdef DEVFS 539 int mynor; 540 int typemynor; 541 int typesize; 542#endif 543 |
544 dev->id_ointr = fdintr; |
|
543 fdc->fdcu = fdcu; 544 fdc->flags |= FDC_ATTACHED; 545 fdc->dmachan = dev->id_drq; 546 /* Acquire the DMA channel forever, The driver will do the rest */ 547 isa_dma_acquire(fdc->dmachan); 548 isa_dmainit(fdc->dmachan, 128 << 3 /* XXX max secsize */); 549 fdc->state = DEVIDLE; 550 /* reset controller, turn motor off, clear fdout mirror reg */ --- 719 unchanged lines hidden (view full) --- 1270 splx(s); 1271} 1272 1273/***********************************************************************\ 1274* fdintr * 1275* keep calling the state machine until it returns a 0 * 1276* ALWAYS called at SPLBIO * 1277\***********************************************************************/ | 545 fdc->fdcu = fdcu; 546 fdc->flags |= FDC_ATTACHED; 547 fdc->dmachan = dev->id_drq; 548 /* Acquire the DMA channel forever, The driver will do the rest */ 549 isa_dma_acquire(fdc->dmachan); 550 isa_dmainit(fdc->dmachan, 128 << 3 /* XXX max secsize */); 551 fdc->state = DEVIDLE; 552 /* reset controller, turn motor off, clear fdout mirror reg */ --- 719 unchanged lines hidden (view full) --- 1272 splx(s); 1273} 1274 1275/***********************************************************************\ 1276* fdintr * 1277* keep calling the state machine until it returns a 0 * 1278* ALWAYS called at SPLBIO * 1279\***********************************************************************/ |
1278void | 1280static void |
1279fdintr(fdcu_t fdcu) 1280{ 1281 fdc_p fdc = fdc_data + fdcu; 1282#if NFT > 0 1283 fdu_t fdu = fdc->fdu; 1284 1285 if (fdc->flags & FDC_TAPE_BUSY) 1286 (ftintr(fdu)); --- 739 unchanged lines hidden --- | 1281fdintr(fdcu_t fdcu) 1282{ 1283 fdc_p fdc = fdc_data + fdcu; 1284#if NFT > 0 1285 fdu_t fdu = fdc->fdu; 1286 1287 if (fdc->flags & FDC_TAPE_BUSY) 1288 (ftintr(fdu)); --- 739 unchanged lines hidden --- |