Summary of changes from v2.6.5-rc1 to v2.6.5-rc2 ============================================ input: Fix hid-core for devices that have less usages than values in a hid report. We could iterate beyond the end of array of usages before. input: Add a new ioctl to hiddev, which allows multiple usages to be set in a single request. Also fixes sizes of fields in hiddev structs to use _uXX types. input: It looks like the Saitek RumblePad needs a BADPAD entry. input: Add support for another a4tech 2-wheel USB mouse, with a Cypress ID this time. Also rearrange the HID blacklist a bit - it has grown too long. usb: Minor documentation fix reflecting new USB module names in acm.txt input: Fix sunkbd.c to work with serport. Must sleep. input: Use request_region() instead of check_region() in ns558.c it's both safer and correct. input: Bail out in atkbd.c if scancode set is changed, don't reinitialize scancode map. This is even more anoying than a new keyboard device in the unlikely case of set change. input: Add support for scroll wheel on MS Office and similar keyboards. input: Create an extra option for enabling IBM RapidAccess keyboard special features (atkbd.extra), instead of abusing the atkbd.set option for this. input: Convert HP/PARISC Lasi/Dino PS/2 keyboard/mouse driver from an input driver to a serio driver. input: Credit to Panagiotis Issaris for Graphire 3 support. input: Remove the obsolete "busmouse.c" helper driver. input: Fix "psmouse: Lost sync" problem. It was really losing sync. input: Fix a warning in i8042.c input: Fix a bug introduced by Andrew Morton's gcc3.2 fixes. input: Re-add a loop to set the old scancode bit in device key bitmap. [PATCH] USB Storage: unusual_devs.h update On Thu, 19 Feb 2004, Evan Felix wrote: > I plugged a Cyclades AlterPath BIO USb device into my linux 2.6.2 laptop > and it asked me to send you this: > > > hub 1-1.2:1.0: new USB device on port 3, assigned address 6 > hub 1-1.2.3:1.0: USB hub found > hub 1-1.2.3:1.0: 4 ports detected > hub 1-1.2.3:1.0: new USB device on port 1, assigned address 7 > hub 1-1.2.3:1.0: new USB device on port 2, assigned address 8 > Initializing USB Mass Storage driver... > usb-storage: This device (05dc,0001,0001 S 06 P 50) has an unneeded > SubClass entry in unusual_devs.h > Please send a copy of this message to > > scsi0 : SCSI emulation for USB Mass Storage devices > Vendor: Lexar Model: Jumpshot USB CF Rev: 0001 > Type: Direct-Access ANSI SCSI revision: 02 Thank you for sending this. Greg, here's the patch. [PATCH] USB Storage: update unusual_devs.h comments On Tue, 24 Feb 2004, Matthew Dharm wrote: > We should also put a comment into the unusual_devs.h file to make sure > nobody tries to remove the protocol override in the future. How about this? [PATCH] USB: Fix a bug in the UHCI dequeueing code On Mon, 23 Feb 2004, Stephen Hemminger wrote: > Great, the kernel with this patch ran successfully all weekend. Looks like no > more races in the unlink path. Wonderful. Thanks a lot for all your SMP testing, it's been a big help. This patch corrects an error in the dequeueing code for UHCI. Improper locking caused it to hang in the oddball case where an URB was unlinked even before it had been queued. [PATCH] USB: Enable interrupts in UHCI after PM resume On Mon, 23 Feb 2004, Chip Salzenberg wrote: > It works ... perfectly! I can now suspend and resume my A30 with > impunity, and the USB keyboard works fine after each resume. > > Thanks much, Alan. > > (Now if I could just get the alsa guys to fix snd-intel8x0...) This patch re-initializes the UHCI Interrupt Enable register following a PM resume. Apparently some systems clear the register during suspend, which causes obvious problems later on. [PATCH] USB: Return better result codes in UHCI This patch changes the result code returned by the UHCI driver for a certain class of errors. Under a number of circumstances a USB device is obliged to send a response packet within a fairly short turn-around time, typically 1 - 10 microseconds depending on the bus speed. Failure to do so is a protocol error and should be reported as such, not as a timeout, which is really a higher-level concept. I believe the EHCI driver already does this. I trust nobody will object to the update this patch adds to Documentation/usb/error-codes.txt, making this more explicit. In a vaguely related change, the patch corrects the terminology in a few comments. The parts of a control transfer are called "stages", not "phases". [PATCH] USB: Remove name obfuscation in UHCI On Mon, 23 Feb 2004, Stephen Hemminger wrote: > Bulk and interrupt urb's share common irq processing, why does the > code try to obfuscate it? Quite right; this is needless complexity. (But note you left in a couple of lines that should have been deleted.) [PATCH] USB: Use list_splice instead of looping over list elements This patch is from Stephen Hemminger. I modified it slightly to place the new elements at the end of the complete_list instead of at the front. On Tue, 24 Feb 2004, Stephen Hemminger wrote: > Since the remove_list and complete_list now use the same element for > linking, it is possible to use the list_splice inline to avoid > having to loop over all the urb's [PATCH] USB Storage: DSC-T1 unusual_devs.h entry Our friends at sony are at it again. The DSC-T1 needs a new entry. Note that it's the same VID & PID as the last entry, but different version. [PATCH] USB Storage: Fix for Fuji Finepix 1400 This patch changes some error checking so that some bogus devices (like the Fuji Finepix 1400) will work. This is basically relaxing a test on a field that the spec says "should always be zero" [PATCH] USB Storage: Remove unneeded macro This one-liner removes an unneeded macro. [PATCH] USB Storage: tighten sense-clearing code This patch tightens up the conditions under which an auto-sense will be cleared. It also fixes the comment associated with the code. [PATCH] USB Storage: remove unneeded debug message Nothing in life is assured... [PATCH] USB: add IRTrans support to ftdi_sio driver [PATCH] USB: Fix for kl5kusb105 driver I tried using the kl5kusb105 driver for a 3Com PalmConnect USB device I had lying around. It oopses during device detection. There is a nested loop using the same loop counter as the outer loop - causing the code after the nested loop is first executed to have an invalid counter. The counter is then used as an array index, causing a NULL deref. Fix attached. [PATCH] USB Storage: Remove Minolta Dimage 7i from unusual_devs.h On Fri, 27 Feb 2004, Lenar Lõhmus wrote: > Hi, > > Got this: > > usb 3-1: new full speed USB device using address 3 > usb-storage: This device (0686,400b,0001 S 06 P 50) has an unneeded SubClass entry in unusual_devs.h > Please send a copy of this message to Well, Martin Pool notwithstanding (see http://marc.theaimsgroup.com/?l=linux-usb-devel&m=107642806303815&w=2 ), it sure looks like this doesn't need an unusual_devs.h entry. Greg, please apply this patch. [PATCH] USB: usbnet learns about Zaurus C-860 New Zaurus ID, from Sven Trampel [PATCH] USB Gadget: gadget config buffer utilities Adds two new gadget-side utility functions, to support a declarative style of managing usb configuration descriptors. The functions fill buffers from null-terminated vectors of usb descriptors, which are simple to build or update. The "ethernet" gadget driver currently has the most interesting config descriptors. This uses those functions to replace some complex code with simpler static declarations; result, it's cleaner. (And it'll be easier to add RNDIS configurations later, too.) Memory savings (or cost, depending on config) was less than 50 bytes; nothing worth worrying about. [PATCH] USB: EHCI and full-speed ISO-OUT This is a minor update to the patch I sent out about a week ago. The key change is to use the I/O watchdog while doing ISO streaming. Bernd Porr reports that a VT8235 system needs that; it seems like IDE activity can interfere with the delivery of USB IRQs. EHCI periodic scheduling updates. - Initial version of full speed ISO transaction support. This should handle OUT transactions, such as those for usb speakers. For now, it's controlled using an EXPERIMENTAL config option: * I've run into interesting differences in how different USB 2.0 hub silicon (the transaction translators) handle some older audio devices. Needs more investigation. * Interrupt transfer scheduling doesn't yet cope well with schedules where every slot already has activity. For now, don't plug in devices like hubs, mice, or keyboards while EHCI is streaming. - Protect freelist for highspeed ITDs, using spinlock. Could be an issue for some drivers. - Kick in the I/O watchdog timer (5 msec) for periodic transfers. In this case, IDE activity on a VT8235 lost the IRQs which should have kept the ISO stream active. Queues shorter than 5 msec are not going to work on all USB hosts. - Simplified the ISO scheduler: doesn't attempt to re-schedule after lossage, or to short-circuit scanning. (Rescheduling will probably come back later ... for now, the "hard" error here is highlighting problems that need attention.) USB: delete unneeded scanner documentation. [PATCH] USB: add driver for ATI USB/RF remotes I've taken the old GATOS version of the ati_remote driver and done some cleanup/rework of it while porting to 2.6 kernels. [PATCH] USB: kbtab.c (Jamstudio Tablet) with optional pressure I have altered kbtab.c a bit in anticipation of an XFree86 4.3 driver that can accept the pressure data (as a third axis) by listening on the event interface. I have set it so that if the option kb_pressure_click is -1 it reports pressure rather than clicks. [PATCH] USB: add new USB Touchscreen Driver I have attached a patch which contains a driver and documentation for the MicroTouch (14-206) USB Capacitive Touchscreen controller. It based on some older code that I have been using for quite some time now (since 2.4.17). This new version has been completely re-written, and now uses Linux Input. Greg, It would be great to possibly get it into 2.6.4. Please let me know if I have it all wrong... Unfortunately, the X11 mouse driver only seems capable of handling relative data rather than absolute. Hopefully some one will create a suitable X11 driver capable of accepting absolute data from Linux Input. If anyone is aware of one, please let me know. Otherwise, I will most likely begin some work on a patch for GPM. Calibration support will be on the way soon, but I'm not sure of the best way to implement. Perhaps some abstract functions could come available in evdev which can call vendor specific commands for the calibration within this driver (and perhaps others). [PATCH] USB: fix build for older versions of gcc and the mtouchusb driver. [PATCH] USB: fix up the input Makefile after these last few drivers were added. [PATCH] USB: update driver for ATI USB/RF remotes [PATCH] USB ati_remote.c: don't be a namespace hog `debug', indeed. [PATCH] USB: C99 initializers for drivers/usb/serial/keyspan.h Here's a small patch changing the GNU-style initializers to C99 initializers. The patch is against the current BK. [PATCH] USB Storage: unusual devs fix for Pentax cameras. Please apply the attached patches instead. People have tried it on several different Pentax cameras (including 330 GS) [PATCH] USB Storage: unusual_devs.h entry submission here is an unusual_devs.h entry which makes two different USB MP3 players work with Linux' USB storage driver. They share a core chip, the t33520 USB flash card controller by Trumpion microelectronics. They also share the same ID 0x090a:0x1001, which is a "generic" ID for t33520 devices using bulk-only protocol (0x1002 is for CB). About the MP3 players: - I own an apparently unbranded one (sold in masses on ebay.de) which needs US_FL_MODE_XLATE (and used to need US_FL_START_STOP before its removal). - Theodore Kilgore (who created the 0x090a:0x1001 record in the Linux-USB device overwiew) has a "Trumpion Digital Research MYMP3" which needs US_FL_MODE_XLATE and an explicit US_PR_BULK. Of course the different players report the same firmware rev. 1.00, despite their obviously different behaviour. Ugh. There are more players with this ID, the "Kaser Yofun 100 MP-3" (also rev. 1.00) being one. The proposed entry may or may not help them, but it shouldn't break working ones in any case. It is not unlikely they too will need US_FL_MODE_XLATE. Below you'll find my /proc/bus/usb/devices with mounted MP3 player and a patch against 2.4.25-rc3. Please apply. ----------------8<-------------------------8<-------------------- T: Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#= 1 Spd=12 MxCh= 2 B: Alloc= 0/900 us ( 0%), #Int= 0, #Iso= 0 D: Ver= 1.00 Cls=09(hub ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=0000 ProdID=0000 Rev= 0.00 S: Product=USB UHCI Root Hub S: SerialNumber=e400 C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 1 Cls=09(hub ) Sub=00 Prot=00 Driver=hub E: Ad=81(I) Atr=03(Int.) MxPS= 8 Ivl=255ms T: Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=090a ProdID=1001 Rev= 1.00 C:* #Ifs= 1 Cfg#= 1 Atr=80 MxPwr= 60mA I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=81(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=02(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=255ms ----------------8<-------------------------8<-------------------- [PATCH] USB: visor patch for Samsung SPH-i500 Hi... here is a patch for the vendor/device codes for the Samsung SPH-i500 Palm phone. [PATCH] USB Storage: Revision of as202, Genesys quirk patch In the slave_configure routine it's already too late for the host's max_sector value to affect the scsi_device. It's necessary to set the queue value directly. This revised patch takes care of that. input: Add serio entries for LK keyboards. Atkbd: whitespace fixes Atkbd: Clean up unclean merge (remove old MODULE_PARMs) Input: Switch between strict/relaxed synaptics protocol checks based on data in the first full data packet. Having strict checks helps getting rid of bad data after losing sync, but not all harware implements strict protocol. Psmouse: whitespace fixes Psmouse: some hardware does not ACK "disable streaming mode" command. Since we already have an idea that it's a mouse device that is present (from its response to GET ID command), instead of aborting, issue a warning and continue. Introduce module_param_array_named to allow for module options with name different form corresponding array variable. Allows using short (but descriptive) option names without hurting code readability. Modeled after module_param_named. Input: Convert joystick modules to the new way of handling parameters and document them in kernel-parameters.txt The new names are: amijoy.map=, analog.map=,,... db9.dev[2|3]=, gamecon.map[2|3]=,,,... turbografx.map[2|3]=,,,... Also there is a tiny change to mousedev and tsdev descriptions in kernel-parameters, but no name changes. Setup: introduce __obsolete_setup macro to denote truly obsolete parameters. Whenever such parameter is specified kernel will complain that "Parameter %s is obsolete, ignored" Input: use __obsolete_setup to document removed (renamed) options so users will have a clue why the options do not work anymore input: Workaround i8042 chips with broken MUX mode. input: Only do hotplug on PS/2 HW when the HW sends 0xaa. This avoids problems with broken USB->PS/2 legacy emulation in certain BIOSes. input: i8042.c: Assume the chip always is in XLATE mode, even when it doesn't have the XLATE bit set - apparently IBM PS/2 model 70 behaves this way. input: Add DEC LK201/LK401 keyboard support input: Add driver for DEC VSXXX mice. [PATCH] USB Gadget: make usb gadget strings talk utf-8 Teach gadget/usbstring to expect UTF-8 strings, not ISO-8859/1 ones. This just gets rid of an API issue: no hacks needed for non-Western languages, and multi-language support will be lots easier. Current drivers won't notice the API change, they use US-ASCII (which is a strict superset of both encodings). Future drivers may want to teach utf8_to_utf16le() about the four-byte encodings, so they can emit surrogate pairs for those Unicode characters. [PATCH] USB: USB OSS audio driver workaround for buggy descriptors [PATCH] USB: Don't add/del interfaces, register/unregister them On Fri, 27 Feb 2004, Greg KH wrote: > On Wed, Feb 25, 2004 at 10:05:37AM -0500, Alan Stern wrote: > > > Why would anyone want to do this, you ask? Well the USB subsystem does it > > already. Each USB device can have several configurations, only one of > > which is active at any time. Corresponding to each configuration is a set > > of struct devices, and they (together with their embedded kobjects) are > > allocated and initialized when the USB device is first detected. The > > struct devices are add()'ed and del()'ed as configurations are activated > > and deactivated, leading to just the sort of call sequence shown above. > > Then we need to fix this. The driver model does not support repeated device_add(), device_del(), device_add(), device_del(), ... calls for the same device. But that's what happens to an interface's embedded struct device when we change configurations. Accordingly, this patch changes the device_add()/device_del() calls for interfaces to device_register()/device_unregister(). When the interface is unregistered the new code waits for the release method to run, so that it will be safe to re-register the interface should the former configuration be reinstated. Greg, please check this out to make sure I haven't made some dumb mistake. It works on my system and it fixes a memory leak in the USB system. [PATCH] USB: Improve handling of altsettings On Sat, 21 Feb 2004, Greg KH wrote: > > One thing that would be good, whether this change gets made or not, is to > > remove all assumptions from drivers about the order in which interfaces > > are stored (use usb_ifnum_to_if()) and the order in which altsettings are > > stored (replace intf.act_altsetting with a pointer and create > > usb_altnum_to_alt() analogous to usb_ifnum_to_if()). There are plenty of > > drivers that will need to be fixed up. > > I'd be glad to take patches to fix up any drivers that still have this > problem right now. Here's a start. This patch begins the conversion process by adding usbcore support for cur_altsetting and deprecating act_altsetting. So long as we assumed that altsetting numbers range from 0 to num_altsetting-1 and that the number matches its index in the altsetting array, there was no harm in using act_altsetting. But without that assumption act_altsetting is merely an invitation to errors. Although the kerneldoc says that act_altsetting is the _index_ of the active altsetting, it's all too easy to confuse it with the _number_ of the active altsetting. Using cur_altsetting instead (a pointer rather than a number) will prevent that confusion. Until all the drivers have been converted to use cur_altsetting, the core will have to maintain act_altsetting in parallel with it. Eventually we will be able to remove act_altsetting, but fixing all the drivers will take a while. Included in this patch: Add cur_altsetting to struct usb_interface and deprecate act_altsetting. Add comments and kerneldoc explaining the changes. Also remove the comments in front of struct usb_host_config (they seem to have been left behind when usb_ch9.h was split out) and add kerneldoc for that structure. Add usb_altnum_to_altsetting() to help look up altsettings based on their number. Convert the usb_set_interface(), usb_set_configuration(), and usb_reset_configuration() routines to support cur_altsetting and act_altsetting in parallel. Convert a few others to use cur_altsetting rather than act_altsetting. Rename a few local variables to make their meaning a little clearer. It would be nice to change struct usb_host_interface to something like usb_host_altsetting, but that's a patch for another time. [PATCH] USB: Convert usbcore to use cur_altsetting This patch continues the work of as209 by converting the rest of usbcore to use cur_altsetting in place of act_altsetting. The changes required are fairly small, just in the sysfs attributes and hub configuration. [PATCH] USB: Small improvements for devio.c devio.c doesn't need to be changed to support the new altsetting mechanism, but while looking through it I noticed a couple of places that could be improved slightly. Here they are, just removal of some redundant tests (all altsettings for the same interface are guaranteed to have the same bInterfaceNumber) and function calls. [PATCH] USB: Convert usb-storage to use cur_altsetting I'm beginning the process of converting device drivers to use cur_altsetting with usb-storage, the one I know best. Only a few changes are needed (and the first one isn't even really necessary). [PATCH] USB: Convert usbtest to the new altsetting regime This patch converts the usbtest driver to the new way altsettings work. The largest change is to remove the assumptions that altsetting numbers lie in the correct range (a debugging message is logged if they don't but execution doesn't stop) and that the array is sorted by number. [PATCH] USB: remove act_altsetting usages in the remaining drivers/usb/ drivers [PATCH] USB: remove act_altsetting usages in more USB drivers [PATCH] USB: remove intf->act_altsetting altogether from the USB core and usb.h [PATCH] USB: HCD names, for better troubleshooting See the attached patch -- which restores the behavior of usbcore to what it had before "struct device.name" went away, in the (typical) case of PCI devices. It makes the root hubs say what hardware they're actually using, in the reasonably typical case that PCI names are in use, rather than being just generic (and hence almost useless) strings. This sort of information can really help when troubleshooting. input: Add a NEC USB gamepad to badpad blacklist. input: HID needs to distinguish between two types of A4Tech two-wheel mice. input: Fix i8042 PS/2 mouse on ARM. input: Update the Wacom driver to latest version from Ping Cheng from Wacom. input: Add support for devices which need some padding at the end of a HID report. input: Fix a memory leak in ns558.c input: Add a Chic gamepad into badpad quirk list. input: Don't define DEBUG in hid-ff by default. It spews messgaes even when no FF device is present. input: Restore LED state in atkbd.c after resume. input: Fix oops (NULL pointer dereference) on resume in psmouse.c, when the mouse goes away while sleeping. merge fixups with irda usb code USB: fix the pcwd_usb driver due to act_altsetting going away. USB: fix usb-serial core to look at the proper interface descriptor [PATCH] USB: Update USB class drivers This patch makes the necessary updates to the bluetty, cdc-acm, and usblp class drivers for the new interface/altsetting paradigm. The changes are quite small. Unfortunately, the audio and usb-midi drivers are in much worse shape. They will require more in-depth hacking, to come later... [PATCH] USB: Remove interface/altsettings assumption from audio driver This patch updates the USB audio class driver to use the usb_ifnum_to_if() and usb_altnum_to_altsetting() routines, thereby removing assumptions about which interface or altsetting is stored in which array entry. It also simplifies the driver's probe() routine by using the raw configuration descriptor already loaded into memory instead of reading the descriptor from the device. Now, either the current driver has a bug and never deallocates the buffer used to hold the descriptor, or else I've introduced a double-free error. There's no obvious place where the buffer gets freed, but it's hard to be certain. It would be good if someone could try out this patch. I can't test it, not having any USB audio devices handy. If the double-free error is present, it will show up when the device is disconnected and the configuration data is released. [PATCH] USB UHCI: restore more state following PM resume Some systems don't save the internal state of the UHCI registers across a PM suspend/resume cycle very well. This patch saves & restores the Frame Number and the Framelist Base Address registers (in addition to the Interrupt Enable register, which was added separately in a recent patch.) [PATCH] USB: Interface/altsetting update for ISDN hisax driver On Mon, 8 Mar 2004, Greg KH wrote: > Oh, could you look at drivers/isdn/hisax/hfc_usb.c if you get a chance? > I tried to figure out the mess there with regards to act_altsetting, but > gave up :( You're right, it is a mess. Beats me why they didn't use a plain old "for" statement to do that altsetting loop. Probably the most confusing part is where the code needlessly resets intf->act_altsetting. Anyway, this patch sets things right. I haven't tried to compile it, but any errors ought to be pretty small, obvious, and easy to fix. My intention was to go through the files under driver/usb (in alphabetical order!) and then do the ones outside that subtree -- I've got a little list. But it's no problem to take care of this one first. [PATCH] USB: fix compiler warning in hfc_usb.c driver. [PATCH] USB brlvger: Driver obsoleted by rewrite using usbfs We have rewritten the brlvger (Tieman Voyager USB Braille display) driver so that it works from user-space through usbfs. It appears to work just as well as the in-kernel driver. The brlvger driver in the 2.6.x kernel is now obsolete and should be removed. The attached patch against 2.6.3 does this. Please apply. NB: The following files are completely deleted: Documentation/usb/brlvger.txt drivers/usb/misc/brlvger.c include/linux/brlvger.h The new Voyager driver is available (stil under GPL) as part of BRLTTY, starting with version 3.5pre1 (http://mielke.cc/brltty). Thanks to Dave Mielke who implemented BRLTTY's usbfs functionality, among lots of other stuff. [PATCH] USB: 2.6 pegasus.h updates a few more IDs added, could you please apply it? [PATCH] USB: usbnet and ALI M5632 Some of the 480 Mbit/sec USB host-to-host links have ALI chips in them. They seem to work with no problem, given this patch, even when the ends talk different speed. [PATCH] USB: gadget config buf utilities Somehow I sent you a version of this code with a misplaced semicolon ... it makes for awkward failures! Please merge. Bad semicolon! [PATCH] USB: clarify CONFIG_USB_GADGET Marc-Christian Petersen wrote: > > I think the attached patch is needed to stop showing us USB Gadget support if > Support for USB is disabled. No it isn't. But maybe the attached patch would clarify what's really going on: CONFIG_USB is the host side, and CONFIG_USB_GADGET is the peripheral side. input: Avoid an endless loop in hid-core.c, if a device has some empty reports. input: When reading input reports from a device via the ctrl pipe, set idle time of the device. This makes buggy devices which take the idle time into account for the ctrl pipe work. [PATCH] USB: fix stack usage in pl2303 driver Arghh - while trying to follow this I just realized the pl2303 is DMA'ing to the stack - not good! Could you please just try with the patch below. I'm not sure if this might cause the MA620 trouble but it's definedly a bug and maybe it improves things for you... [PATCH] USB: locking fix for pid.c you forgot to drop a spinlock before you report an error. A deadlock will occur. [PATCH] USB: Remove interface/altsetting assumptions from usb-midi This patch makes the usb-midi driver use usb_ifnum_to_if(), thereby removing assumptions about which interface is stored in which array entry. Similarly, it stores the bAlternateSetting value rather than the array index for an altsetting entry. Like the earlier patch for the audio driver, this also changes the driver to use the in-memory rawdescriptor buffer rather than reading a configuration descriptor from the device. Unlike that earlier patch, this time there's no question that the deallocation of the buffer is done correctly. (I suspect the audio driver just left out a call to kfree.) [PATCH] USB: fixes for aiptek driver - don't pass buffers allocated on stack to the sync helpers - check errors in probe - fix count in open - proper macros [PATCH] USB: bug in error code path of kbtab driver this fixes - a leak in the error code path of open() - removes SLAB_ATOMIC where it isn't needed - uses le16_to_cpu (yes Pete, unaligned access is taken care of) [PATCH] USB: wacom driver fixes the same error code path as in the other drivers. In addition I added the endianness macros. They save cycles in interrupt. -use endian macros -use GFP_KERNEL where SLAB_ATOMIC is not needed -fix count bug in open() error path [PATCH] USB_STORAGE: remove a comment In 2.6, USB_STORAGE selects SCSI, so there's no longer a need for this comment. [PATCH] USB: remove USB_SCANNER MAINTAINERS entry When sending the patch to remove USB_SCANNER, I forgot to remove the MAINTAINERS entry. [PATCH] USB: fix net2280 section usage net2280_remove() is called by net2280_probe() so it shouldn't be marked as __exit; [PATCH] USB: usbcore doc update Some doc updates, mostly from Alan Stern, clarifying quetions folk have asked recently about unlinking and about iso transfers. [PATCH] USB gadget: dualspeed {run,compile}-time flags This is the first several autoconfig patches; please merge. This particular one abstracts dual-speed (high and full) support. Support some more autoconfiguration for gadget drivers. Run-time: * Add gadget->is_dualspeed flag for controllers to set. * Tested by "ethernet" gadget, to decide whether certain operations are errors or not. * Turned on by net2280. Compile-time * Generic CONFIG_USB_GADGET_DUALSPEED, not net2280-specific. * Used by "ethernet" gadget, to decide whether to include extra code and data for dual-speed support. * Turned on by net2280. The basic idea behind this, and other autoconfig patches yet to come, is minimizing the controller-specific compile-time configuration needed by gadget drivers. [PATCH] USB: usb_unlink_urb() has distinct "not linked" fault This gets rid of an often-bogus diagnostic, and lets at least the unlink test code recover reasonably when it hits that brief window while another CPU has gotten the complete() callback but hasn't yet resubmitted. Return distinct code when unlinking an urb that's not linked. This lets drivers handle this fault sanely, when they need to. Gets rid of annoying non-error messages about drivers that unlink in disconnect() even when the urb isn't linked. [PATCH] USB: usbtest updates (new firmware) This includes some small updates to "usbtest", mostly from Martin Diehl. Please merge. usbtest updates, supporting new firmware - Support the new usbtest_fw-20040305 EZ-USB firmware, which renumerates and handles full speed ISO transfers. (From Martin Diehl.) - Minor cleanups: use dev_dbg(), let some slightly-off devices work in the control queueing test. - Be pickier about unlink tests: insist that async and sync unlinks give the appropriate fault code. [PATCH] USB: usb buffer allocation shouldn't require DMA Deepak's recent dma_pool changes accidentally assumed that all HCDs use DMA. The fix is simple: use kmalloc/kfree when there's no DMA. [PATCH] USB gadget: gadget zero, simplified controller-specific configuration This removes several controller-specific #define, and converts to using the config_buf utilities. Depends on the patch I submitted yesterday. Looking simpler! Simplify "gadget zero" compile-time configuration. This removes several controller-specific compile-time config options; the others are about to be autoconfigured. - HIGHSPEED replaced by CONFIG_USB_GADGET_DUALSPEED - Default to self-powered operation - There's no UI for remote wakeup It also uses the new config_buf utilities, so it's a bit easier to see what's really going on (this driver implements four configurations). [PATCH] USB: unusual_devs.h update *** linux-2.6.3/drivers/usb/storage/unusual_devs.h 2004-02-18 04:59:06.000000000 +0100 [PATCH] USB: Altsetting/interface update for USB image drivers This patch contains minute updates for the hpusbscsi, mdc800, and microtek drivers. Only two things are worth noting. In the mdc800 driver I removed some unnecessary calls to usb_driver_claim_interface(), usb_driver_release_interface(), and usb_set_interface(). Likewise, in the microtek driver I removed an unnecessary call to usb_set_interface(). [PATCH] PCI Hotplug: Fix PCIE and SHPC hotplug drivers for ia64 This patch fixes the PCIE and SHPC hotplug driver for ia64. The function pcibios_set_irq_routing only exists on x86, and acpi_bridges_head may be NULL, so don't crash. Andreas. [PATCH] PCI Hotlug: fix acpiphp unable to power off slots Attached patch includes the I/O space fix and applies to 2.6.3. This should also solve the problem Maeda-san reported in January (sorry for replying so late!) Here are changes in the patch: - fix the acpiphp driver not powering down a PCI card (from Gary Hade) - fix I/O space size calculation and ISA aliasing (from Gary Hade) - fix some debug messages - only execute ACPI methods on the first existing function [PATCH] PCI Hotplug: rpaphp/rpadlpar latest (support for vio and multifunction devices ) [PATCH] PCI Hotplug: fix compiler warning in acpiphp driver [PATCH] USB: usblp.c (Was: usblp_write spins forever after an error) Paulo Marques wrote: > David Woodhouse wrote: > >> On Thu, 2004-03-04 at 12:33 +0000, Paulo Marques wrote: >> >>> Yes, unfortunately it did went into 2.6.4-rc1. However it is already >>> corrected in 2.6.4-rc2. Luckily it didn't went into any "non-rc" >>> official release. >>> >>> Please try 2.6.4-rc2, and check to see if the bug went away... >>> >> >> Seems to work; thanks. Does this need backporting to 2.4 too? >> > > > Unfortunately this isn't over yet. > > I got suspicious about this bug fix, because I *did* test my patch > before submitting it and the kernel that didn't work before, worked fine > with my patch. > > But now it seems that it is the other way around. After a few digging I > found out the problem: > > The application that I was testing with uses the usblp handle with > non-blocking I/O . > > So my patch does work for non-blocking I/O uses of the port, but wrecks > the normal blocking mode. > > I've already produced a version that works for both cases. I'll just > clean it up a bit and submit it to 2.4 and 2.6 kernels. Here it is. The patch is only one line for 2.6.4-rc2. (I also did a little formatting adjustment to better comply with CodingStyle) For the 2.4.26-pre1 kernel, I also backported the return codes correction patch from Oliver Neukum. The problem with the write function was that, in non-blocking mode, after submitting the first urb, the function would return with -EAGAIN, not reporting to the application that in fact it had already sent "transfer_length" bytes. This way the application would have to send the data *again* causing lots of errors. It did return the correct amount with my first patch, because the writecount was being updated on the end of the loop. However this was wrong for blocking I/O. The "transfer_length" local variable is still needed because if we used the transfer_buffer_length field from the urb, then on a second call to write, if the urb was still pending (in non-blocking mode), the write would return an incorrect amount of data written. Anyway, this time I tested it using blocking and non-blocking I/O and it works for both cases. Even better, this patch only changes the behaviour for non-blocking I/O, and keeps the same behaviour for the more usual blocking I/O (at least on kernel 2.6). Input: when disconnecting PS/2 mouse give protocol's disconnect handler chance to run before starting ignoring mouse data. Otherwise interrupt handler will discard all ACKs and the very first command in cleanup sequence will fail (Synaptics was failing to return to relative mode on module unload). Input: do a full reset of Synaptics touchpad if extended protocol probes failed, otherwise trackpoint on the pass-through port may stop working (reset-disable isn't enough to revive it) Input: if Synaptics' absolute mode is disabled make sure that touchpad is reset back to relative mode and gestures (taps) are enabled [PATCH] USB Gadget: add "gadget_chips.h" This adds standard gadget_is_*() calls. Gadget drivers using those calls can get rid of some inlined #ifdefs, and will also be able to do more "late binding" to their hardware. Define gadget_is_*() calls, to help do late binding to USB controllers. Current gadget drivers expect to know at compile time what hardware they'll bind to. That's not very friendly to a generic PDA distro, which might prefer to defer such choices to run time. These macros let drivers change that code from inlined #ifdefs (ugh) to normal C statements (looks much nicer), so making those "what hardware" policy choices at run time gets easier. input: fixes in wacom.c -use GFP_KERNEL where SLAB_ATOMIC is not needed -fix count bug in open() error path [PATCH] ia64: clean up ACPI GSI/IRQ conversions (ia64 part) Add "acpi_gsi_to_irq()" as a generic replacement for "acpi_irq_to_vector()". This converts from an ACPI global system interrupt number to a Linux IRQ. Also, convert ia64-specific terminology to use GSI when appropriate. ALSA CVS update - Jaroslav Kysela I2C cs8427 Don't reset chip when PCM rate was not changed ALSA CVS update - Jaroslav Kysela Generic drivers Clean the 'AUTO' checking ALSA CVS update - Takashi Iwai EMU10K1/EMU10K2 driver,Trident driver fixed the mapping of silent pages on emu10k1 and trident SG buffers. ALSA CVS update - Takashi Iwai Memalloc module fixed the compilation with sparc sbus support. ALSA CVS update - Jaroslav Kysela GUS Extreme driver Whilst chasing an oops, I shortened some error paths. ALSA CVS update - Jaroslav Kysela ALSA Core Try modprobing a driver that the hardware doesn't exist for. In a few situations, you'll hit an oops due to proc_id not being filled out that early. ALSA CVS update - Jaroslav Kysela ES18xx driver,ES1688 driver,GUS Classic driver,GUS Extreme driver GUS MAX driver,AMD InterWave driver,SB16/AWE driver,SB8 driver This is a *really* silly one. The various probing routines in these drivers can return -ENODEV, -ENOMEM etc.. so when we do something like cards += probe_routine() In some situations we can end up with -13 sound cards, and other such nonsense. Result : lots of fun oopses. ALSA CVS update - Jaroslav Kysela ES968 driver This oopses on rmmod, as we do pnp_unregister_card_driver twice. ALSA CVS update - Jaroslav Kysela DT019x driver,ES968 driver Miscellaneous junk, indentation fixes and the like. ALSA CVS update - Jaroslav Kysela DT019x driver Added missing pnp_unregister_card_driver call ALSA CVS update - Jaroslav Kysela GUS Extreme driver Fixed typo ALSA CVS update - Jaroslav Kysela ES968 driver Fix against Dave's fix: put back the behaviour common to all ISA PnP modules yia64: Fix show_mem() panic [PATCH] ia64: Update SN2 defconfig [PATCH] ia64: fix missing braces in SN2 console code The last mod to fix the staircase printing - missed some bracing... [PATCH] ia64: move consistent_dma_mask to the generic device The patch that moved and renamed consistent_dma_mask neglected to fix up arch/ia64/hp/common/sba_iommu.c. [PATCH] ia64: kill CONFIG_IA64_MCA The MCA code is now slim enough that there isn't much point in keeping CONFIG_IA64_MCA anymore. ia64: Forward-port hp-agp.c fix from 2.4 See this ChangeSet: http://lia64.bkbits.net:8080/linux-ia64-2.4/cset@40524248tkgE0RDYQL0IyiAdFxo_Ew [PATCH] ia64: update ia64/Kconfig This Kconfig patch basically just makes ia64 look a little more like i386: - moves system type above processor type - moves PM & ACPI to a new top-level menu - moves PCI/PCMCIA to a new top-level menu [PATCH] ia64: update simscsi to 2.6 scsi APIs Use the proper (and cleaner) probing API instead of the old scsi_module.c hack, don't use the typedefs I plan to kill in 2.7 and mark everything static ia64: Based on patch by Keith Owens: put stop bit to work around GCC problem. Apparently GCC sometimes fails to insert a stop-bit when re-using p14 after the spinlock directives, even though the register is clearly marked as "clobbered". [PATCH] ia64: Decode salinfo oemdata for SN2 via PROM SN2 platforms provide oemdata in salinfo records. The decode of that oemdata is done via prom routines. This patch provides the interface from user space through the kernel into the prom to do the oem decode. [libata] bump libata and sata_sil driver versions ia64: Update defconfig [PATCH] g5: Fix iommu vs. pci_device_to_OF_node The g5 iommu code would fill the "iommu_table" member of whatever device node was pointed to by pcidev->sysdata during boot. However, the ppc64 kernel fills that with a pointer to the PHB node which is later replaced "lazily" with a pointer to the real node when calling pci_device_to_OF_node(). In this case, we were thus "losign" the iommu_table pointer. Typical symptom: loss of the SATA when looking at it's /proc entry. This fixes it by forcing the update to the final sysdata pointer when filling up the iommu_table pointers. The "lazy" thing is useless on pmac anyway. [PATCH] Fix early parallel make failures From: Sam Ravnborg Ingo said: Starting at around 2.6.4-rc2-mm1, I keep seeing 'scripts/fixdep: Text file busy' messages when doing a -j10 bzImage build - which seems to suggest that by the time fixdep is used by the build system it's not built yet. Sam said: I was pretty sure it was something I had caused, so I gave it a spin. What actually happened was that we tried to build the target 'silentoldconfig' in parrallel with 'scripts'. Since 'silentoldconfig' started a new make and then the config target needed 'scripts' we saw two parallel runs. The way I decided to fix it was to split scripts/ in two parts. The first part is now the very basic stuff - moved to scripts/basic/. The second part is dependent on kernel config etc. and kept in scripts/ In the 2.7 timeframe i will redo this initial stuff - it's becoming too messy for anyone to understand today. Description: Fix dependencies in early phases of kernel build. This solves a few problems nively: modpost is no longer rebuild twicewhen reaching the 'target' state 'make -j10' now works nicely again The patch is rather large due to the following file moves: mkdir scripts/basic mv scripts/fixdep.c scripts/basic mv scripts/split-include.c scripts/basic mv scripts/docproc.c scripts/basic [PATCH] Save some memory in mem_map on x86-64 From: Andi Kleen This patch saves 2MB of memory on a 1GB x86-64 machine, 20MB on a 10GB machine. It does this by eliminating 8 bytes of useless padding in struct page. This resurrects an older patch in a hopefully cleaner form. [PATCH] ppc32 compile fix From: Tom Rini The problem is that on PPC32 (and probably sparc64) 'asmlinkage' is a useless keyword, and should just be removed from include/asm-ppc/unistd.h. [PATCH] s390: update for altered page_state structure From: Gerald Schaefer Update s390 to track the new fields in struct page_state. [PATCH] selinux: Conditional policy extension and MLS detection support From: Stephen Smalley This patch extends the SELinux policy engine to support conditional policy logic based on a set of policy booleans, allowing well-formed changes to the policy to be defined within and mediated by the policy itself. The conditional policy extensions were implemented and contributed by Tresys Technology. Userland packages that support these extensions are already available from nsa.gov/selinux, and backward compatibility is provided for the prior policy version. The patch also includes a small change to enable detection of the optional MLS policy model on a SELinux system and fixes to the conditional policy extensions to allow the MLS policy to work correctly with them that were implemented and contributed by Trusted Computer Solutions. [PATCH] ide-scsi error handling fixes From: Willem Riede The patch revises the error handling in ide-scsi, fixing the scheduling while locked issues, and make it work properly, at least for me... Specific changes in this patch: - introduce idescsi_expiry, a timeout routine for the ide subsystem, which simply flags the fact that the command timed out, but postpones any other action until either the command still finishes on its own (unlikely?) or the scsi error handler kicks in; - introduce idescsi_atapi_error and idescsi_atapi_abort, error routines for the ide subsystem, which are modeled after those of ide-cd, but take only minimal effort to recover, leaving the heavy lifting for the scsi error handler; - rewrite (and rename for clarity) idescsi_eh_abort and idescsi_eh_error, the abort/error routines to be called by the scsi error handler -- this redesign should not have the scheduling while atomic problems of the old implementation. - move ide_cdrom_dump_status() from ide-cd.c to ide-lib.c as ide_dump_atapi_status() and both ide-cd and ide-scsi call it. - replaces BUG() by WARN_ON()/printk in the error handling code. - sets TASK_UNINTERRUPTIBLE before schedule_timeout() and moves the host unlock/lock around the while loop inside the loop in idescsi_eh_reset(). [PATCH] drivers_cdrom_cm206.c check_region() fix From: Trivial Patch Monkey From: Omkhar Arasaratnam check_region() fix [PATCH] ACPI: document acpi_sleep option From: Trivial Patch Monkey From: Pavel Machek acpi_sleep option should be documented. [PATCH] Document tricks to get S3_swsusp working From: Trivial Patch Monkey From: Pavel Machek I was sending this to users that had problems with swsusp, then lost it. It would be nice to have it directly in the tree. [PATCH] drivers_cdrom_sjcd.c check_region() fix From: Trivial Patch Monkey From: Omkhar Arasaratnam [PATCH] rename one of the acpi_disable() instances From: Trivial Patch Monkey From: Pavel Machek There's acpi_disable somewhere in the acpi interpreter (it disables interrupts, iirc). Thus blacklisting function needs better name. [PATCH] filemap.c comment fix From: Trivial Patch Monkey From: Carl Spalletta [PATCH] fix for kallsyms module symbol resolution problem From: Rusty Russell Fix a problem with kallsyms being unable to look up symbols which are in modules. add_kallsyms should be above module_finalize, which means you can just use the mod->symtab and mod->strtab members. [PATCH] Fix scripts/ver_linux From: Trivial Patch Monkey From: Thomas Molina ver_linux hasn't displayed binutils version right for some time. This patch corrects that and preserves the old behaviour as well, as suggested by Rusty. [PATCH] chardev module aliases From: Trivial Patch Monkey From: Steve Youngs Add module aliases for 21285, amba, anakin, clps711x, mux, and sa1100 serial drivers. [PATCH] minor credits updates From: Trivial Patch Monkey From: andersen@codepoet.org I've moved... This patch updates my contact info. [PATCH] Fix comment in drivers/block/genhd.c From: Trivial Patch Monkey From: a.othieno@bluewin.ch (Arthur Othieno) add_gendisk() was replaced with add_disk(), but the comment suggests otherwise. Breaks `make *docs'. [PATCH] add warning to DocBook/Makefile From: Trivial Patch Monkey From: maximilian attems Print something friendlier than: /bin/sh: fig2dev: command not found make[1]: *** [Documentation/DocBook/parport-share.eps] Error 127 make: *** [pdfdocs] Error 2 [PATCH] drivers_cdrom_cdu31c.c check_region() fix From: check_region() fixes. [PATCH] move PCIBIOS access help text From: "Randy.Dunlap" Moves PCI BIOS Access Mode help text to its top level instead of under PCI_GOBIOS (which is only 1 of 4 possible choices). [PATCH] fix modular fb drivers From: Arnd Bergmann The recent "fbdev: monitor detection fixes" patch broke modular frame buffer drivers. [PATCH] kbuild: fix modpost when used with O= From: Sam Ravnborg modpost or to be more specific sumversion.c was not behaving correct when used with O= and MODULE_VERSION was used. Previously it failed to use local .h when calculation the md-sum in case of a O= build. The following patch introduces the following: - A generic get_next_line() - Check that the topmost part of the directory matches - Using strrch when checking for file with suffix .o - Use NOFAIL for allocations in sumversion - Avoid memory leak in new_module The generic get_next_line will pay off when Andreas implmentation of storing symbol addresses in a seperate file is introduced. [PATCH] selinux: fix compute_av bug From: Stephen Smalley This patch fixes a bug in the SELinux compute_av code; the current code yields the right access computation but can cause unnecessary (but harmless) processing to occur when transition permission wasn't granted in the first place by the TE configuration. Thanks to Chad Hanson of TCS for reporting the bug. [PATCH] flush_scheduled_work() deadlock fix Because keventd is a resource which is shared between unrelated parts of the kernel it is possible for one person's workqueue handler to accidentally call another person's flush_scheduled_work(). thockin managed it by calling mntput() from a workqueue handler. It deadlocks. It's simple enough to fix: teach flush_scheduled_work() to go direct when it discovers that the calling thread is the one which should be running the work. Note that this can cause recursion. The depth of that recursion is equal to the number of currently-queued works which themselves want to call flush_scheduled_work(). If this ever exceeds three I'll eat my hat. [PATCH] flush_workqueue(): detect excessive nesting Add a debug check for workqueues nested more than three deep via the direct-run-workqueue() path. [PATCH] page_referenced() simplification There's no point in calling mark_page_accessed() here. The page is never on the LRU so all mark_page_accessed() will do is to set PG_referenced, which we immediately clear again. [PATCH] fbdev: character drawing enhancement. From: James Simmons This patch merges two of the drawing functions. The patch uses aligned transfers when possible even on displays where the characters are not byte align. Tested on my my laptop for 12 bit width fonts and 8 bit wide fonts. It works very nicely. [PATCH] kernel-doc build fix From: Michael Still This is needed to get any of the SGML documentation to build with 2.6.4. [PATCH] reiserfs: fix null pointer deref From: Chris Mason From: Jeff Mahoney fsstress manages to setup a sequence of events that allow an attempt to perform direct-io on a tail. bh_result->b_page == NULL, which causes the PageLocked and PageWriteback checks to perform a NULL deref, causing the oops. [PATCH] resierfs: scheduling latency improvements From: Chris Mason Add conditional schedules to reiserfs to help lower latencies. Bits of this orginated long ago in code akpm sent me. [PATCH] reiserfs: search_by_key fix From: Chris Mason Fix a bug in reiserfs search_by_key call, where it might not properly detect a change in tree height during a schedule. Originally from vs@namesys.com [PATCH] reiserfs: fix transaction sizes From: Chris Mason Make sure reiserfs uses a reasonable number when restarting long unbounded transactions (creating holes or deleting files). Without this patch, the number of blocks requested grows with each transaction restart, until it hits MAX_BATCH_COUNT and starts forcing commits with every new transaction. Oleg Drokin tracked this bug down [PATCH] reiserfs: atomicity fix From: Chris Mason reiserfs_file_write() can use stale metadata after a schedule. Two reiserfs_file_write bugs, where items can change during a schedule. [PATCH] resierfs: AIO support From: Chris Mason reiserfs can safely use the generic fs aio functions. [PATCH] do_write_mem() return value check From: BlaisorBlade , and me - remove unused `file *' arg from do_write_mem() - Add checking for copy_from_user() failures in do_write_mem() - Return correct value from kmem writes() when a fault is encountered. A write()-style syscall's return values are: 0 when nothing was written and there was no error (someone tried to write zero bytes) >0: the number of bytes copied, whether or not there was an error. Userspace detects errors by noting that the write() return value is less than was requested. <0: there was an error and no bytes were copied [PATCH] document unchecked do_munmaps in ipc/shm.c From: Manfred Spraul There are a few unchecked do_munmap()s in the shm code. Manfred's comment explains why they are OK. [PATCH] slab: fix display of object length in corruption detector From: Manfred Spraul print_objinfo() dumps the first few characters of an interesting object for debugging. It used the wrong object len (including debug padding, instead of just the data area), which could cause an oops if DEBUG_PAGEALLOC is enabled. [PATCH] kthreads hold files open keventd and friends are currently holding /dev/console open three times. It's all inherited from init. Steal the relevant parts of daemonize() to fix that up. [PATCH] kill INIT_THREAD_SIZE From: Matt Mackall This piece of the THREAD_SIZE cleanup got dropped. If you make THREAD_SIZE > 8k, the init thread overlaps the .init section and gets smashed. I've gone ahead and killed INIT_THREAD_SIZE throughout as it wasn't doing much. This also saves 4k when we use 4k stacks. Please apply. Couple more minor pieces remaining. [PATCH] blk: statically initialise the congestion waitqueue_heads On a really small memory machine (or one with a monstrous kernel memory leak) we can end up calling blk_congestion_wait() before the waitqueue_heads are set up. [PATCH] iostats averaging fix From: Rick Lindsley Fix bug #2230. I've corresponded with the submitter and he did find a real bug -- when we were merging I/O requests we didn't always take the oldest request start time, which would cause a couple of the calculations like wait time and average queue size to be too small. He found it mathematically but having done so, I think logic and inspection makes it easy to verify. [PATCH] Reduce stack overflow check to 4096 bytes From: Anton Blanchard Reduce stack overflow check to 4096 bytes free, we were tripping it too much at 8192. [PATCH] Remove bogus sys_oldumount sign extension code From: Anton Blanchard Remove bogus sys_oldumount sign extension code. We were sign extending the flags argument which doesnt make sense. [PATCH] Remove some unused ppc64 variables From: Anton Blanchard Remove some unused ppc64 variables [PATCH] Make dma API handle PCI and VIO From: Stephen Rothwell Make dma API handle PCI and VIO [PATCH] Add hypervisor busy return codes From: Dave Boutcher Add hypervisor busy return codes [PATCH] Handle longbusy return codes in IBM VETH driver From: Santiago Leon Handle longbusy return codes in IBM VETH driver [PATCH] Add some missing EXPORT_SYMBOLs From: Anton Blanchard Add some missing EXPORT_SYMBOLs [PATCH] Fix for hotplug of multifunction cards. From: Linda Xie The changes in this patch are for multifunction cards insertions/removals and bug fixes: 1. fix up new nodes' linux_phandle field. 2. new nodes' phb, devfn(and so on) need to be fixed even the nodes don't have "interrupts". 3. change of_remove_node to non-recurisve func. The recursions will be done by the caller. 4. add a new function -- of_finish_dynamic_node_interrupts() [PATCH] Fix multiple EEH-related bugs From: Linas Vepstas This patch fixes multiple EEH-related bugs: - Fixes the eeh_check_failure() usage in an interrupt context. This routine is now safe to use in an interrupt. The fix was to build a cache of IO addresses and check that, instead of using the pci routines. - Merges in Olof Johansson's sizeof patch when checking for failure - Adds EEH tests to array/string reads - Fixes bugs with address resolution (some i/o addresses were handled incorrectly, resulting in EEH errors slipping by undetected.) - Adds EEH support to the PCI Hotplug system (so that devices that get added/removed get properly registered with the EEH subsystem.) - Fixes improper use of /proc filesystem. - Adds some misc statistics. While merging Linas' patch I also converted the proc usage to seq_single, used per cpu variables for the stats and removed the eeh-force-off option. [PATCH] Fix xics IRQ affinity From: Anton Blanchard - Merge some whitespace differences with the ameslab tree - We check for CPU_MASK_ALL in xics to send irqs to all cpus. In some cases CPU_MASK_ALL is smaller than the cpumask (eg NR_CPUS == 32 and cpumask is a long), so we mask it here to be consistent. [PATCH] Add some functions to make vio.h consistant with pci_dma.h and dma_mapping.h From: Dave Boutcher Add some functions to make vio.h consistant with pci_dma.h and dma_mapping.h [PATCH] Move iSeries specific EXPORT_SYMBOLs out of ppc_ksyms.c From: Stephen Rothwell After this the only iSeries specific EXPORT_SYMBOLS in ppc_ksyms.c are the assembler ones ... [PATCH] update iseries default target From: Anton Blanchard update iseries default target [PATCH] Export find_next_bit From: Anton Blanchard - export find_next_bit and move the other exports here - fix a few minor style issues [PATCH] Add slow path lookup in xics_get_irq From: Jake Moilanen In xics_get_irq(), for a real-to-virt irq lookup, go down the slowpath by looking through the entire virt_irq_to_real_map array if take a miss on the radix tree. This is possible, when an interrupt is taken before the driver has called request_irq() (eg IDE). [PATCH] Dont enable interrupts during interrupt processing on iseries From: Stephen Rothwell Dont enable interrupts during interrupt processing on iseries [PATCH] Remove pci DMA exports From: Anton Blanchard Remove pci DMA exports we now access them via inline functions that operate on pci_dma_ops. [PATCH] Added rtas_set_power_level() From: John Rose Added rtas_set_power_level() [PATCH] Fixed NULL ptr deref in RTAS syscall ppc_rtas() From: John Rose Fixed NULL ptr deref in RTAS syscall ppc_rtas() [PATCH] Add kernel version to oops. From: Anton Blanchard Add kernel version to oops. [PATCH] Cleanup ppc64 procfs code From: Anton Blanchard Cleanup ppc64 procfs code: - Use initcalls everywhere. This allowed us to remove the iseries proc callback interface. - Kill proc_pmc.c. Most of it wasnt used (and we are planning to export the PMCs via sysfs). The few things left were iseries specific so they got moved into iSeries_proc.c. - Kill pmc.c. We dont use those statistics and the ones that are left can be gained via PMCs. - Create /proc/iSeries and /proc/ppc64 very early. This means we no longer have to call proc_ppc64_init in all the drivers, we can assume its there. - Fix some error return cases in rtas-proc.c and rtas-flash - Dont even try some pseries specific drivers on pmac. [PATCH] Clean up xmon backtrace code. From: Anton Blanchard Clean up xmon backtrace code, it was doing all manner of scary things. [PATCH] Fix hvc console sleep in spinlock bug From: Jeremy Kerr This patch fixes the sleep in spinlock hvc bug in hvc_write(). The code is a little longer, but protects against large amounts of memory being kmalloc()ed by userspace, and minimises calls to copy_from_user(). [PATCH] ppc64 defconfig update From: Anton Blanchard ppc64 defconfig update [PATCH] ppc64: fix for massive OF properties From: Anton Blanchard We have some versions of firmware out there that have huge OF properties. So huge that we end up overwriting our initrd. Place a 1MB limit and warn bitterly if its over this. Also fix a use of package-to-path where the variable was 64bytes but we would pass in a length of 255. [PATCH] allow random write to cdrom devices with profile 2 (removable disk) This patch is from Iomega, and it allows random write opens of CDROM's that support the feature. [blk carmel] add copyright statement and license mention [PATCH] ia64: fix up DMA API breakage in generic build We also need the following patch to build the generic_defconfig after the DMA API change: http://linux.bkbits.net:8080/linux-2.5/cset@405490e15inT3T0H2x887j9SaMkYRQ [PATCH] USB: replace kobject with kref in usb-serial core. This saves some memory and is easier to understand what is happening. [IPVS]: Add C99 initializers to ip_vs_ctl.c [IPVS]: Add C99 initializers to net/ipv4/ipvs/ip_vs_lblc.c [IPVS]: Add C99 initializers to net/ipv4/ipvs/ip_vs_lblcr.c JFS: zero new log pages, etc. [netdrvr natsemi] Fix RX DMA mapping RX skbs are always considered maximally sized, until actual reception of the RX frame occurs. So, update this driver to always map and unmap a maximally sized skb. This fixes this driver on several non-x86 platforms. [PATCH] update e100.txt * e100.txt needs to refer to the v3 driver and its settings. Spotted by Calum Mackay [calum.mackay@cdmnet.org] [PATCH] fix netpoll warning in tulip On Tue, Mar 16, 2004 at 12:36:02PM +0200, Meelis Roos wrote: > FYI: with netpoll configured out, I get > > CC [M] drivers/net/tulip/tulip_core.o > drivers/net/tulip/tulip_core.c:256: warning: `poll_tulip' declared `static' but never defined Remove bogus linux/irq.h include that fails build on ARM. Verified to not break anything on x86 either. [blk carmel] call del_gendisk(), if disk is 'up', at cleanup time [hamradio 6pack] cleanup [PATCH] Fix blkpg ioctl32 handling Simple obvious patch so that all calls to blkpg from the non-native environment don't get -EINVAL [PATCH] wait_task_inactive should not return on preempt wait_task_inactive is now only used in two non-time-critical places: the ptrace code to guarantee a schedule and kthread_bind so we can change the thread CPU. Unfortunately with preempt, the code as stands has a race: we might return because the thread is preempted, not because it actually reached schedule(). The ptrace code (probably) doesn't care, but the kthread code does. This patch simplifies the (now over-optimized) code, and does a yield() for the preemption case. [PATCH] ide-scsi.c: fix ATAPI multi-lun support ATAPI multi-lun support has been broken for a long time. It used to be that "(drive->id->last_id & 0x7) + 1" was used as shost->max_lun and the "hdXlun=" kernel parameter could be used to override this value. However it was far from optimal: - people played with "hdXlun=" and then complained about multiple instances of the same device (most ATAPI drives respond to each LUN) - probably some devices return 7 not 0 in id->last_id (=> 7 x same device) This patch from Willem Riede fixes it w/o need for "hdXlun=" option. It was tested by Willem on ATAPI PD/CD drive. [PATCH] remove dead "hdXlun=" kernel parameter [PATCH] ATI IXP IDE support It was tested by a few people and has been in -mm since 2.6.4-rc2-mm1. [PATCH] hpt366.c: DMA timeout fix for HPT374 From: Andre Hedrick Tested on Epox 8K9A3+ and 4PCA3+ by Tomi Orava . [PATCH] fix ppc rtas compile The proc_rtas_init call in procfs was removed (replaced with an initcall) but the prototype was still hiding. Kill it. [libata sata_vsc] minor cleanup Add ULL prefix to args in pci_*_set_dma_mask() calls. [PATCH] Make intermezzo work again - Chen Yang's fix to work with NGROUPS - Chen Yang's fix to handle file deletion - Remove TCGETS handling and return -ENOTTY for unknown ioctl code. - Removed InterMezzo from BROKEN state [PATCH] Fix memory corruption on hyperthreaded x86-64 machines Fix memory corruption in the HT init on x86-64 recently introduced by me. Fix from from Suresh B. Siddha. [libata] Several updates to via driver * remove unneeded linux/config.h include * reset and test for device presence using SATA phy registers (SCRs) * add code to make sure that channels and interrupts we are interested in, are enabled * rewrite PCI probe routine (svia_init_one) [wireless prism54] use netdev_priv() helper [wireless prism54] several minor updates Here is the ChangeLog: * wireless/Kconfig: fix typos, add SMC2835W-V2 * islpci_hotplug.c: new version 1.1, authors list, and module description updated appropriately * isl_ioctl.c, islpci_dev.c, islpci_eth.c, islpci_hotplug.c, islpci_mgt.c: s/ndev->priv/netdev_priv(ndev)/g * islpci_hotplug.c: Add PCI ID values for SMC2835W-V2 cardbus card Patch by Manuel Lauss * isl_38xx.[ch]: include firmware.h in header, remove declaration of headers in c file. Fix compiler warnings. * islpci_dev.c (islpci_alloc_memory), * islpci_eth.c (islpci_eth_cleanup_transmit, islpci_eth_transmit, islpci_eth_receive): deal with skb stray pointer, declare NULL. * isl_38xx.c: remove unecessary __KERNEL_SYSCALLS__ and re-ordered headers per vger.kernel.org - liking. * isl_ioctl.c, islpci_mgt.c: move from MODULE_PARAM to the new module_param, which is type-safe. Includes the new . * isl_ioctl.c (prism54_[s|g]et_[maxframeburst|profile]): added. Not adding ioctls as ajfa is working on moving current private ioctls to subioctls. * isl_oid.h (dot11_[maxframeburst|preamblesettings| slotsettings|nonerpstatus|nonerpprotection]_t): added. Note: more ioctls can be added here, I believe problems with mixed modes can be pinpointed here, with these values. [PATCH] ppc32: Fix c&p error in arch/ppc/syslib/indirect_pci.c From: Tom Rini Fix a cut & paste error in forward porting from 2.4, we don't reference dev->bus or dev->devfn, both are passed as arguments. [PATCH] ppc32: Fix PCI DMA API changes From: Tom Rini When Dave Miller updated for the _for_device and _for_cpu portions of the PCI DMA API, he assumed that on PPC32 consistent_sync* would also need to be changed for device or cpu. This is not the case, so what this does is the pci_*_for_{cpu,device} calls call consistent_sync{,page} again. [PATCH] ppc32: Update From: Tom Rini include/asm-ppc/dma-mapping.h was made to be a 'real' header recently and therefore missed out on the updates that davem did to all of the other versions. This updates to match what's expected now. [PATCH] ppc32: Fix thinko in PCI_DMA_FOO to DMA_FOO conversion From: Tom Rini When I converted the use of PCI_DMA_foo constants to DMA_foo constants, I forgot that it's PCI_DMA_FROMDEVICE and DMA_FROM_DEVICE. The following fixes that. [PATCH] ppc64: run bitops.c through Lindent From: Anton Blanchard bitops.c was a bit of a mess wrt formatting so run it through Lindent. No code changes. [PATCH] s390: core From: Martin Schwidefsky s390 core changes: - Merge 31 and 64 bit NR_CPUS config option. Default to 32 cpus. - Remove unused system calls from compat_linux.c. - Add statfs64 and fstatfs64. Reserve system call number for remap_file_pages. - Merge do_signal32 into do_signal. - Don't remove the per bit and the program mask from the user psw due to a signal. - Fix a problem with gdb and interrupted system calls. - Fix single stepping of interrupted system calls. - Fix compiler warnings in bitops.h. [PATCH] s390: common i/o layer. From: Martin Schwidefsky Common i/o layer fixes: - Improve blacklist argument parsing. - Fix device recognition for devices where SenseID fails. - Don't try to set a device online that has no driver. - Chain a release ccw to the unconditional reserve ccw for forced online. - Fix irb accumulation for pure status pending with eswf set. - Fix rc handling in qdio_shutdown. - Improve retry behavious for busy conditions on qdio. - Fix activity check in ccw_device_start/read_dev_chars and read_conf_data. [PATCH] s390: sclp fix. From: Martin Schwidefsky sclp console fixes: - Replace irq_enter/irq_exit pair with Add local_bh_enable/local_bh_disable. [PATCH] s390: network driver fixes. From: Martin Schwidefsky network driver fixes: - Use SET_NETDEV_DEV to create the link from the network device to the physical device. Remove link from physical to network device. - Remove some unnecessary casts in netiucv. - Add missing strings to dev_stat_names & dev_event_names. - Add missing preempt_disable/preempt_enable pairs in iucv. - Allow to change the peer username in netiucv. [PATCH] s390: dasd driver fixes. From: Martin Schwidefsky dasd driver fixes: - Remove additional dasd attributes for a ccw-device if the discipline (=driver) gets unloaded. - Fix race of dasd_generic_offline against dasd_open. - Remove irq_exit calls from diag interrupt handler. The irq_enter/ irq_exit is done in the external interrupt handler. [PATCH] s390: z/VM monitor stream. From: Martin Schwidefsky Fix for z/VM monitor stream: - Add try_module_get and module_put to the [un]register functions. - Some code beautification. [PATCH] s390: tape driver fixes. From: Martin Schwidefsky tape driver fixes: - Link from ccw device to class device in sysfs. - Cosmetic changes. - Add copyright statements. [PATCH] x86 vsyscall alignment fix From: Andy Whitcroft The vsyscall implementation for ia32 provides two different vsyscall pages; one to use int80 and the other to use sysenter. Each includes a common signal trailer. The kernel requires the alignment of routines in this trailer be consistent in both copies. However this is not enforced at compile time. Failure to maintain this alignment typically leads to an obscure SIGSEGV in init during boot. This critical alignment requirement is not well documented. Below is a patch to better document the alignment requirements and to enforce the requirement. [PATCH] make config_max_raw_devices work From: "Kenneth Chen" Even though there is a CONFIG_MAX_RAW_DEVS option, it doesn't actually increase the number of raw devices beyond 256 because during the char registration, it uses the standard register_chrdev() interface which has hard coded 256 minor in it. Here is a patch that fix this problem by using register_chrdev_region() and cdev_(init/add/del) functions. [PATCH] hugetlb_zero_setup() race fix Make the handling of the hugetlb-backed shm file's name counter SMP-safe. (What stops hugetlb_zero_setup() racing with umount?) [PATCH] clean up devices.txt From: "Cagle, John (ISS-Houston)" Patch 1 cleans up the format by making devices.txt easily parsable. Mainly this involved adding the word "block" after all the block major numbers since the previous format didn't include it. [PATCH] devices.txt: typos and removal of dead devices From: "Cagle, John (ISS-Houston)" Patch 2 fixes some typos in devices.txt and removes ancient devices never used. Pretty obvious stuff. [PATCH] devices.txt: add more devices From: "Cagle, John (ISS-Houston)" Patch 3 adds all the new official device registrations that weren't already there. This brings devices.txt up-to-date with LANANA. [PATCH] cpqarray: increment version number From: The following patch bumps the driver version to 2.6.0. Please apply in order. [PATCH] cpqarray: rmmod oops fix From: * Fix for segmentation fault when calling rmmod [PATCH] cpqarray: I/O address fixes From: * cpqarray in kernel 2.6.1 seems to be based from 2.4.18 kernel with specific 2.6.x stuff added. * Defines io_mem_addr and io_mem_length to replace ioaddr (change from 2.4.18 to 2.4.19) [PATCH] cpqarray: use PCI APIs From: - Change to use pci APIs (change from 2.4.18 to 2.4.19) This also includes eisa detection fix during initialization which was missing from 2.4.19 but fixed in 2.4.25 [PATCH] cpqarray: check pci_register_driver() return value From: * Examines rc of pci_register_driver and returns [PATCH] SHMLBA compat task alignment fix From: Arun Sharma The current Linux implementation of shmat() insists on SHMLBA alignment even when shmflg & SHM_RND == 0. This is not consistent with the man pages and the single UNIX spec, which require only a page-aligned address. However, some architectures require a SHMLBA alignment for correctness in all cases. Such architectures use __ARCH_FORCE_SHMLBA. [PATCH] Remove old config options from defconfigs. From: Dave Jones These options are only ever referenced in the defconfigs of various archs now. [PATCH] Fix x86_64 compile warning in bad_page() On x84_64, page->flags is no longer unsigned long. [PATCH] drivers/cdrom/cdu31a - wrong tmp_irq declaration cdu31a.c needs tmp_irq outside of the block it is declared in. Move it to the outer block. [PATCH] hpt366.c: PLL fix needed for some HPT374 From: Boehm Olaf From: Jindrich Makovicka Wider range for 33MHz timing and PLL setup for HPT374 (using the HPT370A timing table, as it is the same as used in the "opensource" driver by HighPoint). fixes bugzilla bugs #2209 and #2271 [PATCH] remove ide_hwif_t->initializing It's write-only these days. [PATCH] remove AMIGA/MAC hacks from IDE resource handling code Nowadays buddha.c, gayle.c and macide.c handle resources themselves (hwif->mmio == 2). Acked by Geert. [PATCH] ide-dma.c: remove unused/obsoleted code for hwif->mmio == 1 All users of hwif->mmio correctly handle resources themselves (hwif->mmio == 2) so remove ide_mmio_dma() and ide_release_mmio_dma(). [netdrvr de2104x] fix ifup/down and promise mode The attached patch fixes the problem: de->macmode variable, meant to shadow MacMode (CSR6) register, was used inconsistently, causing some updates to this register to be dropped. 2.4 kernel doesn't shadow this register at all, so I removed shadowing from 2.6 as well. ia64: Prevent GCC from clobbering r13. Found by Luming You. Without this change, GCC thinks it's OK to clobber r13. It doesn't do it very often, but it's enough if it does it once and it turns out acpi_bus_receive_event() had code that would trigger this issue. Fix by declaring r13 as a global register variable. [netdrvr de2104x] initialize bus mode properly [PATCH] back out netdev_priv() for loopback Please apply this fix to backout an erroneous change in loopback.c The statistics structure is allocated separately from the loopback_dev structure, and the current code overwrites something other than the statistics. In my case the scsi_cmd_pool structure. [PATCH] ppc32: fix SMP build From: Olaf Hering Current Linus tree adds an extra space and dot to the mkprep options. `make all' with an smp config doesnt work. This patch fixes it. [PATCH] ppc32: Fix booting some IBM PRePs From: Tom Rini The following patch comes from Paul Mackerras. Earlier on in 2.6, arch/ppc/boot/utils/mkprep.c was changed slightly so that it would build and work on Solaris. Doing this required changing from filling out pointers to an area to filling out a local copy of the struct. However, a memcpy was left out, and the info is only needed on some machines to boot. The following adds in the missing memcpy and allows for IBM PRePs to boot from a raw floppy again. [PATCH] ppc64: wrap some stuff in __KERNEL__ From: Anton Blanchard - remove now unused kernel syscalls. - wrap recently added defines in #ifdef __KERNEL__, fixes glibc compile issue - some of our extra syscalls used asmlinkage, some did not. Make them consistent [PATCH] ppc64: xmon oops-the-kernel option From: Anton Blanchard Sometimes we just want to pass the error up to the kernel and let it oops. X it is. [PATCH] ppc64: CONFIG_PREEMPT Kconfig help fix From: Anton Blanchard From: Robert Love arch/ppc64/Kconfig's entry for CONFIG_PREEMPT is missing the description after the "bool" statement, so the entry does not show up. Also, the help description mentions a restriction that is not [any longer] true. [PATCH] JBD: avoid panic on corrupted journal superblock Don't panic if the journal superblock is wrecked: just fail the mount. [PATCH] exportfs - Remove unnecessary locking from find_exported_dentry() From: "Jose R. Santos" After discussing it with Neil, he fell that the original justification for taking the kernel_lock on find_exported_dentry() is not longer valid and should be safe to remove. This patch fixes an issue while running SpecSFS where under memory pressure, shrinking dcache cause find_exported_dentry() to allocate disconnected dentries that later needed to be properly connected. The connecting part of the code was done with BKL taken which cause a sharp drop in performance during iterations and profiles showing 75% time spent on find_exported_dentry(). After applying the patch, time spent on the function is reduce to <1%. I have tested this on an 8-way machine with 56 filesystems for several days now with no problems using ext2, ext3, xfs and jfs. [PATCH] ISDN kernelcapi debug message enable From: Armin Schindler Show debug messages if debug is enabled only. [PATCH] ISDN kernelcapi notifier workqueue re-structured From: Armin Schindler Use the notifier workqueue in a cleaner way. [PATCH] ISDN kernelcapi notifier NULL pointer fix From: Armin Schindler Fixed NULL pointer reference in recv_handler() [libata] update dma start/stop path to only set/clear the bits we care about Legacy IDE software has traditionally unconditionally cleared the bits in the IDE BMDMA control register, but at least one controller has important bits in the 'reserved' area that we don't want to touch. So now, we only set/clear the data-direction and dma-start bits, and leave the rest alone. ALSA CVS update - Clemens Ladisch MPU401 UART don't use acpi_disabled because it isn't exported in all archs ALSA CVS update - Clemens Ladisch MPU401 UART don't use negative return value as card count ALSA CVS update - Clemens Ladisch MPU401 UART use global variable to count cards ALSA CVS update - Takashi Iwai SPARC cs4231 driver fixed the dma allocation type. ALSA CVS update - Takashi Iwai SPARC cs4231 driver fixed the compilation error (missing comma). ALSA CVS update - Takashi Iwai au88x0 driver Manuel Jander : clean up and small bugfixes, the routing code fix for multiple streams. ALSA CVS update - Clemens Ladisch USB generic driver don't resubmit unlinked urbs; move interface releasing after urb unlinking ALSA CVS update - Jaroslav Kysela PPC PMAC driver Fix against the new DMA API ALSA CVS update - Takashi Iwai AC97 Codec Core added the quirk for Compaq Evo D510C. ALSA CVS update - Clemens Ladisch USB generic driver fix get_iface_desc macro ALSA CVS update - Clemens Ladisch USB generic driver replace usage of interface index with calls to usb_ifnum_to_if ALSA CVS update - Clemens Ladisch USB generic driver add comments in USB MIDI vendor-specific detection functions [libata sata_sil] port init cleanup, mask SATA phy interrupts * don't define a constant for each of four sets of register block offsets, use a table instead. * mask all SATA phy interrupt events, for each port [libata] API cleanup Remove ->phy_config hook, everybody used pata_phy_config. Rename function to ata_set_mode, and directly call internally. ALSA CVS update - Jaroslav Kysela USB generic driver Returned back get_iface() macro for quirks Removed extra variable to avoid warning [libata sata_sil] add post-set-mode hook to libata, use it Silicon Image has a register that indicates the data transfer mode (pio-old, pio-new, mdma or udma) that must be initialized after the SET FEATURES - XFER command has been issued. This requires a hook in libata core to set the register at the right time. Also, limit to UDMA5 due to scary comments in FreeBSD about chip errata. [libata] remove unneeded linux/config.h includes [PATCH] hpfs: namei.c failure case cleanups Failure exits in hpfs/namei.c merged and cleaned up. [PATCH] hpfs: clean up lock ordering hpfs_{lock,unlock}_{2,3}inodes() killed; all places that take more than one lock have ->i_sem held by VFS on all inodes involved and all hpfs per-inode locks are of the same type. IOW, we can replace these guys with multiple hpfs_lock_inode() - order doesn't matter here. [PATCH] hpfs: new/read/write_inode() cleanups 1) common initialization for all paths in hpfs_read_inode() taken into a separate helper (hpfs_init_inode()) 2) hpfs mkdir(),create(),mknod() and symlink() do not bother with iget() anymore - they call new_inode(), do initializations and insert new inode into icache. Handling of OOM failures cleaned up - if we can't allocate in-core inode, bail instead of corrupting the filesystem. Allocating in-core inode early also avoids one of the deadlocks here (hpfs_write_inode() from memory pressure by kmem_cache_alloc() could deadlock on attempt to lock our directory). 3) hpfs_write_inode() marks the inode dirty again in case if it fails to iget() its parent directory. Again, OOM could trigger fs corruption here. [PATCH] hpfs: hpfs iget locking cleanup preparation Preparation to hpfs iget locking cleanup - remaining iget() callers replaced with explicit iget_locked() + call hpfs_read_inode()/unlock_new_inode() if inode is new. [PATCH] hpfs: hpfs iget locking cleanup Killed the nightmares in hpfs iget handling. Since in some (fairly frequent) cases hpfs_read_inode() could avoid any IO (basically, lookup hitting a native HPFS regular file can get all data from directory entry) hpfs had a flag passed to that sucker. Said flag had been protected by a semaphore lookalike made out of spit and duct-tape and callers of iget looked like hpfs_lock_iget(sb, flag); result = iget(sb, ino); hpfs_unlock_iget(sb); Since now we are calling hpfs_read_inode() directly (note that calling it without hpfs_lock_iget() would simply break) we can forget all that crap and get rid of the flag - caller knows what it wants to call. BTW, that had killed one of the last sleep_on() users in fs/*/*. [PATCH] hpfs: deadlock fixes We used to have GFP_KERNEL kmalloc() done by the code that held hpfs lock on directory. That could trigger a call of hpfs_write_inode() and deadlock; fixed by switch to GFP_NOFS. Same for hpfs inodes themselves - hpfs_write_inode() calls iget() and that could trigger both the deadlocks (avoidable with very baroque locking scheme) and stack overflows (unavoidable unless we kill potential recursion here). [PATCH] hpfs: fix locking scheme Fixed the locking scheme. The need of extra locking was caused by the fact that hpfs_write_inode() must update directory entry; since HPFS directories are implemented as b-trees, we must provide protection both against rename() (to make sure that we update the entry in right directory) and against rebalancing of the parent. Old scheme had both deadlocks and races - to start with, we had no protection against rename()/unlink()/rmdir(), since (a) locking parent was done without any warranties that it will remain our parent and (b) check that we still have a directory entry (== have positive nlink) was done before we tried to lock the parent. Moreover, iget serialization killed two steps ago gave immediate deadlocks if iget() of parent had triggered another hpfs_write_inode(). New scheme introduces another per-inode semaphore (hpfs-only, obviously) protecting the reference to parent. It's taken on rename/rmdir/unlink victims and inode being moved by rename. Old semaphores are taken only on parent(s) and only after we grab one(s) of the new kind. hpfs_write_inode() gets the new semaphore on our inode, checks nlink and if it's non-zero grabs parent and takes the old semaphore on it. Order among the semaphores of the same kind is arbitrary - the only function that might take more than one of the same kind is hpfs_rename() and it's serialized by VFS. We might get away with only one semaphore, but then the ordering issues would bite us big way - we would have to make sure that child is always locked before parent (hpfs_write_inode() leaves no other choice) and while that's easy to do for almost all operations, rename() is a bitch - as always. And per-superblock rwsem giving rename() vs. write_inode() exclusion on hpfs would make the entire thing too baroque for my taste. ->readdir() takes no locks at all (protection against directory modifications is provided by VFS exclusion), ditto for ->lookup(). ->llseek() on directories switched to use of (VFS) ->i_sem, so it's safe from directory modifications and ->readdir() is safe from it - no hpfs locks are needed here. [PATCH] hpfs: general cleanup include files moved to fs/hpfs/, gratitious #include removed, stuff that doesn't have to be global made static, misindented chunk of hpfs_readdir() put in place, etc. [PATCH] Export cpu notifiers and do locking. The registration and unregistration of CPU notifiers should be done under the cpucontrol sem. They should also be exported. [PATCH] Implement migrate_all_tasks Implement migrate_all_tasks() which moves tasks off cpu while machine is stopped. cpu.c needs for symbol exports [PATCH] add missing MODULE_DEVICE_TABLE() to IDE PCI drivers Original patch from Hannes Reinecke . This is required to have modular IDE drivers announce themselves properly in modules.pcimap. Make ppc64 __FD_ISSET() return a proper boolean return value. (The broken macro only triggers for non-gcc compiles, but still..) [PATCH] FD_CLOEXEC fcntl cleanup This fixes a minor problem with fcntl. get_close_on_exec() uses FD_ISSET() to determine the fd state, but this is not guaranteed to be either 0 of FD_CLOEXEC. Make that explicit. Also, the argument of set_close_on_exec() is being AND'ed with the literal constant 1. Make it use an explicit FD_CLOEXEC test. [blk carmel] use statically allocated majors for first two hosts Also: * fix FL_DAC bit definition (value chosen was already in use) * improve info printk'd when adapter is registered * call pci_set_drvdata(pdev, NULL) [PATCH] revert some netdev_priv() changes These drivers don't use the usual/normal/typical netdevice->priv storage, so converting them to use netdev_priv() was not the right thing to do. Back to using dev->priv for them. [PATCH] Fw: [PATCH 2.6] netpoll for pcnet_cs From: Stelian Pop Subject: [PATCH 2.6] netpoll for pcnet_cs This patch adds netpoll support to pcnet_cs. Tested with the netconsole facility. [wireless prism54] add two final missing bits One a fairly important one, ensuring an skb slot is noted to be NULL. [libata] explicitly set consistent DMA mask to 0xffffffff Do not rely on the default being 0xffffffff. [CS4231]: Fix build error, use SNDRV_DMA_TYPE_DEV and missing comma. [SPARC]: NR_SYSCALLS in entry.S needs to be 273. [NET]: Give struct flowi explicit alignment, with help from yoshfuji. [AF_KEY]: More accurate error codes. [PKT_SCHED]: Fix broken indentation in HFSC scheduler. [NET_SCHED]: Fix requeueing in HFSC scheduler. Requeued packets are kept in a high-priority queue which is always dequeued first. [NET_SCHED]: Add packet delay scheduler. [PATCH] missing check in do_add_mount() Make sure that we don't end up with symlink mounted over something (mount --bind is safe since we use LOOKUP_FOLLOW in pathname resolution there). [PATCH] add file_accessed() helper New inlined helper - file_accessed(file) (wrapper for update_atime()) [PATCH] add touch_atime() helper Preparation for per-mountpoint noatime, nodiratime and later - per-mountpoint r/o. Depends on file_accessed() patch, should go after it. New helper - touch_atime(mnt, dentry). It's a wrapper for update_atime() and that's where all future per-mountpoint checks will go. [libata] increase max from UDMA/100 to UDMA/133 for some drivers ServerWorks and Vitesse driver transfer mode maximums were incorrectly too low. [PATCH] ppc64: iSeries virtual tape driver From: Stephen Rothwell This patch adds the driver for the PPC64 iSeries virtual tape. [PATCH] ppc64: remove IO_DEBUG From: Anton Blanchard Remove the old __IO_DEBUG stuff and add some nice comments courtesy of x86. [PATCH] ppc64: Add numa=off command line option From: Anton Blanchard Add numa=off command line option to disable NUMA support at runtime. Useful if there are issues with our parsing of the NUMA toplogy or for testing NUMA gains. [PATCH] ppc64: Fix SLB reload bug From: Paul Mackerras Recently we found a particularly nasty bug in the segment handling in the ppc64 kernel. It would only happen rarely under heavy load, but when it did the machine would lock up with the whole of memory filled with exception stack frames. The primary cause was that we were losing the translation for the kernel stack from the SLB, but we still had it in the ERAT for a while longer. Now, there is a critical region in various exception exit paths where we have loaded the SRR0 and SRR1 registers from GPRs and we are loading those GPRs and the stack pointer from the exception frame on the kernel stack. If we lose the ERAT entry for the kernel stack in that region, we take an SLB miss on the next access to the kernel stack. Taking the exception overwrites the values we have put into SRR0 and SRR1, which means we lose state. In fact we ended up repeating that last section of the exception exit path, but using the user stack pointer this time. That caused another exception (or if it didn't, we loaded a new value from the user stack and then went around and tried to use that). And it spiralled downwards from there. The patch below fixes the primary problem by making sure that we really never cast out the SLB entry for the kernel stack. It also improves debuggability in case anything like this happens again by: - In our exception exit paths, we now check whether the RI bit in the SRR1 value is 0. We already set the RI bit to 0 before starting the critical region, but we never checked it. Now, if we do ever get an exception in one of the critical regions, we will detect it before returning to the critical region, and instead we will print a nasty message and oops. - In the exception entry code, we now check that the kernel stack pointer value we're about to use isn't a userspace address. If it is, we print a nasty message and oops. This has been tested on G5 and pSeries (both with and without hypervisor) and compile-tested on iSeries. [PATCH] ppc64: Fix POWER3 TCE allocation From: Anton Blanchard - Fix for machines with 3GB IO holes (eg nighthawk). - Increase the maximum number of PHBs and warn if we exceed this (we used to walk off the end of the array) - Only allocate an 8MB TCE table on POWER4 [PATCH] Add dma_error() and pci_dma_error() From: Anton Blanchard Introduce dma_error() and pci_dma_error() which are used to detect failures in pci_map_single. [PATCH] sysfs_remove_dir-vs-dcache_readdir race fix From: Maneesh Soni I have re-done the patch fixing the race between sysfs_remove_dir() and dcache_readdir(). If you recall, sysfs_remove_dir(kobj) manipulates the ->d_subdirs list for the dentry corresponding to the sysfs directory being removed. It can end up deleting the cursor dentry which is added to the ->d_subdirs list during a concurrent dcache_dir_open() ==> dcache_readdir() for the same directory. And as a result dcache_readdir() can loop for ever holding dcache_lock. The earlier patch which was included in -mm1 created problems which resulted in list_del() BUG hits in prune_dcache(). The reason I think is that in the main loop in sysfs_remove_dir(), dcache_lock is dropped and re-acquired, and this could result in inconsistent ->d_subdirs list and prune_dcache() may try to delete an already deleted dentry. I have corrected this in the new patch as below. I could do sysfs_remove_dir() more neatly on sysfs backing store patch set as there I don't use the ->d_subdirs list. Instead the list of children sysfs_dirent works out well. But untill sysfs backing store patch is picked up the existing code suffer from this race. This can be easily tested by running following two loops on a SMP box # while true; do insmod drivers/net/dummy.ko; rmmod dummy; done # while true; do find /sys/class/net > /dev/null; done o This patch fixes sysfs_remove_dir race with dcache_readdir. There is no need for sysfs_remove_dir to modify the d_subdirs list for the directory being deleted as it is taken care in the final dput. Modifying this list results in inconsistent d_subdirs list and causes infinite loop in concurrently occurring dcache_readdir. o The main loop is restarted every time, dcache_lock is re-acquired in order to maintain consistency. [PATCH] Fix dentry refcounting in sysfs_remove_group() From: Maneesh Soni The following patch fixes the dentry refcounting, during sysfs_remove_group() and also adds the missing dput() for the "extra" ref taken during sysfs_create() for the sub-directory dentry corresponding to attribute group. [PATCH] sysfs: pin kobjects to fix use-after-free crashes From: Maneesh Soni Fix a sysfs use-after-free crash. The problem we have is of the kobject going away while we have a live dentry (the corresponding sysfs directory) still pointing to it throuh d_fsdata pointer. The patch makes sure to keep the kobject alive by taking a reference to it during the life-time of corresponding dentry. o The following pins the kobject when sysfs assigns dentry and inode to the kobject. This ensures that kobject is alive during the life time of the dentry and inode, and people holding ref. to the dentry can access the kobject without any problems. o The ref. taken for the kobject is released through dentry->d_op->d_iput() call when the dentry ref. count drops to zero and it is being freed. For this sysfs_dentry_operations is introduced. For testing one has to run the following test on a SMP box: 1) Do insmod/rmmod "dummy.o" network driver in a forever loop. 2) Parallely do "find /sys/class/net | xargs cat" also in a forever loop. [PATCH] proper alignment of init task in kernel image From: Matt Mackall This keeps the alignment of the init task matched with the stack size. [PATCH] don't abuse empty_zero_page (x86) From: Brian Gerst Don't abuse empty_zero_page as temporary storage for boot parameters and command line. This is a holdover from the days before discardable init sections. [PATCH] kconfig: fix xconfig on /lib64 properly From: Roman Zippel The correct link path is needed at config time to find the correct library, so let's ask gcc for the real path. [PATCH] kconfig: don't rename target dir when saving config From: Roman Zippel conf_write() now checks the target path whether it's a directory, so it saves the config in the directory instead of renaming it. [PATCH] config: disable debug prints From: Roman Zippel This disables some debug prints, which are more confusing than helpful for normal users. [PATCH] config: persistent qconf configuration From: Roman Zippel This patch is by Andreas Fester and saves and restores various runtime options of qconf. [PATCH] config: choice fix From: Roman Zippel When a boolean choice value has a dependency of 'm' it can be shortly treated as a tristate symbol. This fixes this and also add a small optimization to precompute the value of the module symbol instead of checking it all the time. [PATCH] 8250_pnp: probe and remove can be __devinit/__devexit From: "Randy.Dunlap" From: Luiz Fernando Capitulino [PATCH] slab: start_cpu_timer() can be __init From: "Randy.Dunlap" From: Luiz Fernando Capitulino [PATCH] doc. updates/typos From: "Randy.Dunlap" Remove the rest of references to smp.tex Documentation/cpufreq => Documentation/cpu-freq DocBook/tulip.{pdf,ps,html} => DocBook/tulip-user.{pdf,ps,html} Bunch of other typos. [PATCH] ip2: fix double operator From: "Randy.Dunlap" This trivial patch fixes the bug #320: http://bugme.osdl.org/show_bug.cgi?id=320 The additional comment: http://bugme.osdl.org/show_bug.cgi?id=320#c1 Is wrong, because it will send the command twice. We only want to see if the command got success, thus is not necessary to test against < 0 (if the return value is not 1, we got a error). Note that I'm using the function (bad) style. [PATCH] procfs: use kernel min/max From: "Randy.Dunlap" From: Michael Veeck Patch (against 2.6.3) removes unnecessary min/max macros and changes calls to use kernel.h macros instead. [PATCH] reiserfs: use kernel min/max From: "Randy.Dunlap" From: Michael Veeck Remove unnecessary min/max macros and changes calls to use kernel.h macros instead. [PATCH] sound: use kernel min/max From: "Randy.Dunlap" From: Michael Veeck Remove unnecessary min/max macros and changes calls to use kernel.h macros instead. [PATCH] zlib: use kernel min/max From: "Randy.Dunlap" From: Michael Veeck Remove unnecessary min/max macros and changes calls to use kernel.h macros instead. [PATCH] fix HZ leaking to userspace in BSD accounting From: Tim Schmielau BSD accounting was missed in the conversion from HZ to USER_HZ. I thought nobody cared, but apparently there are still users to it. [PATCH] Fix uninlined memcmp on i386 From: DHollenbeck This patch was needed against a pristine 2.6.4 kernel when compiling with "gcc 3.4 _very recent_" using the -Os option. Without this patch, modules would use a non-inline memcmp() and then not find it in the kernel, causing depmod to complain and some modules not to load. [PATCH] EDD: move code from i386-specific locations to generic From: Matt Domsch Three patches to move the BIOS Enhanced Disk Drive code from i386-specific locations into more generic locations, which will allow it to be used on x86-64 as well. move edd.h from include/asm-i386 to include/linux [PATCH] EDD: move code from i386-specific locations to generic From: Matt Domsch move edd.c from arch/i386/kernel to new dir drivers/firmware. Fix up makefiles and Kconfigs. [PATCH] EDD: split assembly code From: Matt Domsch Split EDD assembly code from setup.S into edd.S. This will enable it to be #included into x86-64 too. [PATCH] pte_chain comment fix From: Carl Spalletta Fix a comment bug. [PATCH] add note about "Copyright" to SubmittingDrivers From: Grant Grundler This patch adds a comment to "Documentation/SubmittingDrivers" about the importance of adding a Copyright notice in submitted code. The parisc-linux port has neglected this in the past and I've been slowly trying to correct that (along with proper GPL header). While I make it sound like GPL is the "only" acceptable license, I'll leave it up to lawyers to determine what other appropriate license could be used for a new driver. [PATCH] sonypi devinit section usage From: Stelian Pop This patch removes the usage of __devinit in the srs methods of the sonypi driver, because those functions are also called from sonypi_pm_callback(). Patch originally from Randy Dunlap. [PATCH] VM overcommit documentation fixes From: Andy Whitcroft Whilst looking at the memory overcommit logic I noticed that the pointer to the documentation from the *_vm_enough_memory calls is incorrect. Also that in one instance the routine does not have the expected pointers. [PATCH] meye driver update From: Stelian Pop This patchlet is just a resync with my tree, it only increments the meye driver version number and makes some small comment changes as suggested by Randy Dunlap. [PATCH] remove_suid() should return error code From: Nikita Danilov remove_suid() ignores return value of notify_change()->i_op->setattr(). This mean, that even if file system fails to clear suid bit, generic_file_aio_write_nolock() proceeds with write, which is unsafe. Actually, even ext2's ->setattr() can fail, when trying to update ACL, for example. Attached patch modifies remove_suid() to return result of ->setattr(), and updates in-tree callers. [PATCH] Hotplug CPUs: cpu_down() Implement cpu_down(): uses stop_machine to freeze the machine, then uses (arch-specific) __cpu_disable() and migrate_all_tasks(). Whole thing under CONFIG_HOTPLUG_CPU, so doesn't break archs which don't define that. [PATCH] Hotplug CPUs: Sysfs Online Attribute Add "online" sysfs attribute to cpus to bring them up and down. Again, only under CONFIG_HOTPLUG_CPU. [PATCH] Hotplug CPUs: don't pull onto offline CPUs Don't move tasks onto offline cpus in load_balance and wake_task (the latter is caused by a completion run from stop_machine). Note that cpu_is_offline() is a noop when CONFIG_HOTPLUG_CPU=n. [PATCH] Hotplug CPUs: Take cpu Lock Around Migration Grab cpu lock around sched_migrate_task() and sys_sched_setaffinity(). This is a noop without CONFIG_HOTPLUG_CPU. The sched_migrate_task may have a performance penalty on NUMA if lots of exec rebalancing is happening, however this only applies to CONFIG_NUMA and CONFIG_HOTPLUG_CPU, which noone does at the moment anyway. Also, the scheduler in -mm solves the race another way, so this will vanish then. [PATCH] Hotplug CPUs: Keep IRQs off in Migration Thread Calling Currently the migration thread re-enables irqs, then calls move_task_away which disables IRQs again and actually does the move. This means there is a race where the migration thread gets preempted, and the target CPU can go down. Hold irqs disabled in migration thread across move_task_away(), which now doesn't need to save flags (the other caller is the hotplug CPU code, where irqs are also disabled). [PATCH] Hotplug CPUs: Set prio of migration thread before CPU We need the migration thread to be RT as soon as the CPU comes online: for example, stop_machine() (another RT task) expects to yield to it. Extract the core of setscheduler() and do that when the migration thread is created. rq lock is a precaution against the (theoretical) possibility of someone else doing setscheduer on this thread at the same time. [PATCH] Hotplug CPUs: Make Migration Thread Handle CPUs Going Change the migration thread to directly use its cpu arg, rather than smp_processor_id(): if a cpu goes up then down rapidly, it can be on the wrong cpu just before it is stopped. Add code to stop the migration thread on CPU_DEAD and CPU_UP_CANCELED. Remove the (bogus) priority of the notifier. [PATCH] Hotplug CPUs: Read Copy Update Changes Add hook for RCU to handle jobs on dead cpu. Requires new tasklet_kill_immediate for RCU to clean up its tasklet (which might have been about to run, so tasklet_kill won't work). [PATCH] Hotplug CPUs: Make ksoftirqd Handle CPU Going Down Change ksoftirqd not to assume it's on the CPU: when a cpu goes down, it will be rudely dragged off. Since do_softirq() uses smp_processor_id(), it's easiest to disable preemption, check that the cpu is still up, then call do_softirq(). If the cpu is actually offline, wait for the notifier, which kills us. Take over tasklets from dead cpu in the notifier. Clean up redundant double assignment in CPU_UP callback. [PATCH] Hotplug CPUs: Workqueue Changes Workqueues need to bring up/destroy the per-cpu thread on cpu up/down. 1) Add a global list of workqueues, and keep the name in the structure (to name the newly created thread). 2) Remove BUG_ON in run_workqueue, since thread is dragged off CPU when it goes down. 3) Lock out cpu up/down in flush_workqueue, create_workqueue and destroy_workqueue. 4) Add notifier to add/destroy workqueue threads, and take over work. [PATCH] Hotplug CPUs: Kswapd Changes Keep track of kswapds: it's OK that they get moved off a node when the last CPU goes down, but when a CPU comes back, we should try to move the kswapd back onto its node. [PATCH] Hotplug CPUs: Other CPU_DEAD Notifiers Various files keep per-cpu caches which need to be freed/moved when a CPU goes down. All under CONFIG_HOTPLUG_CPU ifdefs. scsi.c: drain dead cpu's scsi_done_q onto this cpu. buffer.c: brelse the bh_lrus queue for dead cpu. timer.c: migrate timers from dead cpu, being careful of lock order vs __mod_timer. radix_tree.c: free dead cpu's radix_tree_preloads page_alloc.c: empty dead cpu's nr_pagecache_local into nr_pagecache, and free pages on cpu's local cache. slab.c: stop reap_timer for dead cpu, adjust each cache's free limit, and free each slab cache's per-cpu block. swap.c: drain dead cpu's lru_add_pvecs into ours, and empty its committed_space counter into global counter. dev.c: drain device queues from dead cpu into this one. flow.c: drain dead cpu's flow cache. [PATCH] Hotplug CPUs: Remove CPU_OFFLINE Notifier We no longer have a CPU_OFFLINE notifier: we freeze the machine and kill the CPU atomically. Remove it. [PATCH] Fix 3c509 This rolls up Marc Zyngier's EISA correction (first two) and adds a missed netdev_priv() conversion that was causing an oops on module removal. [PATCH] fix "optimize && ?" This prevents the "optimize && ?" message appearing when the kernel configuration tool is run. The message could be eliminated from the tool, but I'd rather fix the needlessly over-complicated expression: [SPARC64]: Implement pci_dma_error(). [PM2FB]: Fix build on big-endian. [SPARC64]: Update defconfig. [SPARC64]: Export sbus_dma_sync_X_for_device routines too. [PATCH] PCI: insert_resource can succeed and return an error If we start again, we can return an error even if we were successful. Reset the result to 0 before beginning again. Why don't we use a tailcall here? [PATCH] PCI: Use insert_resource in pci_claim_resource On ia64, the parent resources are not necessarily PCI resources and so won't get found by pci_find_parent_resource. Use the shiny new insert_resource() function instead, which I think we would have used here had it been available at the time. [PATCH] PCI: claim PCI resources on ia64 Call pci_claim_resources() so we can see what PCI resources are being used. [NET]: Preemption disabling is superfluous in net_rx_action(). Noticed by Jan Glauber, confirmed by Stephen Hemminger. Add FBIOBLANK to list of compatible ioctls. Linux 2.6.5-rc2