cxddk.c (302408) | cxddk.c (315221) |
---|---|
1/*- 2 * Cronyx-Sigma Driver Development Kit. 3 * 4 * Copyright (C) 1998 Cronyx Engineering. 5 * Author: Pavel Novikov, <pavel@inr.net.kiae.su> 6 * 7 * Copyright (C) 1998-2003 Cronyx Engineering. 8 * Author: Roman Kurakin, <rik@cronyx.ru> 9 * 10 * This software is distributed with NO WARRANTIES, not even the implied 11 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 * 13 * Authors grant any other persons or organisations permission to use 14 * or modify this software as long as this message is kept with the software, 15 * all derivative works or modified versions. 16 * 17 * Cronyx Id: cxddk.c,v 1.1.2.2 2003/11/27 14:24:50 rik Exp $ 18 */ 19#include <sys/cdefs.h> | 1/*- 2 * Cronyx-Sigma Driver Development Kit. 3 * 4 * Copyright (C) 1998 Cronyx Engineering. 5 * Author: Pavel Novikov, <pavel@inr.net.kiae.su> 6 * 7 * Copyright (C) 1998-2003 Cronyx Engineering. 8 * Author: Roman Kurakin, <rik@cronyx.ru> 9 * 10 * This software is distributed with NO WARRANTIES, not even the implied 11 * warranties for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 * 13 * Authors grant any other persons or organisations permission to use 14 * or modify this software as long as this message is kept with the software, 15 * all derivative works or modified versions. 16 * 17 * Cronyx Id: cxddk.c,v 1.1.2.2 2003/11/27 14:24:50 rik Exp $ 18 */ 19#include <sys/cdefs.h> |
20__FBSDID("$FreeBSD: stable/11/sys/dev/cx/cxddk.c 277565 2015-01-23 15:14:30Z kevlo $"); | 20__FBSDID("$FreeBSD: stable/11/sys/dev/cx/cxddk.c 315221 2017-03-14 02:06:03Z pfg $"); |
21 22#include <dev/cx/machdep.h> 23#include <dev/cx/cxddk.h> 24#include <dev/cx/cxreg.h> 25#include <dev/cx/cronyxfw.h> 26#include <dev/cx/csigmafw.h> 27 28#define BYTE *(unsigned char*)& --- 406 unchanged lines hidden (view full) --- 435 ++c->rintr; 436 risr = inw (RISR(c->port)); 437 438 /* Compute optimal receiver buffer length */ 439 rbsz = cx_compute_buf_len(c); 440 if (c->mode == M_ASYNC && (risr & RISA_TIMEOUT)) { 441 unsigned long rcbadr = (unsigned short) inw (RCBADRL(c->port)) | 442 (long) inw (RCBADRU(c->port)) << 16; | 21 22#include <dev/cx/machdep.h> 23#include <dev/cx/cxddk.h> 24#include <dev/cx/cxreg.h> 25#include <dev/cx/cronyxfw.h> 26#include <dev/cx/csigmafw.h> 27 28#define BYTE *(unsigned char*)& --- 406 unchanged lines hidden (view full) --- 435 ++c->rintr; 436 risr = inw (RISR(c->port)); 437 438 /* Compute optimal receiver buffer length */ 439 rbsz = cx_compute_buf_len(c); 440 if (c->mode == M_ASYNC && (risr & RISA_TIMEOUT)) { 441 unsigned long rcbadr = (unsigned short) inw (RCBADRL(c->port)) | 442 (long) inw (RCBADRU(c->port)) << 16; |
443 unsigned char *buf = 0; | 443 unsigned char *buf = NULL; |
444 port_t cnt_port = 0, sts_port = 0; 445 446 if (rcbadr >= c->brphys && rcbadr < c->brphys+DMABUFSZ) { 447 buf = c->brbuf; 448 len = rcbadr - c->brphys; 449 cnt_port = BRBCNT(c->port); 450 sts_port = BRBSTS(c->port); 451 } else if (rcbadr >= c->arphys && rcbadr < c->arphys+DMABUFSZ) { --- 454 unchanged lines hidden --- | 444 port_t cnt_port = 0, sts_port = 0; 445 446 if (rcbadr >= c->brphys && rcbadr < c->brphys+DMABUFSZ) { 447 buf = c->brbuf; 448 len = rcbadr - c->brphys; 449 cnt_port = BRBCNT(c->port); 450 sts_port = BRBSTS(c->port); 451 } else if (rcbadr >= c->arphys && rcbadr < c->arphys+DMABUFSZ) { --- 454 unchanged lines hidden --- |