From 562e127fa76b23b3c94a20d818a0bad43acc88f8 Mon Sep 17 00:00:00 2001 From: Dave Neuer Date: Thu, 9 Jun 2005 17:40:55 +0100 Subject: [PATCH] --- yaml --- r: 1936 b: refs/heads/master c: 12035d64565ae7ecbc7fe906e7fcc8a4a71a3789 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/CREDITS | 6 +- trunk/arch/arm/Kconfig | 2 +- trunk/arch/arm/configs/h3600_defconfig | 24 ++-- trunk/arch/arm/mach-sa1100/Kconfig | 2 +- trunk/arch/ia64/kernel/fsys.S | 4 +- trunk/drivers/block/ub.c | 4 +- trunk/drivers/pci/hotplug/cpci_hotplug_core.c | 2 - trunk/drivers/pci/hotplug/cpci_hotplug_pci.c | 5 +- trunk/drivers/scsi/libata-core.c | 4 +- trunk/drivers/scsi/sata_sil.c | 8 +- trunk/drivers/usb/serial/ftdi_sio.c | 118 ++++-------------- 12 files changed, 55 insertions(+), 126 deletions(-) diff --git a/[refs] b/[refs] index 9eadae9e8d68..7836a7880e9e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 99fdb2fe523480a8748a5af18139bb1f7785c815 +refs/heads/master: 12035d64565ae7ecbc7fe906e7fcc8a4a71a3789 diff --git a/trunk/CREDITS b/trunk/CREDITS index 9bd099d960f3..d65ffe5a4d08 100644 --- a/trunk/CREDITS +++ b/trunk/CREDITS @@ -2475,13 +2475,9 @@ S: Potsdam, New York 13676 S: USA N: Dave Neuer -E: dneuer@innovation-charter.com -E: mr_fred_smoothie@yahoo.com +E: dave.neuer@pobox.com D: Helped implement support for Compaq's H31xx series iPAQs D: Other mostly minor tweaks & bugfixes -S: 325 E. Main St., Suite 3 -S: Carnegie, PA 15105 -S: USA N: Michael Neuffer E: mike@i-Connect.Net diff --git a/trunk/arch/arm/Kconfig b/trunk/arch/arm/Kconfig index bf397a9f8ac2..e787029d1978 100644 --- a/trunk/arch/arm/Kconfig +++ b/trunk/arch/arm/Kconfig @@ -497,7 +497,7 @@ source "drivers/cpufreq/Kconfig" config CPU_FREQ_SA1100 bool - depends on CPU_FREQ && (SA1100_LART || SA1100_PLEB) + depends on CPU_FREQ && (SA1100_H3100 || SA1100_H3600 || SA1100_H3800 || SA1100_LART || SA1100_PLEB) default y config CPU_FREQ_SA1110 diff --git a/trunk/arch/arm/configs/h3600_defconfig b/trunk/arch/arm/configs/h3600_defconfig index b4e297dd54b2..b9de07de80fe 100644 --- a/trunk/arch/arm/configs/h3600_defconfig +++ b/trunk/arch/arm/configs/h3600_defconfig @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit -# Linux kernel version: 2.6.12-rc1-bk2 -# Mon Mar 28 00:02:26 2005 +# Linux kernel version: 2.6.12-rc4 +# Thu Jun 9 01:59:03 2005 # CONFIG_ARM=y CONFIG_MMU=y @@ -16,6 +16,7 @@ CONFIG_GENERIC_IOMAP=y CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y +CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup @@ -33,6 +34,8 @@ CONFIG_KOBJECT_UEVENT=y # CONFIG_EMBEDDED is not set CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_EXTRA_PASS is not set +CONFIG_PRINTK=y +CONFIG_BUG=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y @@ -120,6 +123,7 @@ CONFIG_CPU_MINICACHE=y # Bus support # CONFIG_ISA=y +CONFIG_ISA_DMA_API=y # # PCCARD (PCMCIA/CardBus) support @@ -138,6 +142,7 @@ CONFIG_PCMCIA_SA1100=y # # Kernel Features # +# CONFIG_SMP is not set # CONFIG_PREEMPT is not set CONFIG_DISCONTIGMEM=y # CONFIG_LEDS is not set @@ -159,12 +164,13 @@ CONFIG_CPU_FREQ_TABLE=y # CONFIG_CPU_FREQ_DEBUG is not set CONFIG_CPU_FREQ_STAT=y # CONFIG_CPU_FREQ_STAT_DETAILS is not set -CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y -# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set -CONFIG_CPU_FREQ_GOV_PERFORMANCE=y +# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set +CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y +# CONFIG_CPU_FREQ_GOV_PERFORMANCE is not set # CONFIG_CPU_FREQ_GOV_POWERSAVE is not set -# CONFIG_CPU_FREQ_GOV_USERSPACE is not set +CONFIG_CPU_FREQ_GOV_USERSPACE=y # CONFIG_CPU_FREQ_GOV_ONDEMAND is not set +CONFIG_CPU_FREQ_SA1100=y # # Floating point emulation @@ -298,7 +304,6 @@ CONFIG_MTD_SA1100=y # # Block devices # -# CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_XD is not set # CONFIG_BLK_DEV_COW_COMMON is not set CONFIG_BLK_DEV_LOOP=m @@ -379,7 +384,6 @@ CONFIG_NET=y # Networking options # # CONFIG_PACKET is not set -# CONFIG_NETLINK_DEV is not set CONFIG_UNIX=y # CONFIG_NET_KEY is not set CONFIG_INET=y @@ -476,6 +480,7 @@ CONFIG_IRCOMM=m # CONFIG_SMC_IRCC_FIR is not set # CONFIG_ALI_FIR is not set CONFIG_SA1100_FIR=m +# CONFIG_VIA_FIR is not set # CONFIG_BT is not set CONFIG_NETDEVICES=y # CONFIG_DUMMY is not set @@ -647,7 +652,6 @@ CONFIG_LEGACY_PTY_COUNT=256 # # TPM devices # -# CONFIG_TCG_TPM is not set # # I2C support @@ -676,9 +680,11 @@ CONFIG_FB_CFB_FILLRECT=y CONFIG_FB_CFB_COPYAREA=y CONFIG_FB_CFB_IMAGEBLIT=y CONFIG_FB_SOFT_CURSOR=y +# CONFIG_FB_MACMODES is not set # CONFIG_FB_MODE_HELPERS is not set # CONFIG_FB_TILEBLITTING is not set CONFIG_FB_SA1100=y +# CONFIG_FB_S1D13XXX is not set # CONFIG_FB_VIRTUAL is not set # diff --git a/trunk/arch/arm/mach-sa1100/Kconfig b/trunk/arch/arm/mach-sa1100/Kconfig index 50cde576dadf..6923316b3d0d 100644 --- a/trunk/arch/arm/mach-sa1100/Kconfig +++ b/trunk/arch/arm/mach-sa1100/Kconfig @@ -150,7 +150,7 @@ config SA1100_SSP config H3600_SLEEVE tristate "Compaq iPAQ Handheld sleeve support" - depends on SA1100_H3600 + depends on SA1100_H3100 || SA1100_H3600 help Choose this option to enable support for extension packs (sleeves) for the Compaq iPAQ H3XXX series of handheld computers. This option diff --git a/trunk/arch/ia64/kernel/fsys.S b/trunk/arch/ia64/kernel/fsys.S index 962b6c4e32b5..4f3cdef75797 100644 --- a/trunk/arch/ia64/kernel/fsys.S +++ b/trunk/arch/ia64/kernel/fsys.S @@ -460,9 +460,9 @@ EX(.fail_efault, ld8 r14=[r33]) // r14 <- *set ;; st8 [r2]=r14 // update current->blocked with new mask - cmpxchg4.acq r8=[r9],r18,ar.ccv // current->thread_info->flags <- r18 + cmpxchg4.acq r14=[r9],r18,ar.ccv // current->thread_info->flags <- r18 ;; - cmp.ne p6,p0=r17,r8 // update failed? + cmp.ne p6,p0=r17,r14 // update failed? (p6) br.cond.spnt.few 1b // yes -> retry #ifdef CONFIG_SMP diff --git a/trunk/drivers/block/ub.c b/trunk/drivers/block/ub.c index 19c5e59bcfa8..adc4dcc306f4 100644 --- a/trunk/drivers/block/ub.c +++ b/trunk/drivers/block/ub.c @@ -51,7 +51,7 @@ * This many LUNs per USB device. * Every one of them takes a host, see UB_MAX_HOSTS. */ -#define UB_MAX_LUNS 9 +#define UB_MAX_LUNS 4 /* */ @@ -2100,7 +2100,7 @@ static int ub_probe(struct usb_interface *intf, nluns = rc; break; } - msleep(100); + mdelay(100); } for (i = 0; i < nluns; i++) { diff --git a/trunk/drivers/pci/hotplug/cpci_hotplug_core.c b/trunk/drivers/pci/hotplug/cpci_hotplug_core.c index 30af105271a2..8132d946c384 100644 --- a/trunk/drivers/pci/hotplug/cpci_hotplug_core.c +++ b/trunk/drivers/pci/hotplug/cpci_hotplug_core.c @@ -217,8 +217,6 @@ static void release_slot(struct hotplug_slot *hotplug_slot) kfree(slot->hotplug_slot->info); kfree(slot->hotplug_slot->name); kfree(slot->hotplug_slot); - if (slot->dev) - pci_dev_put(slot->dev); kfree(slot); } diff --git a/trunk/drivers/pci/hotplug/cpci_hotplug_pci.c b/trunk/drivers/pci/hotplug/cpci_hotplug_pci.c index 225b5e551dd6..c878028ad215 100644 --- a/trunk/drivers/pci/hotplug/cpci_hotplug_pci.c +++ b/trunk/drivers/pci/hotplug/cpci_hotplug_pci.c @@ -315,12 +315,9 @@ int cpci_unconfigure_slot(struct slot* slot) PCI_DEVFN(PCI_SLOT(slot->devfn), i)); if (dev) { pci_remove_bus_device(dev); - pci_dev_put(dev); + slot->dev = NULL; } } - pci_dev_put(slot->dev); - slot->dev = NULL; - dbg("%s - exit", __FUNCTION__); return 0; } diff --git a/trunk/drivers/scsi/libata-core.c b/trunk/drivers/scsi/libata-core.c index 9e58f134f68b..21d194c6ace3 100644 --- a/trunk/drivers/scsi/libata-core.c +++ b/trunk/drivers/scsi/libata-core.c @@ -2577,6 +2577,7 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes) next_sg: sg = &qc->sg[qc->cursg]; +next_page: page = sg->page; offset = sg->offset + qc->cursg_ofs; @@ -2584,7 +2585,6 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes) page = nth_page(page, (offset >> PAGE_SHIFT)); offset %= PAGE_SIZE; - /* don't overrun current sg */ count = min(sg->length - qc->cursg_ofs, bytes); /* don't cross page boundaries */ @@ -2609,6 +2609,8 @@ static void __atapi_pio_bytes(struct ata_queued_cmd *qc, unsigned int bytes) kunmap(page); if (bytes) { + if (qc->cursg_ofs < sg->length) + goto next_page; goto next_sg; } } diff --git a/trunk/drivers/scsi/sata_sil.c b/trunk/drivers/scsi/sata_sil.c index 49ed557a4b66..238580d244e6 100644 --- a/trunk/drivers/scsi/sata_sil.c +++ b/trunk/drivers/scsi/sata_sil.c @@ -432,13 +432,7 @@ static int sil_init_one (struct pci_dev *pdev, const struct pci_device_id *ent) writeb(cls, mmio_base + SIL_FIFO_R0); writeb(cls, mmio_base + SIL_FIFO_W0); writeb(cls, mmio_base + SIL_FIFO_R1); - writeb(cls, mmio_base + SIL_FIFO_W1); - if (ent->driver_data == sil_3114) { - writeb(cls, mmio_base + SIL_FIFO_R2); - writeb(cls, mmio_base + SIL_FIFO_W2); - writeb(cls, mmio_base + SIL_FIFO_R3); - writeb(cls, mmio_base + SIL_FIFO_W3); - } + writeb(cls, mmio_base + SIL_FIFO_W2); } else printk(KERN_WARNING DRV_NAME "(%s): cache line size not set. Driver may not function\n", pci_name(pdev)); diff --git a/trunk/drivers/usb/serial/ftdi_sio.c b/trunk/drivers/usb/serial/ftdi_sio.c index 3bfcc7b9f861..051c3a77b41b 100644 --- a/trunk/drivers/usb/serial/ftdi_sio.c +++ b/trunk/drivers/usb/serial/ftdi_sio.c @@ -264,7 +264,7 @@ /* * Version Information */ -#define DRIVER_VERSION "v1.4.2" +#define DRIVER_VERSION "v1.4.1" #define DRIVER_AUTHOR "Greg Kroah-Hartman , Bill Ryder , Kuba Ober " #define DRIVER_DESC "USB FTDI Serial Converters Driver" @@ -687,8 +687,6 @@ struct ftdi_private { char prev_status, diff_status; /* Used for TIOCMIWAIT */ __u8 rx_flags; /* receive state flags (throttling) */ spinlock_t rx_lock; /* spinlock for receive state */ - struct work_struct rx_work; - int rx_processed; __u16 interface; /* FT2232C port interface (0 for FT232/245) */ @@ -719,7 +717,7 @@ static int ftdi_write_room (struct usb_serial_port *port); static int ftdi_chars_in_buffer (struct usb_serial_port *port); static void ftdi_write_bulk_callback (struct urb *urb, struct pt_regs *regs); static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs); -static void ftdi_process_read (void *param); +static void ftdi_process_read (struct usb_serial_port *port); static void ftdi_set_termios (struct usb_serial_port *port, struct termios * old); static int ftdi_tiocmget (struct usb_serial_port *port, struct file *file); static int ftdi_tiocmset (struct usb_serial_port *port, struct file * file, unsigned int set, unsigned int clear); @@ -1389,8 +1387,6 @@ static int ftdi_common_startup (struct usb_serial *serial) port->read_urb->transfer_buffer_length = BUFSZ; } - INIT_WORK(&priv->rx_work, ftdi_process_read, port); - /* Free port's existing write urb and transfer buffer. */ if (port->write_urb) { usb_free_urb (port->write_urb); @@ -1621,7 +1617,6 @@ static int ftdi_open (struct usb_serial_port *port, struct file *filp) spin_unlock_irqrestore(&priv->rx_lock, flags); /* Start reading from the device */ - priv->rx_processed = 0; usb_fill_bulk_urb(port->read_urb, dev, usb_rcvbulkpipe(dev, port->bulk_in_endpointAddress), port->read_urb->transfer_buffer, port->read_urb->transfer_buffer_length, @@ -1672,10 +1667,6 @@ static void ftdi_close (struct usb_serial_port *port, struct file *filp) err("Error from RTS LOW urb"); } } /* Note change no line if hupcl is off */ - - /* cancel any scheduled reading */ - cancel_delayed_work(&priv->rx_work); - flush_scheduled_work(); /* shutdown our bulk read */ if (port->read_urb) @@ -1871,14 +1862,23 @@ static void ftdi_read_bulk_callback (struct urb *urb, struct pt_regs *regs) return; } + /* If throttled, delay receive processing until unthrottled. */ + spin_lock(&priv->rx_lock); + if (priv->rx_flags & THROTTLED) { + dbg("Deferring read urb processing until unthrottled"); + priv->rx_flags |= ACTUALLY_THROTTLED; + spin_unlock(&priv->rx_lock); + return; + } + spin_unlock(&priv->rx_lock); + ftdi_process_read(port); } /* ftdi_read_bulk_callback */ -static void ftdi_process_read (void *param) +static void ftdi_process_read (struct usb_serial_port *port) { /* ftdi_process_read */ - struct usb_serial_port *port = (struct usb_serial_port*)param; struct urb *urb; struct tty_struct *tty; struct ftdi_private *priv; @@ -1889,7 +1889,6 @@ static void ftdi_process_read (void *param) int result; int need_flip; int packet_offset; - unsigned long flags; dbg("%s - port %d", __FUNCTION__, port->number); @@ -1916,18 +1915,12 @@ static void ftdi_process_read (void *param) data = urb->transfer_buffer; - if (priv->rx_processed) { - dbg("%s - already processed: %d bytes, %d remain", __FUNCTION__, - priv->rx_processed, - urb->actual_length - priv->rx_processed); + /* The first two bytes of every read packet are status */ + if (urb->actual_length > 2) { + usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); } else { - /* The first two bytes of every read packet are status */ - if (urb->actual_length > 2) { - usb_serial_debug_data(debug, &port->dev, __FUNCTION__, urb->actual_length, data); - } else { - dbg("Status only: %03oo %03oo",data[0],data[1]); - } - } + dbg("Status only: %03oo %03oo",data[0],data[1]); + } /* TO DO -- check for hung up line and handle appropriately: */ @@ -1936,12 +1929,8 @@ static void ftdi_process_read (void *param) /* if CD is dropped and the line is not CLOCAL then we should hangup */ need_flip = 0; - for (packet_offset = priv->rx_processed; packet_offset < urb->actual_length; packet_offset += PKTSZ) { - int length; - + for (packet_offset=0; packet_offset < urb->actual_length; packet_offset += PKTSZ) { /* Compare new line status to the old one, signal if different */ - /* N.B. packet may be processed more than once, but differences - * are only processed once. */ if (priv != NULL) { char new_status = data[packet_offset+0] & FTDI_STATUS_B0_MASK; if (new_status != priv->prev_status) { @@ -1951,35 +1940,6 @@ static void ftdi_process_read (void *param) } } - length = min(PKTSZ, urb->actual_length-packet_offset)-2; - if (length < 0) { - err("%s - bad packet length: %d", __FUNCTION__, length+2); - length = 0; - } - - /* have to make sure we don't overflow the buffer - with tty_insert_flip_char's */ - if (tty->flip.count+length > TTY_FLIPBUF_SIZE) { - tty_flip_buffer_push(tty); - need_flip = 0; - - if (tty->flip.count != 0) { - /* flip didn't work, this happens when ftdi_process_read() is - * called from ftdi_unthrottle, because TTY_DONT_FLIP is set */ - dbg("%s - flip buffer push failed", __FUNCTION__); - break; - } - } - if (priv->rx_flags & THROTTLED) { - dbg("%s - throttled", __FUNCTION__); - break; - } - if (tty->ldisc.receive_room(tty)-tty->flip.count < length) { - /* break out & wait for throttling/unthrottling to happen */ - dbg("%s - receive room low", __FUNCTION__); - break; - } - /* Handle errors and break */ error_flag = TTY_NORMAL; /* Although the device uses a bitmask and hence can have multiple */ @@ -2002,8 +1962,13 @@ static void ftdi_process_read (void *param) error_flag = TTY_FRAME; dbg("FRAMING error"); } - if (length > 0) { - for (i = 2; i < length+2; i++) { + if (urb->actual_length > packet_offset + 2) { + for (i = 2; (i < PKTSZ) && ((i+packet_offset) < urb->actual_length); ++i) { + /* have to make sure we don't overflow the buffer + with tty_insert_flip_char's */ + if(tty->flip.count >= TTY_FLIPBUF_SIZE) { + tty_flip_buffer_push(tty); + } /* Note that the error flag is duplicated for every character received since we don't know which character it applied to */ @@ -2040,35 +2005,6 @@ static void ftdi_process_read (void *param) tty_flip_buffer_push(tty); } - if (packet_offset < urb->actual_length) { - /* not completely processed - record progress */ - priv->rx_processed = packet_offset; - dbg("%s - incomplete, %d bytes processed, %d remain", - __FUNCTION__, packet_offset, - urb->actual_length - packet_offset); - /* check if we were throttled while processing */ - spin_lock_irqsave(&priv->rx_lock, flags); - if (priv->rx_flags & THROTTLED) { - priv->rx_flags |= ACTUALLY_THROTTLED; - spin_unlock_irqrestore(&priv->rx_lock, flags); - dbg("%s - deferring remainder until unthrottled", - __FUNCTION__); - return; - } - spin_unlock_irqrestore(&priv->rx_lock, flags); - /* if the port is closed stop trying to read */ - if (port->open_count > 0){ - /* delay processing of remainder */ - schedule_delayed_work(&priv->rx_work, 1); - } else { - dbg("%s - port is closed", __FUNCTION__); - } - return; - } - - /* urb is completely processed */ - priv->rx_processed = 0; - /* if the port is closed stop trying to read */ if (port->open_count > 0){ /* Continue trying to always read */ @@ -2508,7 +2444,7 @@ static void ftdi_unthrottle (struct usb_serial_port *port) spin_unlock_irqrestore(&priv->rx_lock, flags); if (actually_throttled) - schedule_work(&priv->rx_work); + ftdi_process_read(port); } static int __init ftdi_init (void)