Commit fba0a9a3 authored by James Bottomley's avatar James Bottomley

Merge ssh://mulgrave-w/BK/scsi-misc-2.5

into raven.il.steeleye.com:/home/jejb/BK/scsi-for-linus-2.5
parents 3e0bb0d1 493c6685
...@@ -2935,9 +2935,9 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -2935,9 +2935,9 @@ int acornscsi_proc_info(char *buffer, char **start, off_t offset,
} }
} }
p += sprintf(p, "\nAttached devices:%s\n", instance->host_queue ? "" : " none"); p += sprintf(p, "\nAttached devices:\n");
for (scd = instance->host_queue; scd; scd = scd->next) { list_for_each_entry(scd, &instance->my_devices, siblings) {
int len; int len;
proc_print_scsidevice(scd, p, &len, 0); proc_print_scsidevice(scd, p, &len, 0);
......
...@@ -311,7 +311,7 @@ int arxescsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -311,7 +311,7 @@ int arxescsi_proc_info(char *buffer, char **start, off_t offset,
pos += sprintf (buffer+pos, "\nAttached devices:\n"); pos += sprintf (buffer+pos, "\nAttached devices:\n");
for (scd = host->host_queue; scd; scd = scd->next) { list_for_each_entry(scd, &host->my_devices, siblings) {
pos += fas216_print_device(&info->info, scd, buffer + pos); pos += fas216_print_device(&info->info, scd, buffer + pos);
if (pos + begin < offset) { if (pos + begin < offset) {
......
...@@ -387,7 +387,7 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset, ...@@ -387,7 +387,7 @@ int cumanascsi_2_proc_info (char *buffer, char **start, off_t offset,
pos += sprintf(buffer+pos, "\nAttached devices:\n"); pos += sprintf(buffer+pos, "\nAttached devices:\n");
for (scd = host->host_queue; scd; scd = scd->next) { list_for_each_entry(scd, &host->my_devices, siblings) {
int len; int len;
proc_print_scsidevice(scd, buffer, &len, pos); proc_print_scsidevice(scd, buffer, &len, pos);
......
...@@ -390,7 +390,7 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -390,7 +390,7 @@ int eesoxscsi_proc_info(char *buffer, char **start, off_t offset,
pos += sprintf(buffer+pos, "\nAttached devices:\n"); pos += sprintf(buffer+pos, "\nAttached devices:\n");
for (scd = host->host_queue; scd; scd = scd->next) { list_for_each_entry(scd, &host->my_devices, siblings) {
int len; int len;
proc_print_scsidevice(scd, buffer, &len, pos); proc_print_scsidevice(scd, buffer, &len, pos);
......
...@@ -2631,7 +2631,7 @@ int fas216_eh_bus_reset(Scsi_Cmnd *SCpnt) ...@@ -2631,7 +2631,7 @@ int fas216_eh_bus_reset(Scsi_Cmnd *SCpnt)
* all command structures. Leave the running * all command structures. Leave the running
* command in place. * command in place.
*/ */
for (SDpnt = info->host->host_queue; SDpnt; SDpnt = SDpnt->next) { list_for_each_entry(SDpnt, &info->host->my_devices, siblings) {
int i; int i;
if (SDpnt->soft_reset) if (SDpnt->soft_reset)
......
...@@ -269,7 +269,7 @@ int powertecscsi_proc_info(char *buffer, char **start, off_t offset, ...@@ -269,7 +269,7 @@ int powertecscsi_proc_info(char *buffer, char **start, off_t offset,
pos += sprintf(buffer+pos, "\nAttached devices:\n"); pos += sprintf(buffer+pos, "\nAttached devices:\n");
for (scd = host->host_queue; scd; scd = scd->next) { list_for_each_entry(scd, &host->my_devices, siblings) {
pos += fas216_print_device(&info->info, scd, buffer + pos); pos += fas216_print_device(&info->info, scd, buffer + pos);
if (pos + begin < offset) { if (pos + begin < offset) {
......
...@@ -372,6 +372,8 @@ int tty_check_change(struct tty_struct * tty) ...@@ -372,6 +372,8 @@ int tty_check_change(struct tty_struct * tty)
return -ERESTARTSYS; return -ERESTARTSYS;
} }
EXPORT_SYMBOL(tty_check_change);
static ssize_t hung_up_tty_read(struct file * file, char * buf, static ssize_t hung_up_tty_read(struct file * file, char * buf,
size_t count, loff_t *ppos) size_t count, loff_t *ppos)
{ {
...@@ -540,6 +542,8 @@ void tty_hangup(struct tty_struct * tty) ...@@ -540,6 +542,8 @@ void tty_hangup(struct tty_struct * tty)
schedule_work(&tty->hangup_work); schedule_work(&tty->hangup_work);
} }
EXPORT_SYMBOL(tty_hangup);
void tty_vhangup(struct tty_struct * tty) void tty_vhangup(struct tty_struct * tty)
{ {
#ifdef TTY_DEBUG_HANGUP #ifdef TTY_DEBUG_HANGUP
...@@ -556,6 +560,8 @@ int tty_hung_up_p(struct file * filp) ...@@ -556,6 +560,8 @@ int tty_hung_up_p(struct file * filp)
return (filp->f_op == &hung_up_tty_fops); return (filp->f_op == &hung_up_tty_fops);
} }
EXPORT_SYMBOL(tty_hung_up_p);
/* /*
* This function is typically called only by the session leader, when * This function is typically called only by the session leader, when
* it wants to disassociate itself from its controlling tty. * it wants to disassociate itself from its controlling tty.
...@@ -1886,6 +1892,8 @@ void do_SAK(struct tty_struct *tty) ...@@ -1886,6 +1892,8 @@ void do_SAK(struct tty_struct *tty)
schedule_work(&tty->SAK_work); schedule_work(&tty->SAK_work);
} }
EXPORT_SYMBOL(do_SAK);
/* /*
* This routine is called out of the software interrupt to flush data * This routine is called out of the software interrupt to flush data
* from the flip buffer to the line discipline. * from the flip buffer to the line discipline.
...@@ -1946,34 +1954,44 @@ static int baud_table[] = { ...@@ -1946,34 +1954,44 @@ static int baud_table[] = {
#endif #endif
}; };
static int n_baud_table = sizeof(baud_table)/sizeof(int); static int n_baud_table = ARRAY_SIZE(baud_table);
int tty_get_baud_rate(struct tty_struct *tty) int tty_termios_baud_rate(struct termios *termios)
{ {
unsigned int cflag, i; unsigned int cbaud = termios->c_cflag & CBAUD;
cflag = tty->termios->c_cflag; if (cbaud & CBAUDEX) {
cbaud &= ~CBAUDEX;
i = cflag & CBAUD; if (cbaud < 1 || cbaud + 15 > n_baud_table)
if (i & CBAUDEX) { termios->c_cflag &= ~CBAUDEX;
i &= ~CBAUDEX;
if (i < 1 || i+15 >= n_baud_table)
tty->termios->c_cflag &= ~CBAUDEX;
else else
i += 15; cbaud += 15;
} }
if (i==15 && tty->alt_speed) {
return baud_table[cbaud];
}
EXPORT_SYMBOL(tty_termios_baud_rate);
int tty_get_baud_rate(struct tty_struct *tty)
{
int baud = tty_termios_baud_rate(tty->termios);
if (baud == 38400 && tty->alt_speed) {
if (!tty->warned) { if (!tty->warned) {
printk(KERN_WARNING "Use of setserial/setrocket to " printk(KERN_WARNING "Use of setserial/setrocket to "
"set SPD_* flags is deprecated\n"); "set SPD_* flags is deprecated\n");
tty->warned = 1; tty->warned = 1;
} }
return(tty->alt_speed); baud = tty->alt_speed;
} }
return baud_table[i]; return baud;
} }
EXPORT_SYMBOL(tty_get_baud_rate);
void tty_flip_buffer_push(struct tty_struct *tty) void tty_flip_buffer_push(struct tty_struct *tty)
{ {
if (tty->low_latency) if (tty->low_latency)
......
...@@ -517,7 +517,7 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags) ...@@ -517,7 +517,7 @@ static void autoconfig(struct uart_8250_port *up, unsigned int probeflags)
unsigned char save_lcr, save_mcr; unsigned char save_lcr, save_mcr;
unsigned long flags; unsigned long flags;
if (!up->port.iobase && !up->port.membase) if (!up->port.iobase && !up->port.mapbase && !up->port.membase)
return; return;
DEBUG_AUTOCONF("ttyS%d: autoconf (0x%04x, 0x%08lx): ", DEBUG_AUTOCONF("ttyS%d: autoconf (0x%04x, 0x%08lx): ",
...@@ -1031,7 +1031,7 @@ static int serial_link_irq_chain(struct uart_8250_port *up) ...@@ -1031,7 +1031,7 @@ static int serial_link_irq_chain(struct uart_8250_port *up)
ret = request_irq(up->port.irq, serial8250_interrupt, ret = request_irq(up->port.irq, serial8250_interrupt,
irq_flags, "serial", i); irq_flags, "serial", i);
if (ret) if (ret < 0)
serial_do_unlink(i, up); serial_do_unlink(i, up);
} }
...@@ -1623,7 +1623,7 @@ static int serial8250_request_port(struct uart_port *port) ...@@ -1623,7 +1623,7 @@ static int serial8250_request_port(struct uart_port *port)
if (up->port.flags & UPF_RESOURCES) { if (up->port.flags & UPF_RESOURCES) {
if (up->port.type == PORT_RSA) { if (up->port.type == PORT_RSA) {
ret = serial8250_request_rsa_resource(up, &res_rsa); ret = serial8250_request_rsa_resource(up, &res_rsa);
if (ret) if (ret < 0)
return ret; return ret;
} }
...@@ -1641,7 +1641,7 @@ static int serial8250_request_port(struct uart_port *port) ...@@ -1641,7 +1641,7 @@ static int serial8250_request_port(struct uart_port *port)
ret = -ENOMEM; ret = -ENOMEM;
} }
if (ret) { if (ret < 0) {
if (res_rsa) if (res_rsa)
release_resource(res_rsa); release_resource(res_rsa);
if (res) if (res)
...@@ -1671,11 +1671,11 @@ static void serial8250_config_port(struct uart_port *port, int flags) ...@@ -1671,11 +1671,11 @@ static void serial8250_config_port(struct uart_port *port, int flags)
*/ */
if (up->port.flags & UPF_RESOURCES) { if (up->port.flags & UPF_RESOURCES) {
ret = serial8250_request_std_resource(up, &res_std); ret = serial8250_request_std_resource(up, &res_std);
if (ret) if (ret < 0)
return; return;
ret = serial8250_request_rsa_resource(up, &res_rsa); ret = serial8250_request_rsa_resource(up, &res_rsa);
if (ret) if (ret < 0)
probeflags &= ~PROBE_RSA; probeflags &= ~PROBE_RSA;
} else { } else {
probeflags &= ~PROBE_RSA; probeflags &= ~PROBE_RSA;
...@@ -1950,6 +1950,7 @@ static int __register_serial(struct serial_struct *req, int line) ...@@ -1950,6 +1950,7 @@ static int __register_serial(struct serial_struct *req, int line)
port.regshift = req->iomem_reg_shift; port.regshift = req->iomem_reg_shift;
port.iotype = req->io_type; port.iotype = req->io_type;
port.flags = req->flags | UPF_BOOT_AUTOCONF; port.flags = req->flags | UPF_BOOT_AUTOCONF;
port.mapbase = req->iomap_base;
port.line = line; port.line = line;
if (share_irqs) if (share_irqs)
...@@ -2029,11 +2030,10 @@ static int __init serial8250_init(void) ...@@ -2029,11 +2030,10 @@ static int __init serial8250_init(void)
spin_lock_init(&irq_lists[i].lock); spin_lock_init(&irq_lists[i].lock);
ret = uart_register_driver(&serial8250_reg); ret = uart_register_driver(&serial8250_reg);
if (ret) if (ret >= 0)
return ret; serial8250_register_ports(&serial8250_reg);
serial8250_register_ports(&serial8250_reg); return ret;
return 0;
} }
static void __exit serial8250_exit(void) static void __exit serial8250_exit(void)
......
...@@ -176,6 +176,7 @@ get_pci_port(struct pci_dev *dev, struct pci_board *board, ...@@ -176,6 +176,7 @@ get_pci_port(struct pci_dev *dev, struct pci_board *board,
return 0; return 0;
} }
req->io_type = SERIAL_IO_MEM; req->io_type = SERIAL_IO_MEM;
req->iomap_base = port;
req->iomem_base = ioremap(port, board->uart_offset); req->iomem_base = ioremap(port, board->uart_offset);
if (req->iomem_base == NULL) if (req->iomem_base == NULL)
return -ENOMEM; return -ENOMEM;
...@@ -262,12 +263,14 @@ static int __devinit pci_plx9050_fn(struct pci_dev *dev, int enable) ...@@ -262,12 +263,14 @@ static int __devinit pci_plx9050_fn(struct pci_dev *dev, int enable)
* interface chip and different configuration methods: * interface chip and different configuration methods:
* - 10x cards have control registers in IO and/or memory space; * - 10x cards have control registers in IO and/or memory space;
* - 20x cards have control registers in standard PCI configuration space. * - 20x cards have control registers in standard PCI configuration space.
*
* Note: some SIIG cards are probed by the parport_serial object.
*/ */
#define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc) #define PCI_DEVICE_ID_SIIG_1S_10x (PCI_DEVICE_ID_SIIG_1S_10x_550 & 0xfffc)
#define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8) #define PCI_DEVICE_ID_SIIG_2S_10x (PCI_DEVICE_ID_SIIG_2S_10x_550 & 0xfff8)
static int __devinit pci_siig10x_fn(struct pci_dev *dev, int enable) int pci_siig10x_fn(struct pci_dev *dev, int enable)
{ {
u16 data, *p; u16 data, *p;
...@@ -295,10 +298,12 @@ static int __devinit pci_siig10x_fn(struct pci_dev *dev, int enable) ...@@ -295,10 +298,12 @@ static int __devinit pci_siig10x_fn(struct pci_dev *dev, int enable)
return 0; return 0;
} }
EXPORT_SYMBOL(pci_siig10x_fn);
#define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc) #define PCI_DEVICE_ID_SIIG_2S_20x (PCI_DEVICE_ID_SIIG_2S_20x_550 & 0xfffc)
#define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc) #define PCI_DEVICE_ID_SIIG_2S1P_20x (PCI_DEVICE_ID_SIIG_2S1P_20x_550 & 0xfffc)
static int __devinit pci_siig20x_fn(struct pci_dev *dev, int enable) int pci_siig20x_fn(struct pci_dev *dev, int enable)
{ {
u8 data; u8 data;
...@@ -318,6 +323,8 @@ static int __devinit pci_siig20x_fn(struct pci_dev *dev, int enable) ...@@ -318,6 +323,8 @@ static int __devinit pci_siig20x_fn(struct pci_dev *dev, int enable)
return 0; return 0;
} }
EXPORT_SYMBOL(pci_siig20x_fn);
/* Added for EKF Intel i960 serial boards */ /* Added for EKF Intel i960 serial boards */
static int __devinit pci_inteli960ni_fn(struct pci_dev *dev, int enable) static int __devinit pci_inteli960ni_fn(struct pci_dev *dev, int enable)
{ {
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
# $Id: Makefile,v 1.8 2002/07/21 21:32:30 rmk Exp $ # $Id: Makefile,v 1.8 2002/07/21 21:32:30 rmk Exp $
# #
export-objs := core.o 8250.o suncore.o export-objs := core.o 8250.o 8250_pci.o suncore.o
serial-8250-y := serial-8250-y :=
serial-8250-$(CONFIG_GSC) += 8250_gsc.o serial-8250-$(CONFIG_GSC) += 8250_gsc.o
......
This diff is collapsed.
...@@ -48,6 +48,7 @@ struct serial_struct { ...@@ -48,6 +48,7 @@ struct serial_struct {
unsigned char *iomem_base; unsigned char *iomem_base;
unsigned short iomem_reg_shift; unsigned short iomem_reg_shift;
unsigned int port_high; unsigned int port_high;
unsigned long iomap_base; /* cookie passed into ioremap */
int reserved[1]; int reserved[1];
}; };
......
...@@ -186,6 +186,7 @@ struct uart_port { ...@@ -186,6 +186,7 @@ struct uart_port {
unsigned int timeout; /* character-based timeout */ unsigned int timeout; /* character-based timeout */
unsigned int type; /* port type */ unsigned int type; /* port type */
struct uart_ops *ops; struct uart_ops *ops;
unsigned int custom_divisor;
unsigned int line; /* port index */ unsigned int line; /* port index */
unsigned long mapbase; /* for ioremap */ unsigned long mapbase; /* for ioremap */
unsigned char hub6; /* this should be in the 8250 driver */ unsigned char hub6; /* this should be in the 8250 driver */
...@@ -204,8 +205,6 @@ struct uart_state { ...@@ -204,8 +205,6 @@ struct uart_state {
#define USF_CLOSING_WAIT_INF (0) #define USF_CLOSING_WAIT_INF (0)
#define USF_CLOSING_WAIT_NONE (65535) #define USF_CLOSING_WAIT_NONE (65535)
unsigned int custom_divisor;
int count; int count;
struct uart_info *info; struct uart_info *info;
struct uart_port *port; struct uart_port *port;
......
...@@ -397,6 +397,7 @@ extern void do_SAK(struct tty_struct *tty); ...@@ -397,6 +397,7 @@ extern void do_SAK(struct tty_struct *tty);
extern void disassociate_ctty(int priv); extern void disassociate_ctty(int priv);
extern void tty_flip_buffer_push(struct tty_struct *tty); extern void tty_flip_buffer_push(struct tty_struct *tty);
extern int tty_get_baud_rate(struct tty_struct *tty); extern int tty_get_baud_rate(struct tty_struct *tty);
extern int tty_termios_baud_rate(struct termios *termios);
/* n_tty.c */ /* n_tty.c */
extern struct tty_ldisc tty_ldisc_N_TTY; extern struct tty_ldisc tty_ldisc_N_TTY;
......
...@@ -353,13 +353,8 @@ EXPORT_SYMBOL(generic_file_writev); ...@@ -353,13 +353,8 @@ EXPORT_SYMBOL(generic_file_writev);
EXPORT_SYMBOL(iov_shorten); EXPORT_SYMBOL(iov_shorten);
/* tty routines */ /* tty routines */
EXPORT_SYMBOL(tty_hangup);
EXPORT_SYMBOL(tty_wait_until_sent); EXPORT_SYMBOL(tty_wait_until_sent);
EXPORT_SYMBOL(tty_check_change);
EXPORT_SYMBOL(tty_hung_up_p);
EXPORT_SYMBOL(tty_flip_buffer_push); EXPORT_SYMBOL(tty_flip_buffer_push);
EXPORT_SYMBOL(tty_get_baud_rate);
EXPORT_SYMBOL(do_SAK);
/* filesystem registration */ /* filesystem registration */
EXPORT_SYMBOL(register_filesystem); EXPORT_SYMBOL(register_filesystem);
......
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