Commit Graph

9955 Commits (d2c5d4fc07a41a6048b01d3b2930aeff1235fda5)

Author SHA1 Message Date
Michael Chan d4d2c558fd [TG3]: Add support for 5714S and 5715S
Add support for 5714S and 5715S.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 17:47:20 -08:00
Jeff Garzik cd85f6e2f5 [libata] sata_mv: fix irq port status usage
Interrupt handler did not properly initialize a variable on a per-port
basis, leading to incorrect behavior on ports other than port 0.

Bug caught and fixed by Mark Lord.

Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-20 19:49:54 -05:00
Greg Kroah-Hartman 71a8924bee [PATCH] USB: omninet: fix up debugging comments
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:03 -08:00
Greg Kroah-Hartman e9a66c64bb [PATCH] USB serial: add navman driver
Thanks to Warren Lewis <wlewis@scn.org> for the information needed to
write the driver and for testing it out.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:03 -08:00
Eugene Teo da81817fbd [PATCH] USB: Fix irda-usb use after use
Don't read from free'd memory after calling netif_rx().  docopy is used as
a boolean (0 and 1) so unsigned int is sufficient.

Coverity bug #928

Signed-off-by: Eugene Teo <eugene.teo@eugeneteo.net>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:03 -08:00
Petko Manolov 09abfa8048 [PATCH] USB: rtl8150 small fix
This one is about announcing the device registration after the last check
has been made.

From: Petko Manolov <petkan@nucleusys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
A. Maitland Bottoms bf58fbd5e8 [PATCH] USB: ftdi_sio: add Icom ID1 USB product and vendor ids
The Icom ID-1 1.2 GHz band digital transceiver is a new radio
that has a USB interface. With this patch, the ftdi_sio driver
will report "Detected FT8U232AM" and provide a serial device
interface.

Signed-off-by: "A. Maitland Bottoms" <bottoms@debian.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Craig Shelley 59224f5352 [PATCH] USB: cp2101: add new device IDs
This patch adds a new device ID to the cp2101 driver

Signed-off-by: Craig Shelley <craig@microtron.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Horst Schirmeier 24f8b116c4 [PATCH] USB: fix check_ctrlrecip to allow control transfers in state ADDRESS
check_ctrlrecip() disallows any control transfers if the device is
deconfigured (in configuration 0, ie.  state ADDRESS).  This for example
makes it impossible to read the device descriptors without configuring the
device, although most standard device requests are allowed in this state by
the spec.  This patch allows control transfers for the ADDRESS state, too.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Cc: Alan Stern <stern@rowland.harvard.edu>
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-03-20 14:50:02 -08:00
Adrian Bunk f88f8295d8 [PATCH] USB: vicam.c: fix a NULL pointer dereference
This patch fixes a NULL pointer dereference spotted by the Coverity
checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:02 -08:00
Luca Risolia 6e0755a4b2 [PATCH] USB: ZC0301 driver bugfix
ZC0301 driver bugfix.

Use correct PID/VID USB entries.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Wolfgang Rohdewald 2e56222ed5 [PATCH] USB: add support for Creativelabs Silvercrest USB keyboard
Signed-off-by: Wolfgang Rohdewald <wolfgang@rohdewald.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Rodolfo Quesada 9d5847bc1a [PATCH] USB: storage: new unusual_devs.h entry: Mitsumi 7in1 Card Reader
This patch (as661) adds an unusual_devs entry for the Mitsumi 7in1 Card
Reader.

From: Rodolfo Quesada <rquesada@roqz.net>
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Pete Zaitcev 23b7885d50 [PATCH] USB: storage: unusual_devs.h entry 0420:0001
Ref
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=176584

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Pete Zaitcev c713c973fb [PATCH] USB: storage: another unusual_devs.h entry
Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Phil Dibowitz 1e7a5a84e4 [PATCH] USB: storage: sandisk unusual_devices entry
The following adds an unusual_devs entry for the SanDisk ImageMate CompactFlash
USB drive, for the US_FL_FIX_CAPACITY flag. Additionally, it removes trailing
whitespace from the previous entry. It's based on the patch sent by Roman Hodek
<roman@hodek.net>.

Signed-off-by: Phil Dibowitz <phil@ipom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Greg Kroah-Hartman b712548c5d [PATCH] USB: fix initdata issue in isp116x-hcd
As found by Sam's scripts.

Cc: Sam Ravnborg <sam@ravnborg.org>
Cc: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Horst Schirmeier f48219db93 [PATCH] USB: usbcore: usb_set_configuration oops (NULL ptr dereference)
When trying to deconfigure a device via usb_set_configuration(dev, 0),
2.6.16-rc kernels after 55c527187c oops
with "Unable to handle NULL pointer dereference at...". This is due to
an unchecked dereference of cp in the power budget part.

Signed-off-by: Horst Schirmeier <horst@schirmeier.com>
Acked-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Alan Stern 6aa35675bb [PATCH] USB: usbcore: Don't assume a USB configuration includes any interfaces
In a couple of places, usbcore assumes that a USB device configuration
will have a nonzero number of interfaces.  Having no interfaces may or
may not be allowed by the USB spec; in any event we shouldn't die if we
encounter such a thing.  This patch (as662) removes the assumptions.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:01 -08:00
Pete Zaitcev 11a223ae3b [PATCH] USB: ub 03 drop stall clearing
Matt mentioned that a very old ZIP-100 actually does need this, but I am
yet to see anyone who actually has one still working and uses ub with it.
He/she must be a retrocomputing geek, who can easily bias it to usb-storage
with libusual, if needed. Meanwhile, common folks have trouble with poorly
designed USB keys and some el-cheapo European music players. I think we
better drop this for now.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Pete Zaitcev 952ba22296 [PATCH] USB: ub 02 remove diag
Remove the "diag" file from the sysfs. The usbmon is good enough these days
so I do not need this feature anymore. Also, sysfs is a pain. Al Viro caught
a race in this, which I thought too bothersome to fix.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Pete Zaitcev 4d69581929 [PATCH] USB: ub 01 remove first_open
The first_open was long overdue for removal, but I wanted to keep this
separate for other changes in case of regressions.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Alan Stern ae55717584 [PATCH] USB: UHCI: Increase port-reset completion delay for HP controllers
This patch (as657) increases the port-reset completion delay in uhci-hcd
for HP's embedded controllers.  Unlike other UHCI controllers, the HP
chips can take as long as 250 us to carry out the processing associated
with finishing a port reset.

This fixes Novell bug #148761.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Dick Streefland 491b04ce1c [PATCH] USB: support for USB-to-serial cable from Speed Dragon Multimedia
The USB data cable for my Samsung GSM phone contains the USB-to-serial
converter chip MS3303H from Speed Dragon Multimedia, Inc.  that appears to
be compatible with the PL2303 chip.  The following patch adds support for
this chip to the pl2303 driver.

Signed-off-by: Dick Streefland <dick@streefland.net>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Julian Bradfield 96050b11f6 [PATCH] USB: PL2303 and TIOCMIWAIT
A while ago, I posted about TIOCMIWAIT not working with the PL2303
USB-serial adapter.

After a brief exchange with Greg, I tracked this to a missing wake-up
in the USB interrupt procedures. I got our systems staff to install
the enclosed very simple patch to our 2.6.12 kernels, and it all works
fine as expected. I guess this should also apply to the latest version
and go into the mainstream.

Apologies for the long delay in posting the result.

The routine being patched is pl2303_update_line_status

Signed-off-by: Julian Bradfield <jcb+luu@inf.ed.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Lonnie Mendez a5c44e29e5 [PATCH] USB: cypress_m8: add support for the Nokia ca42-version 2 cable
This patch adds support for the Nokia ca42 version 2 cable to the
cypress_m8 driver.  The device was tested by others with this patch and
found to be compatible with the cypress_m8 driver.  A special note
should be taken that this cable seems to vary in the type of chipset
used.  This patch supports the cable with product id 0x4101.

Signed-off-by: Lonnie Mendez <lmendez19@austin.rr.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Luca Risolia a847423905 [PATCH] USB: ZC0301 driver updates
ZC0301 driver updates.

Changes: + new, - removed, * cleanup, @ bugfix

@ Need usb_get|put_dev() when disconnecting, if the device is open
* Cleanups and updates in the documentation
+ Use per-device sensor structures
+ Add frame_timeout module parameter

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:50:00 -08:00
Luca Risolia ccad7789d5 [PATCH] USB: ET61X[12]51 driver updates
USB: ET61X[12]51 driver updates

Changes: + new, - removed, * cleanup, @ bugfix

@ Fix stream_interrupt()
@ Fix vidioc_enum_input() and split vidioc_gs_input()
@ Need usb_get|put_dev() when disconnecting, if the device is open
* Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
  when waiting for video frames
* replace wake_up_interruptible(&wait_stream) with wake_up(&wait_stream)
* Cleanups and updates in the documentation
* Use mutexes instead of semaphores
+ Use per-device sensor structures
+ Add support for PAS202BCA image sensors
+ Add frame_timeout module parameter

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Luca Risolia 2ffab02fea [PATCH] USB: SN9C10x driver updates
SN9C10x driver updates.

Changes: + new, - removed, * cleanup, @ bugfix

@ Fix stream_interrupt()
@ Fix vidioc_enum_input() and split vidioc_gs_input()
@ Need usb_get|put_dev() when disconnecting, if the device is open
* Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
  when waiting for video frames
* replace wake_up_interruptible(&wait_stream) with wake_up(&wait_stream)
* Cleanups and updates in the documentation
+ Use per-device sensor structures
+ Add support for PAS202BCA image sensors
+ Add frame_timeout module parameter

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Eric Sesterhenn 7039f4224d [PATCH] USB: kzalloc() conversion in drivers/usb/gadget
this patch converts drivers/usb to kzalloc usage.
Compile tested with allyes config.

I think there was a bug in drivers/usb/gadget/inode.c because
it used sizeof(*data) for the kmalloc() and sizeof(data) for
the memset(), since sizeof(data) just returns the size for a pointer.

Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Eric Sesterhenn 80b6ca4832 [PATCH] USB: kzalloc() conversion for rest of drivers/usb
Signed-off-by: Eric Sesterhenn <snakebyte@gmx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Luca Risolia 9e47a52bf3 [PATCH] USB: ZC0301 driver updates
"Cosmetic" driver updates for the ZC0301 driver:

- Fix stream_interrupt() (and work around a possible kernel bug);

- Fix vidioc_enum_input() and split vidioc_gs_input() in two parts;
- Use wait_event_interruptible_timeout() instead of wait_event_interruptible()
  when waiting for video frames;
- replace erroneous wake_up_interruptible(&wait_stream) with
  wake_up(&wait_stream);
- Cosmetic cleanups in the documentation.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:59 -08:00
Matthew Martin addf36fec0 [PATCH] USB: Fix warning in drivers/usb/media/ov511.c
Gcc 4.0.2 had the warning:

drivers/usb/media/ov511.c: In function 'show_exposure':
drivers/usb/media/ov511.c:5642: warning: 'exp' may be used uninitialized
in this function

Here is the patch to fix that warning.

Signed-off-by: Matthew Martin <lihnucks@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Aras Vaichas 1afc64a3d6 [PATCH] USB: ethernet gadget driver section fixups
This patch allows you to set the iSerialNumber field in the
usb_device_descriptor structure for your USB ethernet gadget.

It also changes the parameters shown through sysfs so they're
no longer declared as __initdata, preventing potential oopses.

That's most useful for the Ethernet addresses, which may in
some cases be random "locally administered" addresses.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
David Brownell 329af28b14 [PATCH] USB: gadget driver section fixups
This adds __init section annotations to gadget driver bind() routines to
remove calls from .text into .init sections (for endpoint autoconfig).
Likewise it adds __exit section annotations to their unbind() routines.

The specification of the gadget driver register/unregister functions is
updated to explicitly allow use of those sections.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern 43c5d5aaaf [PATCH] usbcore: fix compile error with CONFIG_USB_SUSPEND=n
This patch (as647) fixes a small error introduced by a recent change to
the USB core suspend/resume code.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern 6a8e87b23f [PATCH] USB core and HCDs: don't put_device while atomic
This patch (as640) removes several put_device and the corresponding
get_device calls from the USB core and HCDs.  Some of the puts were done
in atomic contexts, and none of them are needed since the core now
guarantees that every endpoint will be disabled and every URB completed
before a USB device is released.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Acked-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern 1393adb2eb [PATCH] uhci-hcd: fix mistaken usage of list_prepare_entry
A recent update to the uhci-hcd driver invoked the list_prepare_entry
macro incorrectly.  This patch (as646) corrects it.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:58 -08:00
Alan Stern dbf4fcad62 [PATCH] UHCI: Don't log short transfers
Even when the URB_SHORT_NOT_OK flag is set, a short transfer shouldn't
generate a debugging log message.  Especially not one with the confusing
claim that the transfer "failed with status 0".  This patch (as627)
fixes that behavior in uhci-hcd.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern 8d402e1ae0 [PATCH] UHCI: improve debugging code
This patch (as626) makes some improvements to the debugging code in
uhci-hcd.  The main change is that now the code won't get compiled if
CONFIG_USB_DEBUG isn't set.  But there are other changes too, like
adding a missing .owner field and printing a debugging dump if the
controller dies.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern 0ed8fee1c1 [PATCH] UHCI: remove main list of URBs
As part of reorienting uhci-hcd away from URBs and toward endpoint
queues, this patch (as625) eliminates the driver's main list of URBs.
The list wsa used mainly in checking for URB completions; now the driver
goes through the list of active endpoints and checks the members of the
queues.

As a side effect, I had to remove the code that looks for FSBR timeouts.
For now, FSBR will remain on so long as any URBs on a full-speed control
or bulk queue request it, even if the queue isn't advancing.  A later
patch can add more intelligent handling.  This isn't a huge drawback;
it's pretty rare for an URB to get stuck for more than a fraction of a
second.  (And it will help the people trying to use those insane HP USB
devices.)

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern af0bb5998a [PATCH] UHCI: use dummy TDs
This patch (as624) fixes a hardware race in uhci-hcd by adding a dummy
TD to the end of each endpoint's queue.  Without the dummy the host
controller will effectively turn off the queue when it reaches the end,
which happens asynchronously.  This leads to a potential problem when
new transfer descriptors are added to the end of the queue; they may
never get used.

With a dummy TD present the controller never turns off the queue;
instead it just stops at the dummy and leaves the queue on but inactive.
When new TDs are added to the end of the queue, the first new one gets
written over the dummy.  Thus there's never any question about whether
the queue is running or needs to be restarted.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Alan Stern dccf4a48d4 [PATCH] UHCI: use one QH per endpoint, not per URB
This patch (as623) changes the uhci-hcd driver to make it use one QH per
device endpoint, instead of a QH per URB as it does now.  Numerous areas
of the code are affected by this.  For example, the distinction between
"queued" URBs and non-"queued" URBs no longer exists; all URBs belong to
a queue and some just happen to be at the queue's head.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Kumar Gala 499003e815 [PATCH] USB: Fix masking bug initialization of Freescale EHCI controller
In setting up the of PHY we masked off too many bits, instead just
initialize PORTSC for the type of PHY we are using.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Franck Bui-Huu 0eb8c7cafe [PATCH] USB: Zero driver: Removed duplicated code
Signed-off-by: Franck Bui-Huu <vagabon.xyz@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:57 -08:00
Malte Doersam efafe6fb72 [PATCH] USB: Pegasus: Linksys USBVPN1 support + cleanup
This patch adds a second linksys vendor-id (077b) and the product id of the
pegasus based adapter USBVPN1

http://www1.linksys.com/Products/product.asp?prid=3D543&scid=3D30

Furthermore it replaces all LINKSYS_GPIO_RESET with DEFAULT_GPIO_RESET as both
are declared like this:
#define        DEFAULT_GPIO_RESET      0x24
#define        LINKSYS_GPIO_RESET      0x24

This is misleading and confusing.
The check is now done via the VENDOR_ID in pegasus.c:
if (usb_dev_id[pegasus->dev_index].vendor == VENDOR_LINKSYS

Signed-off-by: Malte Doersam <mdoersam@arcor.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
Alan Stern aef4e26696 [PATCH] usbhid: add error handling
This patch (as628c) adds error handling to the USB HID core.  When an
error is reported for an interrupt URB, the driver will do delayed
retries, at increasing intervals, for up to one second.  If that doesn't
work, it will try to reset the device.  Testing by users has shown that
both the retries and the resets end up getting used.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell fb669cc01e [PATCH] USB: remove usbcore-specific wakeup flags
This makes usbcore use the driver model wakeup flags for host controllers
and for their root hubs.  Since previous patches have removed all users of
the HCD flags they replace, this converts the last users of those flags.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell 6a9062f393 [PATCH] USB: ohci uses driver model wakeup flags
This makes OHCI use the driver model wakeup control bits for its root hub
(e.g. disable on amd756, because of chip erratum) and for the controller
itself.  It no longer uses the hcd glue bits with those roles, and depends
on the previous patch making the root hub available earlier.

Note that on most platforms (boot code properly setting the RWC bit) this
gives a partial workaround for the way PCI isn't currently flagging devices
that support PME# signals.  (Because of odd PCI init sequencing on PPC.)
That's because many OHCI controllers support "legacy PCI PM" ... without
involving any PCI PM capability.

USB wakeup from STR, if it works on your system, may still involve
tweaking things by hand in /proc/acpi/wakeup.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell b1e8f0a6a8 [PATCH] USB: usbcore sets up root hubs earlier
Make the HCD initialization sequence more sane ... notably, setting up
root hubs before HCDs are asked to do their one-time init.  Among other
things, that lets the HCDs do custom root hub init along with all the
other one-time initialization done in the (now misnamed) reset() method.

This also copies the controller wakeup flags into the root hub; it's
done a bit later than would be ideal, but that'll be necessary until
the PCI code initializes them correctly.  (The PCI patch breaks on PPC
due to how it sequences PCI initialization.)

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell 1c05ad4447 [PATCH] recognize three more usb peripheral controllers
This adds declarations for three USB peripheral controllers:

  - Two high speed USB cores that can be licensed from Mentor Graphics
    to be integrated into silicon:

      * "musbhsfc" is for peripherals only, as found in for example the
        IBM/AMCC 44EP processors.

      * "musbhdrc" is OTG-capable (dual role), and is found in various
        products including OMAP 2430 and the new DaVinci SOCs.

    The "musbh" standing for "Mentor USB Highspeed", the rest standing
    for "Function Controller" or "Dual Role Controller" (OTG-capable).

  - The full speed controller on the FreeScale MPC8272.

Adding these definitions just allows gadget driver code to handle any
controller-specific logic; controller drivers are quite separate.

Signed-off-by: David Brownell <david-b@pacbell.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell 7802ac5c29 [PATCH] USB: minor gadget/rndis tweak
Resove a minor FIXME:  don't change MTU while RNDIS link is active,
the other end won't expect such things...

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
David Brownell bae4bd848d [PATCH] USB: add support for AT91 gadget
This adds support for the USB peripheral controller on AT91
(rm9200, eventually also sam9261 or uClinux) platforms.

More SOC support for Linux-USB ... an uncomplicated pure PIO driver.
It'd be worth using this as a model, if you're starting a driver
for some other peripheral controller.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:56 -08:00
Andrew Victor 39a269c09f [PATCH] USB: add support for OCHI on AT91rm9200
This adds support for OHCI on AT91rm9200 based boards.

Possibly of interest here is the way this uses <linux/clk.h> to
gate clocks on/off during system pm state transitions.  That's
typical for non-PCI systems.  Some can go further; Mini-A host
side connectors enable ID-pin sensing.

From: Andrew Victor <andrew@sanpeople.com>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
David Brownell d085229938 [PATCH] USB: EHCI unlink tweaks
This patch modifies the behavior of the EHCI driver in an unlink path
that seems to be causing various issues on some systems.  Those problems
have included issues with disconnection, driver unbinding, and similar
cases where urb unlinking would just not work right.

This patch should help avoid those problems by not turning off the async
(control/bulk) schedule until it's not expecting an "async advance" IRQ,
which comes from the processing passing the schedule head.  Whether the
driver attempts to do such things is dependent on system timings, so
many folk would never have seen these problems.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Jordan Crouse d5fb7f1b5b [PATCH] USB: OHCI for AU1200
ALCHEMY:  Add OHCI support for AU1200

Updated by moving the OHCI support out of the EHCI patch.

Signed-off-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>
2006-03-20 14:49:55 -08:00
Jordan Crouse 76fa9a240d [PATCH] USB: EHCI for AU1200
ALCHEMY:  Add EHCI support for AU1200

Updated by removing the OHCI support

Signed-off-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>
2006-03-20 14:49:55 -08:00
Kumar Gala 8cd42e97bf [PATCH] USB: EHCI and Freescale 83xx quirk
On the MPC834x processors the multiport host (MPH) EHCI controller has an
erratum in which the port number in the queue head expects to be 0..N-1
instead of 1..N.  If we are on one of these chips we subtract one from
the port number before putting it into the queue head.

Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Randy Vinson 80cb9aee01 [PATCH] USB: EHCI for Freescale 83xx
Adding a Host Mode USB driver for the Freescale 83xx.

This driver supports both the Dual-Role (DR) controller and the
Multi-Port-Host (MPH) controller present in the Freescale MPC8349. It has
been tested with the MPC8349CDS reference system. This driver depends on
platform support code for setting up the pins on the device package in a
manner appropriate for the board in use. Note that this patch requires
selecting the EHCI controller option under the USB Host menu.

Signed-off-by: Randy Vinson <rvinson@mvista.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Clemens Ladisch 469d02293d [PATCH] USB: EHCI full speed ISO bugfixes
This patch replaces the split ISO raw_mask calculation code in the
iso_stream_init() function that computed incorrect numbers of high
speed transactions for both input and output transfers.

In the output case, it added a superfluous start-split transaction for
all maxmimum packet sizes that are a multiple of 188.

In the input case, it forgot to add complete-split transactions for all
microframes covered by the full speed transaction, and the additional
complete-split transaction needed for the case when full speed data
starts arriving near the end of a microframe.

These changes don't affect the lack of full speed bandwidth, but at
least it removes the MMF errors that the HC raised with some input
streams.

Signed-off-by: Clemens Ladisch <clemens@ladisch.de>
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
David Brownell f8aeb3bb86 [PATCH] USB: EHCI and NF2 quirk
This teaches the EHCI driver about a quirk seen in older NForce2 chips,
adding a workaround to ignore selective suspend requests.  Bus-wide
(so-called "global") suspend still works, as does USB wakeup of a
root hub that's globally suspended.

There's still a hole in this support though.  Strictly speaking, this
should _fail_ selective suspend requests, rather than ignoring them,
since doing it this way means that devices which should be able to issue
remote wakeup are not going to be able to do that.  For now, we'll just
live with that problem ... since usbcore expects to do selective suspend
on the way towards a full bus suspend, and usbcore needs to be able to
do full bus suspend.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Arjan van de Ven 4186ecf8ad [PATCH] USB: convert a bunch of USB semaphores to mutexes
the patch below converts a bunch of semaphores-used-as-mutex in the USB
code to mutexes

Signed-off-by: Arjan van de Ven <arjan@infradead.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:55 -08:00
Pekka Enberg 35cce732d9 [PATCH] USB: remove LINUX_VERSION_CODE macro usage
This patch removes unnecessary LINUX_VERSION_CODE macro usage from
drivers/usb/.

Signed-off-by: Pekka Enberg <penberg@cs.helsinki.fi>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Adrian Bunk e266a12492 [PATCH] USB: drivers/usb/core/message.c: make usb_get_string() static
After the removal of usb-midi.c, there's no longer any external user of
usb_get_string().

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Adrian Bunk 9628416a54 [PATCH] USB: remove OBSOLETE_OSS_USB_DRIVER drivers
This patch removes the obsolete USB_MIDI and USB_AUDIO drivers.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Pete Zaitcev 29da7937a1 [PATCH] ub: use kzalloc
Switch from kmalloc+memset to kzalloc.

Signed-off-by: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Oliver Neukum 9ee884cc89 [PATCH] USB: kzalloc in sisusbvga
this does two things:
- use kzalloc where appropriate
- correct error return codes in ioctl

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Oliver Neukum 06d694748b [PATCH] USB: kzalloc in usbled
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:54 -08:00
Oliver Neukum d874a2bade [PATCH] USB: kzalloc in PhidgetServo
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 17590840dc [PATCH] USB: kzalloc in PhidgetInterfaceKit
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 1144cf7af2 [PATCH] USB: kzalloc in ldusb
another one for kzalloc

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 092e462a53 [PATCH] USB: kzalloc in idmouse
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 5f7481337c [PATCH] USB: kzalloc in cytherm
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum 51b208ddf6 [PATCH] USB: kzalloc in usbvideo
another for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum b10b417788 [PATCH] USB: kzalloc in w9968cf
another one for kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum d8e298dc9f [PATCH] USB: kzalloc in dabusb
kzalloc in dabusb.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:53 -08:00
Oliver Neukum bbdb7dafb5 [PATCH] USB: kzalloc for hid
this uses kzalloc in hid.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Oliver Neukum 887c2560b6 [PATCH] USB: kzalloc for storage
another one for kzalloc. This covers the storage subdirectory.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Oliver Neukum 9ff87d7326 [PATCH] USB: mdc800.c to kzalloc
one more conversion to kzalloc.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Andrew Morton 9fcd5c322c [PATCH] USB: optimise devio.c usbdev_read fix
drivers/usb/core/devio.c: In function `usbdev_read':
drivers/usb/core/devio.c:140: error: invalid type argument of `->'
drivers/usb/core/devio.c:141: error: invalid type argument of `->'
drivers/usb/core/devio.c:142: error: invalid type argument of `->'
drivers/usb/core/devio.c:143: error: invalid type argument of `->'

Cc: Oliver Neukum <oliver@neukum.org>
Cc: Pete Zaitcev <zaitcev@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Oliver Neukum 8781ba0aa9 [PATCH] USB: optimise devio.c::usbdev_read
this is a small optimisation. It is ridiculous to do a kmalloc for
18 bytes. This puts it onto the stack.

Signed-off-by: Oliver Neukum <oliver@neukum.name>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Luca Risolia 60f780528f [PATCH] USB: Add ZC0301 Video4Linux2 driver
This patch adds a Video4Linux2 driver for ZC0301
Image Processor and Control Chip.

Signed-off-by: Luca Risolia <luca.risolia@studio.unibo.it>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 14:49:52 -08:00
Andrew Morton a29d642a4a [PATCH] get_cpu_sysdev() signedness fix
Doing (int < NR_CPUS) doesn't dtrt if it's negative..

Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:59 -08:00
Jeff Moyer 30560ba6ed [PATCH] firmware: fix BUG: in fw_realloc_buffer
The fw_realloc_buffer routine does not handle an increase in buffer size of
more than 4k.  It's not clear to me why it expects that it will only get an
extra 4k of data.  The attached patch modifies fw_realloc_buffer to vmalloc
as much memory as is requested, instead of what we previously had + 4k.

I've tested this on my laptop, which would crash occaisionally on boot
without the patch.  With the patch, it hasn't crashed, but I can't be
certain that this code path is exercised.

Signed-off-by: Jeff Moyer <jmoyer@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:58 -08:00
Greg Kroah-Hartman b87ba0a33a [PATCH] add EXPORT_SYMBOL_GPL_FUTURE() to USB subsystem
The USB core symbols will be converted to GPL-only in a few years.  Mark
this as such and update the documentation explaining why, and provide a
pointer for developers to receive help if they need it.

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:58 -08:00
Jes Sorensen 58383af629 [PATCH] kobj_map semaphore to mutex conversion
Convert the kobj_map code to use a mutex instead of a semaphore.  It
converts the single two users as well, genhd.c and char_dev.c.

Signed-off-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:58 -08:00
David Vrabel 489447380a [PATCH] handle errors returned by platform_get_irq*()
platform_get_irq*() now returns on -ENXIO when the resource cannot be
found.  Ensure all users of platform_get_irq*() handle this error
appropriately.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:57 -08:00
David Vrabel 305b3228f9 [PATCH] driver core: platform_get_irq*(): return -ENXIO on error
platform_get_irq*() cannot return 0 on error as 0 is a valid IRQ on some
platforms, return -ENXIO instead.

Signed-off-by: David Vrabel <dvrabel@arcom.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:57 -08:00
Greg Kroah-Hartman 972de6c8bf [PATCH] Mark empty release functions as broken
Come on people, this is just wrong...

Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2006-03-20 13:42:57 -08:00
Russell King 91bca4b3e2 [SERIAL] Merge avlab serial board entries in parport_serial
As can be seen from this patch, the avlab_*_[68]50 table entries are
identical to the plain avlab_* entries in every respect.  Hence, there
is no need to list them separately in the pciserial_board nor
parport_pc_pci card tables - they can re-use the plain avlab_* entries.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-20 20:08:22 +00:00
Russell King d358788f3f [SERIAL] kernel console should send CRLF not LFCR
Glen Turner reported that writing LFCR rather than the more
traditional CRLF causes issues with some terminals.

Since this aflicts many serial drivers, extract the common code
to a library function (uart_console_write) and arrange for each
driver to supply a "putchar" function.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2006-03-20 20:00:09 +00:00
Linus Torvalds c4a1745aa0 Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6
* master.kernel.org:/pub/scm/linux/kernel/git/davem/sparc-2.6: (230 commits)
  [SPARC64]: Update defconfig.
  [SPARC64]: Fix 2 bugs in huge page support.
  [SPARC64]: CONFIG_BLK_DEV_RAM fix
  [SPARC64]: Optimized TSB table initialization.
  [SPARC64]: Allow CONFIG_MEMORY_HOTPLUG to build.
  [SPARC64]: Use SLAB caches for TSB tables.
  [SPARC64]: Don't kill the page allocator when growing a TSB.
  [SPARC64]: Randomize mm->mmap_base when PF_RANDOMIZE is set.
  [SPARC64]: Increase top of 32-bit process stack.
  [SPARC64]: Top-down address space allocation for 32-bit tasks.
  [SPARC64] bbc_i2c: Fix cpu check and add missing module license.
  [SPARC64]: Fix and re-enable dynamic TSB sizing.
  [SUNSU]: Fix missing spinlock initialization.
  [TG3]: Do not try to access NIC_SRAM_DATA_SIG on Sun parts.
  [SPARC64]: First cut at VIS simulator for Niagara.
  [SPARC64]: Fix system type in /proc/cpuinfo and remove bogus OBP check.
  [SPARC64]: Add SMT scheduling support for Niagara.
  [SPARC64]: Fix 32-bit truncation which broke sparsemem.
  [SPARC64]: Move over to sparsemem.
  [SPARC64]: Fix new context version SMP handling.
  ...
2006-03-20 11:57:50 -08:00
Adrian Bunk 7b9af3455b remove dead Radeon URL
This patch removes a dead Radeon URL from two Kconfig files.

This isue was noted by Reto Gantenbein <ganto82@gmx.ch> in
Kernel Bugzilla #4446.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-03-20 20:23:13 +01:00
Adrian Bunk 8075f21fc6 SCSI_AACRAID: add a help text
Most of the text by Mark Salyzyn <mark_salyzyn@adaptec.com>.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: Mark Salyzyn <mark_salyzyn@adaptec.com>
2006-03-20 20:21:24 +01:00
Linus Torvalds c7cace6437 Merge branch 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6
* 'upstream-linus' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/netdev-2.6: (150 commits)
  [PATCH] ipw2100: Update version ipw2100 stamp to 1.2.2
  [PATCH] ipw2100: move mutex.h include from ipw2100.c to ipw2100.h
  [PATCH] ipw2100: semaphore to mutexes conversion
  [PATCH] ipw2100: Fix radiotap code gcc warning
  [PATCH] ipw2100: add radiotap headers to packtes captured in monitor mode
  [PATCH] ipw2x00: expend Copyright to 2006
  [PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
  [PATCH] ieee80211: Don't update network statistics from off-channel packets.
  [PATCH] ipw2200: Update ipw2200 version stamp to 1.1.1
  [PATCH] ipw2200: switch to the new ipw2200-fw-3.0 image format
  [PATCH] ipw2200: wireless extension sensitivity threshold support
  [PATCH] ipw2200: Enables the "slow diversity" algorithm
  [PATCH] ipw2200: Set a meaningful silence threshold value
  [PATCH] ipw2200: export `debug' module param only if CONFIG_IPW2200_DEBUG
  [PATCH] ipw2200: Change debug level for firmware error logging
  [PATCH] ipw2200: Filter unsupported channels out in ad-hoc mode
  [PATCH] ipw2200: Fix ipw_sw_reset() implementation inconsistent with comment
  [PATCH] ipw2200: Fix rf_kill is activated after mode change with 'disable=1'
  [PATCH] ipw2200: remove the WPA card associates to non-WPA AP checking
  [PATCH] ipw2200: Add signal level to iwlist scan output
  ...
2006-03-20 10:30:31 -08:00
Linus Torvalds a90779bfc8 Merge branch 'block-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/block
* 'block-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/block:
  [PATCH] fix rmmod problems with elevator attributes, clean them up
  [PATCH] elevator_t lifetime rules and sysfs fixes
  [PATCH] noise removal: cfq-iosched.c
  [PATCH] don't bother with refcounting for cfq_data
  [PATCH] fix sysfs interaction and lifetime rules handling for queues
  [PATCH] regularize blk_cleanup_queue() use
  [PATCH] fix cfq_get_queue()/ioprio_set(2) races
  [PATCH] deal with rmmod/put_io_context() races
  [PATCH] stop elv_unregister() from rogering other iosched's data, fix locking
  [PATCH] stop cfq from pinning queue down
  [PATCH] make cfq_exit_queue() prune the cfq_io_context for that queue
  [PATCH] fix the exclusion for ioprio_set()
  [PATCH] keep sync and async cfq_queue separate
  [PATCH] switch to use of ->key to get cfq_data by cfq_io_context
  [PATCH] stop leaking cfq_data in cfq_set_request()
  [PATCH] fix cfq hash lookups
  [PATCH] fix locking in queue_requests_store()
  [PATCH] fix double-free in blk_init_queue_node()
  [PATCH] don't do exit_io_context() until we know we won't be doing any IO
2006-03-20 10:28:51 -08:00
Eli Cohen fd02e8038e IB/mthca: Query SRQ srq_limit fixes
Fix endianness handling of srq_limit: it is big-endian in the context
structure, so we need to swab it before returning it.

Also add support for srq_limit query for Tavor (non-MemFree) HCAs.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:26 -08:00
Roland Dreier bfef73fa78 IPoIB: Get rid of useless test of queue length
In neigh_add_path(), the queue of delayed packets can never be full,
because the queue is always freshly created and cannot be found by any
other code path.  In fact, the test of the queue length is worse than
useless: if somehow the test ever triggered and path_rec_start() also
failed, then dev_kfree_skb_any() will be called twice on the same skb.
Fix this by deleting the useless test.  Pointed out by Michael
S. Tsirkin <mst@mellanox.co.il>.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:26 -08:00
Dotan Barak e10e271bfd IB/mthca: Correct reported SRQ size in MemFree case.
MemFree devices need to reserve one shared receive queue (SRQ) work
request for internal use, so the capacity returned from the create_srq
and query_srq methods should be srq->max - 1.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:26 -08:00
Michael S. Tsirkin dc05980dd7 IB/mad: Fix oopsable race on device removal
Fix an oopsable race debugged by Eli Cohen <eli@mellanox.co.il>:
After removing the port from port_list, ib_mad_port_close flushes
port_priv->wq before destroying the special QPs. This means that a
completion event could arrive, and queue a new work in this work queue
after flush.

This patch also removes an unnecessary flush_workqueue():
destroy_workqueue() already includes a flush.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:25 -08:00
Roland Dreier bf17c1c7cc IB/srp: Coverity fix to srp_parse_options()
Fix leak found by Coverity: in the SRP_OPT_DGID case,
srp_parse_options() didn't free the result of match_strdup().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:25 -08:00
Roland Dreier 6b63e3015a IB/mthca: Coverity fix to mthca_init_eq_table()
Fix bug found by coverity: the loop body never executed, because it
was doing for (i = 0; i < MTHCA_EQ_CMD; ++i), but MTHCA_EQ_CMD is 0.
The correct loop bound is MTHCA_NUM_EQ, to loop over all EQs.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:25 -08:00
Roland Dreier 048975ac58 IB: Coverity fixes to sysfs.c
Fix two bugs found by coverity:
 - Memory leak in error path of alloc_group_attrs()
 - Fencepost error in state_show(): the test should be < ARRAY_SIZE(),
   not <= ARRAY_SIZE().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:25 -08:00
Jack Morgenstein 0b3ea0829c IPoIB: Move ipoib_ib_dev_flush() to ipoib workqueue
Move ipoib_ib_dev_flush() to ipoib's workqueue.  This keeps it ordered
with respect to other work scheduled by the ipoib driver.  This fixes
problems with races, for example:
 - ipoib_ib_dev_flush() has started running because of an IB event
 - user does ifconfig ib0 down
 - ipoib_mcast_stop_thread() gets called twice and waits for the same
   completion twice

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:24 -08:00
Roland Dreier 8b9ab02b69 IPoIB: Fix build now that neighbour destructor is in neigh_params
Fix the IPoIB build (which is broken in net-2.6.17 because of my
screw-up, which left out this chunk in ipoib_multicast.c). 
The neighbour destructor is now in neigh_params, so we don't
need to clear it in the ops structure.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:24 -08:00
Ami Perlmutter 702b2aaccf IB/uverbs: Use correct alt_pkey_index in modify QP
The old code incorrectly used the primary P_Key index as the alternate
index too.

Signed-off-by: Ami Perlmutter <amip@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:24 -08:00
Jack Morgenstein f36e1793e2 IB/umad: Add support for large RMPP transfers
Add support for sending and receiving large RMPP transfers.  The old
code supports transfers only as large as a single contiguous kernel
memory allocation.  This patch uses linked list of memory buffers when
sending and receiving data to avoid needing contiguous pages for
larger transfers.

  Receive side: copy the arriving MADs in chunks instead of coalescing
  to one large buffer in kernel space.

  Send side: split a multipacket MAD buffer to a list of segments,
  (multipacket_list) and send these using a gather list of size 2.
  Also, save pointer to last sent segment, and retrieve requested
  segments by walking list starting at last sent segment. Finally,
  save pointer to last-acked segment.  When retrying, retrieve
  segments for resending relative to this pointer.  When updating last
  ack, start at this pointer.

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:23 -08:00
Roland Dreier 6ecb0c8496 IB/srp: Add SCSI host attributes to show target port
Add SCSI host attributes in sysfs that show the ID extension, IOC
GUID, service ID, P_Key and destination GID for each target port that
the SRP initiator connects to.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:23 -08:00
Sean Hefty 87fd1a11ae IB/cm: Check cm_id state before handling a REP
Move checking the state of a cm_id before modifying it when handling a
REP.  This fixes a bug seen under MPI scale-up testing, where a NULL
timewait_info pointer is dereferenced if a request times out before a
REP is received.

Signed-off-by: Sean Hefty <sean.hefty@intel.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:23 -08:00
Roland Dreier 6226bb5701 IB/mthca: Update firmware versions
Update known firmware versions in driver's table to the latest releases.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:22 -08:00
Eli Cohen 651eaac928 IB/mthca: Optimize large messages on Sinai HCAs
Sinai (one-port PCI Express) HCAs get improved throughput for messages
bigger than 80 KB in DDR mode if memory keys are formatted in a
specific way.  The enhancement only works if the memory key table is
smaller than 2^24 entries.  For larger tables, the enhancement is off
and a warning is printed (to avoid silent performance loss).

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:22 -08:00
Dotan Barak 27d5630064 IB/uverbs: Fix query QP return of sq_sig_all
The old code didn't convert from the kernel's enum correctly.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:21 -08:00
Dotan Barak 4546d31d84 IB: Fix modify QP checking of "current QP state" attribute
According to the IB spec version 1.2, section 11.2.4.2, the current
table has a couple of mistakes where it allows the current QP state
(IB_QP_CUR_STATE) attribute.  For the transitions:

  RTS -> RTS: IB_QP_CUR_STATE should be allowed for all transports
  SQD -> SQD: IB_QP_CUR_STATE should never be allowed

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:20 -08:00
Michael S. Tsirkin 9acf6a8570 IPoIB: Fix multicast race between canceling and completing
ipoib_mcast_stop_thread currently tests mcast->query and if it is
NULL, does not perform wait_for_completion on the mcast and frees the
mcast object directly.

However, since both operations are done without locking, it is
possible that ipoib_mcast_join_complete is in progress on this mcast
object and has set mcast->query to NULL already.

Solve this by:
- taking priv->lock before we change mcast->query in ipoib_mcast_join_complete,
  and keeping it until we no longer need the mcast object
- taking priv->lock around mcast->query test in ipoib_mcast_stop_thread

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:20 -08:00
Eli Cohen 54d07e2a1e IPoIB: Clean up if posting receives fails
If posting receives in ipoib_ib_dev_open() fails, call
ipoib_ib_dev_stop() to move the device's QP back to the RESET state so
that we can try again later.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:19 -08:00
Ishai Rabinovitz 8d3ef29d6b IB/mthca: Use an enum for HCA page size
Use a named enum for the HCA's internal page size, rather than having
magic values of 4096 and shifts by 12 all over the code.  Also, fix
one minor bug in EQ handling: only one HCA page is mapped to the HCA
during initialization, but a full kernel page is unmapped during
cleanup.  This might cause problems when PAGE_SIZE != 4096.

Signed-off-by: Ishai Rabinovitz <ishai@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:19 -08:00
Dotan Barak 67e7377661 IB/mthca: Check alternate P_Key index when setting alternate path
Check that the alternate P_Key index is in range when setting the
alternate path for a QP.  Also make a cosmetic touch up to the debug
message printed when the main P_Key index is out of range.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:18 -08:00
Dotan Barak 7667abd152 IB/mthca: Add support for send work request fence flag
Add support for IB_SEND_FENCE flag in post_send methods.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:18 -08:00
Eli Cohen 7343b231f2 IPoIB: Close race in setting mcast->ah
ipoib_mcast_send() tests mcast->ah twice.  If this value is changed
between these two points, we leak an skb.  However,
ipoib_mcast_join_finish() sets mcast->ah with no locking, so it could
race against ipoib_mcast_send().

As a solution, take priv->lock around assignment to mcast->ah thus
making sure ipoib_mcast_send() (which also takes priv->lock) is not in
flight.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:18 -08:00
Jack Morgenstein 1d89b1ae6c IB/mthca: Implement query_ah method
Implement query_ah (except for AVs which are in HCA memory).  This is
needed to implement RMPP duplicate session detection on sending side
(extraction of DGID/DLID and GRH flag from address handle).

Signed-off-by: Jack Morgenstein <jackm@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:17 -08:00
Eli Cohen 14abdffcc0 IB/mthca: Write FW commands through doorbell page
This patch is checks whether the HCA supports posting FW commands
through a doorbell page (user access region 0, or "UAR0").  If this is
supported, the driver maps UAR0 and uses it for FW commands. This can
be controlled by the value of a writable module parameter
fw_cmd_doorbell.  When the parameter is 0, the commands are posted
through HCR using the old method; otherwise if HCA is capable commands
go through UAR0.

This use of UAR0 to post commands eliminates the need for polling the
"go" bit prior to posting a new command. Since reading from a PCI
device is much more expensive then issuing a posted write, it is
expected that issuing FW commands this way will provide better CPU
utilization.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:17 -08:00
Dotan Barak ea88fd16d6 IB/uverbs: Return actual capacity from create SRQ operation
Pass actual capacity of created SRQ back to userspace, so that
userspace can report accurate capacities.  This requires an ABI bump,
to change struct ib_uverbs_create_srq_resp.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:16 -08:00
Dotan Barak abb6e9ba17 IB/mthca: Return actual capacity from create_srq
Have mthca's create_srq method return the actual capacity of the SRQ
that gets created.  Also update comments in <rdma/ib_verbs.h> to
clarify that this is what is expected from ib_create_srq().

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:16 -08:00
Michael S. Tsirkin 44af79f952 IPoIB: clarify to_ipoib_neigh()
Cosmetic change: make alignment explicit in to_ipoib_neigh.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:16 -08:00
Roland Dreier 00df1b2c8b IB/mthca: Bump driver version and release date
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:15 -08:00
Eli Cohen 8ebe5077e3 IB/mthca: Support for query QP and SRQ
Implement the query_qp and query_srq methods in mthca.

Signed-off-by: Eli Cohen <eli@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:15 -08:00
Dotan Barak 8bdb0e8632 IB/uverbs: Support for query SRQ from userspace
Add support to uverbs to handle querying userspace SRQs (shared
receive queues), including adding an ABI for marshalling requests and
responses.  The kernel midlayer already has the underlying
ib_query_srq() function.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:14 -08:00
Dotan Barak 7ccc9a24e0 IB/uverbs: Support for query QP from userspace
Add support to uverbs to handle querying userspace QPs (queue pairs),
including adding an ABI for marshalling requests and responses.  The
kernel midlayer already has the underlying ib_query_qp() function.

Signed-off-by: Dotan Barak <dotanb@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:14 -08:00
Roland Dreier a74cd4af0b IB: Whitespace cleanups
Remove trailing whitespace and fix indentation that with spaces
instead of tabs.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:13 -08:00
Roland Dreier d844183d9c IB/mthca: Convert to use ib_modify_qp_is_ok()
Use ib_modify_qp_is_ok() in mthca, and delete the big table of
attributes for queue pair state transitions.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:13 -08:00
Roland Dreier 8a51866f08 IB: Add ib_modify_qp_is_ok() library function
The in-kernel mthca driver contains a table of which attributes are
valid for each queue pair state transition.  It turns out that both
other IB drivers -- ipath and ehca -- which are being prepared for
merging have copied this table, errors and all.

To forestall this code duplication, move this table and the code to
check parameters against it into a midlayer library function,
ib_modify_qp_is_ok().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:12 -08:00
Roland Dreier 3fa1fa3e80 IB/mthca: Generate SQ drained events when requested
Add low-level driver support to ib_mthca so that consumers can request
a "send queue drained" event be generated when a transiton to the SQD
state completes.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:12 -08:00
Ralph Campbell 5e9f71a16c IB/mad: Simplify SMI by eliminating smi_check_local_dr_smp()
The call to ib_get_agent_port() shouldn't be possible to fail when
smi_check_local_dr_smp() is called from ib_mad_recv_done_handler().
When it is called from handle_outgoing_dr_smp(), the device and
port_num come from mad_agent_priv so I assume the call to
ib_get_agent_port() shouldn't fail either.  In either case,
smi_check_local_smp() only uses the mad_agent pointer to check that
mad_agent->device->process_mad is not NULL.  The device pointer would
have to be the same as the one passed to smi_check_local_dr_smp()
since that pointer is used later instead of the one checked in
smi_check_local_smp().

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:11 -08:00
Ralph Campbell 5f0b67e0d5 IB/mad: Remove redundant check from smi_check_local_dr_smp()
smi_check_local_dr_smp() is called only from two places in core/mad.c
It returns 0 or 1.  In smi_check_local_dr_smp(), it checks for
a directed route SMP but this function is only called when the SMP
is a directed route so this is a NOP.

Signed-off-by: Hal Rosenstock <halr@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:11 -08:00
Or Gerlitz d36f34aadf IB: Enable FMR pool user to set page size
This patch allows the consumer to set the page size of "pages" mapped
by the pool FMRs, which is a feature already existing in the base
verbs API.  On the cosmetic side it changes ib_fmr_attr.page_size field
to be named page_shift.

Signed-off-by: Or Gerlitz <ogerlitz@voltaire.com>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:10 -08:00
Roland Dreier 6dfc3901b0 IB/mthca: Add modify_device method to set node description
Add a modify_device method to mthca, which implements setting the node
description.  This makes the writable "node_desc" sysfs attribute work
for Mellanox HCAs.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:10 -08:00
Roland Dreier c5bcbbb9fe IB: Allow userspace to set node description
Expose a writable "node_desc" sysfs attribute for InfiniBand devices.
This allows userspace to update the node description with information
such as the node's hostname, so that IB network management software
can tie its view to the real world.

Signed-off-by: Michael S. Tsirkin <mst@mellanox.co.il>
Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:09 -08:00
Roland Dreier 2fa5e2ebbe IB/mthca: Whitespace cleanups
Remove trailing whitespace and fix indentation that with spaces
instead of tabs.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:09 -08:00
Roland Dreier 4885bf64bc IB/mthca: Add device-specific support for resizing CQs
Add low-level driver support for resizing CQs (both kernel and
userspace) to mthca.

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:08 -08:00
Roland Dreier 33b9b3ee97 IB: Add userspace support for resizing CQs
Add support to uverbs to handle resizing userspace CQs (completion
queues), including adding an ABI for marshalling requests and
responses.  The kernel midlayer already has ib_resize_cq().

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:07 -08:00
Roland Dreier 399d792129 IB/mthca: Get rid of might_sleep() annotations
The might_sleep() annotations in mthca are silly -- they all occur
shortly before calls that will end up in core functions like kmalloc()
that will print the same warning in an unsafe context anyway.  In
fact, beyond cluttering the source, we're actually bloating text with
CONFIG_DEBUG_SPINLOCK_SLEEP and/or CONFIG_PREEMPT_VOLUNTARY set.

With both options set, getting rid of the might_sleep()s saves a lot:
add/remove: 0/0 grow/shrink: 0/7 up/down: 0/-171 (-171)
function                                     old     new   delta
mthca_pd_alloc                               132     109     -23
mthca_init_cq                                969     946     -23
mthca_mr_alloc                               592     568     -24
mthca_pd_free                                 67      42     -25
mthca_free_mr                                219     194     -25
mthca_free_cq                                570     545     -25
mthca_fmr_alloc                              742     716     -26

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:07 -08:00
Roland Dreier d9b98b0f11 IB/mthca: Make functions that never fail return void
The function mthca_free_err_wqe() can never fail, so get rid of its
return value.  That means handle_error_cqe() doesn't have to check
what mthca_free_err_wqe() returns, which means it can't fail either
and doesn't have to return anything either.  All this results in
simpler source code and a slight object code improvement:

add/remove: 0/0 grow/shrink: 0/2 up/down: 0/-10 (-10)
function                                     old     new   delta
mthca_free_err_wqe                            83      81      -2
mthca_poll_cq                               1758    1750      -8

Signed-off-by: Roland Dreier <rolandd@cisco.com>
2006-03-20 10:08:07 -08:00
Adrian Bunk 0f76ee4514 Merge with git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git 2006-03-20 18:30:36 +01:00
Jeff Garzik 29b2548bf5 Merge branch 'master' 2006-03-20 04:48:50 -05:00
Jeff Garzik 2e9ff56efb Merge branch 'upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-2.6 2006-03-20 04:38:50 -05:00
Jeff Garzik d378aca6ec Merge branch 'master' 2006-03-20 04:38:03 -05:00
David S. Miller b5e7ae5dd0 [SPARC64] bbc_i2c: Fix cpu check and add missing module license.
Should allow cheetah_plus cpu types and don't taint
the kernel.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:16:34 -08:00
David S. Miller a858f1ca72 [SUNSU]: Fix missing spinlock initialization.
Caught by CONFIG_DEBUG_SPINLOCK.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:16:32 -08:00
David S. Miller 72b845e04e [TG3]: Do not try to access NIC_SRAM_DATA_SIG on Sun parts.
Sun does't put an SEEPROM behind the tigon3 chip, among other things,
so accesses to these areas just give bus timeouts.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:14:27 -08:00
David S. Miller f5deb807b8 [SPARC] serial: Make sure sysfs nodes get named correctly.
Because we play this trick where we use ttyS? in increasing minor
numbers for different sunfoo.c drivers, we have to inform the TTY
layer of this.

Do so by setting the tty->name_base appropriately.

Probably there should be a generic way to do this in the serial core,
but for now...

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:47 -08:00
David S. Miller 843dfb4d99 [SPARC64] sunhv: Fix locking in sunhv_start_tx()
Caller takes the lock already.

Also, fixup the poll loop in sunhv_break_ctl().  Just
like in console write, we udelay(2) and use a loop
limit of 1000000 iterations.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:38 -08:00
David S. Miller 11fc04e46a [SPARC64]: Put sunhv.o earliest in the list of sparc serial drivers.
So that it will show up as /dev/ttyS0.  Otherwise things like
installers will try to run on whatever serial port gets probed
first.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:37 -08:00
David S. Miller 135066a211 [SPARC64] sunhv: Support SYSRQ properly.
By calling uart_handle_break().  We'll still do the
"sun_do_break()" handling if the user gives two
breaks in a row.

We should probably do this in the other Sparc serial
drivers too.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:11 -08:00
David S. Miller db33f9bc09 [SPARC64]: Fix OOPS on sunhv interrupts.
Until the uart is openned, port->info is NULL.

Also, init the port->irq properly and give a non-zero
port->membase so that the uart device reporting is done.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:10 -08:00
David S. Miller 9d29a3fafd [SPARC64]: Decode virtual-devices interrupts correctly.
Need to translate through the interrupt-map{,-mask] properties.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:13:05 -08:00
David S. Miller d5a2aa241a [SPARC64] sunhv: Bug fixes.
Add udelay to polling console write loop, and increment
the loop limit.

Name the device "ttyHV" and pass that to add_preferred_console()
when we're using hypervisor console.

Kill sunhv_console_setup(), it's empty.

Handle the case where we don't want to use hypervisor console.
(ie. we have a head attached to a sun4v machine)

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:46 -08:00
David S. Miller f4266ab45a [SPARC64] sunhv: Use virtual-devices layer to get interrupt.
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:45 -08:00
David S. Miller 1ddb7c98d4 [SPARC64]: Prevent registering wrong serial console.
If the console is not for a particular Sun serial
controller, set the drv->cons to NULL.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:42 -08:00
David S. Miller 02fd473bd4 [SPARC64]: Add SUN4V Hypervisor Console driver.
Since it can do things like BREAK and HUP, we implement
this as a serial uart driver.

This still needs interrupt probing code, as I haven't figured
out how interrupts will work or be probed for on SUN4V yet.

Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-20 01:12:18 -08:00
Michael Chan 4a29cc2e50 [TG3]: 40-bit DMA workaround part 2
The 40-bit DMA workaround recently implemented for 5714, 5715, and
5780 needs to be expanded because there may be other tg3 devices
behind the EPB Express to PCIX bridge in the 5780 class device.

For example, some 4-port card or mother board designs have 5704 behind
the 5714.

All devices behind the EPB require the 40-bit DMA workaround.

Thanks to Chris Elmquist again for reporting the problem and testing
the patch.

Signed-off-by: Michael Chan <mchan@broadcom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2006-03-19 13:21:12 -08:00
James Bottomley 2f8600dff2 [SCSI] eliminate rphy allocation in favour of expander/end device allocation
This allows the removal of the contained flag and also does a bit of
class renaming (sas_rphy->sas_device).

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-19 10:21:16 -06:00
James Bottomley f013db3284 [SCSI] convert mptsas over to end_device/expander allocations
The conversion of mptsas should allow the elimination of the contained
flag in the sas transport class.

Acked-by: "Moore, Eric" <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-19 10:20:45 -06:00
James Bottomley 6bdaa1f17d [SCSI] allow displaying and setting of cache type via sysfs
I think I promised to do this two years ago

This patch adds a scsi_disk class with the cache type and FUA
parameters, so user land application can easily obtain them without
having to parse dmesg.  It also allows setting the cache type (use with
care...)

This patch is a bit dangerous because I've replaced the disk kref with a
class device reference ...

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-19 10:19:51 -06:00
James Bottomley 5baba830e9 [SCSI] add scsi_mode_select to scsi_lib.c
This complements the scsi_mode_sense() function

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-19 10:19:14 -06:00
adam radford 75913d9bb8 [SCSI] 3ware 9000 add big endian support
The attached patch updates the 3ware 9000 driver:

- Fix 9550SX pchip reset timeout.
- Add big endian support.

Signed-off-by: Adam Radford <linuxraid@amcc.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-19 10:18:42 -06:00
Al Viro 1312f40e11 [PATCH] regularize blk_cleanup_queue() use
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
2006-03-18 18:34:20 -05:00
Michael Krufky 60a6dc55b9 [PATCH] Kconfig: swap VIDEO_CX88_ALSA and VIDEO_CX88_DVB
VIDEO_CX88_ALSA should not be between VIDEO_CX88_DVB and
VIDEO_CX88_DVB_ALL_FRONTENDS

When cx88-alsa was added to cx88/Kconfig, it was added in between
VIDEO_CX88_DVB and VIDEO_CX88_DVB_ALL_FRONTENDS.  This caused
undesireable effects to the appearance of the menu options in
menuconfig.

This fix reorders cx88-alsa and cx88-dvb in Kconfig, to match saa7134,
and restore the correct menuconfig appearance.

Signed-off-by: Michael Krufky <mkrufky@linuxtv.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-18 12:12:18 -08:00
Markus Rechberger 7215fdb214 [PATCH] Fixed em28xx based system lockup
Fixed em28xx based system lockup, device needs to be initialized before
starting the isoc transfer otherwise the system will completly lock up.

Signed-off-by: Markus Rechberger <mrechberger@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-18 10:52:45 -08:00
Zhu Yi cc8279f68c [PATCH] ipw2100: Update version ipw2100 stamp to 1.2.2
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 16:14:48 -05:00
Zhu Yi 3234eeec18 [PATCH] ipw2100: move mutex.h include from ipw2100.c to ipw2100.h
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 16:14:48 -05:00
Ingo Molnar 752e377bfd [PATCH] ipw2100: semaphore to mutexes conversion
semaphore to mutexes conversion.

the conversion was generated via scripts, and the result was validated
automatically via a script as well.

build-tested.

Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 16:14:48 -05:00
Zhu Yi cae1629515 [PATCH] ipw2100: Fix radiotap code gcc warning
Fix gcc warning: ipw2100.c:2460: ISO C90 forbids mixed declarations and code

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 16:14:48 -05:00
Stefan Rompf 15745a7dd1 [PATCH] ipw2100: add radiotap headers to packtes captured in monitor mode
Signed-off-by: Stefan Rompf <stefan@loplof.de>
Signed-off-by: Andrea Merello <andreamrl at tiscali it>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 16:14:48 -05:00
Zhu Yi 171e7b2f1f [PATCH] ipw2x00: expend Copyright to 2006
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 16:14:47 -05:00
Adrian Bunk 71e585fca2 [PATCH] drivers/net/wireless/ipw2200.c: fix an array overun
This patch fixes a big array overun found by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:41:20 -05:00
Zhu Yi 7c56789448 [PATCH] ipw2200: Update ipw2200 version stamp to 1.1.1
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:04 -05:00
James Ketrenos 9006ea75cf [PATCH] ipw2200: switch to the new ipw2200-fw-3.0 image format
This patch modifies the driver to support the ipw2200-fw-3.0 image format.

The 3.0 fw image does not add any new capabilities, but as a result of
image format changes, it should fix two problems experienced by users:

1) Race conditions with the request_firmware interface and udev/hotplug
are improved as only a single request_firmware call is now required to
load the firmware and microcode (vs. 3 separate calls previously)

2) The monitor mode firmware (sniffer) is now packaged with the correct
boot image so it can now function without frequent restarts.

Note: Once you apply this patch, you will also need to upgrade your
firmware image to the 3.0 version available from:

        http://ipw2200.sf.net/firmware.php

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:04 -05:00
Olivier Hochreutiner 651be26f2d [PATCH] ipw2200: wireless extension sensitivity threshold support
The patch allows the user to set the handover threshold, i.e. the number
of consecutively missed beacons that will trigger a roaming attempt. The
disassociation threshold is set to 3 times the handover threshold.

Signed-off-by: Olivier Hochreutiner <olivier.hochreutiner@epfl.ch>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:04 -05:00
Cahill, Ben M 71de1f3dd1 [PATCH] ipw2200: Enables the "slow diversity" algorithm
This forces one antenna or the other, if the background noise is
significantly quieter in one than the other. It favors the quieter
antenna, and won't kick in unless the difference is significant.

Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:04 -05:00
Cahill, Ben M 12977154e7 [PATCH] ipw2200: Set a meaningful silence threshold value
Set a meaningful silence threshold value (replacing our previous "0"
default), which gets rid of the gratuitous "Link deterioration"
notifications that we've been receiving from firmware.  This
notification feature tells the driver information to help it determine
when to pre-emptively restart the firmware/ucode in anticipation of
firmware errors!  But since setting this new threshold, I haven't seen
any such notifications.  At least it keeps the logs a little less busy.

Signed-off-by: Cahill, Ben M <ben.m.cahill@intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:04 -05:00
Zhu Yi 3e1555bae1 [PATCH] ipw2200: export `debug' module param only if CONFIG_IPW2200_DEBUG
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:03 -05:00
Zhu Yi 1d1b09eb14 [PATCH] ipw2200: Change debug level for firmware error logging
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:03 -05:00
Zhu Yi e815de422c [PATCH] ipw2200: Filter unsupported channels out in ad-hoc mode
Currently iwlist ethX freq[uency]/channel lists all the channels the card
supported for the current region, which includes some channels can only
be used in infrastructure mode. This patch filters these channels out if
the card is currently in ad-hoc mode.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:03 -05:00
Zhu Yi e8c69e27d1 [PATCH] ipw2200: Fix ipw_sw_reset() implementation inconsistent with comment
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:03 -05:00
Zhu Yi d6d5b5c13e [PATCH] ipw2200: Fix rf_kill is activated after mode change with 'disable=1'
When loading the ipw2200 module with disabled=1, rf_kill is activated after
every mode change. This is caused by ipw_sw_reset() is called when a mode
is changed. The patch fixed the problem by distinguishing the purposes with
the 'option' paramenter.

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:03 -05:00
Zhu Yi 8da374fc44 [PATCH] ipw2200: remove the WPA card associates to non-WPA AP checking
wpa_supplicant needs to set wpa_enabled unconditionally, with this check
it hasn't been possible to connect to non-WPA networks using wpa_supplicant.
So remove below check.

if (priv->ieee->wpa_enabled &&
	network->wpa_ie_len == 0 && network->rsn_ie_len == 0)

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:03 -05:00
Bill Moss b191608a45 [PATCH] ipw2200: Add signal level to iwlist scan output
This patch does two things. It uses the parameter IW_QUAL_DBM which is new
in WE-19 to cause signal level and noise to be reported in dBm by the
wireless tools. It also defines the signal level as an unsigned integer
so that the signal level will be reported by iwlist iface scan.

Signed-off-by: Bill Moss <bmoss@clemson.edu>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:02 -05:00
Zhu Yi 9d0be03aee [PATCH] ipw2200: use generic ieee80211_get_hdrlen() to get packet length
replace ipw2200 specific frame_hdr_len() with generic
ieee80211 routine ieee80211_get_hdrlen()

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:02 -05:00
Zhu Yi 85149bace3 [PATCH] ipw2200: fix a potential NULL pointer dereference
Only on CONFIG_IPW2200_DEBUG is not defined

Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:02 -05:00
James Ketrenos f697014af9 [PATCH] ipw2200: stop netdev queue if h/w doesn't have space for new packets
The patch roll back the change we made to support for the ability to
start/stop independent Tx queues within a single net device in order to
support 802.11e QoS. We need to be able to indicate to the upper layers
that packets of a given priority can not be sent any more without halting
transmission of all packets, and without rescheduling high priority packets
down to the next priority level.

So we return NETDEV_TX_BUSY in this case and rely on the stack would
take care of rescheduling... which it apparently does immediately and
consumes the CPU. This caused the ksoftirqd kernel thread consuming almost
all the CPU...

To put the code back to the way it was before we made these changes we
put the call netif_queue_stop back in ipw_tx_skb.  This effectively
disables multiple priority based transmit queues for 802.11e, but given
that its broken anyway...

Signed-off-by: James Ketrenos <jketreno@linux.intel.com>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:02 -05:00
Henrik Brix Andersen 48a847709f [PATCH] ipw2200: print geography code upon module load
Given the amount of support requests for the meaning of the geography code
I've written a patch for printing this information on module load no matter
the debug level.

I've also added a section to the README.ipw2200 file listing the geography
codes and their meaning.

Signed-off-by: Henrik Brix Andersen <brix@gentoo.org>
Signed-off-by: Zhu Yi <yi.zhu@intel.com>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 15:08:02 -05:00
Adrian Bunk 53d0bcf82a [PATCH] drivers/net/wireless/ipw2200.c: make ipw_qos_current_mode() static
This patch makes the needlessly global function ipw_qos_current_mode()
static.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 14:16:44 -05:00
Larry Finger 1867b117d9 [PATCH] Remove duplicated code from ipw2200.c
As stated in a comment, the ipw2200 driver uses several routines that
were borrowed from ieee80211_geo.c. As ipw2200 requires ieee80211,
these routines are duplicated. The attached patch, which is sent
as an attachment to preserve whitespace, converts ipw2200.c to use
the ieee80211 versions, thereby reducing bloat in both the source
and binary.

Signed-Off-By: Larry Finger <Larry.Finger@lwfinger.net>
Signed-off-by: John W. Linville <linville@tuxdriver.com>
2006-03-17 14:01:34 -05:00
Kevin Corry 8ba32fde2c [PATCH] dm stripe: Fix bounds
The dm-stripe target currently does not enforce that the size of a stripe
device be a multiple of the chunk-size.  Under certain conditions, this can
lead to I/O requests going off the end of an underlying device.  This
test-case shows one example.

echo "0 100 linear /dev/hdb1 0" | dmsetup create linear0
echo "0 100 linear /dev/hdb1 100" | dmsetup create linear1
echo "0 200 striped 2 32 /dev/mapper/linear0 0 /dev/mapper/linear1 0" | \
   dmsetup create stripe0
dd if=/dev/zero of=/dev/mapper/stripe0 bs=1k

This will produce the output:
dd: writing '/dev/mapper/stripe0': Input/output error
97+0 records in
96+0 records out

And in the kernel log will be:
attempt to access beyond end of device
dm-0: rw=0, want=104, limit=100

The patch will check that the table size is a multiple of the stripe
chunk-size when the table is created, which will prevent the above striped
device from being created.

This should not affect tools like LVM or EVMS, since in all the cases I can
think of, striped devices are always created with the sizes being a
multiple of the chunk-size.

The size of a stripe device must be a multiple of its chunk-size.

(akpm: that typecast is quite gratuitous)

Signed-off-by: Kevin Corry <kevcorry@us.ibm.com>
Signed-off-by: Alasdair G Kergon <agk@redhat.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-17 07:51:25 -08:00
Christoph Hellwig 9b15879aef [PATCH] spidernet: select FW_LOADER
The spidernet drivers uses request_firmware() and thus needs to select
FW_LOADER.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2006-03-17 13:28:08 +11:00
Paul Mackerras 23dd640112 Merge ../linux-2.6 2006-03-17 12:01:19 +11:00
Jeff Garzik abc71c46dc Merge branch 'upstream-fixes' 2006-03-16 19:27:08 -05:00
Tejun Heo c39f5ebe0a [PATCH] libata: move IDENTIFY info printing from ata_dev_read_id() to ata_dev_configure()
Move IDENTIFY info printing from ata_dev_read_id() to
ata_dev_configure() and print only if @print_info is non-zero.  This
kills duplicate IDENTIFY info printing during probing.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-16 19:22:57 -05:00
Tejun Heo 1148c3a78a [PATCH] libata: use local *id instead of dev->id in ata_dev_configure()
dev->id is used many times in ata_dev_configure().  Use local variable
id instead for shorter notation.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-16 19:22:57 -05:00
Jeff Garzik 6e48f1b763 Merge branch 'master' 2006-03-16 19:22:42 -05:00
Scott Bardone 232a347a44 [netdrvr] fix array overflows in Chelsio driver
Adrian Bunk wrote:
> The Coverity checker spotted the following two array overflows in
> drivers/net/chelsio/sge.c (in both cases, the arrays contain 3
> elements):
[snip]

This is a bug. The array should contain 2 elements.  Here is the fix.

Signed-off-by: Scott Bardone <sbardone@chelsio.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-16 19:20:40 -05:00
David S. Miller c3d7a3a4eb [PATCH] e1000 endianness bugs
return -E_NO_BIG_ENDIAN_TESTING;

[E1000]: Fix 4 missed endianness conversions on RX descriptor fields.

Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-16 19:17:38 -05:00
John W. Linville dd288e7d75 Merge branch 'upstream-fixes' 2006-03-15 17:02:08 -05:00
Jesse Brandeburg aa49cdd93b e100: fix eeh on pseries during ethtool -t
Olaf Hering reported a problem on pseries with e100 where ethtool -t would
cause a bus error, and the e100 driver would stop working.  Due to the new
load ucode command the cb list must be allocated before calling
e100_init_hw, so remove the call and just let e100_up take care of it.

Signed-off-by: Jesse Brandeburg <jesse.brandeburg@intel.com>
2006-03-15 10:55:24 -08:00
Greg Smith e843e280cb [PATCH] "s390: multiple subchannel sets support" fix
It seems this patch got dropped (it was in addition to the `s390:
improve response code handling in chsc_enable_facility()' patch).

Acked-by: Cornelia Huck <cornelia.huck@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-14 21:43:02 -08:00
Mike Anderson a50a5e3792 [SCSI] scsi: move target_destroy call
This patch moves the calling of target_destroy next to the list_del. This
closed a race being seen while doing a device add on the aic7xxx.

Signed-off-by: Mike Anderson <andmike@us.ibm.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:36:00 -06:00
Moore, Eric 9dec70e053 [SCSI] fusion - bump version
version bump

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:35:34 -06:00
Moore, Eric e6b2d76a49 [SCSI] fusion - expander hotplug suport in mptsas module
This adds support for hot adding and removing
expanders, and its associated attached devices.
When there is a change in topology,
the fusion firmware sends the
MPI_EVENT_SAS_DISCOVERY event to the driver.
The driver will read firmware config pages
to determine what changes took place, and refresh
drivers view of the world stored in ioc->sas_topology.

Here is the details of the action the driver does:

(1) Expander Added :  The mptsas_discovery_work
workqueue is called.  Config pages read, and
ioc->sas_topology is refreshed.  The sas_phy_add()
is called for each phy of the expander.  The
expanders attached devices are added via
sas_rphy_add().  Added end devices are handled within
the MPT_ADD_DEVICE logic in  mptsas_hotplug_work
workqueue.

(2) Expander Delete : The sas_rphy_delete() will be
called for the top most compenent of the parent that the
expander is attached to.  The sas_rphy_delete call
will delete all the children phys, rphys, and end devices.
This is handled from mptsas_discovery_work workqueue.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:35:17 -06:00
Moore, Eric f44e5461d9 [SCSI] fusion - exposing raid components in mptsas
Suppport for exposing hidden raid components
for sg interface. The sdev->no_uld_attach flag
will set set accordingly.

The sas module supports adding/removing raid
volumes using online storage management application
interface.

This patch rely's on patch's provided to me
by Christoph Hellwig, that exports device_reprobe.
I will post those patch's on behalf of Christoph.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:35:01 -06:00
Moore, Eric db9c9174e4 [SCSI] fusion - memory leak, and initializing fields
Changelog:
(1) fix memory leak: p->phy_info
(2) initialize device_info and port_info data fields
(3) initialize the hba firmware handle
(4) initialize phy_id for attached phy_info data fields
(5) initialize attached phy_info data fields

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:34:45 -06:00
Moore, Eric 52435430fc [SCSI] fusion - exclosure misspelled
exclosure should be enclosure

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:34:25 -06:00
Moore, Eric 4b766471e3 [SCSI] fusion - cleanup mptsas event handling functions
Cleanup of mptsas firmware event handlers.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:34:08 -06:00
Moore, Eric 914c2d8e59 [SCSI] fusion - removing target_id/bus_id from the VirtDevice structure
It makes no sense in keeping the target_id and bus_id
in the VirtDevice structure, when it can be obtained
from the VirtTarget structure.

In addition, this patch fix's couple compilation bugs
in mptfc.c when MPT_DEBUG_FC is enabled. This
provided by Micheal Reed.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:33:38 -06:00
Moore, Eric c972c70fa0 [SCSI] fusion - static fix's
Patch previously provided from Adrian Bunk <bunk@stusta.de>,
moving some functions to static.  This is already in
the -mm tree.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:33:18 -06:00
Moore, Eric 3a892bef3f [SCSI] fusion - move some debug firmware event debug msgs to verbose level
Created a debug level MPT_DEBUG_VERBOSE_EVENTS.
Moving some of the more vebose debug messages
for firwmare events into new debug level.  Also
added some more firmware events descriptions.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:27:43 -06:00
Moore, Eric 5bf52c4fda [SCSI] fusion - loginfo header update
This header is provided to better understand
loginfo codes returned by the mpt fusion firmware.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:27:21 -06:00
Christoph Hellwig e5b3a65fd7 [SCSI] megaraid_sas: fix extended timeout handling
Replace the eh_timed_out method usage with setting sdev->timeout in
slave_configure.  Also only use the extended timeout for raid volumes,
physical devices shouldn't need it.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 14:18:51 -06:00
James Bottomley f33b5d783b Merge ../linux-2.6 2006-03-14 14:18:01 -06:00
Linus Torvalds 0f511ea706 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:
  [SCSI] zfcp: fix device registration issues
  [SCSI] scsi_transport_fc: fix FC_HOST_NUM_ATTRS
  [SCSI] scsi: aha152x pcmcia driver needs spi transport
  [SCSI] zfcp: correctly set this_id for hosts
  [SCSI] Add Brownie to blacklist
2006-03-14 11:03:50 -08:00
Moore, Eric e935d5da8e [SCSI] drivers/base/bus.c - export reprobe
Adding support for exposing hidden raid components for sg
interface. The sdev->no_uld_attach flag will set set accordingly.

The sas module supports adding/removing raid volumes using online
storage management application interface.

This patch was provided to me by Christoph Hellwig.

Signed-off-by: Eric Moore <Eric.Moore@lsil.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 12:50:44 -06:00
James Bottomley 79cb1819e2 [SCSI] add preliminary expander support to the sas transport class
This patch makes expanders appear as labelled objects with properties in
the SAS tree.

I've also modified the phy code to make expander phys appear labelled by
host number, expander number and phy index.

So, for my current config, you see something like this in sysfs:

/sys/class/scsi_host/host1/device/phy-1:4/expander-1:0/phy-1-0:12/rphy-1:0-12/target1:0:1

And the expander properties are:

jejb@sparkweed> cd /sys/class/sas_expander/expander-1\:0/
jejb@sparkweed> for f in *; do echo -n $f ": "; cat $f; done
component_id : 29024
component_revision_id : 4
component_vendor_id : VITESSE
device : cat: device: Is a directory
level : 0
product_id : VSC7160 Eval Brd
product_rev : 4
uevent : cat: uevent: Permission denied
vendor_id : VITESSE

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-14 12:36:19 -06:00
Dave Peterson ceb2ca9cb0 [PATCH] EDAC: disable sysfs interface
- Disable the EDAC sysfs code.  The sysfs interface that EDAC presents to
  user space needs more thought, and is likely to change substantially.
  Therefore disable it for now so users don't start depending on it in its
  current form.

- Disable the default behavior of calling panic() when an uncorrectible
  error is detected (since for now, there is no sysfs interface that allows
  the user to configure this behavior).

Signed-off-by: David S. Peterson <dsp@llnl.gov>
Cc: Greg KH <greg@kroah.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-14 07:57:18 -08:00
Benjamin Herrenschmidt 63e1fd41c7 [PATCH] macintosh: correct AC Power info in /proc/pmu/info
Report AC Power present in /proc/pmu/info if there is no battery.

Signed-off-by: Olaf Hering <olh@suse.de>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>,
Cc: Paul Mackerras <paulus@samba.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-14 07:57:17 -08:00
Michael Hunold 6acaba8e22 [PATCH] Restore tuning capabilities in V4L2 MXB driver
The behaviour of the all-in-one Video4Linux tuner driver apparently
changed.  It now wants to know the tv standard, otherwise it refuses to
tune.

Restore tuning functionality in my driver for the "Multimedia eXtension
Board".  The all-in-one tuner driver apparently changed its behaviour.

Signed-off-by: Michael Hunold <hunold@linuxtv.org>
Cc: Mauro Carvalho Chehab <mchehab@infradead.org>
Cc: Johannes Stezenbach <js@linuxtv.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-14 07:57:17 -08:00
David Brownell 3cb4f09fc2 [PATCH] mtd_dataflash, fix block vs page erase
Fix a bug in the block-erase optimization for Dataflash; it was using block
erase even for smaller segments that need page erase.

That wouldn't matter for JFFS2, which never erases less than one block
(sometimes several blocks), but for other callers it might.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Acked-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-14 07:57:17 -08:00
James Smart c829c39416 [SCSI] FC transport : Avoid device offline cases by stalling aborts until device unblocked
This moves the eh_timed_out functionality from the scsi_host_template
to the transport_template. Given that this is now a transport function,
the EH_RESET_TIMER case no longer caps the timer reschedulings. The
transport guarantees that this is not an infinite condition.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-13 08:58:58 -06:00
Linus Torvalds 57ddd5c180 Merge branch 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev
* 'upstream-fixes' of master.kernel.org:/pub/scm/linux/kernel/git/jgarzik/libata-dev:
  [PATCH] ahci: fix NULL pointer dereference detected by Coverity
2006-03-12 16:41:27 -08:00
Tejun Heo fb21f0d0ec [PATCH] libata: check Word 88 validity in ata_id_xfer_mask()
Check bit 2 of Word 53 for Word 88 validity before using Word 88 to
determine UDMA mask.  Note that the original xfer mask implementation
using ata_get_mode_mask() didn't consider bit 2 of Word 53.  This
patch introduces different (correct) behavior.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-12 12:51:11 -05:00
Tejun Heo 2044470ccc [PATCH] libata: fix class handling in ata_bus_probe()
ata_bus_probe() didn't set classes[] properly for port disabled case
of ->phy_reset() compatibility path.  This patch moves classes[]
initialization and normalization out of ->probe_reset block such that
it applies to both ->probe_reset and ->phy_reset paths.

Signed-off-by: Tejun Heo <htejun@gmail.com>
Signed-off-by: Jeff Garzik <jeff@garzik.org>
2006-03-12 12:49:45 -05:00
James Bottomley ce313db240 [SCSI] mptscsih: remove unused page 1 setting function
It was actually rendered unused by the move to the spi transport
class, but never taken out.

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 10:02:15 -06:00
James Bottomley 597705aa7f [SCSI] fix minor problem in spi transport message functions
The check for a one byte message should be msg[0] == 0x55 not msg == 0x55

Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:54:19 -06:00
Adrian Bunk a1d4f73a00 [SCSI] sim710: fix a NULL pointer dereference
This patch fixes a NULL pointer dereference spotted by the Coverity
checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:46:23 -06:00
Adrian Bunk a6becb084d [SCSI] ibmmca: fix a NULL pointer dereference
The variable was dereferenced only if it was NULL (sic)...

Spotted by the Coverity checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:46:11 -06:00
Adrian Bunk c3c026ba5a [SCSI] dmx3191d: fix a NULL pointer dereference
This patch fixes a NULL pointer dereference spotted by the Coverity
checker.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:45:56 -06:00
Adrian Bunk 8800727ae8 [SCSI] NCR_D700: fix a NULL dereference
The Coverity checker spotted this NULL dereference.

Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:45:43 -06:00
Matthew Wilcox 72df0ebf95 [SCSI] Missing names from SPI3, SPI4 and SPI5
Add several missing messages from SPI3, SPI4 and SPI5:
 - Terminate Process
 - Continue Task
 - Target Transfer Disable
 - Clear ACA
 - LUN Reset
 - ACA
 - QAS Request
Rename some older commands to their SPI5 names:
 - Command Complete -> Task Complete
 - Abort -> Abort Task Set
 - Bus device Reset -> Target Reset
 - Clear Queue -> Clear Task Set

Change spi_print_msg() to always consume one byte, even if we don't
recognise it.  That allows drivers to call it in a loop to print all
messages.

Signed-off-by: Matthew Wilcox <matthew@wil.cx>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:44:46 -06:00
Andrew Vasquez 1757b67809 [SCSI] qla2xxx: Firmware updates.
Resync with latest 23xx firmware -- 3.03.20.
Resync with latest 24xx firmware -- 4.00.18.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:44:17 -06:00
Andrew Vasquez d584486a1c [SCSI] qla2xxx: Remove legacy ISP6312 firmware loader.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:42:33 -06:00
andrew.vasquez@qlogic.com 9a52a57cb9 [SCSI] qla2xxx: Correct FCAL login retry logic for ISP24xx.
ISP24XX FW does not support Mbx 0x74 ie Login Local Port.
Added the equivalent code for ISP24XX ie to relogin in non
fabric case for ISP24XX use login iocb.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:40:37 -06:00
andrew.vasquez@qlogic.com 4a59f71d7f [SCSI] qla2xxx: Further restrict ZIO mode support.
Only support ZIO mode 6 on specific ISP types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:40:13 -06:00
andrew.vasquez@qlogic.com 6f6417905c [SCSI] qla2xxx: Add VPD sysfs attribute.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:39:55 -06:00
andrew.vasquez@qlogic.com fdbc6833c5 [SCSI] qla2xxx: Correct swing/emphasis settings on ISP24xx.
Reserved-bit 15 must set when updating the swing/emphasis values.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:39:36 -06:00
andrew.vasquez@qlogic.com 1328962eb4 [SCSI] qla2xxx: NVRAM id-list updates.
Resync with latest NVRAM subsystem ID list.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:38:42 -06:00
andrew.vasquez@qlogic.com 48c02fde94 [SCSI] qla2xxx: Consolidate ISP63xx handling.
As new 23xx firmware will accomidate ISP63xx types.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:38:22 -06:00
andrew.vasquez@qlogic.com 044cc6c8ec [SCSI] qla2xxx: Add ISP54xx support.
Chip is similar in form to our ISP24xx offering.

Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:38:03 -06:00
andrew.vasquez@qlogic.com ea5b6382fd [SCSI] qla2xxx: Convert IS_QLA*() defines to bit-operations.
Signed-off-by: Andrew Vasquez <andrew.vasquez@qlogic.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:37:24 -06:00
Dave Jones 93f5608989 [SCSI] fix two leaks in scsi_alloc_sdev failure paths
If the scsi_alloc_queue or the slave_alloc calls in scsi_alloc_device fail,
we forget to release the locally allocated sdev on the failure path.

Coverity #609

Signed-off-by: Dave Jones <davej@redhat.com>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:25:40 -06:00
Ralf Baechle a0b6b6e530 [SCSI] Make sgiwd93_detect and sgiwd93_detect static.
Nothing outside sgiwd93.c references them.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:24:55 -06:00
Alexey Dobriyan 5c1b85e209 [SCSI] drivers/scsi/FlashPoint.c: don't use parenthesis with "return"
Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:18:47 -06:00
Alexey Dobriyan 5c04a7b898 [SCSI] drivers/scsi/FlashPoint.c: Lindent
It's much, much more readable now.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-03-12 09:18:15 -06:00