fixed clang warnings in drivers/
. changed debug statements system for audio/ to do so
This commit is contained in:
parent
a77c2973b3
commit
b19820774e
21 changed files with 86 additions and 183 deletions
|
@ -6,18 +6,6 @@
|
||||||
#include <sys/ioc_sound.h>
|
#include <sys/ioc_sound.h>
|
||||||
|
|
||||||
|
|
||||||
/* change to DEBUG to 1 to print debug info and error messages */
|
|
||||||
|
|
||||||
#define DEBUG 0
|
|
||||||
|
|
||||||
#if DEBUG
|
|
||||||
#define dprint printf
|
|
||||||
#else
|
|
||||||
#define dprint (void)
|
|
||||||
#endif
|
|
||||||
#define error printf
|
|
||||||
|
|
||||||
|
|
||||||
_PROTOTYPE( int drv_init, (void) );
|
_PROTOTYPE( int drv_init, (void) );
|
||||||
_PROTOTYPE( int drv_init_hw, (void) );
|
_PROTOTYPE( int drv_init_hw, (void) );
|
||||||
_PROTOTYPE( int drv_reset, (void) );
|
_PROTOTYPE( int drv_reset, (void) );
|
||||||
|
|
|
@ -110,6 +110,7 @@
|
||||||
#include <minix/drivers.h>
|
#include <minix/drivers.h>
|
||||||
#include <minix/driver.h>
|
#include <minix/driver.h>
|
||||||
#include <minix/drvlib.h>
|
#include <minix/drvlib.h>
|
||||||
|
#include <minix/u64.h>
|
||||||
#include <machine/pci.h>
|
#include <machine/pci.h>
|
||||||
#include <sys/ioc_disk.h>
|
#include <sys/ioc_disk.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
|
|
|
@ -6,11 +6,8 @@
|
||||||
|
|
||||||
/* AC97 Mixer and Mode control function prototypes */
|
/* AC97 Mixer and Mode control function prototypes */
|
||||||
|
|
||||||
FORWARD _PROTOTYPE( int AC97_read,
|
|
||||||
(const DEV_STRUCT * pCC, u16_t wAddr, u16_t *data) );
|
|
||||||
FORWARD _PROTOTYPE( int AC97_write,
|
FORWARD _PROTOTYPE( int AC97_write,
|
||||||
(const DEV_STRUCT * pCC, u16_t wAddr, u16_t wData) );
|
(const DEV_STRUCT * pCC, u16_t wAddr, u16_t wData) );
|
||||||
FORWARD _PROTOTYPE( void set_src_sync_state, (int state) );
|
|
||||||
FORWARD _PROTOTYPE( int AC97_write_unsynced,
|
FORWARD _PROTOTYPE( int AC97_write_unsynced,
|
||||||
(const DEV_STRUCT * pCC, u16_t wAddr, u16_t wData) );
|
(const DEV_STRUCT * pCC, u16_t wAddr, u16_t wData) );
|
||||||
FORWARD _PROTOTYPE( int AC97_read_unsynced,
|
FORWARD _PROTOTYPE( int AC97_read_unsynced,
|
||||||
|
@ -58,6 +55,7 @@ static u32_t SrcSyncState = 0x00010000UL;
|
||||||
static DEV_STRUCT *dev;
|
static DEV_STRUCT *dev;
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
PRIVATE void set_src_sync_state (int state)
|
PRIVATE void set_src_sync_state (int state)
|
||||||
{
|
{
|
||||||
if (state < 0)
|
if (state < 0)
|
||||||
|
@ -67,6 +65,7 @@ PRIVATE void set_src_sync_state (int state)
|
||||||
SrcSyncState &= 0x00070000Ul;
|
SrcSyncState &= 0x00070000Ul;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
PRIVATE int AC97_write (const DEV_STRUCT * pCC, u16_t wAddr, u16_t wData)
|
PRIVATE int AC97_write (const DEV_STRUCT * pCC, u16_t wAddr, u16_t wData)
|
||||||
|
@ -133,6 +132,7 @@ u16_t wBaseAddr = pCC->base;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#if 0
|
||||||
PRIVATE int AC97_read (const DEV_STRUCT * pCC, u16_t wAddr, u16_t *data)
|
PRIVATE int AC97_read (const DEV_STRUCT * pCC, u16_t wAddr, u16_t *data)
|
||||||
{
|
{
|
||||||
u32_t dtemp, i;
|
u32_t dtemp, i;
|
||||||
|
@ -204,6 +204,7 @@ u16_t base = pCC->base;
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
PRIVATE int AC97_write_unsynced (const DEV_STRUCT * pCC, u16_t wAddr,
|
PRIVATE int AC97_write_unsynced (const DEV_STRUCT * pCC, u16_t wAddr,
|
||||||
|
|
|
@ -42,14 +42,14 @@ PUBLIC int mixer_init() {
|
||||||
|
|
||||||
mixer_set(MIXER_DAC_LEVEL, 0x10); /* write something to it */
|
mixer_set(MIXER_DAC_LEVEL, 0x10); /* write something to it */
|
||||||
if(mixer_get(MIXER_DAC_LEVEL) != 0x10) {
|
if(mixer_get(MIXER_DAC_LEVEL) != 0x10) {
|
||||||
dprint("sb16: Mixer not detected\n");
|
Dprint(("sb16: Mixer not detected\n"));
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Enable Automatic Gain Control */
|
/* Enable Automatic Gain Control */
|
||||||
mixer_set(MIXER_AGC, 0x01);
|
mixer_set(MIXER_AGC, 0x01);
|
||||||
|
|
||||||
dprint("Mixer detected\n");
|
Dprint(("Mixer detected\n"));
|
||||||
|
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
|
@ -75,10 +75,10 @@ PUBLIC int drv_init(void) {
|
||||||
PUBLIC int drv_init_hw(void) {
|
PUBLIC int drv_init_hw(void) {
|
||||||
int i;
|
int i;
|
||||||
int DspVersion[2];
|
int DspVersion[2];
|
||||||
dprint("drv_init_hw():\n");
|
Dprint(("drv_init_hw():\n"));
|
||||||
|
|
||||||
if(drv_reset () != OK) {
|
if(drv_reset () != OK) {
|
||||||
dprint("sb16: No SoundBlaster card detected\n");
|
Dprint(("sb16: No SoundBlaster card detected\n"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -97,11 +97,11 @@ PUBLIC int drv_init_hw(void) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(DspVersion[0] < 4) {
|
if(DspVersion[0] < 4) {
|
||||||
dprint("sb16: No SoundBlaster 16 compatible card detected\n");
|
Dprint(("sb16: No SoundBlaster 16 compatible card detected\n"));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprint("sb16: SoundBlaster DSP version %d.%d detected!\n", DspVersion[0], DspVersion[1]);
|
Dprint(("sb16: SoundBlaster DSP version %d.%d detected!\n", DspVersion[0], DspVersion[1]));
|
||||||
|
|
||||||
/* set SB to use our IRQ and DMA channels */
|
/* set SB to use our IRQ and DMA channels */
|
||||||
mixer_set(MIXER_SET_IRQ, (1 << (SB_IRQ / 2 - 1)));
|
mixer_set(MIXER_SET_IRQ, (1 << (SB_IRQ / 2 - 1)));
|
||||||
|
@ -116,7 +116,7 @@ PUBLIC int drv_init_hw(void) {
|
||||||
|
|
||||||
PUBLIC int drv_reset(void) {
|
PUBLIC int drv_reset(void) {
|
||||||
int i;
|
int i;
|
||||||
dprint("drv_reset():\n");
|
Dprint(("drv_reset():\n"));
|
||||||
|
|
||||||
sb16_outb(DSP_RESET, 1);
|
sb16_outb(DSP_RESET, 1);
|
||||||
for(i = 0; i < 1000; i++); /* wait a while */
|
for(i = 0; i < 1000; i++); /* wait a while */
|
||||||
|
@ -132,7 +132,7 @@ PUBLIC int drv_reset(void) {
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int drv_start(int channel, int DmaMode) {
|
PUBLIC int drv_start(int channel, int DmaMode) {
|
||||||
dprint("drv_start():\n");
|
Dprint(("drv_start():\n"));
|
||||||
|
|
||||||
drv_reset();
|
drv_reset();
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ PUBLIC int drv_start(int channel, int DmaMode) {
|
||||||
|
|
||||||
PUBLIC int drv_stop(int sub_dev) {
|
PUBLIC int drv_stop(int sub_dev) {
|
||||||
if(running) {
|
if(running) {
|
||||||
dprint("drv_stop():\n");
|
Dprint(("drv_stop():\n"));
|
||||||
dsp_command((DspBits == 8 ? DSP_CMD_DMA8HALT : DSP_CMD_DMA16HALT));
|
dsp_command((DspBits == 8 ? DSP_CMD_DMA8HALT : DSP_CMD_DMA16HALT));
|
||||||
running = FALSE;
|
running = FALSE;
|
||||||
drv_reenable_int(sub_dev);
|
drv_reenable_int(sub_dev);
|
||||||
|
@ -191,7 +191,7 @@ PUBLIC int drv_stop(int sub_dev) {
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int drv_set_dma(u32_t dma, u32_t length, int chan) {
|
PUBLIC int drv_set_dma(u32_t dma, u32_t length, int chan) {
|
||||||
dprint("drv_set_dma():\n");
|
Dprint(("drv_set_dma():\n"));
|
||||||
DmaPhys = dma;
|
DmaPhys = dma;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ PUBLIC int drv_set_dma(u32_t dma, u32_t length, int chan) {
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int drv_reenable_int(int chan) {
|
PUBLIC int drv_reenable_int(int chan) {
|
||||||
dprint("drv_reenable_int()\n");
|
Dprint(("drv_reenable_int()\n"));
|
||||||
sb16_inb((DspBits == 8 ? DSP_DATA_AVL : DSP_DATA16_AVL));
|
sb16_inb((DspBits == 8 ? DSP_DATA_AVL : DSP_DATA16_AVL));
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ PUBLIC int drv_resume(int chan) {
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int drv_io_ctl(int request, void *val, int *len, int sub_dev) {
|
PUBLIC int drv_io_ctl(int request, void *val, int *len, int sub_dev) {
|
||||||
dprint("dsp_ioctl: got ioctl %d, argument: %d sub_dev: %d\n", request, val, sub_dev);
|
Dprint(("dsp_ioctl: got ioctl %d, argument: %d sub_dev: %d\n", request, val, sub_dev));
|
||||||
|
|
||||||
if(sub_dev == AUDIO) {
|
if(sub_dev == AUDIO) {
|
||||||
return dsp_ioctl(request, val, len);
|
return dsp_ioctl(request, val, len);
|
||||||
|
@ -247,7 +247,7 @@ PUBLIC int drv_io_ctl(int request, void *val, int *len, int sub_dev) {
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int drv_get_irq(char *irq) {
|
PUBLIC int drv_get_irq(char *irq) {
|
||||||
dprint("drv_get_irq():\n");
|
Dprint(("drv_get_irq():\n"));
|
||||||
*irq = SB_IRQ;
|
*irq = SB_IRQ;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -255,7 +255,7 @@ PUBLIC int drv_get_irq(char *irq) {
|
||||||
|
|
||||||
|
|
||||||
PUBLIC int drv_get_frag_size(u32_t *frag_size, int sub_dev) {
|
PUBLIC int drv_get_frag_size(u32_t *frag_size, int sub_dev) {
|
||||||
dprint("drv_get_frag_size():\n");
|
Dprint(("drv_get_frag_size():\n"));
|
||||||
*frag_size = DspFragmentSize;
|
*frag_size = DspFragmentSize;
|
||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
@ -284,7 +284,7 @@ PRIVATE int dsp_ioctl(int request, void *val, int *len) {
|
||||||
PRIVATE void dsp_dma_setup(phys_bytes address, int count, int DmaMode) {
|
PRIVATE void dsp_dma_setup(phys_bytes address, int count, int DmaMode) {
|
||||||
pvb_pair_t pvb[9];
|
pvb_pair_t pvb[9];
|
||||||
|
|
||||||
dprint("Setting up %d bit DMA\n", DspBits);
|
Dprint(("Setting up %d bit DMA\n", DspBits));
|
||||||
|
|
||||||
if(DspBits == 8) { /* 8 bit sound */
|
if(DspBits == 8) { /* 8 bit sound */
|
||||||
count--;
|
count--;
|
||||||
|
@ -327,7 +327,7 @@ PRIVATE void dsp_dma_setup(phys_bytes address, int count, int DmaMode) {
|
||||||
|
|
||||||
|
|
||||||
PRIVATE int dsp_set_size(unsigned int size) {
|
PRIVATE int dsp_set_size(unsigned int size) {
|
||||||
dprint("dsp_set_size(): set fragment size to %u\n", size);
|
Dprint(("dsp_set_size(): set fragment size to %u\n", size));
|
||||||
|
|
||||||
/* Sanity checks */
|
/* Sanity checks */
|
||||||
if(size < sub_dev[AUDIO].MinFragmentSize || size > sub_dev[AUDIO].DmaSize / sub_dev[AUDIO].NrOfDmaFragments || size % 2 != 0) {
|
if(size < sub_dev[AUDIO].MinFragmentSize || size > sub_dev[AUDIO].DmaSize / sub_dev[AUDIO].NrOfDmaFragments || size % 2 != 0) {
|
||||||
|
@ -342,7 +342,7 @@ PRIVATE int dsp_set_size(unsigned int size) {
|
||||||
|
|
||||||
|
|
||||||
PRIVATE int dsp_set_speed(unsigned int speed) {
|
PRIVATE int dsp_set_speed(unsigned int speed) {
|
||||||
dprint("sb16: setting speed to %u, stereo = %d\n", speed, DspStereo);
|
Dprint(("sb16: setting speed to %u, stereo = %d\n", speed, DspStereo));
|
||||||
|
|
||||||
if(speed < DSP_MIN_SPEED || speed > DSP_MAX_SPEED) {
|
if(speed < DSP_MIN_SPEED || speed > DSP_MAX_SPEED) {
|
||||||
return EPERM;
|
return EPERM;
|
||||||
|
@ -395,7 +395,7 @@ PRIVATE int dsp_set_bits(unsigned int bits) {
|
||||||
|
|
||||||
|
|
||||||
PRIVATE int dsp_set_sign(unsigned int sign) {
|
PRIVATE int dsp_set_sign(unsigned int sign) {
|
||||||
dprint("sb16: set sign to %u\n", sign);
|
Dprint(("sb16: set sign to %u\n", sign));
|
||||||
|
|
||||||
DspSign = (sign > 0 ? 1 : 0);
|
DspSign = (sign > 0 ? 1 : 0);
|
||||||
|
|
||||||
|
@ -422,7 +422,7 @@ PUBLIC int dsp_command(int value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dprint("sb16: SoundBlaster: DSP Command(%x) timeout\n", value);
|
Dprint(("sb16: SoundBlaster: DSP Command(%x) timeout\n", value));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -4,6 +4,12 @@
|
||||||
#include <minix/sound.h>
|
#include <minix/sound.h>
|
||||||
#include <minix/audio_fw.h>
|
#include <minix/audio_fw.h>
|
||||||
|
|
||||||
|
#if DEBUG
|
||||||
|
#define Dprint(args) printf args
|
||||||
|
#else
|
||||||
|
#define Dprint(args)
|
||||||
|
#endif
|
||||||
|
|
||||||
#define AUDIO 0
|
#define AUDIO 0
|
||||||
#define MIXER 1
|
#define MIXER 1
|
||||||
|
|
||||||
|
|
|
@ -125,10 +125,6 @@ _PROTOTYPE( static void do_vir_insb, (port_t port, int proc,
|
||||||
vir_bytes buf, size_t size) );
|
vir_bytes buf, size_t size) );
|
||||||
_PROTOTYPE( static void do_vir_insw, (port_t port, int proc,
|
_PROTOTYPE( static void do_vir_insw, (port_t port, int proc,
|
||||||
vir_bytes buf, size_t size) );
|
vir_bytes buf, size_t size) );
|
||||||
_PROTOTYPE( static void do_vir_outsb, (port_t port, int proc,
|
|
||||||
vir_bytes buf, size_t size) );
|
|
||||||
_PROTOTYPE( static void do_vir_outsw, (port_t port, int proc,
|
|
||||||
vir_bytes buf, size_t size) );
|
|
||||||
|
|
||||||
/* SEF functions and variables. */
|
/* SEF functions and variables. */
|
||||||
FORWARD _PROTOTYPE( void sef_local_startup, (void) );
|
FORWARD _PROTOTYPE( void sef_local_startup, (void) );
|
||||||
|
@ -1902,24 +1898,6 @@ static void do_vir_insw(port_t port, int proc, vir_bytes buf, size_t size)
|
||||||
panic("sys_sdevio failed: %d", r);
|
panic("sys_sdevio failed: %d", r);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void do_vir_outsb(port_t port, int proc, vir_bytes buf, size_t size)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
|
|
||||||
r= sys_outsb(port, proc, (void *) buf, size);
|
|
||||||
if (r != OK)
|
|
||||||
panic("sys_sdevio failed: %d", r);
|
|
||||||
}
|
|
||||||
|
|
||||||
static void do_vir_outsw(port_t port, int proc, vir_bytes buf, size_t size)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
|
|
||||||
r= sys_outsw(port, proc, (void *) buf, size);
|
|
||||||
if (r != OK)
|
|
||||||
panic("sys_sdevio failed: %d", r);
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* $PchId: dp8390.c,v 1.25 2005/02/10 17:32:07 philip Exp $
|
* $PchId: dp8390.c,v 1.25 2005/02/10 17:32:07 philip Exp $
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -142,7 +142,6 @@ static void rtl_init(dep)
|
||||||
dpeth_t *dep;
|
dpeth_t *dep;
|
||||||
{
|
{
|
||||||
u8_t reg_a, reg_b, cr, config0, config2, config3;
|
u8_t reg_a, reg_b, cr, config0, config2, config3;
|
||||||
int i;
|
|
||||||
|
|
||||||
#if DEBUG
|
#if DEBUG
|
||||||
printf("rtl_init called\n");
|
printf("rtl_init called\n");
|
||||||
|
|
|
@ -135,13 +135,13 @@ static void mem_nic2user(dpeth_t * dep, int pageno, int pktsize)
|
||||||
*/
|
*/
|
||||||
static void mem_user2nic(dpeth_t *dep, int pageno, int pktsize)
|
static void mem_user2nic(dpeth_t *dep, int pageno, int pktsize)
|
||||||
{
|
{
|
||||||
|
#if 1
|
||||||
|
panic("mem_user2nic: not converted to safecopies");
|
||||||
|
#else
|
||||||
phys_bytes offset, phys_user;
|
phys_bytes offset, phys_user;
|
||||||
iovec_dat_s_t *iovp = &dep->de_write_iovec;
|
iovec_dat_s_t *iovp = &dep->de_write_iovec;
|
||||||
int bytes, ix = 0;
|
int bytes, ix = 0;
|
||||||
|
|
||||||
panic("mem_user2nic: not converted to safecopies");
|
|
||||||
#if 0
|
|
||||||
|
|
||||||
/* Computes shared memory address */
|
/* Computes shared memory address */
|
||||||
offset = pageno * DP_PAGESIZE;
|
offset = pageno * DP_PAGESIZE;
|
||||||
|
|
||||||
|
@ -387,7 +387,6 @@ static void ns_reset(dpeth_t * dep)
|
||||||
static void ns_recv(dpeth_t *dep, int fromint, int size)
|
static void ns_recv(dpeth_t *dep, int fromint, int size)
|
||||||
{
|
{
|
||||||
dp_rcvhdr_t header;
|
dp_rcvhdr_t header;
|
||||||
dp_rcvhdr_t dummy;
|
|
||||||
unsigned pageno, curr, next;
|
unsigned pageno, curr, next;
|
||||||
vir_bytes length;
|
vir_bytes length;
|
||||||
int packet_processed = FALSE;
|
int packet_processed = FALSE;
|
||||||
|
|
|
@ -958,7 +958,7 @@ int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep, int request)
|
||||||
* OR if we did NOT exceed the disk size, then we should
|
* OR if we did NOT exceed the disk size, then we should
|
||||||
* report the driver for acting strangely!
|
* report the driver for acting strangely!
|
||||||
*/
|
*/
|
||||||
if (sizes[0] < 0 || sizes[0] > *sizep ||
|
if (sizes[0] > *sizep ||
|
||||||
cmp64(add64u(pos, sizes[0]), disk_size) < 0)
|
cmp64(add64u(pos, sizes[0]), disk_size) < 0)
|
||||||
return bad_driver(DRIVER_MAIN, BD_PROTO, EFAULT);
|
return bad_driver(DRIVER_MAIN, BD_PROTO, EFAULT);
|
||||||
|
|
||||||
|
@ -980,7 +980,7 @@ int read_write(u64_t pos, char *bufa, char *bufb, size_t *sizep, int request)
|
||||||
printf("Filter: truncated reply from backup driver\n");
|
printf("Filter: truncated reply from backup driver\n");
|
||||||
|
|
||||||
/* As above */
|
/* As above */
|
||||||
if (sizes[1] < 0 || sizes[1] > *sizep ||
|
if (sizes[1] > *sizep ||
|
||||||
cmp64(add64u(pos, sizes[1]), disk_size) < 0)
|
cmp64(add64u(pos, sizes[1]), disk_size) < 0)
|
||||||
return bad_driver(DRIVER_BACKUP, BD_PROTO,
|
return bad_driver(DRIVER_BACKUP, BD_PROTO,
|
||||||
EFAULT);
|
EFAULT);
|
||||||
|
|
|
@ -83,11 +83,3 @@ clock_t flt_alarm(clock_t dt)
|
||||||
return next_alarm;
|
return next_alarm;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*===========================================================================*
|
|
||||||
* got_alarm *
|
|
||||||
*===========================================================================*/
|
|
||||||
static void got_alarm(int sig)
|
|
||||||
{
|
|
||||||
/* Do nothing. */
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
|
@ -60,7 +60,7 @@ PRIVATE struct pcitab pcitab_fxp[]=
|
||||||
typedef int irq_hook_t;
|
typedef int irq_hook_t;
|
||||||
|
|
||||||
/* ignore interrupt for the moment */
|
/* ignore interrupt for the moment */
|
||||||
#define interrupt(x) 0
|
#define interrupt(x) do { } while(0)
|
||||||
|
|
||||||
PRIVATE union tmpbuf
|
PRIVATE union tmpbuf
|
||||||
{
|
{
|
||||||
|
@ -421,7 +421,6 @@ message *mp;
|
||||||
static void fxp_pci_conf()
|
static void fxp_pci_conf()
|
||||||
{
|
{
|
||||||
static char envvar[] = FXP_ENVVAR "#";
|
static char envvar[] = FXP_ENVVAR "#";
|
||||||
static char envfmt[] = "*:d.d.d";
|
|
||||||
|
|
||||||
fxp_t *fp;
|
fxp_t *fp;
|
||||||
long v;
|
long v;
|
||||||
|
@ -627,7 +626,6 @@ static int fxp_probe(fxp_t *fp, int skip)
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
static void fxp_conf_hw(fxp_t *fp)
|
static void fxp_conf_hw(fxp_t *fp)
|
||||||
{
|
{
|
||||||
int i;
|
|
||||||
int mwi, ext_stat1, ext_stat2, lim_fifo, i82503, fc;
|
int mwi, ext_stat1, ext_stat2, lim_fifo, i82503, fc;
|
||||||
|
|
||||||
fp->fxp_mode= FM_DISABLED; /* Superfluous */
|
fp->fxp_mode= FM_DISABLED; /* Superfluous */
|
||||||
|
|
|
@ -645,7 +645,7 @@ ec_conf_t *ecp;
|
||||||
static void ec_init(ec)
|
static void ec_init(ec)
|
||||||
ether_card_t *ec;
|
ether_card_t *ec;
|
||||||
{
|
{
|
||||||
int i, r;
|
int r;
|
||||||
|
|
||||||
/* General initialization */
|
/* General initialization */
|
||||||
ec->flags = ECF_EMPTY;
|
ec->flags = ECF_EMPTY;
|
||||||
|
|
|
@ -121,7 +121,6 @@ PRIVATE void sef_local_startup()
|
||||||
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
|
PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
|
||||||
{
|
{
|
||||||
/* Initialize the memory driver. */
|
/* Initialize the memory driver. */
|
||||||
u32_t ramdev_size;
|
|
||||||
int i, s;
|
int i, s;
|
||||||
|
|
||||||
/* Initialize all minor devices one by one. */
|
/* Initialize all minor devices one by one. */
|
||||||
|
@ -381,8 +380,6 @@ PRIVATE int m_do_close(dp, m_ptr)
|
||||||
struct driver *dp;
|
struct driver *dp;
|
||||||
message *m_ptr;
|
message *m_ptr;
|
||||||
{
|
{
|
||||||
int r;
|
|
||||||
|
|
||||||
if (m_prepare(m_ptr->DEVICE) == NULL) return(ENXIO);
|
if (m_prepare(m_ptr->DEVICE) == NULL) return(ENXIO);
|
||||||
|
|
||||||
if(m_device < 0 || m_device >= NR_DEVS) {
|
if(m_device < 0 || m_device >= NR_DEVS) {
|
||||||
|
|
|
@ -477,7 +477,7 @@ int hermes_bap_pread (hermes_t * hw, int bap, void *buf, unsigned len,
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
/* reading (and writing) data goes a word a time, so should be even */
|
/* reading (and writing) data goes a word a time, so should be even */
|
||||||
if ((len < 0) || (len % 2)) {
|
if ((len % 2)) {
|
||||||
printf("Hermes: Error in length to be read\n");
|
printf("Hermes: Error in length to be read\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -522,7 +522,7 @@ int hermes_bap_pwrite (hermes_t * hw, int bap, const void *buf, unsigned len,
|
||||||
int dreg = bap ? HERMES_DATA1 : HERMES_DATA0;
|
int dreg = bap ? HERMES_DATA1 : HERMES_DATA0;
|
||||||
int err = 0;
|
int err = 0;
|
||||||
|
|
||||||
if ((len < 0) || (len % 2)) {
|
if ((len % 2)) {
|
||||||
printf("Hermes: Error in length to be written\n");
|
printf("Hermes: Error in length to be written\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
@ -592,7 +592,7 @@ int hermes_read_ltv (hermes_t * hw, int bap, u16_t rid, unsigned bufsize,
|
||||||
u16_t rlength, rtype;
|
u16_t rlength, rtype;
|
||||||
unsigned nwords;
|
unsigned nwords;
|
||||||
|
|
||||||
if ((bufsize < 0) || (bufsize % 2)) {
|
if ((bufsize % 2)) {
|
||||||
printf("Hermes: error in bufsize\n");
|
printf("Hermes: error in bufsize\n");
|
||||||
return -EINVAL;
|
return -EINVAL;
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,6 +12,7 @@ Created: Jan 2000 by Philip Homburg <philip@cs.vu.nl>
|
||||||
#include <machine/pci.h>
|
#include <machine/pci.h>
|
||||||
#include <machine/vm.h>
|
#include <machine/vm.h>
|
||||||
#include <minix/com.h>
|
#include <minix/com.h>
|
||||||
|
#include <minix/ds.h>
|
||||||
#include <minix/syslib.h>
|
#include <minix/syslib.h>
|
||||||
|
|
||||||
#include "pci.h"
|
#include "pci.h"
|
||||||
|
|
|
@ -152,13 +152,13 @@ rs.single: ../../etc/rs.single
|
||||||
proto.gen: $(PROGRAMS) $(SCRIPTS) $(MAKEDEV) proto.sh proto
|
proto.gen: $(PROGRAMS) $(SCRIPTS) $(MAKEDEV) proto.sh proto
|
||||||
sh -e proto.sh >proto.gen
|
sh -e proto.sh >proto.gen
|
||||||
|
|
||||||
.if ${OBJECT_FMT} == "ELF"
|
#.if ${OBJECT_FMT} == "ELF"
|
||||||
proto.gen: elfstrip
|
#proto.gen: elfstrip
|
||||||
|
#
|
||||||
.PHONY: elfstrip
|
#.PHONY: elfstrip
|
||||||
|
#
|
||||||
elfstrip: $(PROGRAMS)
|
#elfstrip: $(PROGRAMS)
|
||||||
${ELFSTRIP} $(PROGRAMS)
|
# ${ELFSTRIP} $(PROGRAMS)
|
||||||
.endif
|
#.endif
|
||||||
|
|
||||||
.include <bsd.prog.mk>
|
.include <bsd.prog.mk>
|
||||||
|
|
|
@ -461,7 +461,6 @@ int skip;
|
||||||
u16_t vid, did;
|
u16_t vid, did;
|
||||||
u32_t bar;
|
u32_t bar;
|
||||||
u8_t ilr;
|
u8_t ilr;
|
||||||
char *dname;
|
|
||||||
|
|
||||||
if ((rep->re_pcibus | rep->re_pcidev | rep->re_pcifunc) != 0)
|
if ((rep->re_pcibus | rep->re_pcidev | rep->re_pcifunc) != 0)
|
||||||
{
|
{
|
||||||
|
@ -864,7 +863,6 @@ static void rl_readv_s(const message *mp, int from_int)
|
||||||
int i, j, n, o, s, s1, count, size;
|
int i, j, n, o, s, s1, count, size;
|
||||||
port_t port;
|
port_t port;
|
||||||
unsigned amount, totlen, packlen;
|
unsigned amount, totlen, packlen;
|
||||||
phys_bytes dst_phys;
|
|
||||||
u16_t d_start, d_end;
|
u16_t d_start, d_end;
|
||||||
u32_t l, rxstat = 0x12345678;
|
u32_t l, rxstat = 0x12345678;
|
||||||
re_t *rep;
|
re_t *rep;
|
||||||
|
|
|
@ -252,7 +252,6 @@ _PROTOTYPE( static void reply, (re_t *rep) );
|
||||||
_PROTOTYPE( static void mess_reply, (message *req, message *reply) );
|
_PROTOTYPE( static void mess_reply, (message *req, message *reply) );
|
||||||
_PROTOTYPE( static void check_int_events, (void) );
|
_PROTOTYPE( static void check_int_events, (void) );
|
||||||
_PROTOTYPE( static void do_hard_int, (void) );
|
_PROTOTYPE( static void do_hard_int, (void) );
|
||||||
_PROTOTYPE( static void rtl8169_dump, (void) );
|
|
||||||
_PROTOTYPE( static void dump_phy, (const re_t *rep) );
|
_PROTOTYPE( static void dump_phy, (const re_t *rep) );
|
||||||
_PROTOTYPE( static void rl_handler, (re_t *rep) );
|
_PROTOTYPE( static void rl_handler, (re_t *rep) );
|
||||||
_PROTOTYPE( static void rl_watchdog_f, (timer_t *tp) );
|
_PROTOTYPE( static void rl_watchdog_f, (timer_t *tp) );
|
||||||
|
@ -474,6 +473,7 @@ static void rtl8169_update_stat(re_t *rep)
|
||||||
rep->v_dtcc_buf->Tx1Col + rep->v_dtcc_buf->TxMCol;
|
rep->v_dtcc_buf->Tx1Col + rep->v_dtcc_buf->TxMCol;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if 0
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* rtl8169_dump *
|
* rtl8169_dump *
|
||||||
*===========================================================================*/
|
*===========================================================================*/
|
||||||
|
@ -560,6 +560,7 @@ static void rtl8169_dump(void)
|
||||||
printf("tx_head :%8d busy %d\t",
|
printf("tx_head :%8d busy %d\t",
|
||||||
rep->re_tx_head, rep->re_tx[rep->re_tx_head].ret_busy);
|
rep->re_tx_head, rep->re_tx[rep->re_tx_head].ret_busy);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*===========================================================================*
|
/*===========================================================================*
|
||||||
* do_init *
|
* do_init *
|
||||||
|
@ -1003,7 +1004,6 @@ re_t *rep;
|
||||||
port_t port;
|
port_t port;
|
||||||
u32_t t;
|
u32_t t;
|
||||||
int i;
|
int i;
|
||||||
clock_t t0, t1;
|
|
||||||
|
|
||||||
port = rep->re_base_port;
|
port = rep->re_base_port;
|
||||||
|
|
||||||
|
|
|
@ -54,8 +54,6 @@ PRIVATE int debug;
|
||||||
FORWARD _PROTOTYPE( void hw_init, (struct port *pp) );
|
FORWARD _PROTOTYPE( void hw_init, (struct port *pp) );
|
||||||
FORWARD _PROTOTYPE( void map_regs, (struct port *pp, u32_t base) );
|
FORWARD _PROTOTYPE( void map_regs, (struct port *pp, u32_t base) );
|
||||||
FORWARD _PROTOTYPE( void do_int, (struct port *pp) );
|
FORWARD _PROTOTYPE( void do_int, (struct port *pp) );
|
||||||
FORWARD _PROTOTYPE( void do_outb, (port_t port, u8_t value) );
|
|
||||||
FORWARD _PROTOTYPE( u8_t do_inb, (port_t port) );
|
|
||||||
|
|
||||||
/* SEF functions and variables. */
|
/* SEF functions and variables. */
|
||||||
FORWARD _PROTOTYPE( void sef_local_startup, (void) );
|
FORWARD _PROTOTYPE( void sef_local_startup, (void) );
|
||||||
|
@ -185,7 +183,7 @@ PRIVATE int sef_cb_init_fresh(int type, sef_init_info_t *info)
|
||||||
|
|
||||||
PRIVATE void hw_init(struct port *pp)
|
PRIVATE void hw_init(struct port *pp)
|
||||||
{
|
{
|
||||||
int r, devind, irq;
|
int devind;
|
||||||
u8_t v8;
|
u8_t v8;
|
||||||
u16_t v16;
|
u16_t v16;
|
||||||
u32_t v32;
|
u32_t v32;
|
||||||
|
@ -312,7 +310,7 @@ PRIVATE void map_regs(struct port *pp, u32_t base)
|
||||||
|
|
||||||
PRIVATE void do_int(struct port *pp)
|
PRIVATE void do_int(struct port *pp)
|
||||||
{
|
{
|
||||||
int r, devind, vcc_5v, vcc_3v, vcc_Xv, vcc_Yv,
|
int devind, vcc_5v, vcc_3v, vcc_Xv, vcc_Yv,
|
||||||
socket_5v, socket_3v, socket_Xv, socket_Yv;
|
socket_5v, socket_3v, socket_Xv, socket_Yv;
|
||||||
spin_t spin;
|
spin_t spin;
|
||||||
u32_t csr_event, csr_present, csr_control;
|
u32_t csr_event, csr_present, csr_control;
|
||||||
|
@ -492,25 +490,3 @@ PRIVATE void do_int(struct port *pp)
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
PRIVATE u8_t do_inb(port_t port)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
u32_t value;
|
|
||||||
|
|
||||||
r= sys_inb(port, &value);
|
|
||||||
if (r != OK)
|
|
||||||
panic("sys_inb failed: %d", r);
|
|
||||||
return value;
|
|
||||||
}
|
|
||||||
|
|
||||||
PRIVATE void do_outb(port_t port, u8_t value)
|
|
||||||
{
|
|
||||||
int r;
|
|
||||||
|
|
||||||
r= sys_outb(port, value);
|
|
||||||
if (r != OK)
|
|
||||||
panic("sys_outb failed: %d", r);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -108,7 +108,7 @@ PUBLIC int main(int argc, char *argv[])
|
||||||
msg_hardware();
|
msg_hardware();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
dprint("%s: %d uncaught notify!\n",
|
printf("%s: %d uncaught notify!\n",
|
||||||
drv.DriverName, mess.m_type);
|
drv.DriverName, mess.m_type);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -167,7 +167,7 @@ PUBLIC int main(int argc, char *argv[])
|
||||||
send(caller, &repl_mess);
|
send(caller, &repl_mess);
|
||||||
continue;
|
continue;
|
||||||
default:
|
default:
|
||||||
dprint("%s: %d uncaught msg!\n",
|
printf("%s: %d uncaught msg!\n",
|
||||||
drv.DriverName, mess.m_type);
|
drv.DriverName, mess.m_type);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -233,13 +233,13 @@ PRIVATE int init_driver(void) {
|
||||||
|
|
||||||
/* initialize hardware*/
|
/* initialize hardware*/
|
||||||
if (drv_init_hw() != OK) {
|
if (drv_init_hw() != OK) {
|
||||||
error("%s: Could not initialize hardware\n", drv.DriverName);
|
printf("%s: Could not initialize hardware\n", drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* get irq from device driver...*/
|
/* get irq from device driver...*/
|
||||||
if (drv_get_irq(&irq) != OK) {
|
if (drv_get_irq(&irq) != OK) {
|
||||||
error("%s: init driver couldn't get IRQ", drv.DriverName);
|
printf("%s: init driver couldn't get IRQ", drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
/* TODO: execute the rest of this function only once
|
/* TODO: execute the rest of this function only once
|
||||||
|
@ -249,7 +249,7 @@ PRIVATE int init_driver(void) {
|
||||||
|
|
||||||
/* ...and register interrupt vector */
|
/* ...and register interrupt vector */
|
||||||
if ((i=sys_irqsetpolicy(irq, 0, &irq_hook_id )) != OK){
|
if ((i=sys_irqsetpolicy(irq, 0, &irq_hook_id )) != OK){
|
||||||
error("%s: init driver couldn't set IRQ policy: %d", drv.DriverName, i);
|
printf("%s: init driver couldn't set IRQ policy: %d", drv.DriverName, i);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
irq_hook_set = TRUE; /* now signal handler knows it must unregister policy*/
|
irq_hook_set = TRUE; /* now signal handler knows it must unregister policy*/
|
||||||
|
@ -276,15 +276,15 @@ PRIVATE void sef_cb_signal_handler(int signo)
|
||||||
}
|
}
|
||||||
if (irq_hook_set) {
|
if (irq_hook_set) {
|
||||||
if (sys_irqdisable(&irq_hook_id) != OK) {
|
if (sys_irqdisable(&irq_hook_id) != OK) {
|
||||||
error("Could not disable IRQ\n");
|
printf("Could not disable IRQ\n");
|
||||||
}
|
}
|
||||||
/* get irq from device driver*/
|
/* get irq from device driver*/
|
||||||
if (drv_get_irq(&irq) != OK) {
|
if (drv_get_irq(&irq) != OK) {
|
||||||
error("Msg SIG_STOP Couldn't get IRQ");
|
printf("Msg SIG_STOP Couldn't get IRQ");
|
||||||
}
|
}
|
||||||
/* remove the policy */
|
/* remove the policy */
|
||||||
if (sys_irqrmpolicy(&irq_hook_id) != OK) {
|
if (sys_irqrmpolicy(&irq_hook_id) != OK) {
|
||||||
error("%s: Could not disable IRQ\n",drv.DriverName);
|
printf("%s: Could not disable IRQ\n",drv.DriverName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -293,8 +293,6 @@ PRIVATE int msg_open (int minor_dev_nr) {
|
||||||
int r, read_chan, write_chan, io_ctl;
|
int r, read_chan, write_chan, io_ctl;
|
||||||
special_file_t* special_file_ptr;
|
special_file_t* special_file_ptr;
|
||||||
|
|
||||||
dprint("%s: msg_open() special file %d\n", drv.DriverName, minor_dev_nr);
|
|
||||||
|
|
||||||
special_file_ptr = get_special_file(minor_dev_nr);
|
special_file_ptr = get_special_file(minor_dev_nr);
|
||||||
if(special_file_ptr == NULL) {
|
if(special_file_ptr == NULL) {
|
||||||
return EIO;
|
return EIO;
|
||||||
|
@ -305,19 +303,19 @@ PRIVATE int msg_open (int minor_dev_nr) {
|
||||||
io_ctl = special_file_ptr->io_ctl;
|
io_ctl = special_file_ptr->io_ctl;
|
||||||
|
|
||||||
if (read_chan==NO_CHANNEL && write_chan==NO_CHANNEL && io_ctl==NO_CHANNEL) {
|
if (read_chan==NO_CHANNEL && write_chan==NO_CHANNEL && io_ctl==NO_CHANNEL) {
|
||||||
error("%s: No channel specified for minor device %d!\n",
|
printf("%s: No channel specified for minor device %d!\n",
|
||||||
drv.DriverName, minor_dev_nr);
|
drv.DriverName, minor_dev_nr);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
if (read_chan == write_chan && read_chan != NO_CHANNEL) {
|
if (read_chan == write_chan && read_chan != NO_CHANNEL) {
|
||||||
error("%s: Read and write channels are equal: %d!\n",
|
printf("%s: Read and write channels are equal: %d!\n",
|
||||||
drv.DriverName, minor_dev_nr);
|
drv.DriverName, minor_dev_nr);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
/* init driver */
|
/* init driver */
|
||||||
if (!device_available) {
|
if (!device_available) {
|
||||||
if (init_driver() != OK) {
|
if (init_driver() != OK) {
|
||||||
error("%s: Couldn't init driver!\n", drv.DriverName);
|
printf("%s: Couldn't init driver!\n", drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
} else {
|
} else {
|
||||||
device_available = TRUE;
|
device_available = TRUE;
|
||||||
|
@ -349,12 +347,12 @@ PRIVATE int open_sub_dev(int sub_dev_nr, int dma_mode) {
|
||||||
|
|
||||||
/* Only one open at a time per sub device */
|
/* Only one open at a time per sub device */
|
||||||
if (sub_dev_ptr->Opened) {
|
if (sub_dev_ptr->Opened) {
|
||||||
error("%s: Sub device %d is already opened\n",
|
printf("%s: Sub device %d is already opened\n",
|
||||||
drv.DriverName, sub_dev_nr);
|
drv.DriverName, sub_dev_nr);
|
||||||
return EBUSY;
|
return EBUSY;
|
||||||
}
|
}
|
||||||
if (sub_dev_ptr->DmaBusy) {
|
if (sub_dev_ptr->DmaBusy) {
|
||||||
error("%s: Sub device %d is still busy\n", drv.DriverName, sub_dev_nr);
|
printf("%s: Sub device %d is still busy\n", drv.DriverName, sub_dev_nr);
|
||||||
return EBUSY;
|
return EBUSY;
|
||||||
}
|
}
|
||||||
/* Setup variables */
|
/* Setup variables */
|
||||||
|
@ -384,8 +382,6 @@ PRIVATE int msg_close(int minor_dev_nr) {
|
||||||
int r, read_chan, write_chan, io_ctl;
|
int r, read_chan, write_chan, io_ctl;
|
||||||
special_file_t* special_file_ptr;
|
special_file_t* special_file_ptr;
|
||||||
|
|
||||||
dprint("%s: msg_close() minor device %d\n", drv.DriverName, minor_dev_nr);
|
|
||||||
|
|
||||||
special_file_ptr = get_special_file(minor_dev_nr);
|
special_file_ptr = get_special_file(minor_dev_nr);
|
||||||
if(special_file_ptr == NULL) {
|
if(special_file_ptr == NULL) {
|
||||||
return EIO;
|
return EIO;
|
||||||
|
@ -446,8 +442,6 @@ PRIVATE int msg_ioctl(const message *m_ptr)
|
||||||
sub_dev_t *sub_dev_ptr;
|
sub_dev_t *sub_dev_ptr;
|
||||||
special_file_t* special_file_ptr;
|
special_file_t* special_file_ptr;
|
||||||
|
|
||||||
dprint("%s: msg_ioctl() device %d\n", drv.DriverName, m_ptr->DEVICE);
|
|
||||||
|
|
||||||
special_file_ptr = get_special_file(m_ptr->DEVICE);
|
special_file_ptr = get_special_file(m_ptr->DEVICE);
|
||||||
if(special_file_ptr == NULL) {
|
if(special_file_ptr == NULL) {
|
||||||
return EIO;
|
return EIO;
|
||||||
|
@ -456,14 +450,14 @@ PRIVATE int msg_ioctl(const message *m_ptr)
|
||||||
chan = special_file_ptr->io_ctl;
|
chan = special_file_ptr->io_ctl;
|
||||||
|
|
||||||
if (chan == NO_CHANNEL) {
|
if (chan == NO_CHANNEL) {
|
||||||
error("%s: No io control channel specified!\n", drv.DriverName);
|
printf("%s: No io control channel specified!\n", drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
/* get pointer to sub device data */
|
/* get pointer to sub device data */
|
||||||
sub_dev_ptr = &sub_dev[chan];
|
sub_dev_ptr = &sub_dev[chan];
|
||||||
|
|
||||||
if(!sub_dev_ptr->Opened) {
|
if(!sub_dev_ptr->Opened) {
|
||||||
error("%s: io control impossible - not opened!\n", drv.DriverName);
|
printf("%s: io control impossible - not opened!\n", drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -508,13 +502,11 @@ PRIVATE void msg_write(const message *m_ptr)
|
||||||
int chan; sub_dev_t *sub_dev_ptr;
|
int chan; sub_dev_t *sub_dev_ptr;
|
||||||
special_file_t* special_file_ptr;
|
special_file_t* special_file_ptr;
|
||||||
|
|
||||||
dprint("%s: msg_write() device %d\n", drv.DriverName, m_ptr->DEVICE);
|
|
||||||
|
|
||||||
special_file_ptr = get_special_file(m_ptr->DEVICE);
|
special_file_ptr = get_special_file(m_ptr->DEVICE);
|
||||||
chan = special_file_ptr->write_chan;
|
chan = special_file_ptr->write_chan;
|
||||||
|
|
||||||
if (chan == NO_CHANNEL) {
|
if (chan == NO_CHANNEL) {
|
||||||
error("%s: No write channel specified!\n", drv.DriverName);
|
printf("%s: No write channel specified!\n", drv.DriverName);
|
||||||
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EIO);
|
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EIO);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -523,18 +515,18 @@ PRIVATE void msg_write(const message *m_ptr)
|
||||||
|
|
||||||
if (!sub_dev_ptr->DmaBusy) { /* get fragment size on first write */
|
if (!sub_dev_ptr->DmaBusy) { /* get fragment size on first write */
|
||||||
if (drv_get_frag_size(&(sub_dev_ptr->FragSize), sub_dev_ptr->Nr) != OK){
|
if (drv_get_frag_size(&(sub_dev_ptr->FragSize), sub_dev_ptr->Nr) != OK){
|
||||||
error("%s; Failed to get fragment size!\n", drv.DriverName);
|
printf("%s; Failed to get fragment size!\n", drv.DriverName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(m_ptr->COUNT != sub_dev_ptr->FragSize) {
|
if(m_ptr->COUNT != sub_dev_ptr->FragSize) {
|
||||||
error("Fragment size does not match user's buffer length\n");
|
printf("Fragment size does not match user's buffer length\n");
|
||||||
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EINVAL);
|
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EINVAL);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* if we are busy with something else than writing, return EBUSY */
|
/* if we are busy with something else than writing, return EBUSY */
|
||||||
if(sub_dev_ptr->DmaBusy && sub_dev_ptr->DmaMode != DEV_WRITE_S) {
|
if(sub_dev_ptr->DmaBusy && sub_dev_ptr->DmaMode != DEV_WRITE_S) {
|
||||||
error("Already busy with something else then writing\n");
|
printf("Already busy with something else then writing\n");
|
||||||
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EBUSY);
|
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EBUSY);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -547,7 +539,6 @@ PRIVATE void msg_write(const message *m_ptr)
|
||||||
data_from_user(sub_dev_ptr);
|
data_from_user(sub_dev_ptr);
|
||||||
|
|
||||||
if(!sub_dev_ptr->DmaBusy) { /* Dma tranfer not yet started */
|
if(!sub_dev_ptr->DmaBusy) { /* Dma tranfer not yet started */
|
||||||
dprint("starting audio device\n");
|
|
||||||
get_started(sub_dev_ptr);
|
get_started(sub_dev_ptr);
|
||||||
sub_dev_ptr->DmaMode = DEV_WRITE_S; /* Dma mode is writing */
|
sub_dev_ptr->DmaMode = DEV_WRITE_S; /* Dma mode is writing */
|
||||||
}
|
}
|
||||||
|
@ -559,13 +550,11 @@ PRIVATE void msg_read(message *m_ptr)
|
||||||
int chan; sub_dev_t *sub_dev_ptr;
|
int chan; sub_dev_t *sub_dev_ptr;
|
||||||
special_file_t* special_file_ptr;
|
special_file_t* special_file_ptr;
|
||||||
|
|
||||||
dprint("%s: msg_read() device %d\n", drv.DriverName, m_ptr->DEVICE);
|
|
||||||
|
|
||||||
special_file_ptr = get_special_file(m_ptr->DEVICE);
|
special_file_ptr = get_special_file(m_ptr->DEVICE);
|
||||||
chan = special_file_ptr->read_chan;
|
chan = special_file_ptr->read_chan;
|
||||||
|
|
||||||
if (chan == NO_CHANNEL) {
|
if (chan == NO_CHANNEL) {
|
||||||
error("%s: No read channel specified!\n", drv.DriverName);
|
printf("%s: No read channel specified!\n", drv.DriverName);
|
||||||
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EIO);
|
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EIO);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -574,7 +563,7 @@ PRIVATE void msg_read(message *m_ptr)
|
||||||
|
|
||||||
if (!sub_dev_ptr->DmaBusy) { /* get fragment size on first read */
|
if (!sub_dev_ptr->DmaBusy) { /* get fragment size on first read */
|
||||||
if (drv_get_frag_size(&(sub_dev_ptr->FragSize), sub_dev_ptr->Nr) != OK){
|
if (drv_get_frag_size(&(sub_dev_ptr->FragSize), sub_dev_ptr->Nr) != OK){
|
||||||
error("%s: Could not retrieve fragment size!\n", drv.DriverName);
|
printf("%s: Could not retrieve fragment size!\n", drv.DriverName);
|
||||||
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT,
|
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT,
|
||||||
EIO);
|
EIO);
|
||||||
return;
|
return;
|
||||||
|
@ -582,7 +571,7 @@ PRIVATE void msg_read(message *m_ptr)
|
||||||
}
|
}
|
||||||
if(m_ptr->COUNT != sub_dev_ptr->FragSize) {
|
if(m_ptr->COUNT != sub_dev_ptr->FragSize) {
|
||||||
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EINVAL);
|
reply(DEV_REVIVE, m_ptr->m_source, m_ptr->USER_ENDPT, EINVAL);
|
||||||
error("fragment size does not match message size\n");
|
printf("fragment size does not match message size\n");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
/* if we are busy with something else than reading, reply EBUSY */
|
/* if we are busy with something else than reading, reply EBUSY */
|
||||||
|
@ -610,8 +599,6 @@ PRIVATE void msg_hardware(void) {
|
||||||
|
|
||||||
u32_t i;
|
u32_t i;
|
||||||
|
|
||||||
dprint("%s: handling hardware message\n", drv.DriverName);
|
|
||||||
|
|
||||||
/* while we have an interrupt */
|
/* while we have an interrupt */
|
||||||
while ( drv_int_sum()) {
|
while ( drv_int_sum()) {
|
||||||
/* loop over all sub devices */
|
/* loop over all sub devices */
|
||||||
|
@ -629,7 +616,7 @@ PRIVATE void msg_hardware(void) {
|
||||||
* re-enable out interrupt after every interrupt.
|
* re-enable out interrupt after every interrupt.
|
||||||
*/
|
*/
|
||||||
if ((sys_irqenable(&irq_hook_id)) != OK) {
|
if ((sys_irqenable(&irq_hook_id)) != OK) {
|
||||||
error("%s: msg_hardware: Couldn't enable IRQ\n", drv.DriverName);
|
printf("%s: msg_hardware: Couldn't enable IRQ\n", drv.DriverName);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -638,7 +625,6 @@ PRIVATE void msg_status(message *m_ptr)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
dprint("got a status message\n");
|
|
||||||
for (i = 0; i < drv.NrOfSubDevices; i++) {
|
for (i = 0; i < drv.NrOfSubDevices; i++) {
|
||||||
|
|
||||||
if(sub_dev[i].ReadyToRevive)
|
if(sub_dev[i].ReadyToRevive)
|
||||||
|
@ -671,15 +657,12 @@ PRIVATE void handle_int_write(int sub_dev_nr)
|
||||||
|
|
||||||
sub_dev_ptr = &sub_dev[sub_dev_nr];
|
sub_dev_ptr = &sub_dev[sub_dev_nr];
|
||||||
|
|
||||||
dprint("Finished playing dma[%d] ", sub_dev_ptr->DmaReadNext);
|
|
||||||
sub_dev_ptr->DmaReadNext =
|
sub_dev_ptr->DmaReadNext =
|
||||||
(sub_dev_ptr->DmaReadNext + 1) % sub_dev_ptr->NrOfDmaFragments;
|
(sub_dev_ptr->DmaReadNext + 1) % sub_dev_ptr->NrOfDmaFragments;
|
||||||
sub_dev_ptr->DmaLength -= 1;
|
sub_dev_ptr->DmaLength -= 1;
|
||||||
|
|
||||||
if (sub_dev_ptr->BufLength != 0) { /* Data in extra buf, copy to Dma buf */
|
if (sub_dev_ptr->BufLength != 0) { /* Data in extra buf, copy to Dma buf */
|
||||||
|
|
||||||
dprint(" buf[%d] -> dma[%d] ",
|
|
||||||
sub_dev_ptr->BufReadNext, sub_dev_ptr->DmaFillNext);
|
|
||||||
memcpy(sub_dev_ptr->DmaPtr +
|
memcpy(sub_dev_ptr->DmaPtr +
|
||||||
sub_dev_ptr->DmaFillNext * sub_dev_ptr->FragSize,
|
sub_dev_ptr->DmaFillNext * sub_dev_ptr->FragSize,
|
||||||
sub_dev_ptr->ExtraBuf +
|
sub_dev_ptr->ExtraBuf +
|
||||||
|
@ -701,25 +684,20 @@ PRIVATE void handle_int_write(int sub_dev_nr)
|
||||||
if(sub_dev_ptr->DmaLength == 0) { /* Dma buffer empty, stop Dma transfer */
|
if(sub_dev_ptr->DmaLength == 0) { /* Dma buffer empty, stop Dma transfer */
|
||||||
|
|
||||||
sub_dev_ptr->OutOfData = TRUE; /* we're out of data */
|
sub_dev_ptr->OutOfData = TRUE; /* we're out of data */
|
||||||
dprint("No more work...!\n");
|
|
||||||
if (!sub_dev_ptr->Opened) {
|
if (!sub_dev_ptr->Opened) {
|
||||||
close_sub_dev(sub_dev_ptr->Nr);
|
close_sub_dev(sub_dev_ptr->Nr);
|
||||||
dprint("Stopping sub device %d\n", sub_dev_ptr->Nr);
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
dprint("Pausing sub device %d\n",sub_dev_ptr->Nr);
|
|
||||||
drv_pause(sub_dev_ptr->Nr);
|
drv_pause(sub_dev_ptr->Nr);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
dprint("\n");
|
|
||||||
|
|
||||||
/* confirm and reenable interrupt from this sub dev */
|
/* confirm and reenable interrupt from this sub dev */
|
||||||
drv_reenable_int(sub_dev_nr);
|
drv_reenable_int(sub_dev_nr);
|
||||||
#if 0
|
#if 0
|
||||||
/* reenable irq_hook*/
|
/* reenable irq_hook*/
|
||||||
if (sys_irqenable(&irq_hook_id != OK) {
|
if (sys_irqenable(&irq_hook_id != OK) {
|
||||||
error("%s Couldn't enable IRQ\n", drv.DriverName);
|
printf("%s Couldn't enable IRQ\n", drv.DriverName);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -732,7 +710,6 @@ PRIVATE void handle_int_read(int sub_dev_nr)
|
||||||
|
|
||||||
sub_dev_ptr = &sub_dev[sub_dev_nr];
|
sub_dev_ptr = &sub_dev[sub_dev_nr];
|
||||||
|
|
||||||
dprint("Device filled dma[%d]\n", sub_dev_ptr->DmaFillNext);
|
|
||||||
sub_dev_ptr->DmaLength += 1;
|
sub_dev_ptr->DmaLength += 1;
|
||||||
sub_dev_ptr->DmaFillNext =
|
sub_dev_ptr->DmaFillNext =
|
||||||
(sub_dev_ptr->DmaFillNext + 1) % sub_dev_ptr->NrOfDmaFragments;
|
(sub_dev_ptr->DmaFillNext + 1) % sub_dev_ptr->NrOfDmaFragments;
|
||||||
|
@ -744,7 +721,7 @@ PRIVATE void handle_int_read(int sub_dev_nr)
|
||||||
/* if dma buffer full */
|
/* if dma buffer full */
|
||||||
|
|
||||||
if (sub_dev_ptr->BufLength == sub_dev_ptr->NrOfExtraBuffers) {
|
if (sub_dev_ptr->BufLength == sub_dev_ptr->NrOfExtraBuffers) {
|
||||||
error("All buffers full, we have a problem.\n");
|
printf("All buffers full, we have a problem.\n");
|
||||||
drv_stop(sub_dev_nr); /* stop the sub device */
|
drv_stop(sub_dev_nr); /* stop the sub device */
|
||||||
sub_dev_ptr->DmaBusy = FALSE;
|
sub_dev_ptr->DmaBusy = FALSE;
|
||||||
sub_dev_ptr->ReviveStatus = 0; /* no data for user,
|
sub_dev_ptr->ReviveStatus = 0; /* no data for user,
|
||||||
|
@ -754,8 +731,6 @@ PRIVATE void handle_int_read(int sub_dev_nr)
|
||||||
}
|
}
|
||||||
else { /* dma full, still room in extra buf;
|
else { /* dma full, still room in extra buf;
|
||||||
copy from dma to extra buf */
|
copy from dma to extra buf */
|
||||||
dprint("dma full: going to copy buf[%d] <- dma[%d]\n",
|
|
||||||
sub_dev_ptr->BufFillNext, sub_dev_ptr->DmaReadNext);
|
|
||||||
memcpy(sub_dev_ptr->ExtraBuf +
|
memcpy(sub_dev_ptr->ExtraBuf +
|
||||||
sub_dev_ptr->BufFillNext * sub_dev_ptr->FragSize,
|
sub_dev_ptr->BufFillNext * sub_dev_ptr->FragSize,
|
||||||
sub_dev_ptr->DmaPtr +
|
sub_dev_ptr->DmaPtr +
|
||||||
|
@ -774,7 +749,7 @@ PRIVATE void handle_int_read(int sub_dev_nr)
|
||||||
#if 0
|
#if 0
|
||||||
/* reenable irq_hook*/
|
/* reenable irq_hook*/
|
||||||
if (sys_irqenable(&irq_hook_id) != OK) {
|
if (sys_irqenable(&irq_hook_id) != OK) {
|
||||||
error("%s: Couldn't reenable IRQ", drv.DriverName);
|
printf("%s: Couldn't reenable IRQ", drv.DriverName);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -785,12 +760,12 @@ PRIVATE int get_started(sub_dev_t *sub_dev_ptr) {
|
||||||
|
|
||||||
/* enable interrupt messages from MINIX */
|
/* enable interrupt messages from MINIX */
|
||||||
if ((i=sys_irqenable(&irq_hook_id)) != OK) {
|
if ((i=sys_irqenable(&irq_hook_id)) != OK) {
|
||||||
error("%s: Couldn't enable IRQs: error code %u",drv.DriverName, (unsigned int) i);
|
printf("%s: Couldn't enable IRQs: error code %u",drv.DriverName, (unsigned int) i);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
/* let the lower part of the driver start the device */
|
/* let the lower part of the driver start the device */
|
||||||
if (drv_start(sub_dev_ptr->Nr, sub_dev_ptr->DmaMode) != OK) {
|
if (drv_start(sub_dev_ptr->Nr, sub_dev_ptr->DmaMode) != OK) {
|
||||||
error("%s: Could not start device %d\n",
|
printf("%s: Could not start device %d\n",
|
||||||
drv.DriverName, sub_dev_ptr->Nr);
|
drv.DriverName, sub_dev_ptr->Nr);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -822,7 +797,6 @@ PRIVATE void data_from_user(sub_dev_t *subdev)
|
||||||
(phys_bytes)subdev->FragSize, D);
|
(phys_bytes)subdev->FragSize, D);
|
||||||
|
|
||||||
|
|
||||||
dprint(" user -> dma[%d]\n", subdev->DmaFillNext);
|
|
||||||
subdev->DmaLength += 1;
|
subdev->DmaLength += 1;
|
||||||
subdev->DmaFillNext =
|
subdev->DmaFillNext =
|
||||||
(subdev->DmaFillNext + 1) % subdev->NrOfDmaFragments;
|
(subdev->DmaFillNext + 1) % subdev->NrOfDmaFragments;
|
||||||
|
@ -835,7 +809,6 @@ PRIVATE void data_from_user(sub_dev_t *subdev)
|
||||||
subdev->BufFillNext * subdev->FragSize,
|
subdev->BufFillNext * subdev->FragSize,
|
||||||
(phys_bytes)subdev->FragSize, D);
|
(phys_bytes)subdev->FragSize, D);
|
||||||
|
|
||||||
dprint(" user -> buf[%d]\n", subdev->BufFillNext);
|
|
||||||
subdev->BufLength += 1;
|
subdev->BufLength += 1;
|
||||||
|
|
||||||
subdev->BufFillNext =
|
subdev->BufFillNext =
|
||||||
|
@ -847,7 +820,7 @@ PRIVATE void data_from_user(sub_dev_t *subdev)
|
||||||
drv_reenable_int(subdev->Nr);
|
drv_reenable_int(subdev->Nr);
|
||||||
/* reenable irq_hook*/
|
/* reenable irq_hook*/
|
||||||
if ((sys_irqenable(&irq_hook_id)) != OK) {
|
if ((sys_irqenable(&irq_hook_id)) != OK) {
|
||||||
error("%s: Couldn't enable IRQ", drv.DriverName);
|
printf("%s: Couldn't enable IRQ", drv.DriverName);
|
||||||
}
|
}
|
||||||
drv_resume(subdev->Nr); /* resume resume the sub device */
|
drv_resume(subdev->Nr); /* resume resume the sub device */
|
||||||
}
|
}
|
||||||
|
@ -890,8 +863,6 @@ PRIVATE void data_to_user(sub_dev_t *sub_dev_ptr)
|
||||||
sub_dev_ptr->BufReadNext * sub_dev_ptr->FragSize,
|
sub_dev_ptr->BufReadNext * sub_dev_ptr->FragSize,
|
||||||
(phys_bytes)sub_dev_ptr->FragSize, D);
|
(phys_bytes)sub_dev_ptr->FragSize, D);
|
||||||
|
|
||||||
dprint(" copied buf[%d] to user\n", sub_dev_ptr->BufReadNext);
|
|
||||||
|
|
||||||
/* adjust the buffer status variables */
|
/* adjust the buffer status variables */
|
||||||
sub_dev_ptr->BufReadNext =
|
sub_dev_ptr->BufReadNext =
|
||||||
(sub_dev_ptr->BufReadNext + 1) % sub_dev_ptr->NrOfExtraBuffers;
|
(sub_dev_ptr->BufReadNext + 1) % sub_dev_ptr->NrOfExtraBuffers;
|
||||||
|
@ -905,8 +876,6 @@ PRIVATE void data_to_user(sub_dev_t *sub_dev_ptr)
|
||||||
sub_dev_ptr->DmaReadNext * sub_dev_ptr->FragSize,
|
sub_dev_ptr->DmaReadNext * sub_dev_ptr->FragSize,
|
||||||
(phys_bytes)sub_dev_ptr->FragSize, D);
|
(phys_bytes)sub_dev_ptr->FragSize, D);
|
||||||
|
|
||||||
dprint(" copied dma[%d] to user\n", sub_dev_ptr->DmaReadNext);
|
|
||||||
|
|
||||||
/* adjust the buffer status variables */
|
/* adjust the buffer status variables */
|
||||||
sub_dev_ptr->DmaReadNext =
|
sub_dev_ptr->DmaReadNext =
|
||||||
(sub_dev_ptr->DmaReadNext + 1) % sub_dev_ptr->NrOfDmaFragments;
|
(sub_dev_ptr->DmaReadNext + 1) % sub_dev_ptr->NrOfDmaFragments;
|
||||||
|
@ -946,7 +915,7 @@ PRIVATE int init_buffers(sub_dev_t *sub_dev_ptr)
|
||||||
size= sub_dev_ptr->DmaSize + 64 * 1024;
|
size= sub_dev_ptr->DmaSize + 64 * 1024;
|
||||||
base= alloc_contig(size, AC_ALIGN4K, &ph);
|
base= alloc_contig(size, AC_ALIGN4K, &ph);
|
||||||
if (!base) {
|
if (!base) {
|
||||||
error("%s: failed to allocate dma buffer for a channel\n",
|
printf("%s: failed to allocate dma buffer for a channel\n",
|
||||||
drv.DriverName);
|
drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
|
@ -958,7 +927,7 @@ PRIVATE int init_buffers(sub_dev_t *sub_dev_ptr)
|
||||||
if (!(sub_dev_ptr->ExtraBuf = malloc(sub_dev_ptr->NrOfExtraBuffers *
|
if (!(sub_dev_ptr->ExtraBuf = malloc(sub_dev_ptr->NrOfExtraBuffers *
|
||||||
sub_dev_ptr->DmaSize /
|
sub_dev_ptr->DmaSize /
|
||||||
sub_dev_ptr->NrOfDmaFragments))) {
|
sub_dev_ptr->NrOfDmaFragments))) {
|
||||||
error("%s failed to allocate extra buffer for a channel\n",
|
printf("%s failed to allocate extra buffer for a channel\n",
|
||||||
drv.DriverName);
|
drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
}
|
}
|
||||||
|
@ -986,7 +955,7 @@ PRIVATE int init_buffers(sub_dev_t *sub_dev_ptr)
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
#else /* CHIP != INTEL */
|
#else /* CHIP != INTEL */
|
||||||
error("%s: init_buffers() failed, CHIP != INTEL", drv.DriverName);
|
printf("%s: init_buffers() failed, CHIP != INTEL", drv.DriverName);
|
||||||
return EIO;
|
return EIO;
|
||||||
#endif /* CHIP == INTEL */
|
#endif /* CHIP == INTEL */
|
||||||
}
|
}
|
||||||
|
@ -1017,7 +986,7 @@ PRIVATE special_file_t* get_special_file(int minor_dev_nr) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
error("%s: No subdevice specified for minor device %d!\n",
|
printf("%s: No subdevice specified for minor device %d!\n",
|
||||||
drv.DriverName, minor_dev_nr);
|
drv.DriverName, minor_dev_nr);
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
Loading…
Reference in a new issue