linux-cvs-patches
[Top] [All Lists]

CVS Update@linux-mips.org: linux

To: linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
From: ralf@linux-mips.org
Date: Mon, 23 May 2005 13:12:37 +0100
Reply-to: linux-mips@linux-mips.org
Sender: linux-cvs-patches-bounce@linux-mips.org
CVSROOT:        /home/cvs
Module name:    linux
Changes by:     ralf@ftp.linux-mips.org 05/05/23 13:12:31

Modified files:
        .              : Tag: linux_2_4 Makefile 
        arch/ppc/kernel: Tag: linux_2_4 time.c 
        drivers/char   : Tag: linux_2_4 moxa.c 
        drivers/i2c    : Tag: linux_2_4 i2c-core.c 
        drivers/net    : Tag: linux_2_4 pcnet32.c 
        drivers/net/bonding: Tag: linux_2_4 bond_main.c 
        drivers/scsi   : Tag: linux_2_4 ahci.c libata-scsi.c sata_sil.c 
                         sata_svw.c 
        drivers/usb/serial: Tag: linux_2_4 pl2303.c 
        fs             : Tag: linux_2_4 binfmt_elf.c 
        include/linux  : Tag: linux_2_4 i2c.h 

Log message:
        Merge with Linux 2.4.31-pre2.

diff -urN linux/Makefile linux/Makefile
--- linux/Makefile      2005/05/05 13:43:41     1.119.2.36
+++ linux/Makefile      2005/05/23 12:12:30     1.119.2.37
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 31
-EXTRAVERSION = -pre1
+EXTRAVERSION = -pre2
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux/arch/ppc/kernel/time.c linux/arch/ppc/kernel/time.c
--- linux/arch/ppc/kernel/time.c        2003/08/13 17:19:11     1.26.2.6
+++ linux/arch/ppc/kernel/time.c        2005/05/23 12:12:30     1.26.2.7
@@ -150,7 +150,7 @@
 
        hardirq_enter(cpu);
 
-       while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) < 0) {
+       while ((next_dec = tb_ticks_per_jiffy - tb_delta(&jiffy_stamp)) <= 0) {
                jiffy_stamp += tb_ticks_per_jiffy;
                if (!user_mode(regs))
                        ppc_do_profile(instruction_pointer(regs));
diff -urN linux/drivers/char/moxa.c linux/drivers/char/moxa.c
--- linux/drivers/char/moxa.c   2005/01/13 10:59:03     1.9.2.2
+++ linux/drivers/char/moxa.c   2005/05/23 12:12:30     1.9.2.3
@@ -995,7 +995,8 @@
                return;
        }
        for (card = 0; card < MAX_BOARDS; card++) {
-               if ((ports = MoxaPortsOfCard(card)) <= 0)
+               if ((ports = MoxaPortsOfCard(card)) <= 0
+                               || moxaIntPend[card] == 0)
                        continue;
                ch = &moxaChannels[card * MAX_PORTS_PER_BOARD];
                for (i = 0; i < ports; i++, ch++) {
diff -urN linux/drivers/i2c/i2c-core.c linux/drivers/i2c/i2c-core.c
--- linux/drivers/i2c/i2c-core.c        2004/11/29 17:47:16     1.14.2.8
+++ linux/drivers/i2c/i2c-core.c        2005/05/23 12:12:30     1.14.2.9
@@ -851,7 +851,7 @@
                   at all */
                found = 0;
 
-               for (i = 0; !found && (address_data->force[i] != 
I2C_CLIENT_END); i += 3) {
+               for (i = 0; !found && (address_data->force[i] != 
I2C_CLIENT_END); i += 2) {
                        if (((adap_id == address_data->force[i]) || 
                             (address_data->force[i] == ANY_I2C_BUS)) &&
                             (addr == address_data->force[i+1])) {
diff -urN linux/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
--- linux/drivers/net/pcnet32.c 2005/01/09 19:34:02     1.33.2.12
+++ linux/drivers/net/pcnet32.c 2005/05/23 12:12:30     1.33.2.13
@@ -1348,7 +1348,8 @@
        printk(KERN_INFO "%s: registered as %s\n", dev->name, lp->name);
     cards_found++;
 
-    a->write_bcr(ioaddr, 2, 0x1002);   /* enable LED writes */
+    /* enable LED writes */
+    a->write_bcr(ioaddr, 2, a->read_bcr(ioaddr, 2) | 0x1000);
 
     return 0;
 
diff -urN linux/drivers/net/bonding/bond_main.c 
linux/drivers/net/bonding/bond_main.c
--- linux/drivers/net/bonding/bond_main.c       2004/11/19 00:28:40     1.3.2.6
+++ linux/drivers/net/bonding/bond_main.c       2005/05/23 12:12:30     1.3.2.7
@@ -469,6 +469,13 @@
  *       * Add support for VLAN hardware acceleration capable slaves.
  *       * Add capability to tag self generated packets in ALB/TLB modes.
  *       Set version to 2.6.0.
+ * 2004/10/29 - Mitch Williams <mitch.a.williams at intel dot com>
+ *     - Fixed bug when unloading module while using 802.3ad.  If
+ *       spinlock debugging is turned on, this causes a stack dump.
+ *       Solution is to move call to dev_remove_pack outside of the
+ *       spinlock.
+ *       Set version to 2.6.1.
+ *
  */
 
 //#define BONDING_DEBUG 1
@@ -3565,15 +3572,15 @@
 {
        struct bonding *bond = bond_dev->priv;
 
-       write_lock_bh(&bond->lock);
-
-       bond_mc_list_destroy(bond);
-
        if (bond->params.mode == BOND_MODE_8023AD) {
                /* Unregister the receive of LACPDUs */
                bond_unregister_lacpdu(bond);
        }
 
+       write_lock_bh(&bond->lock);
+
+       bond_mc_list_destroy(bond);
+
        /* signal timers not to re-arm */
        bond->kill_timers = 1;
 
diff -urN linux/drivers/scsi/ahci.c linux/drivers/scsi/ahci.c
--- linux/drivers/scsi/ahci.c   2005/03/18 12:13:27     1.2.2.4
+++ linux/drivers/scsi/ahci.c   2005/05/23 12:12:31     1.2.2.5
@@ -176,6 +176,7 @@
 static int ahci_port_start(struct ata_port *ap);
 static void ahci_port_stop(struct ata_port *ap);
 static void ahci_host_stop(struct ata_host_set *host_set);
+static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf);
 static void ahci_qc_prep(struct ata_queued_cmd *qc);
 static u8 ahci_check_status(struct ata_port *ap);
 static u8 ahci_check_err(struct ata_port *ap);
@@ -209,6 +210,8 @@
        .check_err              = ahci_check_err,
        .dev_select             = ata_noop_dev_select,
 
+       .tf_read                = ahci_tf_read,
+
        .phy_reset              = ahci_phy_reset,
 
        .qc_prep                = ahci_qc_prep,
@@ -249,8 +252,6 @@
          board_ahci }, /* ICH7 */
        { PCI_VENDOR_ID_INTEL, 0x27c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
          board_ahci }, /* ICH7M */
-       { PCI_VENDOR_ID_INTEL, 0x27c2, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-         board_ahci }, /* ICH7R */
        { PCI_VENDOR_ID_INTEL, 0x27c3, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
          board_ahci }, /* ICH7R */
        { PCI_VENDOR_ID_AL, 0x5288, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
@@ -462,6 +463,14 @@
        return (readl(mmio + PORT_TFDATA) >> 8) & 0xFF;
 }
 
+static void ahci_tf_read(struct ata_port *ap, struct ata_taskfile *tf)
+{
+       struct ahci_port_priv *pp = ap->private_data;
+       u8 *d2h_fis = pp->rx_fis + RX_FIS_D2H_REG;
+
+       ata_tf_from_fis(d2h_fis, tf);
+}
+
 static void ahci_fill_sg(struct ata_queued_cmd *qc)
 {
        struct ahci_port_priv *pp = qc->ap->private_data;
@@ -538,7 +547,7 @@
 
        /* stop DMA */
        tmp = readl(port_mmio + PORT_CMD);
-       tmp &= PORT_CMD_START | PORT_CMD_FIS_RX;
+       tmp &= ~PORT_CMD_START;
        writel(tmp, port_mmio + PORT_CMD);
 
        /* wait for engine to stop.  TODO: this could be
@@ -570,7 +579,7 @@
 
        /* re-start DMA */
        tmp = readl(port_mmio + PORT_CMD);
-       tmp |= PORT_CMD_START | PORT_CMD_FIS_RX;
+       tmp |= PORT_CMD_START;
        writel(tmp, port_mmio + PORT_CMD);
        readl(port_mmio + PORT_CMD); /* flush */
 
diff -urN linux/drivers/scsi/libata-scsi.c linux/drivers/scsi/libata-scsi.c
--- linux/drivers/scsi/libata-scsi.c    2005/03/18 12:13:27     1.10.2.6
+++ linux/drivers/scsi/libata-scsi.c    2005/05/23 12:12:31     1.10.2.7
@@ -1000,7 +1000,12 @@
 
 static unsigned int ata_msense_ctl_mode(u8 **ptr_io, const u8 *last)
 {
-       const u8 page[] = {0xa, 0xa, 2, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 30};
+       const u8 page[] = {0xa, 0xa, 6, 0, 0, 0, 0, 0, 0xff, 0xff, 0, 30};
+
+       /* byte 2: set the descriptor format sense data bit (bit 2)
+        * since we need to support returning this format for SAT
+        * commands and any SCSI commands against a 48b LBA device.
+        */
 
        ata_msense_push(ptr_io, last, page, sizeof(page));
        return sizeof(page);
diff -urN linux/drivers/scsi/sata_sil.c linux/drivers/scsi/sata_sil.c
--- linux/drivers/scsi/sata_sil.c       2005/03/18 12:13:28     1.10.2.4
+++ linux/drivers/scsi/sata_sil.c       2005/05/23 12:12:31     1.10.2.5
@@ -38,12 +38,21 @@
 #include <linux/libata.h>
 
 #define DRV_NAME       "sata_sil"
-#define DRV_VERSION    "0.8"
+#define DRV_VERSION    "0.9"
 
 enum {
        sil_3112                = 0,
        sil_3114                = 1,
 
+       SIL_FIFO_R0             = 0x40,
+       SIL_FIFO_W0             = 0x41,
+       SIL_FIFO_R1             = 0x44,
+       SIL_FIFO_W1             = 0x45,
+       SIL_FIFO_R2             = 0x240,
+       SIL_FIFO_W2             = 0x241,
+       SIL_FIFO_R3             = 0x244,
+       SIL_FIFO_W3             = 0x245,
+
        SIL_SYSCFG              = 0x48,
        SIL_MASK_IDE0_INT       = (1 << 22),
        SIL_MASK_IDE1_INT       = (1 << 23),
@@ -199,6 +208,13 @@
 MODULE_DEVICE_TABLE(pci, sil_pci_tbl);
 MODULE_VERSION(DRV_VERSION);
 
+static unsigned char sil_get_device_cache_line(struct pci_dev *pdev)
+{
+       u8 cache_line = 0;
+       pci_read_config_byte(pdev, PCI_CACHE_LINE_SIZE, &cache_line);
+       return cache_line;
+}
+
 static void sil_post_set_mode (struct ata_port *ap)
 {
        struct ata_host_set *host_set = ap->host_set;
@@ -341,6 +357,7 @@
        unsigned int i;
        int pci_dev_busy = 0;
        u32 tmp, irq_mask;
+       u8 cls;
 
        if (!printed_version++)
                printk(KERN_DEBUG DRV_NAME " version " DRV_VERSION "\n");
@@ -402,6 +419,19 @@
                ata_std_ports(&probe_ent->port[i]);
        }
 
+       /* Initialize FIFO PCI bus arbitration */
+       cls = sil_get_device_cache_line(pdev);
+       if (cls) {
+               cls >>= 3;
+               cls++;  /* cls = (line_size/8)+1 */
+               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_W2);
+       } else
+               printk(KERN_WARNING DRV_NAME "(%s): cache line size not set.  
Driver may not function\n",
+                       pci_name(pdev));
+
        if (ent->driver_data == sil_3114) {
                irq_mask = SIL_MASK_4PORT;
 
diff -urN linux/drivers/scsi/sata_svw.c linux/drivers/scsi/sata_svw.c
--- linux/drivers/scsi/sata_svw.c       2005/03/18 12:13:28     1.11.2.4
+++ linux/drivers/scsi/sata_svw.c       2005/05/23 12:12:31     1.11.2.5
@@ -392,7 +392,7 @@
 
        /* Clear a magic bit in SCR1 according to Darwin, those help
         * some funky seagate drives (though so far, those were already
-        * set by the firmware on the machines I had access to
+        * set by the firmware on the machines I had access to)
         */
        writel(readl(mmio_base + K2_SATA_SICR1_OFFSET) & ~0x00040000,
               mmio_base + K2_SATA_SICR1_OFFSET);
diff -urN linux/drivers/usb/serial/pl2303.c linux/drivers/usb/serial/pl2303.c
--- linux/drivers/usb/serial/pl2303.c   2004/08/14 18:38:57     1.4.2.10
+++ linux/drivers/usb/serial/pl2303.c   2005/05/23 12:12:31     1.4.2.11
@@ -59,7 +59,7 @@
 /*
  * Version Information
  */
-#define DRIVER_VERSION "v0.10"
+#define DRIVER_VERSION "v0.10.1"       /* Takes from 2.6's */
 #define DRIVER_DESC "Prolific PL2303 USB to serial adaptor driver"
 
 
@@ -156,20 +156,38 @@
        .shutdown =             pl2303_shutdown,
 };
 
+enum pl2303_type {
+       type_0,         /* don't know the difference between type 0 and */
+       type_1,         /* type 1, until someone from prolific tells us... */
+       HX,             /* HX version of the pl2303 chip */
+};
+
 struct pl2303_private {
        spinlock_t lock;
        wait_queue_head_t delta_msr_wait;
        u8 line_control;
        u8 line_status;
        u8 termios_initialized;
+       enum pl2303_type type;
 };
 
 
 static int pl2303_startup (struct usb_serial *serial)
 {
        struct pl2303_private *priv;
+       enum pl2303_type type = type_0;
        int i;
 
+       if (serial->dev->descriptor.bDeviceClass == 0x02)
+               type = type_0;
+       else if (serial->dev->descriptor.bMaxPacketSize0 == 0x40)
+               type = HX;
+       else if (serial->dev->descriptor.bDeviceClass == 0x00)
+               type = type_1;
+       else if (serial->dev->descriptor.bDeviceClass == 0xFF)
+               type = type_1;
+       dbg("device type: %d", type);
+
        for (i = 0; i < serial->num_ports; ++i) {
                priv = kmalloc (sizeof (struct pl2303_private), GFP_KERNEL);
                if (!priv)
@@ -178,6 +196,7 @@
                spin_lock_init(&priv->lock);
                init_waitqueue_head(&priv->delta_msr_wait);
                usb_set_serial_port_data(&serial->port[i], priv);
+               priv->type = type;
        }
        return 0;
 }
@@ -380,10 +399,17 @@
             buf[0], buf[1], buf[2], buf[3], buf[4], buf[5], buf[6]);
 
        if (cflag & CRTSCTS) {
-               i = usb_control_msg (serial->dev, usb_sndctrlpipe (serial->dev, 
0),
-                                    VENDOR_WRITE_REQUEST, 
VENDOR_WRITE_REQUEST_TYPE,
-                                    0x0, 0x41, NULL, 0, 100);
-               dbg ("0x40:0x1:0x0:0x41  %d", i);
+               __u16 index;
+               if (priv->type == HX)
+                       index = 0x61;
+               else
+                       index = 0x41;
+               i = usb_control_msg(serial->dev, 
+                                   usb_sndctrlpipe(serial->dev, 0),
+                                   VENDOR_WRITE_REQUEST,
+                                   VENDOR_WRITE_REQUEST_TYPE,
+                                   0x0, index, NULL, 0, 100);
+               dbg ("0x40:0x1:0x0:0x%x  %d", index, i);
        }
 
        kfree (buf);
@@ -395,6 +421,7 @@
        struct termios tmp_termios;
        struct usb_serial *serial = port->serial;
        unsigned char *buf;
+       struct pl2303_private *priv = port->private;
        int result;
 
        if (port_paranoia_check (port, __FUNCTION__))
@@ -427,6 +454,18 @@
        SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0x0404, 1);
        FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8484, 0);
        FISH (VENDOR_READ_REQUEST_TYPE, VENDOR_READ_REQUEST, 0x8383, 0);
+       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 0, 1);
+       SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 1, 0);
+ 
+       if (priv->type == HX) {
+               /* HX chip */
+               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x44);
+               /* reset upstream data pipes */
+               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 8, 0);
+               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 9, 0);
+       } else {
+               SOUP (VENDOR_WRITE_REQUEST_TYPE, VENDOR_WRITE_REQUEST, 2, 0x24);
+       }
 
        kfree(buf);
 
diff -urN linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- linux/fs/binfmt_elf.c       2005/04/05 19:09:57     1.52.2.17
+++ linux/fs/binfmt_elf.c       2005/05/23 12:12:31     1.52.2.18
@@ -222,7 +222,7 @@
        }
 
        __put_user((elf_addr_t)argc,--sp);
-       current->mm->arg_start = (unsigned long) p;
+       current->mm->arg_start = current->mm->arg_end = (unsigned long) p;
        while (argc-->0) {
                __put_user((elf_caddr_t)(unsigned long)p,argv++);
                len = strnlen_user(p, PAGE_SIZE*MAX_ARG_PAGES);
@@ -1162,7 +1162,7 @@
        /* first copy the parameters from user space */
        memset(&psinfo, 0, sizeof(psinfo));
        {
-               int i, len;
+               unsigned int i, len;
 
                len = current->mm->arg_end - current->mm->arg_start;
                if (len >= ELF_PRARGSZ)
diff -urN linux/include/linux/i2c.h linux/include/linux/i2c.h
--- linux/include/linux/i2c.h   2004/11/29 17:47:18     1.14.2.3
+++ linux/include/linux/i2c.h   2005/05/23 12:12:31     1.14.2.4
@@ -193,7 +193,7 @@
        char name[32];                          /* textual description  */
        unsigned int id;
 
-       /* If an adapter algorithm can't to I2C-level access, set master_xfer
+       /* If an adapter algorithm can't do I2C-level access, set master_xfer
           to NULL. If an adapter algorithm can do SMBus access, set 
           smbus_xfer. If set to NULL, the SMBus protocol is simulated
           using common I2C messages */
@@ -390,23 +390,23 @@
 #define I2C_FUNC_SMBUS_READ_I2C_BLOCK  0x04000000 /* New I2C-like block */
 #define I2C_FUNC_SMBUS_WRITE_I2C_BLOCK 0x08000000 /* transfer */
 
-#define I2C_FUNC_SMBUS_BYTE I2C_FUNC_SMBUS_READ_BYTE | \
-                            I2C_FUNC_SMBUS_WRITE_BYTE
-#define I2C_FUNC_SMBUS_BYTE_DATA I2C_FUNC_SMBUS_READ_BYTE_DATA | \
-                                 I2C_FUNC_SMBUS_WRITE_BYTE_DATA
-#define I2C_FUNC_SMBUS_WORD_DATA I2C_FUNC_SMBUS_READ_WORD_DATA | \
-                                 I2C_FUNC_SMBUS_WRITE_WORD_DATA
-#define I2C_FUNC_SMBUS_BLOCK_DATA I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
-                                  I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
-#define I2C_FUNC_SMBUS_I2C_BLOCK I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
-                                  I2C_FUNC_SMBUS_WRITE_I2C_BLOCK
-
-#define I2C_FUNC_SMBUS_EMUL I2C_FUNC_SMBUS_QUICK | \
-                            I2C_FUNC_SMBUS_BYTE | \
-                            I2C_FUNC_SMBUS_BYTE_DATA | \
-                            I2C_FUNC_SMBUS_WORD_DATA | \
-                            I2C_FUNC_SMBUS_PROC_CALL | \
-                            I2C_FUNC_SMBUS_WRITE_BLOCK_DATA
+#define I2C_FUNC_SMBUS_BYTE (I2C_FUNC_SMBUS_READ_BYTE | \
+                             I2C_FUNC_SMBUS_WRITE_BYTE)
+#define I2C_FUNC_SMBUS_BYTE_DATA (I2C_FUNC_SMBUS_READ_BYTE_DATA | \
+                                  I2C_FUNC_SMBUS_WRITE_BYTE_DATA)
+#define I2C_FUNC_SMBUS_WORD_DATA (I2C_FUNC_SMBUS_READ_WORD_DATA | \
+                                  I2C_FUNC_SMBUS_WRITE_WORD_DATA)
+#define I2C_FUNC_SMBUS_BLOCK_DATA (I2C_FUNC_SMBUS_READ_BLOCK_DATA | \
+                                   I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
+#define I2C_FUNC_SMBUS_I2C_BLOCK (I2C_FUNC_SMBUS_READ_I2C_BLOCK | \
+                                  I2C_FUNC_SMBUS_WRITE_I2C_BLOCK)
+
+#define I2C_FUNC_SMBUS_EMUL (I2C_FUNC_SMBUS_QUICK | \
+                             I2C_FUNC_SMBUS_BYTE | \
+                             I2C_FUNC_SMBUS_BYTE_DATA | \
+                             I2C_FUNC_SMBUS_WORD_DATA | \
+                             I2C_FUNC_SMBUS_PROC_CALL | \
+                             I2C_FUNC_SMBUS_WRITE_BLOCK_DATA)
 
 /* 
  * Data for SMBus Messages 

<Prev in Thread] Current Thread [Next in Thread>