GitHub/mt8127/android_kernel_alcatel_ttab.git
17 years agoUSB: misc: legousbtower: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: misc: legousbtower: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: misc: ldusb: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: misc: ldusb: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: misc: iowarrior: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: misc: iowarrior: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: misc: ftdi-elan: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: misc: ftdi-elan: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: misc: auerswald: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: misc: auerswald: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: misc: appledisplay: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: misc: appledisplay: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: misc: adtux: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: misc: adtux: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: core: message: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: core: message: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: image: microtek: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: image: microtek: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: image: mdc800: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: image: mdc800: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: storage: onetouch: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: storage: onetouch: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: class: usblp: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: class: usblp: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: class: cdc-acm: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: class: cdc-acm: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: atm: usbatm: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: atm: usbatm: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: atm: ueagle-atm: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: atm: ueagle-atm: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: atm: speedtch: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: atm: speedtch: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: atm: cxacru: clean up urb->status usage
Greg Kroah-Hartman [Wed, 18 Jul 2007 17:58:02 +0000 (10:58 -0700)]
USB: atm: cxacru: clean up urb->status usage

This done in anticipation of removal of urb->status, which will make
that patch easier to review and apply in the future.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: m66592-udc: fixes some problems
Yoshihiro Shimoda [Tue, 17 Jul 2007 12:01:17 +0000 (21:01 +0900)]
USB: m66592-udc: fixes some problems

This patch incorporates some updates from the review of the
Renesas m66592-udc driver.  Updates include:

 - Fix some locking bugs; and add a few sparse annotations
 - Don't #define __iomem !
 - Lots of whitespace fixes (most of the patch by volume)
 - Some #include file trimmage
 - Other checkpatch.pl and sparse updates
 - Alphabetized and slightly-more-informative Kconfig
 - Don't use the ID which was assigned to the amd5536udc driver.
 - Remove pointless suspend/resume methods updating obsolete field.
 - Some section fixups
 - Fix some leak bugs
 - Fix byteswapping

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: usb-storage: unusual_devs entry for Nikon D100
Alan Stern [Mon, 16 Jul 2007 19:30:20 +0000 (15:30 -0400)]
USB: usb-storage: unusual_devs entry for Nikon D100

This patch (as938) adds an unusual_devs entry for the Nikon DSC D100.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: Remove pointless conditional in drivers/usb/serial/io_ti.c::edge_shutdown()
Jesper Juhl [Mon, 16 Jul 2007 20:17:25 +0000 (22:17 +0200)]
USB: Remove pointless conditional in drivers/usb/serial/io_ti.c::edge_shutdown()

Coverity scan found (CID: 1708) this in
drivers/usb/serial/io_ti.c::edge_shutdown() :

...
2797  for (i=0; i < serial->num_ports; ++i) {
2798  edge_port = usb_get_serial_port_data(serial->port[i]);
2799  edge_remove_sysfs_attrs(edge_port->port);
2800  if (edge_port) {
2801  edge_buf_free(edge_port->ep_out_buf);
2802  kfree(edge_port);
2803  }
2804  usb_set_serial_port_data(serial->port[i], NULL);
2805  }
...

It's complaining that we dereference 'edge_port' in line 2799 which
makes the test of that pointer against NULL in 2800 pointless, since if
edge_port was actually NULL we'd have crashed already before reaching
line 2800.
Reading the edge_open() function it seems to me that the pointer
returned by usb_get_serial_port_data(serial->port[i]) and stored in
'edge_port' can never actually be NULL here, so the test is entirely
superfluous (even if it could be NULL it would be pointless here,
ignoring the then possible crash in that case, since both
edge_buf_free() and kfree() can handle being passed NULL pointers.

This patch removes the pointless conditional (and also makes a few
tiny style corrections now that I was in the area anyway).

Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: MAINTAINERS entry for amd5536udc
Thomas Dahlmann [Thu, 12 Jul 2007 16:30:39 +0000 (09:30 -0700)]
USB: MAINTAINERS entry for amd5536udc

MAINTAINERS entry for amd5536udc driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: amd5536 UDC driver (in GEODE southbridge)
Thomas Dahlmann [Tue, 17 Jul 2007 04:40:54 +0000 (21:40 -0700)]
USB: amd5536 UDC driver (in GEODE southbridge)

Driver for the AMD5536 UDC, as found in the AMD Geode CS5536 (southbridge).
This is a high speed DMA-capable controller, which can also be used in
OTG configurations (which are not supported by this patch).

Acked-by: Jordan Crouse <jordan.crouse@amd.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: documentation update for usb_unlink_urb
Alan Stern [Fri, 13 Jul 2007 19:47:16 +0000 (15:47 -0400)]
USB: documentation update for usb_unlink_urb

This patch (as936) updates the kerneldoc for usb_unlink_urb.  The
explanation of how endpoint queues are meant to work is now clearer
and in better agreement with reality.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUHCI: short control URBs get a status stage
Alan Stern [Fri, 13 Jul 2007 19:46:29 +0000 (15:46 -0400)]
UHCI: short control URBs get a status stage

It has recently been pointed out that short control transfers should
have a status stage, even if they generate an error because
URB_SHORT_NOT_OK was set.  This patch (as935) changes uhci-hcd to
enable the status stage when this happens.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: mos7720, mos7840: remove redundant urb check
Florin Malita [Mon, 16 Jul 2007 15:50:53 +0000 (11:50 -0400)]
USB: mos7720, mos7840: remove redundant urb check

Coverity (1709, 1710, 1711, 1712, 1713) actually flagged these as
REVERSE_INULLs (NULL check performed after dereference). But looking at
the other drivers I can't see any similar tests and the USB core already
makes sure urb is non-null - so might as well get rid of the checks.

Signed-off-by: Florin Malita <fmalita@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: fix warning caused by autosuspend counter going negative
Alan Stern [Mon, 16 Jul 2007 19:28:19 +0000 (15:28 -0400)]
USB: fix warning caused by autosuspend counter going negative

This patch (as937) fixes a minor bug in the autosuspend usage-counting
code.  Each hub's usage counter keeps track of the number of
unsuspended children.  However the current driver increments the
counter after registering a new child, by which time the child may
already have been suspended and caused the counter to go negative.
The obvious solution is to increment the counter before registering
the child.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: stable <stable@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: add "descriptors" binary sysfs attribute
Alan Stern [Thu, 12 Jul 2007 21:06:23 +0000 (17:06 -0400)]
USB: add "descriptors" binary sysfs attribute

This patch (as934) adds a new readonly binary sysfs attribute file
called "descriptors" for each USB device.  The attribute contains the
device descriptor followed by the raw descriptor entry (config plug
subsidiary descriptors) for the current configuration.

Having this information available in fixed-format binary makes life a
lot easier for user programs by avoiding the need to open, read, and
parse multiple sysfs text files.

The information in this attribute file is much like that in usbfs's
device file, but there are some significant differences:

The 2-byte fields in the device descriptor are left in
little-endian byte order, as they appear on the bus and
in the kernel.

Only one raw descriptor set is presented, that of the
current configuration.

Opening this file will not cause a suspended device to be
autoresumed.

The last item in particular should be a big selling point for libusb,
which currently forces all USB devices to be resumed as it scans the
device tree.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Dave Mielke <dave@mielke.cc>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoisp116x-hcd: prepare for urb->status
Alan Stern [Thu, 12 Jul 2007 21:03:01 +0000 (17:03 -0400)]
isp116x-hcd: prepare for urb->status

This patch (as931b), adapted from a patch by Olav Kongas, makes a small
set of conservative changes to the isp116x-hcd driver in preparation
for the removal of urb->status.

finish_request() is moved up in the source and is called
as soon as the URB is known to have completed, rather than
after all the active endpoints have been scanned.

The status of a completed URB is kept in a local variable
and copied to urb->status only when the URB is about to be
given back.

-EREMOTEIO error status for control transfers is set after
the status stage rather than when the short packet arrives.

Some unnecessary uses of urb->lock are removed.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Cc: Olav Kongas <ok@artecdesign.ee>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: usblp: "Big cleanup" breaks O_NONBLOCK
Pete Zaitcev [Wed, 11 Jul 2007 03:09:58 +0000 (20:09 -0700)]
USB: usblp: "Big cleanup" breaks O_NONBLOCK

I found the first regresson in the rewritten ("all dynamic" and "no races")
driver. If application uses O_NONBLOCK, I return -EAGAIN despite the URB
being submitted successfuly. This causes the application to resubmit the
same data erroneously.

The fix is to pretend that the transfer has succeeded even if URB was
merely queued. It is the same behaviour as with the old version.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: sierra: Add new devices
Kevin Lloyd [Mon, 16 Jul 2007 20:49:29 +0000 (13:49 -0700)]
USB: sierra: Add new devices

This patch adds new devices to the Sierra Wireless driver. This is being
resubmitted because the dependent patch (patch 01/02) needed to be
resubmitted.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: sierra: Add TRU-Install (c) Support
Kevin Lloyd [Mon, 16 Jul 2007 20:49:27 +0000 (13:49 -0700)]
USB: sierra: Add TRU-Install (c) Support

This patch adds compatibility with Sierra Wireless' new TRU-Install
feature. Future devices that use this feature will not work unless this
patch has been applied.

Signed-off-by: Kevin Lloyd <linux@sierrawireless.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: use mutex instead of semaphore in the FTDI ELAN driver
Matthias Kaehlcke [Fri, 13 Jul 2007 19:29:46 +0000 (21:29 +0200)]
USB: use mutex instead of semaphore in the FTDI ELAN driver

The FTDI ELAN driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: use mutex instead of semaphore in the Adutux driver
Matthias Kaehlcke [Fri, 13 Jul 2007 19:28:31 +0000 (21:28 +0200)]
USB: use mutex instead of semaphore in the Adutux driver

The Adutux driver uses a semaphore as mutex. Use the mutex API
instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: use mutex instead of semaphore in the ELAN U132 adapter driver
Matthias Kaehlcke [Fri, 13 Jul 2007 19:26:59 +0000 (21:26 +0200)]
USB: use mutex instead of semaphore in the ELAN U132 adapter driver

The ELAN U132 adapter driver uses the semaphore u132_module_lock
as mutex. Use the mutex API instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoUSB: use mutex instead of semaphore in the USB gadget serial driver
Matthias Kaehlcke [Fri, 13 Jul 2007 19:25:25 +0000 (21:25 +0200)]
USB: use mutex instead of semaphore in the USB gadget serial driver

The USB gadget serial driver uses a semaphore as mutex. Use the
mutex API instead of the (binary) semaphore.

Signed-off-by: Matthias Kaehlcke <matthias.kaehlcke@gmail.com>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
17 years agoMerge master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6
Linus Torvalds [Thu, 19 Jul 2007 23:31:22 +0000 (16:31 -0700)]
Merge /pub/scm/linux/kernel/git/bart/ide-2.6

* master.kernel.org:/pub/scm/linux/kernel/git/bart/ide-2.6: (23 commits)
  ide: add support for SCSI ioctls to ide-floppy
  ide: remove stale changelog from setup-pci.c
  ide: remove stale changelog/comments/TODO from ide.c
  ide-cris: handle PIO auto-tuning in tune_cris_ide()
  ide: add PIO masks
  ide: remove ide_find_best_pio_mode()
  ide: drop "PIO data" argument from ide_get_best_pio_mode()
  ide: ide_find_best_pio_mode() fixes (take 2)
  ide: add ide_pio_cycle_time() helper (take 2)
  sc1200: remove stale Power Management code
  ide: ide_start_power_step() fix WRT disabling DMA
  serverworks: fix DMA
  serverworks: always tune PIO
  ide: add ide_pci_device_t.host_flags (take 2)
  ide: add ide_dev_has_iordy() helper (take 4)
  ide: make ide_get_best_pio_mode() print info if overriding PIO mode
  siimage: PIO mode setup fixes (take 2)
  atiixp: PIO mode setup fixes
  ide: Stop mapping ROMs
  IDE: Remove references to dead ETRAX-related variables.
  ...

17 years agocoda breakage
Al Viro [Thu, 19 Jul 2007 23:23:31 +0000 (00:23 +0100)]
coda breakage

a) switch by loff_t == __cmpdi2 use.  Replaced with a couple
of obvious ifs; update of ->f_pos in the first one makes sure that we
do the right thing in all cases.
b) block_signals() and unblock_signals() are globals on UML.
Renamed coda ones; in principle UML probably ought to do rename as
well, but that's another story.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agomissed cong_avoid() instance
Al Viro [Thu, 19 Jul 2007 23:17:45 +0000 (00:17 +0100)]
missed cong_avoid() instance

Removal of rtt argument in ->cong_avoid() had missed tcp_htcp.c
instance.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoide: add support for SCSI ioctls to ide-floppy
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: add support for SCSI ioctls to ide-floppy

Now that ide-floppy supports SG_IO we can add support for SCSI ioctls
(except deprecated SCSI_IOCTL_SEND_COMMAND and legacy CDROM_SEND_PACKET
ones - we can add them later iff really needed).

While at it remove handling of CDROMEJECT and CDROMCLOSETRAY ioctls from
generic_ide_ioctl():

- This prevents ide-{disk,tape,scsi} device drivers from obtaining
  REQ_TYPE_BLOCK_PC type requests which are currently unsupported by
  these drivers and which are potentially harmful (as reported by Andrew).

- There is no functionality loss since aforementioned ioctls will now be
  handled by idefloppy_ioctl()->scsi_cmd_ioctl() (for devices using
  ide-floppy driver) and by idecd_ioctl->cdrom_ioctl()->scsi_cmd_ioctl()
  (for devices using ide-cd driver).

Cc: Jens Axboe <jens.axboe@oracle.com>
Cc: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Cc: James Bottomley <James.Bottomley@steeleye.com>
Cc: Jeff Garzik <jeff@garzik.org>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove stale changelog from setup-pci.c
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: remove stale changelog from setup-pci.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove stale changelog/comments/TODO from ide.c
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: remove stale changelog/comments/TODO from ide.c

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide-cris: handle PIO auto-tuning in tune_cris_ide()
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide-cris: handle PIO auto-tuning in tune_cris_ide()

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add PIO masks
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:59 +0000 (01:11 +0200)]
ide: add PIO masks

* Add ATA_PIO[0-6] defines to <linux/ata.h>.

* Add ->pio_mask field to ide_pci_device_t and ide_hwif_t.

* Add PIO masks to host drivers.

<linux/ata.h> change ACK-ed by Jeff Garzik <jeff@garzik.org>.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: remove ide_find_best_pio_mode()
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:58 +0000 (01:11 +0200)]
ide: remove ide_find_best_pio_mode()

* Add ->host_flags to ide_hwif_t to store ide_pci_device_t.host_flags,
  assign it in setup-pci.c:ide_pci_setup_ports().

* Add IDE_HFLAG_PIO_NO_{BLACKLIST,DOWNGRADE} to ide_pci_device_t.host_flags
  and teach ide_get_best_pio_mode() about them.  Also remove needless
  !drive->id check while at it (drive->id is always present).

* Convert amd74xx, via82cxxx and ide-timing.h to use ide_get_best_pio_mode()
  and then remove no longer needed ide_find_best_pio_mode().

There should be no functionality changes caused by this patch.

Acked-by: Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: drop "PIO data" argument from ide_get_best_pio_mode()
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:58 +0000 (01:11 +0200)]
ide: drop "PIO data" argument from ide_get_best_pio_mode()

* Drop no longer needed "PIO data" argument from ide_get_best_pio_mode()
  and convert all users accordingly.

* Remove no longer needed ide_pio_data_t.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: ide_find_best_pio_mode() fixes (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:57 +0000 (01:11 +0200)]
ide: ide_find_best_pio_mode() fixes (take 2)

* Check IORDY bit for PIO modes > 2.

* Some devices claim maximum PIO mode > 2 in id->tPIO, they were punished too
  severly for this by being limited to PIO_SLOW.  Limit them to PIO2 instead.

v2:
* Fix PIO number being returned incorrectly instead of PIO mode
  (Noticed by Sergei).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_pio_cycle_time() helper (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
ide: add ide_pio_cycle_time() helper (take 2)

* Add ide_pio_cycle_time() helper.

* Use it in ali14xx/ht6560b/qd65xx/cmd64{0,x}/sl82c105 and pmac host drivers
  (previously cycle time given by the device was only used for "pio" == 255).

* Remove no longer needed ide_pio_data_t.cycle_time field.

v2:
* Fix "ata_" prefix (Noticed by Jeff).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosc1200: remove stale Power Management code
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
sc1200: remove stale Power Management code

* Nowadays core IDE code handles restoring of PIO and DMA modes
  (ide-io.c:ide_start_power_step() etc) so remove open-coded version
  from sc1200_resume().

  There should be no change in behavior because settings done by
  sc1200_resume() were always overridden by generic_ide_resume()
  and ide_{start,stop}_power_step().

* Bump driver version.

Cc: Mark Lord <mlord@pobox.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: ide_start_power_step() fix WRT disabling DMA
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
ide: ide_start_power_step() fix WRT disabling DMA

* Do the same thing as probe_hwif() and always disable DMA so chipset DMA
  enabled bit gets cleared (if the drive doesn't support DMA ide_set_dma()
  won't try to tune it anyway).

* Add TODO comment about respecting ->using_dma setting.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoserverworks: fix DMA
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
serverworks: fix DMA

The driver used to depend on BIOS settings for deciding whether it is OK
to use DMA.  However it seems that BIOS doesn't always handle all cases
correctly so just let IDE core to decide about this.  It should be a safe
thing to do now, after the driver went through heavy bugfixing.

Thanks for bugreport and testing the patch goes out to Sven Niedner.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoserverworks: always tune PIO
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:56 +0000 (01:11 +0200)]
serverworks: always tune PIO

* Always set ->autotune so PIO gets correctly auto-tuned (previously
  ->autotune was only set when ->dma_base wasn't available, however
  ->ide_dma_check()/->speedproc() was always trying to tune PIO when
  tuning DMA).

* Move code responsible for programming chipset for PIO mode from
  svwks_tune_chipset() to svwks_tune_pio().  Don't tune PIO when tuning
  DMA (this is no longer needed since ->autotune is always set now).

* Handle PIO modes early in svwks_tune_chipset() so DMA configuration
  registers don't get cleared when programming PIO mode.

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_pci_device_t.host_flags (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:55 +0000 (01:11 +0200)]
ide: add ide_pci_device_t.host_flags (take 2)

* Rename ide_pci_device_t.flags to ide_pci_device_t.host_flags
  and IDEPCI_FLAG_ISA_PORTS flag to IDE_HFLAG_ISA_PORTS.

* Add IDE_HFLAG_SINGLE flag for single channel devices.

* Convert core code and all IDE PCI drivers to use IDE_HFLAG_SINGLE
  and remove no longer needed ide_pci_device_t.channels field.

v2:
* Fix issues noticed by Sergei:
  - correct code alignment in scc_pata.c
  - s/IDE_HFLAG_SINGLE/~IDE_HFLAG_SINGLE/ in serverworks.c

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: add ide_dev_has_iordy() helper (take 4)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:55 +0000 (01:11 +0200)]
ide: add ide_dev_has_iordy() helper (take 4)

* Add ide_dev_has_iordy() helper and use it sl82c105 host driver.

* Remove no longer needed ide_pio_data_t.use_iordy field.

v2/v3:
* Fix issues noticed by Sergei:
  - correct patch description
  - fix comment in ide_get_best_pio_mode()

v4:
* Fix "ata_" prefix (Noticed by Jeff).

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: make ide_get_best_pio_mode() print info if overriding PIO mode
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:55 +0000 (01:11 +0200)]
ide: make ide_get_best_pio_mode() print info if overriding PIO mode

* Print info about overriding PIO mode in ide_get_best_pio_mode().

* Remove info about overriding PIO mode from cmd64{0,x} host drivers.

* Remove no longer needed ide_pio_data_t.overridden field.

Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agosiimage: PIO mode setup fixes (take 2)
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
siimage: PIO mode setup fixes (take 2)

* Add sil_tuneproc() wrapper for siimage_tuneproc() which also sets
  PIO mode on the device.

* Add missing ide_get_best_pio_mode() call to sil_tuneproc() so
  "pio" == 255 (autotune) is handled correctly (previously PIO0 was used)
  and "pio" values > 4 && < 255 are filtered to PIO4 (instead of PIO0).

* Add code limiting maximum PIO mode according to the pair device capabilities
  to sil_tuneproc().

* Convert users of config_siimage_chipset_for_pio() to use sil_tune_pio() and
  sil_tuneproc().  This fixes PIO fallback in siimage_config_drive_for_dma() to
  use max PIO mode available instead of PIO4 (config_siimage_chipset_for_pio()
  used wrong arguments for ide_get_best_pio_mode() and as a results always
  tried to set PIO4).

* Remove no longer needed siimage_taskfile_timing()
  and config_siimage_chipset_for_pio().

* Enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
  from siimage_speedproc()

* Bump driver version.

v2:
* Fix issues noticed by Sergei:
  - correct pair device check
  - trim only taskfile PIO to the slowest of the master/slave
  - enable ->autotune unconditionally and remove PIO tuning for UDMA/MDMA modes
    from siimage_speedproc()
  - add TODO item for IORDY bugs
  - minor cleanups

Reviewed-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoatiixp: PIO mode setup fixes
Bartlomiej Zolnierkiewicz [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
atiixp: PIO mode setup fixes

* Split off exisiting atiixp_tuneproc() into atiixp_tune_pio()
  and then add setting device PIO mode to atiixp_tuneproc().

* Add missing ide_get_best_pio_mode() call to atiixp_tuneproc() so
  "pio" == 255 (autotune) is handled correctly and "pio" values > 4 && < 255
  are filtered to PIO4 (previously "pio" == 5 could result in wrong timings
  being used and "pio" values > 4 && < 255 in an OOPS).

* Handle PIO modes early in atiixp_speedproc() so save_mdma_mode[]
  doesn't get cleared.

* In atiixp_dma_check():
  - fix max_mode argument for ide_get_best_pio_mode()
  - don't call atiixp_dma_2_pio() so PIO1 doesn't get remapped to PIO0
  - use atiixp_tuneproc() instead of atiixp_speedproc()

* Bump driver version.

Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoide: Stop mapping ROMs
Alan Cox [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
ide: Stop mapping ROMs

Various old IDE drivers go mapping ROM devices for no apparent reason and
without using the ROM mapping API we now have. They don't actually use
the ROM they map and the new libata drivers are happy without it being
mapped so rather than port them lets just junk it for the next -rc1.

Signed-off-by: Alan Cox <alan@redhat.com>
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Cc: Andrew Morton <akpm@osdl.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoIDE: Remove references to dead ETRAX-related variables.
Robert P. J. Day [Thu, 19 Jul 2007 23:11:54 +0000 (01:11 +0200)]
IDE: Remove references to dead ETRAX-related variables.

The two CONFIG variables

        CONFIG_ETRAX_IDE_CSE1_16_RESET
        CONFIG_ETRAX_IDE_CSP0_8_RESET

appear to have been dead since way back in 2.5.xx days:

http://www.linuxhq.com/kernel/v2.5/75/arch/cris/drivers/Kconfig

Signed-off-by: Robert P. J. Day <rpjday@mindspring.com>
Cc: Michael Starvik <starvik@axis.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoPCMCIA: Add another MemoryCard to ide-cs/pata_pcmcia
Marcin Juszkiewicz [Thu, 19 Jul 2007 23:11:53 +0000 (01:11 +0200)]
PCMCIA: Add another MemoryCard to ide-cs/pata_pcmcia

One card submitted by user.

Signed-off-by: Marcin Juszkiewicz <openembedded@hrw.one.pl>
Cc: Jeff Garzik <jeff@garzik.org>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoscc_pata.c: Workaround for errata A308 (take 2)
Kou Ishizaki [Thu, 19 Jul 2007 23:11:53 +0000 (01:11 +0200)]
scc_pata.c: Workaround for errata A308 (take 2)

Workaround for errata A308: turn down the UDMA mode and retry
the DMA command when the data lost condition is detected.

take2:
udma_filter() hook is used to limit ATAPI UDMA mode.

Signed-off-by: Kou Ishizaki <kou.ishizaki@toshiba.co.jp>
Signed-off-by: Akira Iguchi <akira2.iguchi@toshiba.co.jp>
Cc: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoscc_pata: Use inline function for eieio
Kumar Gala [Thu, 19 Jul 2007 23:11:53 +0000 (01:11 +0200)]
scc_pata: Use inline function for eieio

Move to using inline function variant of eieio instead of inline assmebly.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Cc: kou.ishizaki@toshiba.co.jp
Acked-by: Sergei Shtylyov <sshtylyov@ru.mvista.com>
Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
17 years agoMerge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
Linus Torvalds [Thu, 19 Jul 2007 21:42:40 +0000 (14:42 -0700)]
Merge branch 'for-linus' of git://git./linux/kernel/git/jmorris/selinux-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/selinux-2.6:
  SELinux: use SECINITSID_NETMSG instead of SECINITSID_UNLABELED for NetLabel
  SELinux: enable dynamic activation/deactivation of NetLabel/SELinux enforcement

17 years agoMerge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6
Linus Torvalds [Thu, 19 Jul 2007 21:41:33 +0000 (14:41 -0700)]
Merge branch 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6

* 'for-linus' of git://oss.sgi.com:8090/xfs/xfs-2.6:
  [XFS] Fix inode size update before data write in xfs_setattr
  [XFS] Allow punching holes to free space when at ENOSPC
  [XFS] Implement ->page_mkwrite in XFS.
  [FS] Implement block_page_mkwrite.

Manually fix up conflict with Nick's VM fault handling patches in
fs/xfs/linux-2.6/xfs_file.c

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoi386: Allow KVM on i386 nonpae
Avi Kivity [Thu, 19 Jul 2007 11:30:14 +0000 (14:30 +0300)]
i386: Allow KVM on i386 nonpae

Currently, CONFIG_X86_CMPXCHG64 both enables boot-time checking of
the cmpxchg64b feature and enables compilation of the set_64bit() family.
Since the option is dependent on PAE, and since KVM depends on set_64bit(),
this effectively disables KVM on i386 nopae.

Simplify by removing the config option altogether: the boot check is made
dependent on CONFIG_X86_PAE directly, and the set_64bit() family is exposed
without constraints.  It is up to users to check for the feature flag (KVM
does not as virtualiation extensions imply its existence).

Signed-off-by: Avi Kivity <avi@qumranet.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.linux-nfs.org/pub/linux/nfs-2.6
Linus Torvalds [Thu, 19 Jul 2007 21:33:41 +0000 (14:33 -0700)]
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6

* git://git.linux-nfs.org/pub/linux/nfs-2.6:
  NFSv4: handle lack of clientaddr in option string
  NFSv4: debug print ntohl(status) in nfs client callback xdr code
  SUNRPC: Clean up the sillyrename code
  NFS: Introduce struct nfs_removeargs+nfs_removeres
  NFS: Use dentry->d_time to store the parent directory verifier.
  SUNRPC: move bkl locking and xdr proc invocation into a common helper
  NFSv4: Fix the nfsv4 readlink reply buffer alignment
  NFSv4: Fix the readdir reply buffer alignment
  NFSv4: More NFSv4 xdr cleanups
  NFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open
  NFSv4: 'constify' lookup arguments.
  NFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed
  NFSv4: Fix open state recovery
  NFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS

17 years agoUpdate .gitignore for arch/i386/boot
Matthew Wilcox [Thu, 19 Jul 2007 19:09:10 +0000 (13:09 -0600)]
Update .gitignore for arch/i386/boot

With the new setup code, we generate a couple more files

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
[ .. and do the same for x86-64 - Alexey ]
Acked-by: Alexey Dobriyan <adobriyan@gmail.com>
Acked-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agofix spufs build after ->fault changes
Christoph Hellwig [Thu, 19 Jul 2007 19:05:58 +0000 (12:05 -0700)]
fix spufs build after ->fault changes

83c54070ee1a2d05c89793884bea1a03f2851ed4 broke spufs by incorrectly
updating the code, this patch gets it to compile again.

It's probably still broken due to the scheduler changes, but this
at least makes sure cell kernels can still be built.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Arnd Bergmann <arnd@arndb.de>
Acked-by: Geoff Levand <geoffrey.levand@am.sony.com>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Nick Piggin <nickpiggin@yahoo.com.au>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild
Linus Torvalds [Thu, 19 Jul 2007 21:28:19 +0000 (14:28 -0700)]
Merge git://git./linux/kernel/git/sam/kbuild

* git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild: (33 commits)
  xtensa: use DATA_DATA in xtensa
  powerpc: add missing DATA_DATA to powerpc
  cris: use DATA_DATA in cris
  kallsyms: remove usage of memmem and _GNU_SOURCE from scripts/kallsyms.c
  kbuild: use -fno-optimize-sibling-calls unconditionally
  kconfig: reset generated values only if Kconfig and .config agree.
  kbuild: fix the warning when running make tags
  kconfig: strip 'CONFIG_' automatically in kernel configuration search
  kbuild: use POSIX BRE in headers install target
  Whitelist references from __dbe_table to .init
  modpost white list pattern adjustment
  kbuild: do section mismatch check on full vmlinux
  kbuild: whitelist references from variables named _timer to .init.text
  kbuild: remove hardcoded _logo names from modpost
  kbuild: remove hardcoded apic_es7000 from modpost
  kbuild: warn about references from .init.text to .exit.text
  kbuild: consolidate section checks
  kbuild: refactor code in modpost to improve maintainability
  kbuild: ignore section mismatch warnings originating from .note section
  kbuild: .paravirtprobe section is obsolete, so modpost doesn't need to handle it
  ...

17 years agoMerge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6
Linus Torvalds [Thu, 19 Jul 2007 21:24:57 +0000 (14:24 -0700)]
Merge branch 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6

* 'release' of git://lm-sensors.org/kernel/mhoffman/hwmon-2.6: (44 commits)
  i2c: Delete the i2c-isa pseudo bus driver
  hwmon: refuse to load abituguru driver on non-Abit boards
  hwmon: fix Abit Uguru3 driver detection on some motherboards
  hwmon/w83627ehf: Be quiet when no chip is found
  hwmon/w83627ehf: No need to initialize fan_min
  hwmon/w83627ehf: Export the thermal sensor types
  hwmon/w83627ehf: Enable VBAT monitoring
  hwmon/w83627ehf: Add support for the VID inputs
  hwmon/w83627ehf: Fix timing issues
  hwmon/w83627ehf: Add error messages for two error cases
  hwmon/w83627ehf: Convert to a platform driver
  hwmon/w83627ehf: Update the Kconfig entry
  make coretemp_device_remove() static
  hwmon: Add LM93 support
  hwmon: Improve the pwmN_enable documentation
  hwmon/smsc47b397: Don't report missing fans as spinning at 82 RPM
  hwmon: Add support for newer uGuru's
  hwmon/f71805f: Add temperature-tracking fan control mode
  hwmon/w83627ehf: Preserve speed reading when changing fan min
  hwmon: fix detection of abituguru volt inputs
  ...

Manual fixup of trivial conflict in MAINTAINERS file

17 years agorandom: fix bound check ordering (CVE-2007-3105)
Matt Mackall [Thu, 19 Jul 2007 18:30:14 +0000 (11:30 -0700)]
random: fix bound check ordering (CVE-2007-3105)

If root raised the default wakeup threshold over the size of the
output pool, the pool transfer function could overflow the stack with
RNG bytes, causing a DoS or potential privilege escalation.

(Bug reported by the PaX Team <pageexec@freemail.hu>)

Cc: Theodore Tso <tytso@mit.edu>
Cc: Willy Tarreau <w@1wt.eu>
Signed-off-by: Matt Mackall <mpm@selenic.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoMerge branch 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfashe...
Linus Torvalds [Thu, 19 Jul 2007 21:16:44 +0000 (14:16 -0700)]
Merge branch 'upstream-linus' of git://git./linux/kernel/git/mfasheh/ocfs2

* 'upstream-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/mfasheh/ocfs2:
  ocfs2: ->fallocate() support

17 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched
Linus Torvalds [Thu, 19 Jul 2007 21:11:14 +0000 (14:11 -0700)]
Merge git://git./linux/kernel/git/mingo/linux-2.6-sched

* git://git.kernel.org/pub/scm/linux/kernel/git/mingo/linux-2.6-sched:
  [PATCH] sched: implement cpu_clock(cpu) high-speed time source
  [PATCH] sched: fix the all pinned logic in load_balance_newidle()
  [PATCH] sched: fix newly idle load balance in case of SMT
  [PATCH] sched: sched_cacheflush is now unused

17 years agouser namespace: fix copy_user_ns return value
Serge E. Hallyn [Tue, 17 Jul 2007 19:28:17 +0000 (15:28 -0400)]
user namespace: fix copy_user_ns return value

When a CONFIG_USER_NS=n and a user tries to unshare some namespace other
than the user namespace, the dummy copy_user_ns returns NULL rather than
the old_ns.

This value then gets assigned to task->nsproxy->user_ns, so that a
subsequent setuid, which uses task->nsproxy->user_ns, causes a NULL
pointer deref.

Fix this by returning old_ns.

Signed-off-by: Serge E. Hallyn <serue@us.ibm.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoslub: fix ksize() for zero-sized pointers
Linus Torvalds [Thu, 19 Jul 2007 20:21:34 +0000 (13:21 -0700)]
slub: fix ksize() for zero-sized pointers

The slab and slob allocators already did this right, but slub would call
"get_object_page()" on the magic ZERO_SIZE_PTR, with all kinds of nasty
end results.

Noted by Ingo Molnar.

Cc: Ingo Molnar <mingo@elte.hu>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years agoFix up non-NUMA SLAB configuration for zero-sized allocations
Linus Torvalds [Thu, 19 Jul 2007 20:17:15 +0000 (13:17 -0700)]
Fix up non-NUMA SLAB configuration for zero-sized allocations

I suspect Christoph tested his code only in the NUMA configuration, for
the combination of SLAB+non-NUMA the zero-sized kmalloc's would not work.

Of course, this would only trigger in configurations where those zero-
sized allocations happen (not very common), so that may explain why it
wasn't more widely noticed.

Seen by by Andi Kleen under qemu, and there seems to be a report by
Michael Tsirkin on it too.

Cc: Andi Kleen <ak@suse.de>
Cc: Roland Dreier <rdreier@cisco.com>
Cc: Michael S. Tsirkin <mst@dev.mellanox.co.il>
Cc: Pekka Enberg <penberg@cs.helsinki.fi>
Cc: Christoph Lameter <clameter@sgi.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
17 years ago[PATCH] sched: implement cpu_clock(cpu) high-speed time source
Ingo Molnar [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: implement cpu_clock(cpu) high-speed time source

Implement the cpu_clock(cpu) interface for kernel-internal use:
high-speed (but slightly incorrect) per-cpu clock constructed from
sched_clock().

This API, unused at the moment, will be used in the future by blktrace,
by the softlockup-watchdog, by printk and by lockstat.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: fix the all pinned logic in load_balance_newidle()
Suresh Siddha [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: fix the all pinned logic in load_balance_newidle()

nr_moved is not the correct check for triggering all pinned logic. Fix
the all pinned logic in the case of load_balance_newidle().

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: fix newly idle load balance in case of SMT
Suresh Siddha [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: fix newly idle load balance in case of SMT

In the presence of SMT, newly idle balance was never happening for
multi-core and SMP domains (even when both the logical siblings are
idle).

If thread 0 is already idle and when thread 1 is about to go to idle,
newly idle load balance always think that one of the threads is not idle
and skips doing the newly idle load balance for multi-core and SMP
domains.

This is because of the idle_cpu() macro, which checks if the current
process on a cpu is an idle process. But this is not the case for the
thread doing the load_balance_newidle().

Fix this by using runqueue's nr_running field instead of idle_cpu(). And
also skip the logic of 'only one idle cpu in the group will be doing
load balancing' during newly idle case.

Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years ago[PATCH] sched: sched_cacheflush is now unused
Ralf Baechle [Thu, 19 Jul 2007 19:28:35 +0000 (21:28 +0200)]
[PATCH] sched: sched_cacheflush is now unused

Since Ingo's recent scheduler rewrite which was merged as commit
0437e109e1841607f2988891eaa36c531c6aa6ac sched_cacheflush is unused.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
17 years agoNFSv4: handle lack of clientaddr in option string
Jeff Layton [Wed, 18 Jul 2007 15:28:43 +0000 (11:28 -0400)]
NFSv4: handle lack of clientaddr in option string

If a NFSv4 mount is attempted  with string based options, and the
option string doesn't contain a clientaddr= option, the kernel will
currently oops. Check for this situation and return a proper error.

Signed-off-by: Jeff Layton <jlayton@redhat.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: debug print ntohl(status) in nfs client callback xdr code
Benny Halevy [Sun, 15 Jul 2007 17:14:32 +0000 (20:14 +0300)]
NFSv4: debug print ntohl(status) in nfs client callback xdr code

status in nfs client callback xdr code is passed in network order.
print it in host order for better readability.

Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoSUNRPC: Clean up the sillyrename code
Trond Myklebust [Sat, 14 Jul 2007 19:39:58 +0000 (15:39 -0400)]
SUNRPC: Clean up the sillyrename code

Fix a couple of bugs:
 - Don't rely on the parent dentry still being valid when the call completes.
   Fixes a race with shrink_dcache_for_umount_subtree()

 - Don't remove the file if the filehandle has been labelled as stale.

Fix a couple of inefficiencies
 - Remove the global list of sillyrenamed files. Instead we can cache the
   sillyrename information in the dentry->d_fsdata
 - Move common code from unlink_setup/unlink_done into fs/nfs/unlink.c

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFS: Introduce struct nfs_removeargs+nfs_removeres
Trond Myklebust [Sat, 14 Jul 2007 19:39:57 +0000 (15:39 -0400)]
NFS: Introduce struct nfs_removeargs+nfs_removeres

We need a common structure for setting up an unlink() rpc call in order to
fix the asynchronous unlink code.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFS: Use dentry->d_time to store the parent directory verifier.
Trond Myklebust [Sat, 14 Jul 2007 21:36:45 +0000 (17:36 -0400)]
NFS: Use dentry->d_time to store the parent directory verifier.

This will free up the d_fsdata field for other use.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoSUNRPC: move bkl locking and xdr proc invocation into a common helper
J. Bruce Fields [Wed, 11 Jul 2007 22:39:02 +0000 (18:39 -0400)]
SUNRPC: move bkl locking and xdr proc invocation into a common helper

Since every invocation of xdr encode or decode functions takes the BKL now,
there's a lot of redundant lock_kernel/unlock_kernel pairs that we can pull
out into a common function.

Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Fix the nfsv4 readlink reply buffer alignment
Trond Myklebust [Thu, 19 Jul 2007 14:03:38 +0000 (10:03 -0400)]
NFSv4: Fix the nfsv4 readlink reply buffer alignment

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Fix the readdir reply buffer alignment
Trond Myklebust [Thu, 19 Jul 2007 14:03:37 +0000 (10:03 -0400)]
NFSv4: Fix the readdir reply buffer alignment

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: More NFSv4 xdr cleanups
Trond Myklebust [Wed, 18 Jul 2007 01:52:42 +0000 (21:52 -0400)]
NFSv4: More NFSv4 xdr cleanups

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open
Trond Myklebust [Wed, 18 Jul 2007 01:52:41 +0000 (21:52 -0400)]
NFSv4: Try to recover from getfh failures in nfs4_xdr_dec_open

Try harder to recover the open state if the server failed to return a
filehandle.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: 'constify' lookup arguments.
Trond Myklebust [Wed, 18 Jul 2007 01:52:39 +0000 (21:52 -0400)]
NFSv4: 'constify' lookup arguments.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed
Trond Myklebust [Wed, 18 Jul 2007 01:52:37 +0000 (21:52 -0400)]
NFSv4: Don't fail nfs4_xdr_dec_open if decode_restorefh() failed

We can already easily recover from that inside _nfs4_proc_open().

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSv4: Fix open state recovery
Trond Myklebust [Wed, 18 Jul 2007 01:50:45 +0000 (21:50 -0400)]
NFSv4: Fix open state recovery

Ensure that opendata->state is always initialised when we do state
recovery.

Ensure that we set the filehandle in the case where we're doing an
"OPEN_CLAIM_PREVIOUS" call due to a server reboot.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoNFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS
Trond Myklebust [Thu, 19 Jul 2007 14:03:34 +0000 (10:03 -0400)]
NFSD/SUNRPC: Fix the automatic selection of RPCSEC_GSS

Bruce's patch broke the ability to compile RPCSEC_GSS as a module.

Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
17 years agoi2c: Delete the i2c-isa pseudo bus driver
Jean Delvare [Sun, 8 Jul 2007 12:26:37 +0000 (14:26 +0200)]
i2c: Delete the i2c-isa pseudo bus driver

There are no users of i2c-isa left, so we can finally get rid of it.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
17 years agohwmon: refuse to load abituguru driver on non-Abit boards
Hans de Goede [Tue, 10 Jul 2007 15:09:57 +0000 (17:09 +0200)]
hwmon: refuse to load abituguru driver on non-Abit boards

With this patch the abituguru refuses to load on non Abit motherboards, as
discussed in lkml CONFIG_BREAK_MY_MACHINE thread.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Acked-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon: fix Abit Uguru3 driver detection on some motherboards
Hans de Goede [Mon, 2 Jul 2007 21:08:26 +0000 (23:08 +0200)]
hwmon: fix Abit Uguru3 driver detection on some motherboards

This patch changes the driver to also detect uguru3's which hold 0x08 at DATA
initially, as has been reported here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=220160

Also when an uguru3's holds 0x0014 in the ID register it will now report
"Abit AB9 Pro" as motherboard identification.

Signed-off-by: Hans de Goede <j.w.r.degoede@hhs.nl>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Be quiet when no chip is found
Jean Delvare [Sun, 24 Jun 2007 09:23:41 +0000 (11:23 +0200)]
hwmon/w83627ehf: Be quiet when no chip is found

This fixes bug #8593:
http://bugzilla.kernel.org/show_bug.cgi?id=8593

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: No need to initialize fan_min
Jean Delvare [Sun, 24 Jun 2007 09:21:43 +0000 (11:21 +0200)]
hwmon/w83627ehf: No need to initialize fan_min

We don't need to initialize fan_min in this driver, as the fan_div
attributes are read-only.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Export the thermal sensor types
Jean Delvare [Sun, 24 Jun 2007 09:21:02 +0000 (11:21 +0200)]
hwmon/w83627ehf: Export the thermal sensor types

Add support for the w83627ehf thermal sensor types. I made them read-only,
as the BIOS is supposed to set them up properly. This information makes it
easier to find out which temperature channel corresponds to the CPU.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
17 years agohwmon/w83627ehf: Enable VBAT monitoring
Jean Delvare [Sun, 24 Jun 2007 09:20:13 +0000 (11:20 +0200)]
hwmon/w83627ehf: Enable VBAT monitoring

If VBAT monitoring is disabled, enable it. Original patch from
an anonymous contributor on the lm-sensors trac system:
http://lm-sensors.org/ticket/2218

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>