Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6
authorLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Mar 2007 21:34:11 +0000 (14:34 -0700)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Mon, 26 Mar 2007 21:34:11 +0000 (14:34 -0700)
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/usb-2.6:
  USB: fix usb-serial/ftdi build warning
  USB: fix usb-serial/generic build warning
  USB: another entry for the quirk list
  USB: remove duplicated device id in airprime driver
  USB: omap_udc: workaround dma_free_coherent() bogosity
  UHCI: Fix problem caused by lack of terminating QH

14 files changed:
Documentation/power/pci.txt
arch/i386/pci/common.c
drivers/ide/Kconfig
drivers/ide/ide-io.c
drivers/ide/ide-iops.c
drivers/ide/ide.c
drivers/ide/pci/pdc202xx_new.c
drivers/pci/pcie/portdrv_pci.c
drivers/pci/quirks.c
fs/9p/v9fs_vfs.h
fs/9p/vfs_file.c
include/linux/compiler.h
include/linux/ide.h
kernel/time/clockevents.c

index c750f9f..b6a3cbf 100644 (file)
@@ -102,31 +102,28 @@ pci_save_state
 --------------
 
 Usage:
-       pci_save_state(dev, buffer);
+       pci_save_state(struct pci_dev *dev);
 
 Description:
-       Save first 64 bytes of PCI config space. Buffer must be allocated by
-       caller.
+       Save first 64 bytes of PCI config space, along with any additional
+       PCI-Express or PCI-X information.
 
 
 pci_restore_state
 -----------------
 
 Usage:
-       pci_restore_state(dev, buffer);
+       pci_restore_state(struct pci_dev *dev);
 
 Description:
-       Restore previously saved config space. (First 64 bytes only);
-
-       If buffer is NULL, then restore what information we know about the
-       device from bootup: BARs and interrupt line.
+       Restore previously saved config space.
 
 
 pci_set_power_state
 -------------------
 
 Usage:
-       pci_set_power_state(dev, state);
+       pci_set_power_state(struct pci_dev *dev, pci_power_t state);
 
 Description:
        Transition device to low power state using PCI PM Capabilities
@@ -142,7 +139,7 @@ pci_enable_wake
 ---------------
 
 Usage:
-       pci_enable_wake(dev, state, enable);
+       pci_enable_wake(struct pci_dev *dev, pci_power_t state, int enable);
 
 Description:
        Enable device to generate PME# during low power state using PCI PM 
index 1bb0693..9484366 100644 (file)
@@ -191,6 +191,14 @@ static struct dmi_system_id __devinitdata pciprobe_dmi_table[] = {
                        DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge 2950"),
                },
        },
+       {
+               .callback = set_bf_sort,
+               .ident = "Dell PowerEdge R900",
+               .matches = {
+                       DMI_MATCH(DMI_SYS_VENDOR, "Dell"),
+                       DMI_MATCH(DMI_PRODUCT_NAME, "PowerEdge R900"),
+               },
+       },
        {
                .callback = set_bf_sort,
                .ident = "HP ProLiant BL20p G3",
index 8f1fd01..ca2e4f8 100644 (file)
@@ -103,8 +103,10 @@ config BLK_DEV_IDE_SATA
        ---help---
          There are two drivers for Serial ATA controllers.
 
-         The main driver, "libata", exists inside the SCSI subsystem
-         and supports most modern SATA controllers.
+         The main driver, "libata", uses the SCSI subsystem
+         and supports most modern SATA controllers. In order to use it
+         you may take a look at "Serial ATA (prod) and Parallel ATA
+         (experimental) drivers".
 
          The IDE driver (which you are currently configuring) supports
          a few first-generation SATA controllers.
index c193553..0e02800 100644 (file)
@@ -519,21 +519,24 @@ static ide_startstop_t ide_ata_error(ide_drive_t *drive, struct request *rq, u8
        if ((stat & DRQ_STAT) && rq_data_dir(rq) == READ && hwif->err_stops_fifo == 0)
                try_to_flush_leftover_data(drive);
 
+       if (rq->errors >= ERROR_MAX || blk_noretry_request(rq)) {
+               ide_kill_rq(drive, rq);
+               return ide_stopped;
+       }
+
        if (hwif->INB(IDE_STATUS_REG) & (BUSY_STAT|DRQ_STAT))
-               /* force an abort */
-               hwif->OUTB(WIN_IDLEIMMEDIATE, IDE_COMMAND_REG);
+               rq->errors |= ERROR_RESET;
 
-       if (rq->errors >= ERROR_MAX || blk_noretry_request(rq))
-               ide_kill_rq(drive, rq);
-       else {
-               if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
-                       ++rq->errors;
-                       return ide_do_reset(drive);
-               }
-               if ((rq->errors & ERROR_RECAL) == ERROR_RECAL)
-                       drive->special.b.recalibrate = 1;
+       if ((rq->errors & ERROR_RESET) == ERROR_RESET) {
                ++rq->errors;
+               return ide_do_reset(drive);
        }
+
+       if ((rq->errors & ERROR_RECAL) == ERROR_RECAL)
+               drive->special.b.recalibrate = 1;
+
+       ++rq->errors;
+
        return ide_stopped;
 }
 
@@ -1025,6 +1028,13 @@ static ide_startstop_t start_request (ide_drive_t *drive, struct request *rq)
        if (!drive->special.all) {
                ide_driver_t *drv;
 
+               /*
+                * We reset the drive so we need to issue a SETFEATURES.
+                * Do it _after_ do_special() restored device parameters.
+                */
+               if (drive->current_speed == 0xff)
+                       ide_config_drive_speed(drive, drive->desired_speed);
+
                if (rq->cmd_type == REQ_TYPE_ATA_CMD ||
                    rq->cmd_type == REQ_TYPE_ATA_TASK ||
                    rq->cmd_type == REQ_TYPE_ATA_TASKFILE)
index bd513f5..1ee53a5 100644 (file)
@@ -583,8 +583,12 @@ u8 eighty_ninty_three (ide_drive_t *drive)
        if(!(drive->id->hw_config & 0x4000))
                return 0;
 #endif /* CONFIG_IDEDMA_IVB */
-       if (!(drive->id->hw_config & 0x2000))
-               return 0;
+       /*
+        * FIXME:
+        * - change master/slave IDENTIFY order
+        * - force bit13 (80c cable present) check
+        *   (unless the slave device is pre-ATA3)
+        */
        return 1;
 }
 
@@ -1090,6 +1094,9 @@ static void pre_reset(ide_drive_t *drive)
        if (HWIF(drive)->pre_reset != NULL)
                HWIF(drive)->pre_reset(drive);
 
+       if (drive->current_speed != 0xff)
+               drive->desired_speed = drive->current_speed;
+       drive->current_speed = 0xff;
 }
 
 /*
index 695610f..a6f098f 100644 (file)
@@ -1124,17 +1124,40 @@ static int set_io_32bit(ide_drive_t *drive, int arg)
 static int set_using_dma (ide_drive_t *drive, int arg)
 {
 #ifdef CONFIG_BLK_DEV_IDEDMA
+       ide_hwif_t *hwif = drive->hwif;
+       int err = -EPERM;
+
        if (!drive->id || !(drive->id->capability & 1))
-               return -EPERM;
-       if (HWIF(drive)->ide_dma_check == NULL)
-               return -EPERM;
+               goto out;
+
+       if (hwif->ide_dma_check == NULL)
+               goto out;
+
+       err = -EBUSY;
+       if (ide_spin_wait_hwgroup(drive))
+               goto out;
+       /*
+        * set ->busy flag, unlock and let it ride
+        */
+       hwif->hwgroup->busy = 1;
+       spin_unlock_irq(&ide_lock);
+
+       err = 0;
+
        if (arg) {
-               if (ide_set_dma(drive))
-                       return -EIO;
-               if (HWIF(drive)->ide_dma_on(drive)) return -EIO;
+               if (ide_set_dma(drive) || hwif->ide_dma_on(drive))
+                       err = -EIO;
        } else
                ide_dma_off(drive);
-       return 0;
+
+       /*
+        * lock, clear ->busy flag and unlock before leaving
+        */
+       spin_lock_irq(&ide_lock);
+       hwif->hwgroup->busy = 0;
+       spin_unlock_irq(&ide_lock);
+out:
+       return err;
 #else
        return -EPERM;
 #endif
index 6ceb25b..ace9892 100644 (file)
@@ -255,7 +255,7 @@ static int config_chipset_for_dma(ide_drive_t *drive)
                printk(KERN_WARNING "%s reduced to Ultra33 mode.\n", drive->name);
        }
 
-       if (drive->media != ide_disk)
+       if (drive->media != ide_disk && drive->media != ide_cdrom)
                return 0;
 
        if (id->capability & 4) {
@@ -545,6 +545,7 @@ static void __devinit init_hwif_pdc202new(ide_hwif_t *hwif)
 
        hwif->drives[0].autotune = hwif->drives[1].autotune = 1;
 
+       hwif->atapi_dma  = 1;
        hwif->ultra_mask = 0x7f;
        hwif->mwdma_mask = 0x07;
 
index 0be5a0b..df38364 100644 (file)
@@ -93,7 +93,7 @@ static int __devinit pcie_portdrv_probe (struct pci_dev *dev,
         if (!dev->irq && dev->pin) {
                printk(KERN_WARNING 
                "%s->Dev[%04x:%04x] has invalid IRQ. Check vendor BIOS\n", 
-               __FUNCTION__, dev->device, dev->vendor);
+               __FUNCTION__, dev->vendor, dev->device);
        }
        if (pcie_port_device_register(dev)) {
                pci_disable_device(dev);
index 7f94fc0..65d6f23 100644 (file)
@@ -963,6 +963,13 @@ DECLARE_PCI_FIXUP_RESUME(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_8237, k8t_sound_ho
  * bridge. Unfortunately, this device has no subvendor/subdevice ID. So it 
  * becomes necessary to do this tweak in two steps -- I've chosen the Host
  * bridge as trigger.
+ *
+ * Note that we used to unhide the SMBus that way on Toshiba laptops
+ * (Satellite A40 and Tecra M2) but then found that the thermal management
+ * was done by SMM code, which could cause unsynchronized concurrent
+ * accesses to the SMBus registers, with potentially bad effects. Thus you
+ * should be very careful when adding new entries: if SMM is accessing the
+ * Intel SMBus, this is a very good reason to leave it hidden.
  */
 static int asus_hides_smbus;
 
@@ -1040,17 +1047,6 @@ static void __init asus_hides_smbus_hostbridge(struct pci_dev *dev)
                        case 0x099c: /* HP Compaq nx6110 */
                                asus_hides_smbus = 1;
                        }
-       } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_TOSHIBA)) {
-               if (dev->device == PCI_DEVICE_ID_INTEL_82855GM_HB)
-                       switch(dev->subsystem_device) {
-                       case 0x0001: /* Toshiba Satellite A40 */
-                               asus_hides_smbus = 1;
-                       }
-               else if (dev->device == PCI_DEVICE_ID_INTEL_82855PM_HB)
-                       switch(dev->subsystem_device) {
-                       case 0x0001: /* Toshiba Tecra M2 */
-                               asus_hides_smbus = 1;
-                       }
        } else if (unlikely(dev->subsystem_vendor == PCI_VENDOR_ID_SAMSUNG)) {
                if (dev->device ==  PCI_DEVICE_ID_INTEL_82855PM_HB)
                        switch(dev->subsystem_device) {
index 8ada4c5..6a82d39 100644 (file)
@@ -40,7 +40,6 @@
 extern struct file_system_type v9fs_fs_type;
 extern const struct address_space_operations v9fs_addr_operations;
 extern const struct file_operations v9fs_file_operations;
-extern const struct file_operations v9fs_cached_file_operations;
 extern const struct file_operations v9fs_dir_operations;
 extern struct dentry_operations v9fs_dentry_operations;
 extern struct dentry_operations v9fs_cached_dentry_operations;
index 653dfa5..c7b6772 100644 (file)
@@ -42,6 +42,8 @@
 #include "v9fs_vfs.h"
 #include "fid.h"
 
+static const struct file_operations v9fs_cached_file_operations;
+
 /**
  * v9fs_file_open - open a file (or directory)
  * @inode: inode to be opened
@@ -245,7 +247,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
        return total;
 }
 
-const struct file_operations v9fs_cached_file_operations = {
+static const struct file_operations v9fs_cached_file_operations = {
        .llseek = generic_file_llseek,
        .read = do_sync_read,
        .aio_read = generic_file_aio_read,
index aca6698..3b6949b 100644 (file)
@@ -15,8 +15,8 @@
 # define __acquire(x)  __context__(x,1)
 # define __release(x)  __context__(x,-1)
 # define __cond_lock(x,c)      ((c) ? ({ __acquire(x); 1; }) : 0)
-extern void __chk_user_ptr(void __user *);
-extern void __chk_io_ptr(void __iomem *);
+extern void __chk_user_ptr(const void __user *);
+extern void __chk_io_ptr(const void __iomem *);
 #else
 # define __user
 # define __kernel
index 34f2676..58564a1 100644 (file)
@@ -615,6 +615,7 @@ typedef struct ide_drive_s {
         u8     init_speed;     /* transfer rate set at boot */
         u8     pio_speed;      /* unused by core, used by some drivers for fallback from DMA */
         u8     current_speed;  /* current transfer rate set */
+       u8      desired_speed;  /* desired transfer rate set */
         u8     dn;             /* now wide spread use */
         u8     wcache;         /* status of write cache */
        u8      acoustic;       /* acoustic management */
index 67932ea..76212b2 100644 (file)
@@ -274,72 +274,3 @@ void clockevents_notify(unsigned long reason, void *arg)
 }
 EXPORT_SYMBOL_GPL(clockevents_notify);
 
-#ifdef CONFIG_SYSFS
-
-/**
- * clockevents_show_registered - sysfs interface for listing clockevents
- * @dev:       unused
- * @buf:       char buffer to be filled with clock events list
- *
- * Provides sysfs interface for listing registered clock event devices
- */
-static ssize_t clockevents_show_registered(struct sys_device *dev, char *buf)
-{
-       struct list_head *tmp;
-       char *p = buf;
-       int cpu;
-
-       spin_lock(&clockevents_lock);
-
-       list_for_each(tmp, &clockevent_devices) {
-               struct clock_event_device *ce;
-
-               ce = list_entry(tmp, struct clock_event_device, list);
-               p += sprintf(p, "%-20s F:%04x M:%d", ce->name,
-                            ce->features, ce->mode);
-               p += sprintf(p, " C:");
-               if (!cpus_equal(ce->cpumask, cpu_possible_map)) {
-                       for_each_cpu_mask(cpu, ce->cpumask)
-                               p += sprintf(p, " %d", cpu);
-               } else {
-                       /*
-                        * FIXME: Add the cpu which is handling this sucker
-                        */
-               }
-               p += sprintf(p, "\n");
-       }
-
-       spin_unlock(&clockevents_lock);
-
-       return p - buf;
-}
-
-/*
- * Sysfs setup bits:
- */
-static SYSDEV_ATTR(registered, 0600,
-                  clockevents_show_registered, NULL);
-
-static struct sysdev_class clockevents_sysclass = {
-       set_kset_name("clockevents"),
-};
-
-static struct sys_device clockevents_sys_device = {
-       .id     = 0,
-       .cls    = &clockevents_sysclass,
-};
-
-static int __init clockevents_sysfs_init(void)
-{
-       int error = sysdev_class_register(&clockevents_sysclass);
-
-       if (!error)
-               error = sysdev_register(&clockevents_sys_device);
-       if (!error)
-               error = sysdev_create_file(
-                               &clockevents_sys_device,
-                               &attr_registered);
-       return error;
-}
-device_initcall(clockevents_sysfs_init);
-#endif