Commit 82e6a99c authored by Linus Torvalds's avatar Linus Torvalds

Merge http://gkernel.bkbits.net/misc-2.5

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 24a17a26 14003981
......@@ -24,6 +24,8 @@ HiCOMX (2x2Mbps intelligent board)
LoCOMX (1x512 kbps passive board)
MixCOM (1x512 or 2x512kbps passive board with a hardware watchdog an
optional BRI interface and optional flashROM (1-32M))
SliceCOM (1x2Mbps channelized E1 board)
PciCOM (X21)
At the moment of writing this document, the (Cisco)-HDLC, LAPB, SyncPPP and
Frame Relay (DTE, rfc1294 IP encapsulation with partially implemented Q933a
......@@ -72,7 +74,7 @@ EXAMPLE
To create the interface 'comx0' which is the first channel of a COMX card:
insmod comx
# insmod comx-hw-comx ; insmod comx-proto-hdlc (these are usually
# insmod comx-hw-comx ; insmod comx-proto-ppp (these are usually
autoloaded if you use the kernel module loader)
mkdir /proc/comx/comx0
......@@ -141,47 +143,45 @@ THE MIXCOM DRIVER
The MixCOM board doesn't require firmware, the driver communicates with
it through I/O ports. You can have three of these cards in one machine.
THE HDLC LINE PROTOCOL DRIVER
THE SLICECOM DRIVER
There's only one configurable parameter with this protocol: the 'keepalive'
value. You can set this in seconds or set to 'off'. Agree with the administrator
of your peer router on this setting. The default is 10 (seconds).
The SliceCOM board doesn't require firmware. You can have 4 of these cards
in one machine. The driver doesn't (yet) support shared interrupts, so
you will need a separate IRQ line for every board.
Read linux/Documentation/networking/slicecom.txt for help on configuring
this adapter.
EXAMPLE
THE HDLC/PPP LINE PROTOCOL DRIVER
(setting up hw parameters, see above)
echo hdlc >/proc/comx/comx0/protocol
echo 10 >/proc/comx/comx0/keepalive <- not necessary, 10 is the default
ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255
The HDLC/SyncPPP line protocol driver uses the kernel's built-in syncppp
driver (syncppp.o). You don't have to manually select syncppp.o when building
the kernel, the dependencies compile it in automatically.
THE PPP LINE PROTOCOL DRIVER
To use this driver, you have to have ppp-2.3.4, and have a modified version of
pppd (this pppd will work as async pppd to, the modifiactions merely relax
some restricions in order to be able to use non-async lines too.
If configured, this driver can use Van Jacobson TCP header compression (you'll
need the slhc.o module for this).
Additionally to use this protocol, enable async ppp in your kernel config, and
create the comx device special files in /dev. They're character special files
with major 88, and their names must be the same as their network interface
counterparts (i.e /dev/comx0 with minor 0 corresponds interface comx0 and so
on).
EXAMPLE
(setting up hw parameters, see above)
# using HDLC:
echo hdlc >/proc/comx/comx0/protocol
echo 10 >/proc/comx/comx0/keepalive <- not necessary, 10 is the default
ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255
(setting up hw parameters, see above)
# using PPP:
echo ppp >/proc/comx/comx0/protocol
ifconfig comx0 up
pppd comx0 1.2.3.4:5.6.7.8 persist <- with this option pppd won't exit
when the line goes down
ifconfig comx0 1.2.3.4 pointopoint 5.6.7.8 netmask 255.255.255.255
THE LAPB LINE PROTOCOL DRIVER
For this, you'll need to configure LAPB support (See 'LAPB Data Link Driver' in
'Network options' section) into your kernel (thanks to Jonathan Naylor for his
excellent implementation).
comxlapb.o provides the following files in the appropriate directory
comx-proto-lapb.o provides the following files in the appropriate directory
(the default values in parens): t1 (5), t2 (1), n2 (20), mode (DTE, STD) and
window (7). Agree with the administrator of your peer router on these
settings (most people use defaults, but you have to know if you are DTE or
......@@ -221,7 +221,7 @@ FURTHER /proc FILES
boardtype:
Type of the hardware. Valid values are:
'comx', 'hicomx', 'locomx', 'cmx'.
'comx', 'hicomx', 'locomx', 'cmx', 'slicecom'.
protocol:
Data-link protocol on this channel. Can be: HDLC, LAPB, PPP, FRAD
......
This diff is collapsed.
This diff is collapsed.
......@@ -548,7 +548,7 @@ int pci_controller_num(struct pci_dev *pdev)
return ret;
}
int pcibios_set_mwi(struct pci_dev *dev)
int pcibios_prep_mwi(struct pci_dev *dev)
{
/* We set correct PCI_CACHE_LINE_SIZE register values for every
* device probed on this platform. So there is nothing to check
......
......@@ -227,7 +227,7 @@ static inline int rocket_paranoia_check(struct r_port *info,
if (!info)
return 1;
if (info->magic != RPORT_MAGIC) {
printk(badmagic, MAJOR(device), MINOR(device), routine);
printk(badmagic, major(device), minor(device), routine);
return 1;
}
#endif
......@@ -896,7 +896,7 @@ static int rp_open(struct tty_struct *tty, struct file * filp)
CHANNEL_t *cp;
unsigned long page;
line = MINOR(tty->device) - tty->driver.minor_start;
line = minor(tty->device) - tty->driver.minor_start;
if ((line < 0) || (line >= MAX_RP_PORTS))
return -ENODEV;
if (!tmp_buf) {
......
......@@ -2402,16 +2402,23 @@ static inline int stl_initeio(stlbrd_t *brdp)
brdp->ioctrl);
}
if (check_region(brdp->ioaddr1, brdp->iosize1)) {
printk("STALLION: Warning, board %d I/O address %x conflicts "
"with another device\n", brdp->brdnr, brdp->ioaddr1);
}
if (brdp->iosize2 > 0) {
if (check_region(brdp->ioaddr2, brdp->iosize2)) {
printk("STALLION: Warning, board %d I/O address %x "
"conflicts with another device\n",
brdp->brdnr, brdp->ioaddr2);
if (!request_region(brdp->ioaddr1, brdp->iosize1, name)) {
printk(KERN_WARNING "STALLION: Warning, board %d I/O address "
"%x conflicts with another device\n", brdp->brdnr,
brdp->ioaddr1);
return(-EBUSY);
}
if (brdp->iosize2 > 0)
if (!request_region(brdp->ioaddr2, brdp->iosize2, name)) {
printk(KERN_WARNING "STALLION: Warning, board %d I/O "
"address %x conflicts with another device\n",
brdp->brdnr, brdp->ioaddr2);
printk(KERN_WARNING "STALLION: Warning, also "
"releasing board %d I/O address %x \n",
brdp->brdnr, brdp->ioaddr1);
release_region(brdp->ioaddr1, brdp->iosize1);
return(-EBUSY);
}
/*
......@@ -2454,14 +2461,11 @@ static inline int stl_initeio(stlbrd_t *brdp)
* We have verfied that the board is actually present, so now we
* can complete the setup.
*/
request_region(brdp->ioaddr1, brdp->iosize1, name);
if (brdp->iosize2 > 0)
request_region(brdp->ioaddr2, brdp->iosize2, name);
panelp = (stlpanel_t *) stl_memalloc(sizeof(stlpanel_t));
if (panelp == (stlpanel_t *) NULL) {
printk("STALLION: failed to allocate memory (size=%d)\n",
sizeof(stlpanel_t));
printk(KERN_WARNING "STALLION: failed to allocate memory "
"(size=%d)\n", sizeof(stlpanel_t));
return(-ENOMEM);
}
memset(panelp, 0, sizeof(stlpanel_t));
......@@ -2585,22 +2589,27 @@ static int inline stl_initech(stlbrd_t *brdp)
}
/*
* Check boards for possible IO address conflicts. We won't actually
* do anything about it here, just issue a warning...
* Check boards for possible IO address conflicts and return fail status
* if an IO conflict found.
*/
conflict = check_region(brdp->ioaddr1, brdp->iosize1) ?
brdp->ioaddr1 : 0;
if ((conflict == 0) && (brdp->iosize2 > 0))
conflict = check_region(brdp->ioaddr2, brdp->iosize2) ?
brdp->ioaddr2 : 0;
if (conflict) {
printk("STALLION: Warning, board %d I/O address %x conflicts "
"with another device\n", brdp->brdnr, conflict);
if (!request_region(brdp->ioaddr1, brdp->iosize1, name)) {
printk(KERN_WARNING "STALLION: Warning, board %d I/O address "
"%x conflicts with another device\n", brdp->brdnr,
brdp->ioaddr1);
return(-EBUSY);
}
request_region(brdp->ioaddr1, brdp->iosize1, name);
if (brdp->iosize2 > 0)
request_region(brdp->ioaddr2, brdp->iosize2, name);
if (!request_region(brdp->ioaddr2, brdp->iosize2, name)) {
printk(KERN_WARNING "STALLION: Warning, board %d I/O "
"address %x conflicts with another device\n",
brdp->brdnr, brdp->ioaddr2);
printk(KERN_WARNING "STALLION: Warning, also "
"releasing board %d I/O address %x \n",
brdp->brdnr, brdp->ioaddr1);
release_region(brdp->ioaddr1, brdp->iosize1);
return(-EBUSY);
}
/*
* Scan through the secondary io address space looking for panels.
......
......@@ -24,6 +24,7 @@ if [ "$CONFIG_WAN" = "y" ]; then
dep_tristate ' Support for COMX/CMX/HiCOMX boards' CONFIG_COMX_HW_COMX $CONFIG_COMX
dep_tristate ' Support for LoCOMX board' CONFIG_COMX_HW_LOCOMX $CONFIG_COMX
dep_tristate ' Support for MixCOM board' CONFIG_COMX_HW_MIXCOM $CONFIG_COMX
dep_tristate ' Support for MUNICH based boards: SliceCOM, PCICOM (WelCOM)' CONFIG_COMX_HW_MUNICH $CONFIG_COMX
dep_tristate ' Support for HDLC and syncPPP protocols on MultiGate boards' CONFIG_COMX_PROTO_PPP $CONFIG_COMX
if [ "$CONFIG_LAPB" = "y" ]; then
dep_tristate ' Support for LAPB protocol on MultiGate boards' CONFIG_COMX_PROTO_LAPB $CONFIG_COMX
......
......@@ -34,6 +34,7 @@ obj-$(CONFIG_COMX) += comx.o
obj-$(CONFIG_COMX_HW_COMX) += comx-hw-comx.o
obj-$(CONFIG_COMX_HW_LOCOMX) += z85230.o syncppp.o comx-hw-locomx.o
obj-$(CONFIG_COMX_HW_MIXCOM) += comx-hw-mixcom.o
obj-$(CONFIG_COMX_HW_MUNICH) += comx-hw-munich.o
obj-$(CONFIG_COMX_PROTO_PPP) += syncppp.o comx-proto-ppp.o
obj-$(CONFIG_COMX_PROTO_LAPB) += comx-proto-lapb.o
obj-$(CONFIG_COMX_PROTO_FR) += comx-proto-fr.o
......
This diff is collapsed.
/*
* Device driver framework for the COMX line of synchronous serial boards
*
* for Linux kernel 2.2.X
* for Linux kernel 2.2.X / 2.4.X
*
* Original authors: Arpad Bakay <bakay.arpad@synergon.hu>,
* Peter Bajan <bajan.peter@synergon.hu>,
......
/*
* Defines for comx-hw-slicecom.c - FALC-LH specific
*
* Author: Bartok Istvan <bartoki@itc.hu>
* Last modified: Mon Feb 7 20:00:38 CET 2000
*
* :set tabstop=6
*/
/*
* Control register offsets on the LBI (page 90)
* use it like:
* lbi[ MODE ] = 0x34;
*/
#define MODE 0x03
#define IPC 0x08
#define IMR0 0x14 /* Interrupt Mask Register 0 */
#define IMR1 0x15
#define IMR2 0x16
#define IMR3 0x17
#define IMR4 0x18
#define IMR5 0x19
#define FMR0 0x1a /* Framer Mode Register 0 */
#define FMR1 0x1b
#define FMR2 0x1c
#define XSW 0x1e
#define XSP 0x1f
#define XC0 0x20
#define XC1 0x21
#define RC0 0x22
#define RC1 0x23
#define XPM0 0x24
#define XPM1 0x25
#define XPM2 0x26
#define TSWM 0x27
#define IDLE 0x29 /* Idle Code */
#define LIM0 0x34
#define LIM1 0x35
#define PCD 0x36
#define PCR 0x37
#define LIM2 0x38
/*
* Status registers on the LBI (page 134)
* these are read-only, use it like:
* if( lbi[ FRS0 ] ) ...
*/
#define FRS0 0x4c /* Framer Receive Status register 0 */
#define FRS1 0x4d /* Framer Receive Status register 1 */
#define FECL 0x50 /* Framing Error Counter low byte */ /* Counts FAS word receive errors */
#define FECH 0x51 /* high byte */
#define CVCL 0x52 /* Code Violation Counter low byte */ /* Counts bipolar and HDB3 code violations */
#define CVCH 0x53 /* high byte */
#define CEC1L 0x54 /* CRC4 Error Counter 1 low byte */ /* Counts CRC4 errors in the incoming stream */
#define CEC1H 0x55 /* high byte */
#define EBCL 0x56 /* E Bit error Counter low byte */ /* E-bits: the remote end sends them, when */
#define EBCH 0x57 /* high byte */ /* it detected a CRC4-error */
#define ISR0 0x68 /* Interrupt Status Register 0 */
#define ISR1 0x69 /* Interrupt Status Register 1 */
#define ISR2 0x6a /* Interrupt Status Register 2 */
#define ISR3 0x6b /* Interrupt Status Register 3 */
#define ISR5 0x6c /* Interrupt Status Register 5 */
#define GIS 0x6e /* Global Interrupt Status Register */
#define VSTR 0x6f /* version information */
/*
* Bit fields
*/
#define FRS0_LOS (1 << 7)
#define FRS0_AIS (1 << 6)
#define FRS0_LFA (1 << 5)
#define FRS0_RRA (1 << 4)
#define FRS0_AUXP (1 << 3)
#define FRS0_NMF (1 << 2)
#define FRS0_LMFA (1 << 1)
#define FRS1_XLS (1 << 1)
#define FRS1_XLO (1)
#define ISR2_FAR (1 << 7)
#define ISR2_LFA (1 << 6)
#define ISR2_MFAR (1 << 5)
#define ISR2_T400MS (1 << 4)
#define ISR2_AIS (1 << 3)
#define ISR2_LOS (1 << 2)
#define ISR2_RAR (1 << 1)
#define ISR2_RA (1)
#define ISR3_ES (1 << 7)
#define ISR3_SEC (1 << 6)
#define ISR3_LMFA16 (1 << 5)
#define ISR3_AIS16 (1 << 4)
#define ISR3_RA16 (1 << 3)
#define ISR3_API (1 << 2)
#define ISR3_RSN (1 << 1)
#define ISR3_RSP (1)
#define ISR5_XSP (1 << 7)
#define ISR5_XSN (1 << 6)
/*
* Defines for comx-hw-slicecom.c - MUNICH32X specific
*
* Author: Bartok Istvan <bartoki@itc.hu>
* Last modified: Tue Jan 11 14:27:36 CET 2000
*
* :set tabstop=6
*/
#define TXBUFFER_SIZE 1536 /* Max mennyit tud a kartya hardver atvenni */
#define RXBUFFER_SIZE (TXBUFFER_SIZE+4) /* For Rx reasons it must be a multiple of 4, and =>4 (page 265) */
/* +4 .. see page 265, bit FE */
/* TOD: a MODE1-be nem is ezt teszem, hanem a TXBUFFER-t, lehet hogy nem is kell? */
//#define PCI_VENDOR_ID_SIEMENS 0x110a
#define PCI_DEVICE_ID_SIEMENS_MUNICH32X 0x2101
/*
* PCI config space registers (page 120)
*/
#define MUNICH_PCI_PCIRES 0x4c /* 0xe0000 resets the chip */
/*
* MUNICH slave register offsets relative to base_address[0] (PCI BAR1) (page 181):
* offsets are in bytes, registers are u32's, so we need a >>2 for indexing
* the int[] by byte offsets. Use it like:
*
* bar1[ STAT ] = ~0L; or
* x = bar1[ STAT ];
*/
#define CONF (0x00 >> 2)
#define CMD (0x04 >> 2)
#define STAT (0x08 >> 2)
#define STACK (0x08 >> 2)
#define IMASK (0x0c >> 2)
#define PIQBA (0x14 >> 2)
#define PIQL (0x18 >> 2)
#define MODE1 (0x20 >> 2)
#define MODE2 (0x24 >> 2)
#define CCBA (0x28 >> 2)
#define TXPOLL (0x2c >> 2)
#define TIQBA (0x30 >> 2)
#define TIQL (0x34 >> 2)
#define RIQBA (0x38 >> 2)
#define RIQL (0x3c >> 2)
#define LCONF (0x40 >> 2) /* LBI Configuration Register */
#define LCCBA (0x44 >> 2) /* LBI Configuration Control Block */ /* DE: lehet hogy nem is kell? */
#define LTIQBA (0x50 >> 2) /* DE: lehet hogy nem is kell? page 210: LBI DMA Controller intq - nem hasznalunk DMA-t.. */
#define LTIQL (0x54 >> 2) /* DE: lehet hogy nem is kell? */
#define LRIQBA (0x58 >> 2) /* DE: lehet hogy nem is kell? */
#define LRIQL (0x5c >> 2) /* DE: lehet hogy nem is kell? */
#define LREG0 (0x60 >> 2) /* LBI Indirect External Configuration register 0 */
#define LREG1 (0x64 >> 2)
#define LREG2 (0x68 >> 2)
#define LREG3 (0x6c >> 2)
#define LREG4 (0x70 >> 2)
#define LREG5 (0x74 >> 2)
#define LREG6 (0x78 >> 2) /* LBI Indirect External Configuration register 6 */
#define LSTAT (0x7c >> 2) /* LBI Status Register */
#define GPDIR (0x80 >> 2) /* General Purpose Bus DIRection - 0..input, 1..output */
#define GPDATA (0x84 >> 2) /* General Purpose Bus DATA */
/*
* MUNICH commands: (they go into register CMD)
*/
#define CMD_ARPCM 0x01 /* Action Request Serial PCM Core */
#define CMD_ARLBI 0x02 /* Action Request LBI */
/*
* MUNICH event bits in the STAT, STACK, IMASK registers (page 188,189)
*/
#define STAT_PTI (1 << 15)
#define STAT_PRI (1 << 14)
#define STAT_LTI (1 << 13)
#define STAT_LRI (1 << 12)
#define STAT_IOMI (1 << 11)
#define STAT_SSCI (1 << 10)
#define STAT_LBII (1 << 9)
#define STAT_MBI (1 << 8)
#define STAT_TI (1 << 6)
#define STAT_TSPA (1 << 5)
#define STAT_RSPA (1 << 4)
#define STAT_LBIF (1 << 3)
#define STAT_LBIA (1 << 2)
#define STAT_PCMF (1 << 1)
#define STAT_PCMA (1)
/*
* We do not handle these (and do not touch their STAT bits) in the interrupt loop
*/
#define STAT_NOT_HANDLED_BY_INTERRUPT (STAT_PCMF | STAT_PCMA)
/*
* MUNICH MODE1/MODE2 slave register fields (page 193,196)
* these are not all masks, MODE1_XX_YY are my magic values!
*/
#define MODE1_PCM_E1 (1 << 31) /* E1, 2.048 Mbit/sec */
#define MODE1_TBS_4 (1 << 24) /* TBS = 4 .. no Tx bit shift */
#define MODE1_RBS_4 (1 << 18) /* RBS = 4 .. no Rx bit shift */
#define MODE1_REN (1 << 15) /* Rx Enable */
#define MODE1_MFL_MY TXBUFFER_SIZE /* Maximum Frame Length */
#define MODE1_MAGIC (MODE1_PCM_E1 | MODE1_TBS_4 | MODE1_RBS_4 | MODE1_REN | MODE1_MFL_MY)
#define MODE2_HPOLL (1 << 8) /* Hold Poll */
#define MODE2_SPOLL (1 << 7) /* Slow Poll */
#define MODE2_TSF (1) /* real magic - discovered by probing :) */
// #define MODE2_MAGIC (MODE2_TSF)
#define MODE2_MAGIC (MODE2_SPOLL | MODE2_TSF)
/*
* LCONF bits (page 205)
* these are not all masks, LCONF_XX_YY are my magic values!
*/
#define LCONF_IPA (1 << 31) /* Interrupt Pass. Use 1 for FALC54 */
#define LCONF_DCA (1 << 30) /* Disregard the int's for Channel A - DMSM does not try to handle them */
#define LCONF_DCB (1 << 29) /* Disregard the int's for Channel B */
#define LCONF_EBCRES (1 << 22) /* Reset LBI External Bus Controller, 0..reset, 1..normal operation */
#define LCONF_LBIRES (1 << 21) /* Reset LBI DMSM, 0..reset, 1..normal operation */
#define LCONF_BTYP_16DEMUX (1 << 7) /* 16-bit demultiplexed bus */
#define LCONF_ABM (1 << 4) /* Arbitration Master */
/* writing LCONF_MAGIC1 followed by a LCONF_MAGIC2 into LCONF resets the EBC and DMSM: */
#define LCONF_MAGIC1 (LCONF_BTYP_16DEMUX | LCONF_ABM | LCONF_IPA | LCONF_DCA | LCONF_DCB)
#define LCONF_MAGIC2 (LCONF_MAGIC1 | LCONF_EBCRES | LCONF_LBIRES)
/*
* LREGx magic values if a FALC54 is on the LBI (page 217)
*/
#define LREG0_MAGIC 0x00000264
#define LREG1_MAGIC 0x6e6a6b66
#define LREG2_MAGIC 0x00000264
#define LREG3_MAGIC 0x6e686966
#define LREG4_MAGIC 0x00000000
#define LREG5_MAGIC ( (7<<27) | (3<<24) | (1<<21) | (7<<3) | (2<<9) )
/*
* PCM Action Specification fields (munich_ccb_t.action_spec)
*/
#define CCB_ACTIONSPEC_IN (1 << 15) /* init */
#define CCB_ACTIONSPEC_ICO (1 << 14) /* init only this channel */
#define CCB_ACTIONSPEC_RES (1 << 6) /* reset all channels */
#define CCB_ACTIONSPEC_LOC (1 << 5)
#define CCB_ACTIONSPEC_LOOP (1 << 4)
#define CCB_ACTIONSPEC_LOOPI (1 << 3)
#define CCB_ACTIONSPEC_IA (1 << 2)
/*
* Interrupt Information bits in the TIQ, RIQ
*/
#define PCM_INT_HI (1 << 12)
#define PCM_INT_FI (1 << 11)
#define PCM_INT_IFC (1 << 10)
#define PCM_INT_SF (1 << 9)
#define PCM_INT_ERR (1 << 8)
#define PCM_INT_FO (1 << 7)
#define PCM_INT_FE2 (1 << 6)
#define PCM_INT_CHANNEL( info ) (info & 0x1F)
/*
* Rx status info in the rx_desc_t.status
*/
#define RX_STATUS_SF (1 << 6)
#define RX_STATUS_LOSS (1 << 5)
#define RX_STATUS_CRCO (1 << 4)
#define RX_STATUS_NOB (1 << 3)
#define RX_STATUS_LFD (1 << 2)
#define RX_STATUS_RA (1 << 1)
#define RX_STATUS_ROF 1
......@@ -849,18 +849,19 @@ pci_set_master(struct pci_dev *dev)
pcibios_set_master(dev);
}
#ifndef HAVE_ARCH_PCI_MWI
/**
* pdev_set_mwi - helper function for pci_set_mwi
* pci_generic_prep_mwi - helper function for pci_set_mwi
* @dev: the PCI device for which MWI is enabled
*
* Helper function for generic implementation of pci_set_mwi
* Helper function for generic implementation of pcibios_prep_mwi
* function. Originally copied from drivers/net/acenic.c.
* Copyright 1998-2001 by Jes Sorensen, <jes@trained-monkey.org>.
*
* RETURNS: An appriopriate -ERRNO error value on eror, or zero for success.
* RETURNS: An appropriate -ERRNO error value on eror, or zero for success.
*/
static int
pdev_set_mwi(struct pci_dev *dev)
pci_generic_prep_mwi(struct pci_dev *dev)
{
int rc = 0;
u8 cache_size;
......@@ -874,8 +875,8 @@ pdev_set_mwi(struct pci_dev *dev)
pci_read_config_byte(dev, PCI_CACHE_LINE_SIZE, &cache_size);
cache_size <<= 2;
if (cache_size != SMP_CACHE_BYTES) {
printk(KERN_WARNING "PCI: %s PCI cache line size set incorrectly "
"(%i bytes) by BIOS/FW, ",
printk(KERN_WARNING "PCI: %s PCI cache line size set "
"incorrectly (%i bytes) by BIOS/FW, ",
dev->slot_name, cache_size);
if (cache_size > SMP_CACHE_BYTES) {
printk("expecting %i\n", SMP_CACHE_BYTES);
......@@ -889,6 +890,7 @@ pdev_set_mwi(struct pci_dev *dev)
return rc;
}
#endif /* !HAVE_ARCH_PCI_MWI */
/**
* pci_set_mwi - enables memory-write-validate PCI transaction
......@@ -907,9 +909,9 @@ pci_set_mwi(struct pci_dev *dev)
u16 cmd;
#ifdef HAVE_ARCH_PCI_MWI
rc = pcibios_set_mwi(dev);
rc = pcibios_prep_mwi(dev);
#else
rc = pdev_set_mwi(dev);
rc = pci_generic_prep_mwi(dev);
#endif
if (rc)
......
......@@ -415,8 +415,6 @@ static struct clgenfb_info boards[MAX_NUM_BOARDS]; /* the boards */
static unsigned clgen_def_mode = 1;
static int noaccel = 0;
static int release_io_ports = 0;
/*
......@@ -2413,6 +2411,8 @@ static void __init get_prep_addrs (unsigned long *display, unsigned long *regist
#ifdef CONFIG_PCI
static int release_io_ports = 0;
/* Pulled the logic from XFree86 Cirrus driver to get the memory size,
* based on the DRAM bandwidth bit and DRAM bank switching bit. This
* works with 1MB, 2MB and 4MB configurations (which the Motorola boards
......@@ -2635,11 +2635,11 @@ static void __exit clgen_zorro_unmap (struct clgenfb_info *info)
release_mem_region(info->board_addr, info->board_size);
if (info->btype == BT_PICASSO4) {
iounmap (info->board_addr);
iounmap (info->fbmem_phys);
iounmap ((void *)info->board_addr);
iounmap ((void *)info->fbmem_phys);
} else {
if (info->board_addr > 0x01000000)
iounmap (info->board_addr);
iounmap ((void *)info->board_addr);
}
}
......
......@@ -203,7 +203,7 @@ extern int pci_mmap_page_range(struct pci_dev *dev, struct vm_area_struct *vma,
/* Platform specific MWI support. */
#define HAVE_ARCH_PCI_MWI
extern int pcibios_set_mwi(struct pci_dev *dev);
extern int pcibios_prep_mwi(struct pci_dev *dev);
#endif /* __KERNEL__ */
......
......@@ -2049,7 +2049,7 @@ static ssize_t via_dsp_do_read (struct via_info *card,
while ((count > 0) && (chan->slop_len < chan->frag_size)) {
size_t slop_left = chan->frag_size - chan->slop_len;
void *base = chan->pgtbl[n / (PAGE_SIZE / chan->frag_size)].cpuaddr;
unsigned ofs = n % (PAGE_SIZE / chan->frag_size);
unsigned ofs = (n % (PAGE_SIZE / chan->frag_size)) * chan->frag_size;
size = (count < slop_left) ? count : slop_left;
if (copy_to_user (userbuf,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment