Commit graph

11105 commits

Author SHA1 Message Date
Mike Miller ca1e0484d9 [PATCH] cciss: bug fix for crash when running hpacucli
Fix a crash when running hpacucli with multiple logical volumes on a cciss
controller.  We were not properly initializing the disk->queue and causing
a fault.

Thanks to Hasso Tepper for reporting the problem.  Thanks to Steve Cameron
for root causing the problem.  Most of the patch just moves things around.
The fix is a one-liner.

Signed-off-by: Mike Miller <mike.miller@hp.com>
Signed-off-by: Stephen Cameron <steve.cameron@hp.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-17 14:24:57 -07:00
Randy Dunlap 66e0a9888b [PATCH] isd200: limit to BLK_DEV_IDE
Limit USB_STORAGE_ISD200 to whatever BLK_DEV_IDE and USB_STORAGE
are set to (y, m) since isd200 calls ide_fix_driveid() in the
BLK_DEV_IDE code.

Signed-off-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-17 14:24:57 -07:00
David Brownell 2c5362007b Fix AT91RM9200 build breakage
The at91_cf driver got out of sync with certain changes in the PCMCIA
layer, notably getting rid of some duplication of data ... causing the
version merged to kernel.org to fail compiling.

This patch gives the at91_cf platform device a new iomem resource, using
it so this new pcmcia scheme works.  It also cleans up some whitepsace
bugs that have accumulated over time (mostly too-long lines).

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-14 18:38:01 -07:00
H. Peter Anvin 1f60245479 [efficeon-agp] Add missing memory mask
Original patch by Benjamin Herrenschmidt after debugging by Brian Hinz.

Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Brian Hinz <bphinz@hotmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-14 17:41:06 -07:00
Linus Torvalds 1b627d173e Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6: (170 commits)
  commit 3d9dd7564d
  Author: Zach Brown <zach.brown@oracle.com>
  Date:   Fri Apr 14 16:04:18 2006 -0700
  
      [PATCH] ip_output: account for fraggap when checking to add trailer_len
      
      During other work I noticed that ip_append_data() seemed to be forgetting to
      include the frag gap in its calculation of a fragment that consumes the rest of
      the payload.  Herbert confirmed that this was a bug that snuck in during a
      previous rework.
      
      Signed-off-by: Zach Brown <zach.brown@oracle.com>
      Signed-off-by: David S. Miller <davem@davemloft.net>
  
  commit 08d099974a
  Author: Linus Walleij <triad@df.lth.se>
  Date:   Fri Apr 14 16:03:33 2006 -0700
  
      [IRDA]: smsc-ircc2, smcinit support for ALi ISA bridges
      
  ...
2006-04-14 17:10:20 -07:00
Linus Torvalds f05472f10d Merge master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6: (679 commits)
  commit 7676f83aeb
  Author: James Bottomley <James.Bottomley@steeleye.com>
  Date:   Fri Apr 14 09:47:59 2006 -0500
  
      [SCSI] scsi_transport_sas: don't scan a non-existent end device
      
      Any end device that can't support any of the scanning protocols
      shouldn't be scanned, so set its id to -1 to prevent
      scsi_scan_target() being called for it.
      
      Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
  
  commit 3c0c25b97c
  Author: Moore, Eric <Eric.Moore@lsil.com>
  Date:   Thu Apr 13 16:08:17 2006 -0600
  
      [SCSI] mptfusion - fix panic in mptsas_slave_configure
      
      Driver panic when RAID logical volume was present when driver
      loaded, or when a RAID logical volume was created on the fly.
  ...
2006-04-14 17:09:08 -07:00
Linus Torvalds 11f16971ce Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/i2c-2.6: (78 commits)
  commit e97b81ddbb
  Author: Mark M. Hoffman <mhoffman@lightlink.com>
  Date:   Thu Mar 23 16:50:25 2006 +0100
  
      [PATCH] i2c-parport: Make type parameter mandatory
      
      This patch forces the user to specify what type of adapter is present when
      loading i2c-parport or i2c-parport-light.  If none is specified, the driver
      init simply fails - instead of assuming adapter type 0.
      
      This alleviates the sometimes lengthy boot time delays which can be caused
      by accidentally building one of these into a kernel along with several i2c
      slave drivers that have lengthy probe routines (e.g. hwmon drivers).
      
      Kconfig and documentation updated accordingly.
      
      Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
      Signed-off-by: Jean Delvare <khali@linux-fr.org>
      Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  
  ...
2006-04-14 17:08:41 -07:00
Linus Torvalds bcdc084257 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/pci-2.6: (169 commits)
  commit 78a596b449
  Author: Adrian Bunk <bunk@stusta.de>
  Date:   Fri Mar 31 01:38:12 2006 -0800
  
      [PATCH] remove kernel/power/pm.c:pm_unregister()
      
      Since the last user is removed in -mm, we can now remove this long deprecated
      function.
      
      Signed-off-by: Adrian Bunk <bunk@stusta.de>
      Cc: Pavel Machek <pavel@ucw.cz>
      Signed-off-by: Andrew Morton <akpm@osdl.org>
      Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  
  commit 21440d3133
  Author: David Brownell <david-b@pacbell.net>
  Date:   Sat Apr 1 10:21:52 2006 -0800
  
      [PATCH] dma doc updates
      
  ...
2006-04-14 17:08:18 -07:00
Linus Torvalds 754a264c42 Merge master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/gregkh/driver-2.6: (158 commits)
  commit 4f705ae3e9
  Author: Bjorn Helgaas <bjorn.helgaas@hp.com>
  Date:   Mon Apr 3 17:09:22 2006 -0700
  
      [PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/
      
      dmi_scan.c is arch-independent and is used by i386, x86_64, and ia64.
      Currently all three arches compile it from arch/i386, which means that ia64
      and x86_64 depend on things in arch/i386 that they wouldn't otherwise care
      about.
      
      This is simply "mv arch/i386/kernel/dmi_scan.c drivers/firmware/" (removing
      trailing whitespace) and the associated Makefile changes.  All three
      architectures already set CONFIG_DMI in their top-level Kconfig files.
      
      Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
      Cc: Andi Kleen <ak@muc.de>
      Cc: "Luck, Tony" <tony.luck@intel.com>
      Cc: Andrey Panin <pazke@orbita1.ru>
      Signed-off-by: Andrew Morton <akpm@osdl.org>
  ...
2006-04-14 17:07:57 -07:00
Linus Walleij 08d099974a [IRDA]: smsc-ircc2, smcinit support for ALi ISA bridges
From: Linus Walleij <triad@df.lth.se>

This patch enables support for ALi ISA bridges when we run the smcinit
code.  It is needed to properly configure some Toshiba laptops.

Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-14 16:03:33 -07:00
Samuel Ortiz 269690ac16 [IRDA]: irda-usb, unregister netdev when patch upload fails
In the STIR421x case, when the firmware upload fails, we need to
unregister_netdev. Otherwise we hit a BUG on free_netdev(), if sysfs
is enabled.
 
Signed-off-by: Samuel Ortiz <samuel.ortiz@nokia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-04-14 16:02:07 -07:00
James Bottomley 7676f83aeb [SCSI] scsi_transport_sas: don't scan a non-existent end device
Any end device that can't support any of the scanning protocols
shouldn't be scanned, so set its id to -1 to prevent
scsi_scan_target() being called for it.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-14 15:33:41 -05:00
Jean Delvare 2d1e1c754d [PATCH] PCI: Add PCI quirk for SMBus on the Asus A6VA notebook
The Asus A6VA notebook was reported to need a PCI quirk to unhide
the SMBus.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 12:25:26 -07:00
John Rose e6ad00576f [PATCH] PCI: rpaphp: remove init error condition
The init function for the RPA PCI Hotplug driver returns -ENODEV in the
case that no hotplug-capable slots are detected in the system.  This is
bad, since hot-capable slots can be added after boot to a purely virtual
POWER partition.  This is also bad because DLPAR I/O operations depend
on the rpaphp module.

Change the rpaphp init module to return success for the case of
partitions that own no hotplug-capable slots at boot.  Such slots can be
dynamically added after boot.

Signed-off-by: John Rose <johnrose@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 12:25:25 -07:00
John W. Linville 5da594b1c5 [PATCH] pci_ids.h: correct naming of 1022:7450 (AMD 8131 Bridge)
The naming of the constant defined for PCI ID 1022:7450 does not seem
to match the information at http://pciids.sourceforge.net/:

	http://pci-ids.ucw.cz/iii/?i=1022

There 1022:7450 is listed as "AMD-8131 PCI-X Bridge" while 1022:7451
is listed as "AMD-8131 PCI-X IOAPIC".  Yet, the current definition for
0x7450 is PCI_DEVICE_ID_AMD_8131_APIC.	It seems to me like that name
should map to 0x7451, while a name like PCI_DEVICE_ID_AMD_8131_BRIDGE
should map to 0x7450.

Signed-off-by: John W. Linville <linville@tuxdriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 12:25:25 -07:00
Shaohua Li 41017f0cac [PATCH] PCI: MSI(X) save/restore for suspend/resume
Add MSI(X) configure sapce save/restore in generic PCI helper.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 12:25:25 -07:00
Bjorn Helgaas 4f705ae3e9 [PATCH] DMI: move dmi_scan.c from arch/i386 to drivers/firmware/
dmi_scan.c is arch-independent and is used by i386, x86_64, and ia64.
Currently all three arches compile it from arch/i386, which means that ia64
and x86_64 depend on things in arch/i386 that they wouldn't otherwise care
about.

This is simply "mv arch/i386/kernel/dmi_scan.c drivers/firmware/" (removing
trailing whitespace) and the associated Makefile changes.  All three
architectures already set CONFIG_DMI in their top-level Kconfig files.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Cc: Andi Kleen <ak@muc.de>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: Andrey Panin <pazke@orbita1.ru>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:25 -07:00
Andrew Morton 0266949205 [PATCH] pm: print name of failed suspend function
Print more diagnostic info to help identify the source of power management
suspend failures.

Example:

usb_hcd_pci_suspend(): pci_set_power_state+0x0/0x1af() returns -22
pci_device_suspend(): usb_hcd_pci_suspend+0x0/0x11b() returns -22
suspend_device(): pci_device_suspend+0x0/0x34() returns -22

Work-in-progress.  It needs lots more suspend_report_result() calls sprinkled
everywhere.

Cc: Patrick Mochel <mochel@digitalimplant.org>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Nigel Cunningham <nigel@suspend2.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:25 -07:00
Ryan Wilson 372254018e [PATCH] driver core: driver_bind attribute returns incorrect value
The manual driver <-> device binding attribute in sysfs doesn't return
the correct value on failure or success of driver_probe_device.
driver_probe_device returns 1 on success (the driver accepted the
device) or 0 on probe failure (when the driver didn't accept the
device but no real error occured). However, the attribute can't just
return 0 or 1, it must return the number of bytes consumed from buf
or an error value. Returning 0 indicates to userspace that nothing
was written (even though the kernel has tried to do the bind/probe and
failed). Returning 1 indicates that only one character was accepted in
which case userspace will re-try the write with a partial string.

A more correct version of driver_bind would return count (to indicate
the entire string was consumed) when driver_probe_device returns 1
and -ENODEV when driver_probe_device returns 0. This patch makes that
change.

Signed-off-by: Ryan Wilson <hap9@epoch.ncsc.mil>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:25 -07:00
Jayachandran C a14388904c [PATCH] driver core: fix unnecessary NULL check in drivers/base/class.c
This patch tries to fix an issue in drivers/base/class.c, please
review and apply if correct.

Patch Description:
  "parent_class" is checked for NULL already, so removed the unnecessary
  check.

Signed-off-by: Jayachandran C. <c.jayachandran@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:24 -07:00
Alan Stern 0f836ca4c1 [PATCH] driver core: safely unbind drivers for devices not on a bus
This patch (as667) changes the __device_release_driver() routine to
prevent it from crashing when it runs across a device not on any bus.
This seems logical, inasmuch as the corresponding bus_add_device()
routine has an explicit check allowing it to accept such devices.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:24 -07:00
NeilBrown 4508a7a734 [PATCH] sysfs: Allow sysfs attribute files to be pollable
It works like this:
  Open the file
  Read all the contents.
  Call poll requesting POLLERR or POLLPRI (so select/exceptfds works)
  When poll returns,
     close the file and go to top of loop.
   or lseek to start of file and go back to the 'read'.

Events are signaled by an object manager calling
   sysfs_notify(kobj, dir, attr);

If the dir is non-NULL, it is used to find a subdirectory which
contains the attribute (presumably created by sysfs_create_group).

This has a cost of one int  per attribute, one wait_queuehead per kobject,
one int per open file.

The name "sysfs_notify" may be confused with the inotify
functionality.  Maybe it would be nice to support inotify for sysfs
attributes as well?

This patch also uses sysfs_notify to allow /sys/block/md*/md/sync_action
to be pollable

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:41:24 -07:00
Mark M. Hoffman e97b81ddbb [PATCH] i2c-parport: Make type parameter mandatory
This patch forces the user to specify what type of adapter is present when
loading i2c-parport or i2c-parport-light.  If none is specified, the driver
init simply fails - instead of assuming adapter type 0.

This alleviates the sometimes lengthy boot time delays which can be caused
by accidentally building one of these into a kernel along with several i2c
slave drivers that have lengthy probe routines (e.g. hwmon drivers).

Kconfig and documentation updated accordingly.

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:18:34 -07:00
Mark M. Hoffman 3cb8e1a92e [PATCH] i2c-sis96x: Remove an init-time log message
This patch removes an init-time kernel log message.
http://marc.theaimsgroup.com/?l=linux-kernel&m=114232987208628&w=3

Signed-off-by: Mark M. Hoffman <mhoffman@lightlink.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:18:34 -07:00
Jean Delvare ac987c1f65 [PATCH] w83792d: Be quiet on misdetection
Make the w83792d driver keep quiet when misdetecting a chip. This can
happen, and the user doesn't need to know.

Also renumber the messages, and add one, for consistency.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:18:33 -07:00
Mark A. Greer 8c750c0bd2 [PATCH] i2c: convert m41t00 to use a workqueue
The m41t00 i2c/rtc driver currently uses a tasklet to schedule
interrupt-level writes to the rtc.  This patch causes the driver
to use a workqueue instead.

Signed-off-by: Mark A. Greer <mgreer@mvista.com>
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:18:33 -07:00
Jean Delvare 524465df2a [PATCH] i2c: convert ds1374 to use a workqueue
A tasklet is not suitable for what the ds1374 driver does: neither sleeping
nor mutex operations are allowed in tasklets, and ds1374_set_tlet may do
both.

We can use a workqueue instead, where both sleeping and mutex operations
are allowed.

Signed-off-by: Jean Delvare <khali@linux-fr.org>
Acked-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:18:33 -07:00
Greg Kroah-Hartman f9814802df [PATCH] USB: add driver for funsoft usb serial device
Cc: David Clare <david@funsoft.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:27 -07:00
Paul Fulghum 69a4bf7c95 [PATCH] USB: remove __init from usb_console_setup
This prevents an Oops if booted with "console=ttyUSB0" but without a
USB-serial dongle, and plugged one in afterwards.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:27 -07:00
Tomasz Kazmierczak e853bf4af3 [PATCH] USB: pl2303: added support for OTi's DKU-5 clone cable
This patch adds support for a clone of Nokia DKU-5 cable made by
Ours Technology Inc for Nokia phones with PopPort (Nokia 3100 and others).
The cable uses PL2303 USB-to-serial converter from Prolific Technology Inc.

Signed-off-by: Tomasz Kazmierczak <tomek.fizyk@op.pl>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:27 -07:00
Ben Dooks 3799c40189 [PATCH] USB: S3C2410: use clk_enable() to ensure 48MHz to OHCI core
Get the "usb-bus" clock and ensure it is enabled
when the OHCI core is in use.

It seems that a few bootloaders do not enable the
UPLL at startup, which stops the OHCI core having
a 48MHz bus clock. The improvements to the clock
framework for the s3c24xx now allow the USB PLL
to be started and stopped when being used.

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:26 -07:00
Jeffrey Vandenbroucke sign bfb25849f0 [PATCH] hid-core.c: fix "input irq status -32 received" for Silvercrest USB Keyboard
When not using this patch, the kernel will continuously return "input irq
status -32 received", while making the keyboard unusable.  This can be
easely resolved using HID_QUIRK_NOGET.  Vendor-ID and Device-ID should be
applied to hid-core.c, and making an entry to make use of it.

Signed-off-by: Jeffrey Vandenbroucke <jeffrey@wirehead.be>
Cc: Alan Stern <stern@rowland.harvard.edu>
Cc: Greg KH <greg@kroah.com>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:26 -07:00
Alan Stern 8e32640672 [PATCH] USB: UHCI: don't track suspended ports
Someone recently posted a bug report where it turned out that uhci-hcd
was disagreeing with the UHCI controller over whether or not a port was
suspended: The driver thought it wasn't and the hardware thought it was.
This patch (as665) fixes the problem and simplifies the driver by
removing the internal state-tracking completely.  Now the driver just
asks the hardware whether a port is suspended.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:26 -07:00
Michael Downey 01e8950635 [PATCH] USB: keyspan-remote bugfix
Signed-off-by: Michael Downey <downey@zymeta.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:26 -07:00
David Hollis 48b1be6ac0 [PATCH] USB: Rename ax8817x_func() to asix_func() and add utility functions to reduce bloat
Now that the ASIX code is supporting more than just the AX88172 devices,
make the utility function names more generic: ax8817x_func -> asix_func.
Functions that are chip specific now indicate as such: ax88772_func.

Additionally, pull some common routines used in initialization and such
into simple functions to reduce the verbosity of certain functions such
as
the bind() routines and to make the error handling consistent across the
board.

Signed-off-by: David Hollis <dhollis@davehollis.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:25 -07:00
Pete Zaitcev 9fc4831cc3 [PATCH] USB: linux/usb/net2280.h common definitions
Move common definitions for NET2280 to <linux/usb/net2280.h>, so that I can
use them in prism54usb (it is not merged yet, but I plan to do it soon).

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:25 -07:00
David Brownell e1394b49ee [PATCH] USB: g_ether, highspeed conformance fix
Be sure to record the peripheral's ep0 maxpacket size BEFORE using
that to initialize the (high speed) device qualifier; that helps a
lot with USBCV testing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:25 -07:00
David Brownell 8b52490193 [PATCH] USB: usbtest: scatterlist OUT data pattern testing
Previously, scatterlist tests didn't write patterned data.  Given how many
corner cases are addresed by them, this was a significant gap in Linux-USB
test coverage.  Moreover, when peripherals checked for correct data patterns,
false error reports would drown out the true ones.

This adds the pattern on the way OUT from the host, so scatterlist tests can
now be used to uncover bugs like host TX or peripheral RX paths failing for
back-to-back short packets.  It's easy enough to get an error there with at
least one of the {DMA,PIO}{RX,TX} code paths, or run into hardware races
that need to be defended against.

Note this patch doesn't add checking for correct data patterns on the way
IN from peripherals, just a FIXME for later.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:25 -07:00
David Brownell 68ba61b89c [PATCH] USB: at91 usb driver supend/resume fixes
AT91: the two USB drivers (OHCI, UDC) got out of sync with various
usbcore and driver model PM updates; fix.

Also minor fixes to ohci:  whitespace/style, MODULE_ALIAS so coldplug works
using /sys/.../modalias, and turn off _both_ clocks during suspend.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:25 -07:00
David Brownell 35fcca442a [PATCH] USB: gadget zero poisons OUT buffers
Fill OUT buffers with 0x55 before RX, so that controller driver
bugs that mangle data can be more readily detected during testing.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:24 -07:00
David Brownell 984163338a [PATCH] USB: gadgetfs highspeed bugfix
This catches up to a change in the Kconfig support for highspeed modes;
the change predated 2.6.10, and anyone using gadgetfs on a highspeed
device would see the kernel wrongly reject the alternate descriptors.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:24 -07:00
David Brownell 51400f1d6e [PATCH] USB: rndis_host whitespace/comment updates
This adds a "avoid proprietary protocols" warnoff, identifying several
of the known deficiencies in Microsoft's excuse-for-specification, and
fixes some whitespace bugs.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:24 -07:00
David Brownell 68dcc688d1 [PATCH] USB: net2280 short rx status fix
Some patch broke short-OUT packet handling for net2280, making it report
illegal status values.  This updates the status code so it's correct.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:24 -07:00
David Brownell 42795410c3 [PATCH] USB: fix gadget_is_musbhdrc()
I submitted the wrong version of the patch teaching about the driver
for Mentor's Highspeed Dual Role Controller (HDRC), whoops!  This
uses the right name for that driver.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:24 -07:00
David Brownell 89ccbdc91b [PATCH] USB: otg hub support is optional
USB OTG devices are not required to support external hubs.  This adds a
configuration option to disable that support.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:23 -07:00
matthieu castet 4d45e21867 [PATCH] USB: UEAGLE : memory leack fix
this patch fix leak of memory allocated to intr if allocation of
sc->urb_int fails.
Found by the Coverity checker.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:23 -07:00
matthieu castet 584958c3d2 [PATCH] USB: UEAGLE : null pointer dereference fix
this patch fix potential null pointer dereference.  Found by the
Coverity checker.

Signed-off-by: Duncan Sands <baldrick@free.fr>
Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:23 -07:00
matthieu castet 22fcceb546 [PATCH] USB: UEAGLE : support geode
- increase ack timeout for slow system (geode 233MHz where HZ=100)
- reset the cmv ack flag when rebooting

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:23 -07:00
matthieu castet 2a99b50719 [PATCH] USB: UEAGLE : cosmetic
- improve debug trace in order to make easy to solve user problems.
- indent some code
- increase version number

Signed-off-by: Matthieu CASTET <castet.matthieu@free.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:23 -07:00
Adrian Bunk 87ed0aeba8 [PATCH] USB: drivers/usb/core/: remove unused exports
This patch removes the following unused EXPORT_SYMBOL's:
- hub.c: usb_set_device_state
- usb.c: usb_alloc_dev
- usb.c: usb_disconnect

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:22 -07:00
Petko Manolov 016534cffc [PATCH] USB: pegasus driver bugfix
Attached is a patch that fixes nasty bug, which i am afraid was there
for a long time.  It was spotted by Andre Draszik <kernel@andred.net>.

From: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:22 -07:00
Ping Cheng 999a6a6a2a [PATCH] USB: add new wacom devices to usb hid-core list
This patch adds support for DTF 521, Intuos3 12x12 and 12x19

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:22 -07:00
Ping Cheng 7d3fe085f9 [PATCH] USB: wacom tablet driver update
This patch adds support for DTF 521, Intuos3 12x12, and 12x19;
           fixes minor data report bugs.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Vojtech Pavlik <vojtech@suse.cz>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:22 -07:00
Alan Stern aafe5bd6ec [PATCH] USB: g_file_storage: use module_param_array_named macro
Randy Dunlap pointed out that there now is a module_param_array_named
macro available.  This patch (as666) updates g_file_storage to make use of
it.  It also adds a comment listing the specifications documents used in
the design of the driver's SCSI operation (at Pat LaVarre's request).

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:21 -07:00
Daniel Ritz 5e32b5767f [PATCH] usb/input: remove Kconfig entries of old touchscreen drivers in favour of usbtouchscreen
Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:21 -07:00
Daniel Ritz 1d3e20236d [PATCH] USB: usbtouchscreen: unified USB touchscreen driver
A new single driver for various USB touchscreen devices. It currently
supports:
- eGalax TouchKit
- PanJit TouchSet
- 3M/Microtouch
- ITM Touchscreens

Support for the diffent devices can be enabled/disable when CONFIG_EMBEDDED
is set.

Sizes for comparision:
   text    data     bss     dec     hex filename
   2942     724       4    3670     e56 touchkitusb.ko
   2647     660       0    3307     ceb mtouchusb.ko
   2448     628       0    3076     c04 itmtouch.ko
   4145    1012      12    5169    1431 usbtouchscreen.ko

Signed-off-by: Daniel Ritz <daniel.ritz@gmx.ch>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:21 -07:00
Folkert van Heusden 62a13db346 [PATCH] USB: add support for Papouch TMU (USB thermometer)
This patch adds support for new vendor (papouch) and one of their
devices - TMU (a USB thermometer).

More information:
vendor homepage:
	http://www.papouch.com/en/
product homepage (Polish):
	http://www.papouch.com/shop/scripts/_detail.asp?katcislo=0188

This patch is based on the submission from Folkert van Heusden [1].
Then reviseted by Kalin KOZHUHAROV [2] and retested by Folkert.

[1]	http://article.gmane.org/gmane.linux.kernel/392970
[2]	http://article.gmane.org/gmane.linux.kernel/393386

Signed-off-by: Folkert van Heusden <folkert@vanheusden.com>
Signed-off-by: Kalin KOZHUHAROV <kalin@thinrope.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:21 -07:00
Adrian Bunk fb9ac9bda9 [PATCH] USB: input/: proper prototypes
This patch adds proper prototypes in a header file for some global
functions.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:20 -07:00
Adrian Bunk 75e2df603d [PATCH] USB: pci-quirks.c: proper prototypes
This patch adds a header file with proper prototypes for two functions
in drivers/usb/host/pci-quirks.c.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:20 -07:00
Luiz Fernando Capitulino 1ce7dd26e0 [PATCH] USB serial: Converts port semaphore to mutexes.
The usbserial's port semaphore used to synchronize serial_open()
and serial_close() are strict mutexes, convert them to the mutex
implementation.

Signed-off-by: Luiz Capitulino <lcapitulino@mandriva.com.br>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:20 -07:00
Alan Stern 14cd5f8e85 [PATCH] USB: g_file_storage: add comment about buffer allocation
This patch (as664) adds a comment to file_storage.c, noting that the
driver is slightly non-portable because it assumes that a buffer
allocated for a bulk-in endpoint will also be useable for a bulk-out
endpoint.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:20 -07:00
Alan Stern 70ffe6e14d [PATCH] USB: g_file_storage: Set short_not_ok for bulk-out transfers
I'm told that some UDC hardware may work better if it knows that
receiving a short packet should always cause an error.  Accordingly,
this patch (as663) sets the short_not_ok flag for bulk-out transfers in
g_file_storage.  Oddly enough, there are no circumstances where that
driver can legally receive a shorter-than-expected bulk-out packet.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:20 -07:00
Ian Abbott 7e1c0b86ac [PATCH] USB: ftdi_sio: add support for Eclo COM to 1-Wire USB adapter
This patch adds support for the Eclo COM to 1-Wire USB adapter
<http://www.eclo.pt/products_ibutton_adapters_usb01_en.asp> to the
ftdi_sio driver's device ID table.  Details were provided by Martin
Grill on the ftdi-sio-usb-devel mailing list and I (Ian Abbott)
confirmed it matched the INF file in the Eclo's Windows driver package.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:19 -07:00
Ben Dooks f096e0434c [PATCH] USB: cleanups for ohci-s3c2410.c
Fix compile errors due to functions not being
defined static

Signed-off-by: Ben Dooks <ben-linux@fluff.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-04-14 11:12:19 -07:00
Guennadi Liakhovetski 950ee4c8f0 [PATCH] USB: net2282 and net2280 software compatibility
Below is a patch to gadgets/net2280.[ch] which adds support for the
net2282 controller. The original code was kindly provided by PLX
Technology, I just merged it with the current net2280 driver in the
kernel. Tested on 2.6.15.6, but only with 2282. I did the merge, so
that the behaviour for the 2280 is unaffected (except for short delays
for extra checks).

Signed-off-by: G. Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

Support for net2282 in net2280 driver.
2006-04-14 11:12:19 -07:00
Moore, Eric 3c0c25b97c [SCSI] mptfusion - fix panic in mptsas_slave_configure
Driver panic when RAID logical volume was present when driver
loaded, or when a RAID logical volume was created on the fly.

This issue was created in due to recent scsi_transport_sas change,
when sas_read_port_mode_page was added into the mptsas drivers
slave_config entry point.

This new API expects that all sdev's to be assocated to an rphy, however
that is not the case for logical volumes, as they are created using
scsi_add_device, instead of sas_rphy_add().

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-14 09:35:12 -05:00
Eric W. Biederman 20ac94378d [PATCH] do_SAK: Don't recursively take the tasklist_lock
By calling send_sig do_SAK is recursively taking the
tasklist_lock, which is silly.

In addition I just audited the kernel and this was the only
place where tasklist_lock is taken inside of task_lock.

So this one line change is a general worthwhile cleanup and
it increases our options on how to fix the ptrace_attach races.

Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-04-13 11:59:12 -07:00
adam radford 1e08dcb39c [SCSI] 3ware 9000 disable local irqs during kmap_atomic
Equivalent of the same patch for the 3w-xxxx driver.

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 13:27:38 -05:00
Tejun Heo e36e0c8013 [SCSI] SCSI: fix scsi_kill_request() busy count handling
scsi_kill_request() completes requests via normal SCSI completion path
which decrements busy counts; however, requests which get passed to
scsi_kill_request() aren't holding busy counts and scsi_kill_request()
don't increment them before invoking completion path resulting in
incorrect busy counts.  Bump up busy counts before invoking completion
path.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 13:25:49 -05:00
James Smart aedf349773 [SCSI] FC transport: fixes for workq deadlocks
As previously reported via Michael Reed, the FC transport took a hit
in 2.6.15 (perhaps a little earlier) when we solved a recursion error.
There are 2 deadlocks occurring:
- With scan and the delete items sharing the same workq, flushing the
  workq for the delete code was getting it stalled behind a very long
  running scan code path.
- There's a deadlock where scsi_remove_target() has to sit behind
  scsi_scan_target() due to contention over the scan_lock().

This patch resolves the 1st deadlock and significantly reduces the
odds of the second. So far, we have only replicated the 2nd deadlock
on a highly-parallel SMP system. More on the 2nd deadlock in a following
email.

This patch reworks the transport to:
- Only use the scsi host workq for scanning
- Use 2 other workq's internally. One for deletions, the other for
  scheduled deletions. Originally, we tried this with a single workq,
  but the occassional flushes of the scheduled queues was hitting the
  second deadlock with a slightly higher frequency. In the future, we'll
  look at the LLDD's and the transport to see if we can get rid of this
  extra overhead.
- When moving to the other workq's we tightened up some object states
  and some lock handling.
- Properly syncs adds/deletes
- minor code cleanups
  - directly reference fc_host_attrs, rather than through attribute
    macros
  - flush the right workq on delayed work cancel failures.

Large kudos to Michael Reed who has been working this issue for the last
month.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 13:25:16 -05:00
Hannes Reinecke b0d2364887 [SCSI] aic79xx: target hotplug fixes
When a target is added aic79xx tries to be overly clever: it changes
the command on the fly to TEST UNIT READY and tries to requeue the
original command. Sadly this breaks SCSI compability and of course
the midlayer is getting a bit confused by it.

So we're just removing that bit of code and let the midlayer deal with
it. It's clever enough by now. And the driver code is getting simpler.

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 13:23:11 -05:00
FUJITA Tomonori 441f987ca4 [SCSI] ibmvscsi: remove drivers/scsi/ibmvscsi/srp.h
It's no longer needed after the convrsion to use the linux srp.h file.

Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 13:21:51 -05:00
Hannes Reinecke f41b5cec9b [SCSI] aic79xx bus reset update
As James B. correctly noted, ahd_reset_channel() in
ahd_linux_bus_reset() should be protected by ahd_lock().  However, the
main reason for not doing so was a deadlock with the interesting
polling mechanism to detect the end a bus reset.

This patch replaces the polling mechanism with a saner signalling via
flags; it also gives us the benefit of detecting any multiple calls to
ahd_reset_channel().

Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 12:56:15 -05:00
James Bottomley 4d7db04a7a [SCSI] add SCSI_UNKNOWN and LUN transfer limit restrictions
Original From: Ingo Flaschberger <if@xip.at>

To support the RA4100 array from Compaq.

This patch now correctly handles SCSI_UNKNOWN types with regard to
BLIST_REPORTLUNS2 (allow it) and cdb[1] LUN inclusion (don't).

It also allows a BLIST_MAX_512 flag to restrict the maximum transfer
length to 512 blocks (apparently this is an RA4100 problem).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:31 -05:00
Matthew Wilcox d637c4543f [SCSI] sym2: Fix build when spinlock debugging is enabled
When spinlock debugging is turned on, a struct completion grows beyond the
size allowed for the scsi_pointer.  So move the struct completion back onto
the stack.  The additional memory barriers are to keep us from completing
a random piece of kernel stack if the command happens to complete after
the error handling has finished.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:30 -05:00
Brian King 80286d478c [SCSI] ipr: Bump version
Bump ipr driver version to 2.1.3

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:30 -05:00
Brian King c651309671 [SCSI] ipr: Reset device cleanup
Encapsulate some more of the device reset processing in
preparation for SATA support.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:29 -05:00
Brian King fb3ed3cb4b [SCSI] ipr: printk macro cleanup/removal
Remove some unused printk macros, make some more robust, and
convert some to use standard printk macros when possible.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:29 -05:00
Brian King fe964d0a4b [SCSI] ipr: Simplify status area dumping
Simplify the dumping of the command status area by
removing some device specific information that has proven
to not be worthwhile.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:28 -05:00
Brian King e4fbf44ed0 [SCSI] ipr: Fixup device type check
Fixup a check used by the ipr driver to determine if a given
device is a SCSI disk. Due to the addition of support for
attaching SATA devices, this check needs to be more robust.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:28 -05:00
Brian King 1121b794a3 [SCSI] ipr: Disk remove path cleanup
Instead of NULLing the resource entry pointer when a disk
goes away to prevent any new commands being sent to it,
set the adapter resource handle to an invalid value so
new ops getting sent to it will fail with a selection timeout
response. This patch is needed for future SATA patches.

Signed-off-by: Brian King <brking@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:28 -05:00
Douglas Gilbert c06bb7f514 [SCSI] sg: fix leak when dio setup fails
when the sg driver is unable to setup direct IO, free that scatter
gather list prior to falling back to indirect IO

Further to this thread started by Bryan Holty:
http://marc.theaimsgroup.com/?l=linux-scsi&m=114306885116728&w=2

Here is the reworked patch again. This time it has been
tested with a program provided by Bryan.

Signed-off-by: Douglas Gilbert <dougg@torque.net>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:27 -05:00
James Bottomley d6159c17c2 [SCSI] expose sas internal class for the domain transport
necessary to make the domain class use the internal structures

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:27 -05:00
KAMEZAWA Hiroyuki 530bba6fa8 [SCSI] for_each_possible_cpu: scsi
for_each_cpu() actually iterates across all possible CPUs.  We've had mistakes
in the past where people were using for_each_cpu() where they should have been
iterating across only online or present CPUs.  This is inefficient and
possibly buggy.

We're renaming for_each_cpu() to for_each_possible_cpu() to avoid this in the
future.

This patch replaces for_each_cpu with for_each_possible_cpu.

Signed-off-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:26 -05:00
Matthew Wilcox ac05165179 [SCSI] Version 2.2.3
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:26 -05:00
Matthew Wilcox 14ac8bf58d [SCSI] Enable clustering and large transfers
This patch enables clustering and sets max_sectors to 0xffff to enable
reading and writing of large blocks with tapes (and large transfers with
sg). This change is needed after the sg and st drivers started using
chained bios through scsi_request_async() in 2.6.16.

Signed-off-by: Kai Makisara <kai.makisara@kolumbus.fi>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:26 -05:00
Matthew Wilcox b4e93a739e [SCSI] Simplify error handling
Use wait_for_completion_timeout() instead of using a timer (as
Christoph Hellwig did for aic7xxx).

That lets me eliminate the sym_eh_wait structure; the struct completion,
the old_done pointer and the to_do flag can be folded into the sym_ucmd
(which overrides the scsi_pointer in scsi_cmnd).

The sym_eh_done() function becomes much simpler as the timeout handling
is done in sym_eh_handler() directly.

The host_lock can be unlocked earlier, and I cache the host in
a local variable to make accesses to it quicker.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:25 -05:00
Matthew Wilcox c2349df918 [SCSI] Allow nvram settings to determine bus mode
The PDC code can set the bus mode, but we were ignoring that setting.
Also move the code that determines bus mode into its own function.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:25 -05:00
Matthew Wilcox 92d578b94c [SCSI] Use SPI messages where possible
Now sym2 is using spi_print_msg, we don't need to have our own messages
for IGNORE WIDE RESIDUE and MODIFY DATA POINTER, so provide the option
of passing NULL for the label.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:24 -05:00
Matthew Wilcox 3bea15a76e [SCSI] Disable sym2 driver queueing
Undef SYM_OPT_HANDLE_DEVICE_QUEUEING.
Call sym_put_start_queue instead of sym_start_next_ccbs.
Turn asserts into checks that we can send the command to the adapter,
and return busy from queuecommand if we can't.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:24 -05:00
Matthew Wilcox 76789f0176 [SCSI] Mark div_10M array const
Patch below is one out of a large series to mark kernel data const when
possible, goal is to use .rodata and avoid false sharing

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:23 -05:00
Matthew Wilcox ab19d52bec [SCSI] Simplify error handling a bit
- to_do was never set to SYM_EH_DO_COMPLETE, so remove that code
 - move the spinlocks inside the common error handler code path

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:23 -05:00
Matthew Wilcox b6d105d7ee [SCSI] Use pcibios_resource_to_bus()
We had our own code (pci_get_base_address()) to get the bus address of
a BAR.  We can get this using pcibios_resource_to_bus() instead.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:23 -05:00
Matthew Wilcox 1f61d82490 [SCSI] Change Kconfig option from IOMAPPED to MMIO
Most of the Kconfig options for switching between IO Port and MMIO
operations use the opposite sense from sym2.  Really, this option
should be set at a chipset level rather than per-driver.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:22 -05:00
Mike Anderson 92aab6464b [SCSI] sas transport: ref count update
Fix puts so that release functions will be called.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:22 -05:00
Mark Haverkamp 9a72f976d2 [SCSI] aacraid: Driver version update
Received from Mark Salyzyn

Fix module param
Update driver version.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:21 -05:00
Mark Haverkamp 3d2f98a665 [SCSI] aacraid: Fix parenthesis placement error
Received from Mark Salyzyn

On 64 bit machines, when a 32 bit application tries to acquire the AIF,
they will always get and EFAULT error response from the driver.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:21 -05:00
Mark Haverkamp d1ad94ad77 [SCSI] aacraid: Show max channel and max id is sysfs
Received from Mark Salyzyn

Add max_channel and max_id sysfs parameters.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:21 -05:00
Mark Haverkamp dc4adbf413 [SCSI] aacraid: Re-start helper thread if it dies
Received from Mark Salyzyn

Since the helper thread for the driver can be killed unceremoniously by
an application, we detect the loss of the helper and restart it.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:20 -05:00
Mark Haverkamp 1241f3593a [SCSI] aacraid: General driver cleanup
Received from Mark Salyzyn

Remove superfluous code, optimize code, harden code, cast code, correct
some text, use msleep instead of schedule_timeout_interruptible. No
bugs.

Signed-off-by: Mark Haverkamp <markh@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-04-13 10:13:19 -05:00