1. 16 1月, 2009 6 次提交
  2. 15 1月, 2009 3 次提交
    • H
      byteorder: make swab.h include asm/swab.h like a regular header · 74d96f01
      Harvey Harrison 提交于
      Add swab.h to kbuild.asm and remove the individual entries from
      each arch, mark as unifdef as some arches have some kernel-only
      bits inside.
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      74d96f01
    • B
      IDE: fix sparse signed-ness errors with host->host_busy · e720b9e4
      Ben Dooks 提交于
      The host_busy field in struct ide_host defaults to a
      signed-long, where most arch's test_and_set_bit_*
      macros use an unsigned long.
      
      Change to using an unsigned long, which on ARM removes
      the following sparse errors:
      
      drivers/ide/ide-io.c:681:8: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:681:8:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:681:8:    got long volatile *<noident>
      drivers/ide/ide-io.c:681:8: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:681:8:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:681:8:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      drivers/ide/ide-io.c:695:3: warning: incorrect type in argument 2 (different signedness)
      drivers/ide/ide-io.c:695:3:    expected unsigned long volatile *p
      drivers/ide/ide-io.c:695:3:    got long volatile *<noident>
      Signed-off-by: NBen Dooks <ben-linux@fluff.org>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      e720b9e4
    • B
      it821x: Add ultra_mask quirk for Vortex86SX · b94b898f
      Brandon Philips 提交于
      On Vortex86SX with IDE controller revision 0x11 ultra DMA must be
      disabled. This patch was tested by DMP and seems to work.
      
      It is a cleaned up version of their older Kernel patch: 
       http://www.dmp.com.tw/tech/vortex86sx/patch-2.6.24-DMP.gzTested-by: NShawn Lin <shawn@dmp.com.tw>
      Signed-off-by: NBrandon Philips <bphilips@suse.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Signed-off-by: NBartlomiej Zolnierkiewicz <bzolnier@gmail.com>
      b94b898f
  3. 14 1月, 2009 9 次提交
  4. 13 1月, 2009 2 次提交
  5. 12 1月, 2009 1 次提交
    • M
      BUGFIX: used NULL pointer at ioctl(sk,IMGETDEVINFO,&devinfo) when devinfo.id not registered · 57de16e6
      Martin Bachem 提交于
      daxtar example # modprobe hfcsusb
      daxtar example # modprobe mISDN_l1loop
      daxtar example # ./misdnportinfo
      Found 3 devices
              id:             0
              Dprotocols:     00000006
              Bprotocols:     0000000e
              protocol:       0
              nrbchan:        2
              name:           HFC-S_USB.1
              id:             1
              Dprotocols:     00000006
              Bprotocols:     0000000e
              protocol:       0
              nrbchan:        2
              name:           mISDN_l1loop.1
              id:             2
              Dprotocols:     00000006
              Bprotocols:     0000000e
              protocol:       0
              nrbchan:        2
              name:           mISDN_l1loop.2
      daxtar example # rmmod hfcsusb
      daxtar example # ./misdnportinfo
      Found 2 devices
      *Segmentation* *fault*
      
      dmesg:
      
      [ 9914.939718] BUG: unable to handle kernel NULL pointer dereference at 000000d4
      [ 9914.939721] IP: [<f8f9f2dd>] :mISDN_core:get_mdevice+0x19/0x22
      [ 9914.939729] *pde = 00000000
      [ 9914.939732] Oops: 0000 [#14] PREEMPT SMP
      [ 9914.939734] Modules linked in: mISDN_l1loop mISDN_core vmnet vmblock vmci vmmon coretemp w83627ehf hwmon_vid rfcomm l2cap blue
      tooth usbhid snd_usb_audio snd_usb_lib snd_rawmidi snd_hwdep fuse nvidia(P) uhci_hcd i2c_i801 ehci_hcd snd_hda_intel atl1 usbcore i2c_core parport_seria
      l [last unloaded: hfcsusb]
      [ 9914.939751] Pid: 29618, comm: misdnportinfo Tainted: P      D   (2.6.27.3 #5)
      [ 9914.939753] EIP: 0060:[<f8f9f2dd>] EFLAGS: 00210246 CPU: 0
      [ 9914.939758] EIP is at get_mdevice+0x19/0x22 [mISDN_core]
      [ 9914.939760] EAX: 00000000 EBX: f8fa791c ECX: f6afaa58 EDX: f7960cf4
      [ 9914.939762] ESI: 80044944 EDI: bfc2e62c EBP: bfc2e62c ESP: f5adbef4
      [ 9914.939763]  DS: 007b ES: 007b FS: 00d8 GS: 0033 SS: 0068
      [ 9914.939765] Process misdnportinfo (pid: 29618, ti=f5ada000 task=f6bec430 task.ti=f5ada000)
      [ 9914.939767] Stack: f8f9f4e0 00000000 f8f9f867 bfc2e62c 0000000a c02461e8 00200246 c042dde8
      [ 9914.939771]        00000003 c042dde4 00000000 00000001 00200082 c0114775 00000000 00000000
      [ 9914.939775]        00000003 f7088010 00200282 f8fa791c 80044944 bfc2e62c bfc2e62c c02f6615
      [ 9914.939780] Call Trace:
      [ 9914.939782]  [<f8f9f4e0>] _get_mdevice+0x0/0x18 [mISDN_core]
      [ 9914.939789]  [<f8f9f867>] base_sock_ioctl+0x7a/0x129 [mISDN_core]
      [ 9914.939789]  [<c02461e8>] opost+0x171/0x182
      [ 9914.939789]  [<c0114775>] __wake_up+0x29/0x39
      [ 9914.939789]  [<c02f6615>] sock_ioctl+0x1b5/0x1d9
      [ 9914.939789]  [<c02f6460>] sock_ioctl+0x0/0x1d9
      [ 9914.939789]  [<c016794c>] vfs_ioctl+0x1c/0x5d
      [ 9914.939789]  [<c0167bcb>] do_vfs_ioctl+0x23e/0x24e
      [ 9914.939789]  [<c0167c07>] sys_ioctl+0x2c/0x45
      [ 9914.939789]  [<c0102cbd>] sysenter_do_call+0x12/0x21
      [ 9914.939789]  [<c0350000>] pci_fixup_i450gx+0x4e/0x56
      [ 9914.939789]  =======================
      [ 9914.939789] Code: 00 68 02 f0 f9 f8 e8 ae b4 2c c7 8b 44 24 04 5a 59 c3 83 ec 04 31 d2 89 04 24 89 e1 b8 ac df fa f8 68 e0 f4
      f9 f8 e8 4a b5 2c c7 <8b> 80 d4 00 00 00 5a 59 c3 53 89 cb 8d 90 9c 00 00 00 89 c8 e8
      [ 9914.939789] EIP: [<f8f9f2dd>] get_mdevice+0x19/0x22 [mISDN_core] SS:ESP 0068:f5adbef4
      [ 9914.939858] ---[ end trace 50e18a715b019424 ]---
      Signed-off-by: NMartin Bachem <m.bachem@gmx.de>
      Signed-off-by: NKarsten Keil <kkeil@suse.de>
      57de16e6
  6. 11 1月, 2009 9 次提交
  7. 10 1月, 2009 10 次提交
    • A
      rbtree: add const qualifier to some functions · f4b477c4
      Artem Bityutskiy 提交于
      The 'rb_first()', 'rb_last()', 'rb_next()' and 'rb_prev()' calls
      take a pointer to an RB node or RB root. They do not change the
      pointed objects, so add a 'const' qualifier in order to make life
      of the users of these functions easier.
      
      Indeed, if I have my own constant pointer &const struct my_type *p,
      and I call 'rb_next(&p->rb)', I get a GCC warning:
      
      warning: passing argument 1 of ‘rb_next’ discards qualifiers from pointer target type
      Signed-off-by: NArtem Bityutskiy <Artem.Bityutskiy@nokia.com>
      Signed-off-by: NDavid Woodhouse <David.Woodhouse@intel.com>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      f4b477c4
    • T
      filesystem freeze: implement generic freeze feature · fcccf502
      Takashi Sato 提交于
      The ioctls for the generic freeze feature are below.
      o Freeze the filesystem
        int ioctl(int fd, int FIFREEZE, arg)
          fd: The file descriptor of the mountpoint
          FIFREEZE: request code for the freeze
          arg: Ignored
          Return value: 0 if the operation succeeds. Otherwise, -1
      
      o Unfreeze the filesystem
        int ioctl(int fd, int FITHAW, arg)
          fd: The file descriptor of the mountpoint
          FITHAW: request code for unfreeze
          arg: Ignored
          Return value: 0 if the operation succeeds. Otherwise, -1
          Error number: If the filesystem has already been unfrozen,
                        errno is set to EINVAL.
      
      [akpm@linux-foundation.org: fix CONFIG_BLOCK=n]
      Signed-off-by: NTakashi Sato <t-sato@yk.jp.nec.com>
      Signed-off-by: NMasayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>
      Cc: <xfs-masters@oss.sgi.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Alasdair G Kergon <agk@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      fcccf502
    • T
      filesystem freeze: add error handling of write_super_lockfs/unlockfs · c4be0c1d
      Takashi Sato 提交于
      Currently, ext3 in mainline Linux doesn't have the freeze feature which
      suspends write requests.  So, we cannot take a backup which keeps the
      filesystem's consistency with the storage device's features (snapshot and
      replication) while it is mounted.
      
      In many case, a commercial filesystem (e.g.  VxFS) has the freeze feature
      and it would be used to get the consistent backup.
      
      If Linux's standard filesystem ext3 has the freeze feature, we can do it
      without a commercial filesystem.
      
      So I have implemented the ioctls of the freeze feature.
      I think we can take the consistent backup with the following steps.
      1. Freeze the filesystem with the freeze ioctl.
      2. Separate the replication volume or create the snapshot
         with the storage device's feature.
      3. Unfreeze the filesystem with the unfreeze ioctl.
      4. Take the backup from the separated replication volume
         or the snapshot.
      
      This patch:
      
      VFS:
      Changed the type of write_super_lockfs and unlockfs from "void"
      to "int" so that they can return an error.
      Rename write_super_lockfs and unlockfs of the super block operation
      freeze_fs and unfreeze_fs to avoid a confusion.
      
      ext3, ext4, xfs, gfs2, jfs:
      Changed the type of write_super_lockfs and unlockfs from "void"
      to "int" so that write_super_lockfs returns an error if needed,
      and unlockfs always returns 0.
      
      reiserfs:
      Changed the type of write_super_lockfs and unlockfs from "void"
      to "int" so that they always return 0 (success) to keep a current behavior.
      Signed-off-by: NTakashi Sato <t-sato@yk.jp.nec.com>
      Signed-off-by: NMasayuki Hamaguchi <m-hamaguchi@ys.jp.nec.com>
      Cc: <xfs-masters@oss.sgi.com>
      Cc: <linux-ext4@vger.kernel.org>
      Cc: Christoph Hellwig <hch@lst.de>
      Cc: Dave Kleikamp <shaggy@austin.ibm.com>
      Cc: Dave Chinner <david@fromorbit.com>
      Cc: Alasdair G Kergon <agk@redhat.com>
      Cc: Al Viro <viro@zeniv.linux.org.uk>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      c4be0c1d
    • H
      memstick: annotate endianness of attribute structs · 69347a23
      Harvey Harrison 提交于
      The code was shifting the endianness appropriately everywhere, annotate
      the structs to avoid the sparse warnings when assigning the endian types
      to the struct members, or passing them to be[16|32]_to_cpu:
      
      drivers/memstick/core/mspro_block.c:331:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:333:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:335:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:337:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:341:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:347:4: warning: cast to restricted __be32
      drivers/memstick/core/mspro_block.c:356:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:358:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:364:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:367:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:369:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:371:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:377:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:478:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:480:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:482:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:484:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:486:4: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:689:22:    expected unsigned int [unsigned] [assigned] data_address
      drivers/memstick/core/mspro_block.c:689:22:    got restricted __be32 [usertype] <noident>
      drivers/memstick/core/mspro_block.c:697:3: warning: cast to restricted __be32
      drivers/memstick/core/mspro_block.c:960:17: warning: incorrect type in initializer (different base types)
      drivers/memstick/core/mspro_block.c:960:17:    expected unsigned short [unsigned] data_count
      drivers/memstick/core/mspro_block.c:960:17:    got restricted __be16 [usertype] <noident>
      drivers/memstick/core/mspro_block.c:993:6: warning: cast to restricted __be16
      drivers/memstick/core/mspro_block.c:995:28: warning: cast to restricted __be16
      Signed-off-by: NHarvey Harrison <harvey.harrison@gmail.com>
      Cc: Alex Dubov <oakad@yahoo.com>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      69347a23
    • A
      compiler-gcc.h: add more comments to RELOC_HIDE · 85c210ed
      Andi Kleen 提交于
      Requested by C. Lameter
      Signed-off-by: NAndi Kleen <ak@linux.intel.com>
      Cc: Christoph Lameter <cl@linux-foundation.org>
      Cc: Andi Kleen <andi@firstfloor.org>
      Cc: Rusty Russell <rusty@rustcorp.com.au>
      Cc: Stephen Rothwell <sfr@canb.auug.org.au>
      Cc: Mike Travis <travis@sgi.com>
      Cc: Ingo Molnar <mingo@elte.hu>
      Cc: Richard Henderson <rth@twiddle.net>
      Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
      Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
      85c210ed
    • G
      Revert "driver core: create a private portion of struct device" · 926beadb
      Greg Kroah-Hartman 提交于
      This reverts commit 2831fe6f.
      
      Turns out that device_initialize shouldn't fail silently.
      This series needs to be reworked in order to get into proper
      shape.
      Reported-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      926beadb
    • G
      Revert "driver core: move klist_children into private structure" · e2d40776
      Greg Kroah-Hartman 提交于
      This reverts commit 11c3b5c3.
      
      Turns out that device_initialize shouldn't fail silently.
      This series needs to be reworked in order to get into proper
      shape.
      Reported-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      e2d40776
    • J
      drivers/of: Add the of_find_i2c_device_by_node function. · 2526c151
      Jon Smirl 提交于
      The of_find_i2c_device_by_node function allows you to follow a
      reference in the device tree to an i2c device node and then locate
      the linux device instantiated by the device tree. Example use: an I2S
      bus driver finding the i2c_device instance for a codec described by
      a device tree node.
      
      This was waiting for Anton's i2c patches that were just added.
      Signed-off-by: NJon Smirl <jonsmirl@gmail.com>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      2526c151
    • G
      Revert "driver core: move knode_driver into private structure" · cda5e83f
      Greg Kroah-Hartman 提交于
      This reverts commit 93e746db.
      
      Turns out that device_initialize shouldn't fail silently.
      This series needs to be reworked in order to get into proper
      shape.
      Reported-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      cda5e83f
    • G
      Revert "driver core: move knode_bus into private structure" · 4db8e282
      Greg Kroah-Hartman 提交于
      This reverts commit b9daa99e.
      
      Turns out that device_initialize shouldn't fail silently.
      This series needs to be reworked in order to get into proper
      shape.
      Reported-by: NStefan Richter <stefanr@s5r6.in-berlin.de>
      Cc: Alan Cox <alan@lxorguk.ukuu.org.uk>
      Cc: Kay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
      4db8e282