Commit 6c849620 authored by Linus Torvalds's avatar Linus Torvalds

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

into home.transmeta.com:/home/torvalds/v2.5/linux
parents 98c587d4 0630b89d
...@@ -226,6 +226,7 @@ static int sg_io(request_queue_t *q, struct block_device *bdev, ...@@ -226,6 +226,7 @@ static int sg_io(request_queue_t *q, struct block_device *bdev,
/* /*
* fill in request structure * fill in request structure
*/ */
rq->cmd_len = hdr.cmd_len;
copy_from_user(rq->cmd, hdr.cmdp, hdr.cmd_len); copy_from_user(rq->cmd, hdr.cmdp, hdr.cmd_len);
if (sizeof(rq->cmd) != hdr.cmd_len) if (sizeof(rq->cmd) != hdr.cmd_len)
memset(rq->cmd + hdr.cmd_len, 0, sizeof(rq->cmd) - hdr.cmd_len); memset(rq->cmd + hdr.cmd_len, 0, sizeof(rq->cmd) - hdr.cmd_len);
...@@ -348,6 +349,7 @@ static int sg_scsi_ioctl(request_queue_t *q, struct block_device *bdev, ...@@ -348,6 +349,7 @@ static int sg_scsi_ioctl(request_queue_t *q, struct block_device *bdev,
* get command and data to send to device, if any * get command and data to send to device, if any
*/ */
err = -EFAULT; err = -EFAULT;
rq->cmd_len = cmdlen;
if (copy_from_user(rq->cmd, sic->data, cmdlen)) if (copy_from_user(rq->cmd, sic->data, cmdlen))
goto error; goto error;
......
...@@ -882,6 +882,15 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive, ...@@ -882,6 +882,15 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
struct request *rq, struct request *rq,
ide_handler_t *handler) ide_handler_t *handler)
{ {
/*
* FIXME! This should be 'rq->cmd_len' when that is reliable.
*
* This breaks for real 16-byte commands. however, lots of drives
* currently break if we just send 16-bytes for 10/12 byte commands.
*/
#define MAX_CDB_BYTES 12
int cmd_len = MAX_CDB_BYTES;
struct cdrom_info *info = drive->driver_data; struct cdrom_info *info = drive->driver_data;
ide_startstop_t startstop; ide_startstop_t startstop;
...@@ -906,7 +915,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive, ...@@ -906,7 +915,7 @@ static ide_startstop_t cdrom_transfer_packet_command (ide_drive_t *drive,
ide_set_handler(drive, handler, rq->timeout, cdrom_timer_expiry); ide_set_handler(drive, handler, rq->timeout, cdrom_timer_expiry);
/* Send the command to the device. */ /* Send the command to the device. */
HWIF(drive)->atapi_output_bytes(drive, rq->cmd, sizeof(rq->cmd)); HWIF(drive)->atapi_output_bytes(drive, rq->cmd, cmd_len);
/* Start the DMA if need be */ /* Start the DMA if need be */
if (info->dma) if (info->dma)
...@@ -3004,6 +3013,7 @@ static int ide_cdrom_prep_fs(request_queue_t *q, struct request *rq) ...@@ -3004,6 +3013,7 @@ static int ide_cdrom_prep_fs(request_queue_t *q, struct request *rq)
*/ */
rq->cmd[7] = (blocks >> 8) & 0xff; rq->cmd[7] = (blocks >> 8) & 0xff;
rq->cmd[8] = blocks & 0xff; rq->cmd[8] = blocks & 0xff;
rq->cmd_len = 10;
return BLKPREP_OK; return BLKPREP_OK;
} }
...@@ -3026,6 +3036,7 @@ static int ide_cdrom_prep_pc(struct request *rq) ...@@ -3026,6 +3036,7 @@ static int ide_cdrom_prep_pc(struct request *rq)
c[2] = 0; c[2] = 0;
c[1] &= 0xe0; c[1] &= 0xe0;
c[0] += (READ_10 - READ_6); c[0] += (READ_10 - READ_6);
rq->cmd_len = 10;
return BLKPREP_OK; return BLKPREP_OK;
} }
......
...@@ -104,9 +104,6 @@ struct ide_cd_state_flags { ...@@ -104,9 +104,6 @@ struct ide_cd_state_flags {
#define CDROM_STATE_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->state_flags)) #define CDROM_STATE_FLAGS(drive) (&(((struct cdrom_info *)(drive->driver_data))->state_flags))
struct packet_command {
};
/* Structure of a MSF cdrom address. */ /* Structure of a MSF cdrom address. */
struct atapi_msf { struct atapi_msf {
byte reserved; byte reserved;
...@@ -472,7 +469,6 @@ struct cdrom_info { ...@@ -472,7 +469,6 @@ struct cdrom_info {
struct request_sense sense_data; struct request_sense sense_data;
struct request request_sense_request; struct request request_sense_request;
struct packet_command request_sense_pc;
int dma; int dma;
int cmd; int cmd;
unsigned long last_block; unsigned long last_block;
......
...@@ -171,7 +171,7 @@ static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs) ...@@ -171,7 +171,7 @@ static void serial21285_tx_chars(int irq, void *dev_id, struct pt_regs *regs)
} while (--count > 0 && !(*CSR_UARTFLG & 0x20)); } while (--count > 0 && !(*CSR_UARTFLG & 0x20));
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(port, EVT_WRITE_WAKEUP); uart_write_wakeup(port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
serial21285_stop_tx(port, 0); serial21285_stop_tx(port, 0);
...@@ -485,11 +485,7 @@ void __init rs285_console_init(void) ...@@ -485,11 +485,7 @@ void __init rs285_console_init(void)
static struct uart_driver serial21285_reg = { static struct uart_driver serial21285_reg = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.driver_name = "ttyFB", .driver_name = "ttyFB",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyFB%d", .dev_name = "ttyFB%d",
#else
.dev_name = "ttyFB",
#endif
.major = SERIAL_21285_MAJOR, .major = SERIAL_21285_MAJOR,
.minor = SERIAL_21285_MINOR, .minor = SERIAL_21285_MINOR,
.nr = 1, .nr = 1,
......
This diff is collapsed.
...@@ -41,6 +41,7 @@ ...@@ -41,6 +41,7 @@
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/tty.h> #include <linux/tty.h>
#include <linux/serial.h> #include <linux/serial.h>
#include <linux/serial_core.h>
#include <linux/major.h> #include <linux/major.h>
#include <linux/workqueue.h> #include <linux/workqueue.h>
#include <asm/io.h> #include <asm/io.h>
...@@ -306,7 +307,7 @@ static int setup_serial(serial_info_t * info, ioaddr_t port, int irq) ...@@ -306,7 +307,7 @@ static int setup_serial(serial_info_t * info, ioaddr_t port, int irq)
memset(&serial, 0, sizeof (serial)); memset(&serial, 0, sizeof (serial));
serial.port = port; serial.port = port;
serial.irq = irq; serial.irq = irq;
serial.flags = ASYNC_SKIP_TEST | ASYNC_SHARE_IRQ; serial.flags = UPF_SKIP_TEST | UPF_SHARE_IRQ;
line = register_serial(&serial); line = register_serial(&serial);
if (line < 0) { if (line < 0) {
printk(KERN_NOTICE "serial_cs: register_serial() at 0x%04lx," printk(KERN_NOTICE "serial_cs: register_serial() at 0x%04lx,"
......
/*
* Serial Device Initialisation for Lasi/Asp/Wax/Dino
*
* (c) Copyright Matthew Wilcox <willy@debian.org> 2001-2002
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/module.h>
#include <linux/serial.h>
#include <linux/signal.h>
#include <linux/slab.h>
#include <linux/types.h>
#include <asm/hardware.h>
#include <asm/io.h>
#include <asm/serial.h>
static void setup_parisc_serial(struct serial_struct *serial,
unsigned long address, int irq, int line)
{
memset(serial, 0, sizeof(struct serial_struct));
/* autoconfig() sets state->type. This sets info->type */
serial->type = PORT_16550A;
serial->line = line;
serial->iomem_base = ioremap(address, 0x8);
serial->irq = irq;
serial->io_type = SERIAL_IO_MEM; /* define access method */
serial->flags = 0;
serial->xmit_fifo_size = 16;
serial->custom_divisor = 0;
serial->baud_base = LASI_BASE_BAUD;
}
static int __init
serial_init_chip(struct parisc_device *dev)
{
static int serial_line_nr;
unsigned long address;
int err;
struct serial_struct *serial;
if (!dev->irq) {
/* We find some unattached serial ports by walking native
* busses. These should be silently ignored. Otherwise,
* what we have here is a missing parent device, so tell
* the user what they're missing.
*/
if (dev->parent->id.hw_type != HPHW_IOA) {
printk(KERN_INFO "Serial: device 0x%lx not configured.\n"
"Enable support for Wax, Lasi, Asp or Dino.\n", dev->hpa);
}
return -ENODEV;
}
serial = kmalloc(sizeof(*serial), GFP_KERNEL);
if (!serial)
return -ENOMEM;
address = dev->hpa;
if (dev->id.sversion != 0x8d) {
address += 0x800;
}
setup_parisc_serial(serial, address, dev->irq, serial_line_nr++);
err = register_serial(serial);
if (err < 0) {
printk(KERN_WARNING "register_serial returned error %d\n", err);
kfree(serial);
return -ENODEV;
}
return 0;
}
static struct parisc_device_id serial_tbl[] = {
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x00075 },
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008c },
{ HPHW_FIO, HVERSION_REV_ANY_ID, HVERSION_ANY_ID, 0x0008d },
{ 0 }
};
/* Hack. Dino's serial port will get listed first on some machines.
* So we register this driver first which knows about Lasi's serial port.
* This needs to get fixed properly somehow.
*/
static struct parisc_device_id serial1_tbl[] = {
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03B, 0x0008C }, /* C1xx/C1xxL */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03C, 0x0008C }, /* B132L */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03D, 0x0008C }, /* B160L */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03E, 0x0008C }, /* B132L+ */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x03F, 0x0008C }, /* B180L+ */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x046, 0x0008C }, /* Rocky2 120 */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x047, 0x0008C }, /* Rocky2 150 */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x04E, 0x0008C }, /* Kiji L2 132 */
{ HPHW_FIO, HVERSION_REV_ANY_ID, 0x056, 0x0008C }, /* Raven+ */
{ 0 }
};
MODULE_DEVICE_TABLE(parisc, serial_tbl);
static struct parisc_driver serial1_driver = {
name: "Serial RS232",
id_table: serial1_tbl,
probe: serial_init_chip,
};
static struct parisc_driver serial_driver = {
name: "Serial RS232",
id_table: serial_tbl,
probe: serial_init_chip,
};
int __init probe_serial_gsc(void)
{
register_parisc_driver(&serial1_driver);
register_parisc_driver(&serial_driver);
return 0;
}
module_init(probe_serial_gsc);
This diff is collapsed.
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
export-objs := core.o 8250.o suncore.o export-objs := core.o 8250.o suncore.o
serial-8250-y := serial-8250-y :=
serial-8250-$(CONFIG_GSC) += 8250_gsc.o
serial-8250-$(CONFIG_PCI) += 8250_pci.o serial-8250-$(CONFIG_PCI) += 8250_pci.o
serial-8250-$(CONFIG_PNP) += 8250_pnp.o serial-8250-$(CONFIG_PNP) += 8250_pnp.o
obj-$(CONFIG_SERIAL_CORE) += core.o obj-$(CONFIG_SERIAL_CORE) += core.o
......
...@@ -245,7 +245,7 @@ static void ambauart_tx_chars(struct uart_port *port) ...@@ -245,7 +245,7 @@ static void ambauart_tx_chars(struct uart_port *port)
} while (--count > 0); } while (--count > 0);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(port, EVT_WRITE_WAKEUP); uart_write_wakeup(port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
ambauart_stop_tx(port); ambauart_stop_tx(port);
...@@ -706,11 +706,7 @@ void __init ambauart_console_init(void) ...@@ -706,11 +706,7 @@ void __init ambauart_console_init(void)
static struct uart_driver amba_reg = { static struct uart_driver amba_reg = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.driver_name = "ttyAM", .driver_name = "ttyAM",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttyAM%d", .dev_name = "ttyAM%d",
#else
.dev_name = "ttyAM",
#endif
.major = SERIAL_AMBA_MAJOR, .major = SERIAL_AMBA_MAJOR,
.minor = SERIAL_AMBA_MINOR, .minor = SERIAL_AMBA_MINOR,
.nr = UART_NR, .nr = UART_NR,
......
...@@ -161,7 +161,7 @@ anakin_tx_chars(struct uart_port *port) ...@@ -161,7 +161,7 @@ anakin_tx_chars(struct uart_port *port)
anakin_transmit_buffer(port); anakin_transmit_buffer(port);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(port, EVT_WRITE_WAKEUP); uart_write_wakeup(port);
} }
static void static void
......
...@@ -50,14 +50,12 @@ ...@@ -50,14 +50,12 @@
#define UART_NR 2 #define UART_NR 2
#ifndef CONFIG_SERIAL_CLPS711X_OLD_NAME #ifndef CONFIG_SERIAL_CLPS711X_OLD_NAME
#define SERIAL_CLPS711X_NAME "ttyCL"
#define SERIAL_CLPS711X_MAJOR 204 #define SERIAL_CLPS711X_MAJOR 204
#define SERIAL_CLPS711X_MINOR 40 #define SERIAL_CLPS711X_MINOR 40
#define SERIAL_CLPS711X_NR UART_NR #define SERIAL_CLPS711X_NR UART_NR
#else #else
#warning The old names/device number for this driver if compatabity is needed #warning The old names/device number for this driver if compatabity is needed
#define SERIAL_CLPS711X_NAME "ttyAM"
#define SERIAL_CLPS711X_MAJOR 204 #define SERIAL_CLPS711X_MAJOR 204
#define SERIAL_CLPS711X_MINOR 16 #define SERIAL_CLPS711X_MINOR 16
#define SERIAL_CLPS711X_NR UART_NR #define SERIAL_CLPS711X_NR UART_NR
...@@ -209,7 +207,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs) ...@@ -209,7 +207,7 @@ static void clps711xuart_int_tx(int irq, void *dev_id, struct pt_regs *regs)
} while (--count > 0); } while (--count > 0);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(port, EVT_WRITE_WAKEUP); uart_write_wakeup(port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
clps711xuart_stop_tx(port); clps711xuart_stop_tx(port);
...@@ -545,7 +543,7 @@ static int __init clps711xuart_console_setup(struct console *co, char *options) ...@@ -545,7 +543,7 @@ static int __init clps711xuart_console_setup(struct console *co, char *options)
} }
static struct console clps711x_console = { static struct console clps711x_console = {
.name = SERIAL_CLPS711X_NAME, .name = "ttyCL",
.write = clps711xuart_console_write, .write = clps711xuart_console_write,
.device = clps711xuart_console_device, .device = clps711xuart_console_device,
.setup = clps711xuart_console_setup, .setup = clps711xuart_console_setup,
...@@ -565,12 +563,7 @@ void __init clps711xuart_console_init(void) ...@@ -565,12 +563,7 @@ void __init clps711xuart_console_init(void)
static struct uart_driver clps711x_reg = { static struct uart_driver clps711x_reg = {
.driver_name = "ttyCL", .driver_name = "ttyCL",
#ifdef CONFIG_DEVFS_FS .dev_name = "ttyCL%d",
.dev_name = SERIAL_CLPS711X_NAME,
#else
.dev_name = SERIAL_CLPS711X_NAME,
#endif
.major = SERIAL_CLPS711X_MAJOR, .major = SERIAL_CLPS711X_MAJOR,
.minor = SERIAL_CLPS711X_MINOR, .minor = SERIAL_CLPS711X_MINOR,
.nr = UART_NR, .nr = UART_NR,
......
...@@ -65,11 +65,9 @@ static void uart_wait_until_sent(struct tty_struct *tty, int timeout); ...@@ -65,11 +65,9 @@ static void uart_wait_until_sent(struct tty_struct *tty, int timeout);
* This routine is used by the interrupt handler to schedule processing in * This routine is used by the interrupt handler to schedule processing in
* the software interrupt portion of the driver. * the software interrupt portion of the driver.
*/ */
void uart_event(struct uart_port *port, int event) void uart_write_wakeup(struct uart_port *port)
{ {
struct uart_info *info = port->info; struct uart_info *info = port->info;
set_bit(0, &info->event);
tasklet_schedule(&info->tlet); tasklet_schedule(&info->tlet);
} }
...@@ -112,13 +110,12 @@ static void uart_tasklet_action(unsigned long data) ...@@ -112,13 +110,12 @@ static void uart_tasklet_action(unsigned long data)
struct tty_struct *tty; struct tty_struct *tty;
tty = info->tty; tty = info->tty;
if (!tty || !test_and_clear_bit(EVT_WRITE_WAKEUP, &info->event)) if (tty) {
return; if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) &&
tty->ldisc.write_wakeup)
if ((tty->flags & (1 << TTY_DO_WRITE_WAKEUP)) && tty->ldisc.write_wakeup(tty);
tty->ldisc.write_wakeup) wake_up_interruptible(&tty->write_wait);
(tty->ldisc.write_wakeup)(tty); }
wake_up_interruptible(&tty->write_wait);
} }
static inline void static inline void
...@@ -1981,7 +1978,8 @@ static int uart_pm(struct pm_dev *dev, pm_request_t rqst, void *data) ...@@ -1981,7 +1978,8 @@ static int uart_pm(struct pm_dev *dev, pm_request_t rqst, void *data)
static inline void static inline void
uart_report_port(struct uart_driver *drv, struct uart_port *port) uart_report_port(struct uart_driver *drv, struct uart_port *port)
{ {
printk("%s%d at ", drv->dev_name, port->line); printk(drv->dev_name, port->line);
printk(" at ");
switch (port->iotype) { switch (port->iotype) {
case UPIO_PORT: case UPIO_PORT:
printk("I/O 0x%x", port->iobase); printk("I/O 0x%x", port->iobase);
...@@ -2005,7 +2003,6 @@ __uart_register_port(struct uart_driver *drv, struct uart_state *state, ...@@ -2005,7 +2003,6 @@ __uart_register_port(struct uart_driver *drv, struct uart_state *state,
state->port = port; state->port = port;
spin_lock_init(&port->lock); spin_lock_init(&port->lock);
port->type = PORT_UNKNOWN;
port->cons = drv->cons; port->cons = drv->cons;
port->info = state->info; port->info = state->info;
...@@ -2022,8 +2019,10 @@ __uart_register_port(struct uart_driver *drv, struct uart_state *state, ...@@ -2022,8 +2019,10 @@ __uart_register_port(struct uart_driver *drv, struct uart_state *state,
flags = UART_CONFIG_TYPE; flags = UART_CONFIG_TYPE;
if (port->flags & UPF_AUTO_IRQ) if (port->flags & UPF_AUTO_IRQ)
flags |= UART_CONFIG_IRQ; flags |= UART_CONFIG_IRQ;
if (port->flags & UPF_BOOT_AUTOCONF) if (port->flags & UPF_BOOT_AUTOCONF) {
port->type = PORT_UNKNOWN;
port->ops->config_port(port, flags); port->ops->config_port(port, flags);
}
/* /*
* Register the port whether it's detected or not. This allows * Register the port whether it's detected or not. This allows
...@@ -2439,8 +2438,9 @@ void uart_unregister_port(struct uart_driver *drv, int line) ...@@ -2439,8 +2438,9 @@ void uart_unregister_port(struct uart_driver *drv, int line)
struct uart_state *state; struct uart_state *state;
if (line < 0 || line >= drv->nr) { if (line < 0 || line >= drv->nr) {
printk(KERN_ERR "Attempt to unregister %s%d\n", printk(KERN_ERR "Attempt to unregister ");
drv->dev_name, line); printk(drv->dev_name, line);
printk("\n");
return; return;
} }
...@@ -2453,7 +2453,7 @@ void uart_unregister_port(struct uart_driver *drv, int line) ...@@ -2453,7 +2453,7 @@ void uart_unregister_port(struct uart_driver *drv, int line)
up(&port_sem); up(&port_sem);
} }
EXPORT_SYMBOL(uart_event); EXPORT_SYMBOL(uart_write_wakeup);
EXPORT_SYMBOL(uart_register_driver); EXPORT_SYMBOL(uart_register_driver);
EXPORT_SYMBOL(uart_unregister_driver); EXPORT_SYMBOL(uart_unregister_driver);
EXPORT_SYMBOL(uart_register_port); EXPORT_SYMBOL(uart_register_port);
......
...@@ -305,7 +305,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport) ...@@ -305,7 +305,7 @@ static void sa1100_tx_chars(struct sa1100_port *sport)
} }
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(&sport->port, EVT_WRITE_WAKEUP); uart_write_wakeup(&sport->port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
sa1100_stop_tx(&sport->port, 0); sa1100_stop_tx(&sport->port, 0);
...@@ -661,7 +661,7 @@ void __init sa1100_register_uart_fns(struct sa1100_port_fns *fns) ...@@ -661,7 +661,7 @@ void __init sa1100_register_uart_fns(struct sa1100_port_fns *fns)
void __init sa1100_register_uart(int idx, int port) void __init sa1100_register_uart(int idx, int port)
{ {
if (idx >= NR_PORTS) { if (idx >= NR_PORTS) {
printk(KERN_ERR __FUNCTION__ ": bad index number %d\n", idx); printk(KERN_ERR "%s: bad index number %d\n", __FUNCTION__, idx);
return; return;
} }
...@@ -688,7 +688,7 @@ void __init sa1100_register_uart(int idx, int port) ...@@ -688,7 +688,7 @@ void __init sa1100_register_uart(int idx, int port)
break; break;
default: default:
printk(KERN_ERR __FUNCTION__ ": bad port number %d\n", port); printk(KERN_ERR "%s: bad port number %d\n", __FUNCTION__, port);
} }
} }
...@@ -827,11 +827,7 @@ void __init sa1100_rs_console_init(void) ...@@ -827,11 +827,7 @@ void __init sa1100_rs_console_init(void)
static struct uart_driver sa1100_reg = { static struct uart_driver sa1100_reg = {
.owner = THIS_MODULE, .owner = THIS_MODULE,
.driver_name = "ttySA", .driver_name = "ttySA",
#ifdef CONFIG_DEVFS_FS
.dev_name = "ttySA%d", .dev_name = "ttySA%d",
#else
.dev_name = "ttySA",
#endif
.major = SERIAL_SA1100_MAJOR, .major = SERIAL_SA1100_MAJOR,
.minor = MINOR_START, .minor = MINOR_START,
.nr = NR_PORTS, .nr = NR_PORTS,
......
...@@ -266,7 +266,7 @@ static void transmit_chars(struct uart_sunsab_port *up, ...@@ -266,7 +266,7 @@ static void transmit_chars(struct uart_sunsab_port *up,
writeb(SAB82532_CMDR_XF, &up->regs->w.cmdr); writeb(SAB82532_CMDR_XF, &up->regs->w.cmdr);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(&up->port, EVT_WRITE_WAKEUP); uart_write_wakeup(&up->port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
sunsab_stop_tx(&up->port, 0); sunsab_stop_tx(&up->port, 0);
...@@ -843,7 +843,7 @@ static struct uart_driver sunsab_reg = { ...@@ -843,7 +843,7 @@ static struct uart_driver sunsab_reg = {
#ifdef CONFIG_DEVFS_FS #ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d", .dev_name = "tts/%d",
#else #else
.dev_name = "ttyS", .dev_name = "ttyS%d",
#endif #endif
.major = TTY_MAJOR, .major = TTY_MAJOR,
}; };
......
...@@ -431,7 +431,7 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up) ...@@ -431,7 +431,7 @@ static _INLINE_ void transmit_chars(struct uart_sunsu_port *up)
} while (--count > 0); } while (--count > 0);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(&up->port, EVT_WRITE_WAKEUP); uart_write_wakeup(&up->port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
sunsu_stop_tx(&up->port, 0); sunsu_stop_tx(&up->port, 0);
...@@ -1262,7 +1262,7 @@ static struct uart_driver sunsu_reg = { ...@@ -1262,7 +1262,7 @@ static struct uart_driver sunsu_reg = {
#ifdef CONFIG_DEVFS_FS #ifdef CONFIG_DEVFS_FS
.dev_name = "tts/%d", .dev_name = "tts/%d",
#else #else
.dev_name = "ttyS", .dev_name = "ttyS%d",
#endif #endif
.major = TTY_MAJOR, .major = TTY_MAJOR,
}; };
......
...@@ -523,7 +523,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up, ...@@ -523,7 +523,7 @@ static void sunzilog_transmit_chars(struct uart_sunzilog_port *up,
up->port.icount.tx++; up->port.icount.tx++;
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(&up->port, EVT_WRITE_WAKEUP); uart_write_wakeup(&up->port);
if (!uart_circ_empty(xmit)) if (!uart_circ_empty(xmit))
return; return;
...@@ -1003,7 +1003,7 @@ static struct uart_driver sunzilog_reg = { ...@@ -1003,7 +1003,7 @@ static struct uart_driver sunzilog_reg = {
#ifdef CONFIG_DEVFS_FS #ifdef CONFIG_DEVFS_FS
.dev_name = "ttyS%d", .dev_name = "ttyS%d",
#else #else
.dev_name = "ttyS", .dev_name = "ttyS%d",
#endif #endif
.major = TTY_MAJOR, .major = TTY_MAJOR,
}; };
......
...@@ -215,7 +215,7 @@ static void uart00_tx_chars(struct uart_port *port) ...@@ -215,7 +215,7 @@ static void uart00_tx_chars(struct uart_port *port)
} while (--count > 0); } while (--count > 0);
if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
uart_event(port, EVT_WRITE_WAKEUP); uart_write_wakeup(port);
if (uart_circ_empty(xmit)) if (uart_circ_empty(xmit))
uart00_stop_tx(port, 0); uart00_stop_tx(port, 0);
......
...@@ -209,9 +209,7 @@ static void ext2_preread_inode(struct inode *inode) ...@@ -209,9 +209,7 @@ static void ext2_preread_inode(struct inode *inode)
* For other inodes, search forward from the parent directory\'s block * For other inodes, search forward from the parent directory\'s block
* group to find a free inode. * group to find a free inode.
*/ */
#if 0 static int find_group_dir(struct super_block *sb, struct inode *parent)
static int find_group_dir(struct super_block *sb, int parent_group)
{ {
struct ext2_super_block * es = EXT2_SB(sb)->s_es; struct ext2_super_block * es = EXT2_SB(sb)->s_es;
int ngroups = EXT2_SB(sb)->s_groups_count; int ngroups = EXT2_SB(sb)->s_groups_count;
...@@ -243,7 +241,6 @@ static int find_group_dir(struct super_block *sb, int parent_group) ...@@ -243,7 +241,6 @@ static int find_group_dir(struct super_block *sb, int parent_group)
mark_buffer_dirty(best_bh); mark_buffer_dirty(best_bh);
return best_group; return best_group;
} }
#endif
/* /*
* Orlov's allocator for directories. * Orlov's allocator for directories.
...@@ -289,7 +286,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) ...@@ -289,7 +286,8 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
struct ext2_group_desc *desc; struct ext2_group_desc *desc;
struct buffer_head *bh; struct buffer_head *bh;
if (parent == sb->s_root->d_inode) { if ((parent == sb->s_root->d_inode) ||
(parent->i_flags & EXT2_TOPDIR_FL)) {
struct ext2_group_desc *best_desc = NULL; struct ext2_group_desc *best_desc = NULL;
struct buffer_head *best_bh = NULL; struct buffer_head *best_bh = NULL;
int best_ndir = inodes_per_group; int best_ndir = inodes_per_group;
...@@ -342,7 +340,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent) ...@@ -342,7 +340,7 @@ static int find_group_orlov(struct super_block *sb, struct inode *parent)
desc = ext2_get_group_desc (sb, group, &bh); desc = ext2_get_group_desc (sb, group, &bh);
if (!desc || !desc->bg_free_inodes_count) if (!desc || !desc->bg_free_inodes_count)
continue; continue;
if (sbi->debts[group] >= max_debt) if (sbi->s_debts[group] >= max_debt)
continue; continue;
if (le16_to_cpu(desc->bg_used_dirs_count) >= max_dirs) if (le16_to_cpu(desc->bg_used_dirs_count) >= max_dirs)
continue; continue;
...@@ -447,9 +445,12 @@ struct inode * ext2_new_inode(struct inode * dir, int mode) ...@@ -447,9 +445,12 @@ struct inode * ext2_new_inode(struct inode * dir, int mode)
lock_super (sb); lock_super (sb);
es = EXT2_SB(sb)->s_es; es = EXT2_SB(sb)->s_es;
repeat: repeat:
if (S_ISDIR(mode)) if (S_ISDIR(mode)) {
group = find_group_orlov(sb, dir); if (test_opt (sb, OLDALLOC))
else group = find_group_dir(sb, dir);
else
group = find_group_orlov(sb, dir);
} else
group = find_group_other(sb, dir); group = find_group_other(sb, dir);
err = -ENOSPC; err = -ENOSPC;
...@@ -488,11 +489,11 @@ struct inode * ext2_new_inode(struct inode * dir, int mode) ...@@ -488,11 +489,11 @@ struct inode * ext2_new_inode(struct inode * dir, int mode)
cpu_to_le32(le32_to_cpu(es->s_free_inodes_count) - 1); cpu_to_le32(le32_to_cpu(es->s_free_inodes_count) - 1);
if (S_ISDIR(mode)) { if (S_ISDIR(mode)) {
if (EXT2_SB(sb)->debts[group] < 255) if (EXT2_SB(sb)->s_debts[group] < 255)
EXT2_SB(sb)->debts[group]++; EXT2_SB(sb)->s_debts[group]++;
} else { } else {
if (EXT2_SB(sb)->debts[group]) if (EXT2_SB(sb)->s_debts[group])
EXT2_SB(sb)->debts[group]--; EXT2_SB(sb)->s_debts[group]--;
} }
mark_buffer_dirty(EXT2_SB(sb)->s_sbh); mark_buffer_dirty(EXT2_SB(sb)->s_sbh);
......
...@@ -140,6 +140,7 @@ static void ext2_put_super (struct super_block * sb) ...@@ -140,6 +140,7 @@ static void ext2_put_super (struct super_block * sb)
if (sbi->s_group_desc[i]) if (sbi->s_group_desc[i])
brelse (sbi->s_group_desc[i]); brelse (sbi->s_group_desc[i]);
kfree(sbi->s_group_desc); kfree(sbi->s_group_desc);
kfree(sbi->s_debts);
brelse (sbi->s_sbh); brelse (sbi->s_sbh);
sb->s_fs_info = NULL; sb->s_fs_info = NULL;
kfree(sbi); kfree(sbi);
...@@ -385,6 +386,10 @@ static int parse_options (char * options, ...@@ -385,6 +386,10 @@ static int parse_options (char * options,
return 0; return 0;
sbi->s_resuid = v; sbi->s_resuid = v;
} }
else if (!strcmp (this_char, "oldalloc"))
set_opt (sbi->s_mount_opt, OLDALLOC);
else if (!strcmp (this_char, "orlov"))
clear_opt (sbi->s_mount_opt, OLDALLOC);
/* Silently ignore the quota options */ /* Silently ignore the quota options */
else if (!strcmp (this_char, "grpquota") else if (!strcmp (this_char, "grpquota")
|| !strcmp (this_char, "noquota") || !strcmp (this_char, "noquota")
...@@ -756,13 +761,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -756,13 +761,13 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
printk ("EXT2-fs: not enough memory\n"); printk ("EXT2-fs: not enough memory\n");
goto failed_mount; goto failed_mount;
} }
sbi->debts = kmalloc(sbi->s_groups_count * sizeof(*sbi->debts), sbi->s_debts = kmalloc(sbi->s_groups_count * sizeof(*sbi->s_debts),
GFP_KERNEL); GFP_KERNEL);
if (!sbi->debts) { if (!sbi->s_debts) {
printk ("EXT2-fs: not enough memory\n"); printk ("EXT2-fs: not enough memory\n");
goto failed_mount_group_desc; goto failed_mount_group_desc;
} }
memset(sbi->debts, 0, sbi->s_groups_count * sizeof(*sbi->debts)); memset(sbi->s_debts, 0, sbi->s_groups_count * sizeof(*sbi->s_debts));
for (i = 0; i < db_count; i++) { for (i = 0; i < db_count; i++) {
block = descriptor_loc(sb, logic_sb_block, i); block = descriptor_loc(sb, logic_sb_block, i);
sbi->s_group_desc[i] = sb_bread(sb, block); sbi->s_group_desc[i] = sb_bread(sb, block);
...@@ -771,7 +776,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -771,7 +776,7 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
brelse (sbi->s_group_desc[j]); brelse (sbi->s_group_desc[j]);
kfree(sbi->s_group_desc); kfree(sbi->s_group_desc);
printk ("EXT2-fs: unable to read group descriptors\n"); printk ("EXT2-fs: unable to read group descriptors\n");
goto failed_mount; goto failed_mount_group_desc;
} }
} }
if (!ext2_check_descriptors (sb)) { if (!ext2_check_descriptors (sb)) {
...@@ -808,6 +813,8 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent) ...@@ -808,6 +813,8 @@ static int ext2_fill_super(struct super_block *sb, void *data, int silent)
brelse(sbi->s_group_desc[i]); brelse(sbi->s_group_desc[i]);
failed_mount_group_desc: failed_mount_group_desc:
kfree(sbi->s_group_desc); kfree(sbi->s_group_desc);
if (sbi->s_debts)
kfree(sbi->s_debts);
failed_mount: failed_mount:
brelse(bh); brelse(bh);
failed_sbi: failed_sbi:
......
This diff is collapsed.
...@@ -390,6 +390,7 @@ void ext3_put_super (struct super_block * sb) ...@@ -390,6 +390,7 @@ void ext3_put_super (struct super_block * sb)
for (i = 0; i < sbi->s_gdb_count; i++) for (i = 0; i < sbi->s_gdb_count; i++)
brelse(sbi->s_group_desc[i]); brelse(sbi->s_group_desc[i]);
kfree(sbi->s_group_desc); kfree(sbi->s_group_desc);
kfree(sbi->s_debts);
brelse(sbi->s_sbh); brelse(sbi->s_sbh);
/* Debugging code just in case the in-memory inode orphan list /* Debugging code just in case the in-memory inode orphan list
...@@ -1221,6 +1222,13 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1221,6 +1222,13 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
printk (KERN_ERR "EXT3-fs: not enough memory\n"); printk (KERN_ERR "EXT3-fs: not enough memory\n");
goto failed_mount; goto failed_mount;
} }
sbi->s_debts = kmalloc(sbi->s_groups_count * sizeof(*sbi->s_debts),
GFP_KERNEL);
if (!sbi->s_debts) {
printk ("EXT3-fs: not enough memory\n");
goto failed_mount2;
}
memset(sbi->s_debts, 0, sbi->s_groups_count * sizeof(*sbi->s_debts));
for (i = 0; i < db_count; i++) { for (i = 0; i < db_count; i++) {
block = descriptor_loc(sb, logic_sb_block, i); block = descriptor_loc(sb, logic_sb_block, i);
sbi->s_group_desc[i] = sb_bread(sb, block); sbi->s_group_desc[i] = sb_bread(sb, block);
...@@ -1236,6 +1244,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1236,6 +1244,7 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
goto failed_mount2; goto failed_mount2;
} }
sbi->s_gdb_count = db_count; sbi->s_gdb_count = db_count;
sbi->s_dir_count = ext3_count_dirs(sb);
/* /*
* set up enough so that it can read an inode * set up enough so that it can read an inode
*/ */
...@@ -1339,6 +1348,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent) ...@@ -1339,6 +1348,8 @@ static int ext3_fill_super (struct super_block *sb, void *data, int silent)
failed_mount3: failed_mount3:
journal_destroy(sbi->s_journal); journal_destroy(sbi->s_journal);
failed_mount2: failed_mount2:
if (sbi->s_debts)
kfree(sbi->s_debts);
for (i = 0; i < db_count; i++) for (i = 0; i < db_count; i++)
brelse(sbi->s_group_desc[i]); brelse(sbi->s_group_desc[i]);
kfree(sbi->s_group_desc); kfree(sbi->s_group_desc);
......
...@@ -92,6 +92,7 @@ struct request { ...@@ -92,6 +92,7 @@ struct request {
/* /*
* when request is used as a packet command carrier * when request is used as a packet command carrier
*/ */
unsigned int cmd_len;
unsigned char cmd[16]; unsigned char cmd[16];
unsigned int data_len; unsigned int data_len;
......
...@@ -191,10 +191,11 @@ struct ext2_group_desc ...@@ -191,10 +191,11 @@ struct ext2_group_desc
#define EXT2_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */ #define EXT2_JOURNAL_DATA_FL 0x00004000 /* Reserved for ext3 */
#define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */ #define EXT2_NOTAIL_FL 0x00008000 /* file tail should not be merged */
#define EXT2_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ #define EXT2_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
#define EXT2_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
#define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */ #define EXT2_RESERVED_FL 0x80000000 /* reserved for ext2 lib */
#define EXT2_FL_USER_VISIBLE 0x00011FFF /* User visible flags */ #define EXT2_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
#define EXT2_FL_USER_MODIFIABLE 0x000100FF /* User modifiable flags */ #define EXT2_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */
/* /*
* ioctl commands * ioctl commands
...@@ -300,6 +301,7 @@ struct ext2_inode { ...@@ -300,6 +301,7 @@ struct ext2_inode {
* Mount flags * Mount flags
*/ */
#define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */ #define EXT2_MOUNT_CHECK 0x0001 /* Do mount-time checks */
#define EXT2_MOUNT_OLDALLOC 0x0002 /* Don't use the new Orlov allocator */
#define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */ #define EXT2_MOUNT_GRPID 0x0004 /* Create files with directory's group */
#define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */ #define EXT2_MOUNT_DEBUG 0x0008 /* Some debugging messages */
#define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */ #define EXT2_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
......
...@@ -44,7 +44,7 @@ struct ext2_sb_info { ...@@ -44,7 +44,7 @@ struct ext2_sb_info {
int s_first_ino; int s_first_ino;
u32 s_next_generation; u32 s_next_generation;
unsigned long s_dir_count; unsigned long s_dir_count;
u8 *debts; u8 *s_debts;
}; };
#endif /* _LINUX_EXT2_FS_SB */ #endif /* _LINUX_EXT2_FS_SB */
...@@ -186,10 +186,11 @@ struct ext3_group_desc ...@@ -186,10 +186,11 @@ struct ext3_group_desc
#define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */ #define EXT3_JOURNAL_DATA_FL 0x00004000 /* file data should be journaled */
#define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */ #define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */
#define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */ #define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
#define EXT3_TOPDIR_FL 0x00020000 /* Top of directory hierarchies*/
#define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */ #define EXT3_RESERVED_FL 0x80000000 /* reserved for ext3 lib */
#define EXT3_FL_USER_VISIBLE 0x00015FFF /* User visible flags */ #define EXT3_FL_USER_VISIBLE 0x0003DFFF /* User visible flags */
#define EXT3_FL_USER_MODIFIABLE 0x000100FF /* User modifiable flags */ #define EXT3_FL_USER_MODIFIABLE 0x000380FF /* User modifiable flags */
/* /*
* Inode dynamic state flags * Inode dynamic state flags
...@@ -308,6 +309,7 @@ struct ext3_inode { ...@@ -308,6 +309,7 @@ struct ext3_inode {
* Mount flags * Mount flags
*/ */
#define EXT3_MOUNT_CHECK 0x0001 /* Do mount-time checks */ #define EXT3_MOUNT_CHECK 0x0001 /* Do mount-time checks */
#define EXT3_MOUNT_OLDALLOC 0x0002 /* Don't use the new Orlov allocator */
#define EXT3_MOUNT_GRPID 0x0004 /* Create files with directory's group */ #define EXT3_MOUNT_GRPID 0x0004 /* Create files with directory's group */
#define EXT3_MOUNT_DEBUG 0x0008 /* Some debugging messages */ #define EXT3_MOUNT_DEBUG 0x0008 /* Some debugging messages */
#define EXT3_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */ #define EXT3_MOUNT_ERRORS_CONT 0x0010 /* Continue on errors */
...@@ -704,6 +706,7 @@ extern struct inode * ext3_new_inode (handle_t *, struct inode *, int); ...@@ -704,6 +706,7 @@ extern struct inode * ext3_new_inode (handle_t *, struct inode *, int);
extern void ext3_free_inode (handle_t *, struct inode *); extern void ext3_free_inode (handle_t *, struct inode *);
extern struct inode * ext3_orphan_get (struct super_block *, ino_t); extern struct inode * ext3_orphan_get (struct super_block *, ino_t);
extern unsigned long ext3_count_free_inodes (struct super_block *); extern unsigned long ext3_count_free_inodes (struct super_block *);
extern unsigned long ext3_count_dirs (struct super_block *);
extern void ext3_check_inodes_bitmap (struct super_block *); extern void ext3_check_inodes_bitmap (struct super_block *);
extern unsigned long ext3_count_free (struct buffer_head *, unsigned); extern unsigned long ext3_count_free (struct buffer_head *, unsigned);
......
...@@ -50,6 +50,8 @@ struct ext3_sb_info { ...@@ -50,6 +50,8 @@ struct ext3_sb_info {
u32 s_next_generation; u32 s_next_generation;
u32 s_hash_seed[4]; u32 s_hash_seed[4];
int s_def_hash_version; int s_def_hash_version;
unsigned long s_dir_count;
u8 *s_debts;
/* Journaling */ /* Journaling */
struct inode * s_journal_inode; struct inode * s_journal_inode;
......
...@@ -196,7 +196,7 @@ int isapnp_proc_init(void); ...@@ -196,7 +196,7 @@ int isapnp_proc_init(void);
int isapnp_proc_done(void); int isapnp_proc_done(void);
#else #else
static inline isapnp_proc_init(void) { return 0; } static inline isapnp_proc_init(void) { return 0; }
static inline isapnp_proc_done(void) { return 0; ) static inline isapnp_proc_done(void) { return 0; }
#endif #endif
/* misc */ /* misc */
......
...@@ -154,6 +154,7 @@ struct uart_port { ...@@ -154,6 +154,7 @@ struct uart_port {
unsigned int flags; unsigned int flags;
#define UPF_HUP_NOTIFY (1 << 0) #define UPF_HUP_NOTIFY (1 << 0)
#define UPF_FOURPORT (1 << 1)
#define UPF_SAK (1 << 2) #define UPF_SAK (1 << 2)
#define UPF_SPD_MASK (0x1030) #define UPF_SPD_MASK (0x1030)
#define UPF_SPD_HI (0x0010) #define UPF_SPD_HI (0x0010)
...@@ -167,6 +168,9 @@ struct uart_port { ...@@ -167,6 +168,9 @@ struct uart_port {
#define UPF_LOW_LATENCY (1 << 13) #define UPF_LOW_LATENCY (1 << 13)
#define UPF_BUGGY_UART (1 << 14) #define UPF_BUGGY_UART (1 << 14)
#define UPF_AUTOPROBE (1 << 15) #define UPF_AUTOPROBE (1 << 15)
#define UPF_BOOT_ONLYMCA (1 << 22)
#define UPF_CONS_FLOW (1 << 23)
#define UPF_SHARE_IRQ (1 << 24)
#define UPF_BOOT_AUTOCONF (1 << 28) #define UPF_BOOT_AUTOCONF (1 << 28)
#define UPF_RESOURCES (1 << 30) #define UPF_RESOURCES (1 << 30)
#define UPF_IOREMAP (1 << 31) #define UPF_IOREMAP (1 << 31)
...@@ -247,8 +251,6 @@ struct uart_info { ...@@ -247,8 +251,6 @@ struct uart_info {
/* number of characters left in xmit buffer before we ask for more */ /* number of characters left in xmit buffer before we ask for more */
#define WAKEUP_CHARS 256 #define WAKEUP_CHARS 256
#define EVT_WRITE_WAKEUP 0
struct module; struct module;
struct tty_driver; struct tty_driver;
...@@ -269,7 +271,7 @@ struct uart_driver { ...@@ -269,7 +271,7 @@ struct uart_driver {
struct tty_driver *tty_driver; struct tty_driver *tty_driver;
}; };
void uart_event(struct uart_port *port, int event); void uart_write_wakeup(struct uart_port *port);
struct uart_port *uart_get_console(struct uart_port *ports, int nr, struct uart_port *uart_get_console(struct uart_port *ports, int nr,
struct console *c); struct console *c);
void uart_parse_options(char *options, int *baud, int *parity, int *bits, void uart_parse_options(char *options, int *baud, int *parity, int *bits,
...@@ -380,7 +382,7 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status) ...@@ -380,7 +382,7 @@ uart_handle_cts_change(struct uart_port *port, unsigned int status)
if (status) { if (status) {
tty->hw_stopped = 0; tty->hw_stopped = 0;
port->ops->start_tx(port, 0); port->ops->start_tx(port, 0);
uart_event(port, EVT_WRITE_WAKEUP); uart_write_wakeup(port);
} }
} else { } else {
if (!status) { if (!status) {
......
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