Summary of changes from v2.6.7 to v2.6.8-rc1 ============================================ Kconfig typo fix from Jochen Voss [ACPI] PCI IRQ update (Bjorn Helgaas) http://bugme.osdl.org/show_bug.cgi?id=2574 mp_parse_prt() and iosapic_parse_prt() used to allocate all IRQs, whether devices needed them or not. Some devices failed because the this method enabled unused PCI Interrupt Link Devices, which disrupted active link devices. Now the PRT knowledge is pulled out of the arch code and the IRQ allocation and IO-APIC programming is done by pci_enable_device(). This is also a step toward allowing the addition of new root bridges and PRTs at run-time. The architecture supplies unsigned int acpi_register_gsi(u32 gsi, int edge_level, int active_high_low) which is called by acpi_pci_irq_enable(). ACPI supplies all the information from the PRT, and the arch sets up the routing and returns the IRQ it allocated. [PATCH] Nuke HAS_IP_COPYSUM for net drivers Entirely untested, but Obviously Correct(TM). HAS_IP_COPYSUM has been utterly meaningless for a long time. [NETDRV #1] Ifdef builtin-only probe in ISA/MCA drivers Here is the bit which conditionalises the builtin-only probe functions. [NETDRV #2] Use driver-specific name for resources Here is the next part which uses a driver-specific name instead of dev->name for resource allocations prior to netdev registration. It also changes printks that are in direct response to errors in resource allocations. [PATCH] move scsi debugging helpers and give them sane names - give the constants.c prettyprinting helpers proper scsi_ prefixed names (and keep compat versions for 2.6.x) - move them to include/scsi/scsi_dbg.h so now really only legacy stuff is left in drivers/scsi/scsi.h Signed-off-by: James Bottomley SCSI: slave_detach -> slave_destory comment fix From: Guennadi Liakhovetski Signed-off-by: James Bottomley Convert tmcscsim to new probing interfaces From: Guennadi Liakhovetski Update the driver to use the new pci, scsi and module interfaces. Modified with feedback from hch Signed-off-by: James Bottomley [PATCH] ipr scsi busy io hang Signed-off-by: James Bottomley [PATCH] ipr duplicate ioa reset fix This patch closes a window where if a device had a cancel all outstanding as a result of a check condition and the adapter was reset for some reason, a request sense would still be issued, which would end up timing out and issuing an additional adapter reset. It could also result in a leak of command blocks, depending on when it timed out. Signed-off-by: James Bottomley [PATCH] ipr driver version 2.0.8 Bump driver version Signed-off-by: James Bottomley [PATCH] USB / SCSI multi-card reader whitelist updates. For more info see Red Hat bugzilla entries #85851 and #124048 Signed-off-by: James Bottomley MPT Fusion driver 3.01.07 update From: "Moore, Eric Dean" Clean up backword compatibility with 2.4 kernel and older. Patch provided by Christoph Hellwig Signed-off-by: James Bottomley [PATCH] SCSI: remove extra queue unplug calls blk_insert_request will do the right thing and either unplug the queue or call the request_fn, so users of scsi_do_req do not need to call generic_unplug_device themselves. The attached patch just removes that call from scsi_lib.c and the sg driver after they do a scsi_do_req. Signed-off-by: James Bottomley [PATCH] qla1280.c warning fix. drivers/scsi/qla1280.c:3124: warning: `qla1280_64bit_start_scsi' defined but not used Signed-off-by: James Bottomley [PATCH] Stop megaraid trashing other i960 based devices From: Alan Cox In 2.4 the megaraid driver was careful to avoid stepping on wrong devices. Specifically the megaraid3 series devices used an intel pci ID (8086:1960) which is the generic i960 identifier not their own. The code to do this in 2.4 worked for almost all cases, but even that code has mysteriously vanished in 2.6 meaning the megaraid driver trashes stuff like promise i2o cards and compaq management cards. The following patch puts back the 2.4 stuff + one additional check so that the driver isn't quite as rude as it was before. Signed-off-by: James Bottomley [PATCH] SCSI: more whitelist updates for usb card readers ATech 9-in-1 card reader. Cbox 3 5 1/2 bay with 6in1 card reader Signed-off-by: James Bottomley [PATCH] SCSI: Correct BELKIN card reader whitelist entry. Should be FORCELUN not SPARSELUN ? Signed-off-by: James Bottomley [PATCH] tmscsim: Update version after "new API" The "API-update" patch, just approved by Christoph deserves a new version. Signed-off-by: James Bottomley [PATCH] tmscsim: remove DeviceCnt On Wed, 26 May 2004, Christoph Hellwig wrote: > On Sun, May 23, 2004 at 11:19:58PM +0200, Guennadi Liakhovetski wrote: > > > > Whereas, DCBCnt is incremented on slave_alloc, decremented on > > slave_destroy and used in a couple more places. So, is it safe to assume > > that DeviceCnt is redundant and remove it in a next patch?... Then it > > might be already safe to move scan_devices as you suggest? > > Looks like a way to go. I'm not sure what scan_device is supposed to > do as I already wrote, but from looking at when it's set/cleared I'm > pretty sure it tries to indicate whethere we're currently scanning for > devices. And useing slave_alloc/slave_configure is a much safer way to > find that out then guessing from the commands sent. So, here's the first one - remove DeviceCnt. Signed-off-by: James Bottomley [PATCH] unchecked kmalloc in sr_audio_ioctl() From: "Luiz Fernando N. Capitulino" Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] tmscsim: convert to slave_... On Wed, 26 May 2004, Christoph Hellwig wrote: > Looks like a way to go. I'm not sure what scan_device is supposed to > do as I already wrote, but from looking at when it's set/cleared I'm > pretty sure it tries to indicate whethere we're currently scanning for > devices. And useing slave_alloc/slave_configure is a much safer way to > find that out then guessing from the commands sent. Attached is a patch, that moves scan_device to slave_alloc/_configure/_destroy, as you suggested (to be precise, as I understood your suggestion:-)) Signed-off-by: James Bottomley [PATCH] ipr operational timeout oops This patch fixes an oops that can occur if an adapter times out coming operational. Signed-off-by: James Bottomley [PATCH] get I2O working with Adaptec's zero channel this patch now gets the mentioned controllers working with the I2O subsystem. It tested on two different system with ASR-2005S and ASR-2010S and reported as working. It's also tested on i686 and x86_64 with already working I2O controllers without a problem. Signed-off-by: James Bottomley [PATCH] remove calls of obsolete scsi APIs in i2o_scsi From: Markus Lidel Here is a patch from Christoph Hellwig, which removes calls of the obsolete scsi API in i2o_scsi. Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] Nuke HAS_IP_COPYSUM HAS_IP_COPYSUM has been utterly meaningless for a long time. Signed-off-by: Roger Luethi [PATCH] Nuke CanHaveMII and related code All Rhines can have a MII. Signed-off-by: Roger Luethi [PATCH] Nuke HasESIPhy and related code This has been dead code forever. Signed-off-by: Roger Luethi [PATCH] Nuke default_port, references to if_port, medialock As is, code doesn't do anything useful. Signed-off-by: Roger Luethi [PATCH] Nuke all pci_flags All this code together can be replaced with a single #ifdef USE_MMIO. Signed-off-by: Roger Luethi [PATCH] Return codes for rhine_init_one Use return codes in rhine_init_one instead of -ENODEV for all errors. Signed-off-by: Roger Luethi [PATCH] Rewrite special-casing Use PCI revision to determine special cases. One bit field replaces a bunch of data structures holding special case information. Replace chip_id, drv_flags in rhine_private with quirks Remove enum rhine_chips, struct rhine_chip_info (and array), enum chip_capability_flags Add enum rhine_revs, enum rhine_quirks (some values in preparation for subsequent changes) wait_for_reset() and enable_mmio() now use quirks instead of chip_id Remove model names from ident strings for now. Signed-off-by: Roger Luethi [PATCH] Add rhine_power_init(): get power regs into sane state Add rhine_power_init(): get power regs into sane state. Move the respective code out of rhine_init_one. Add code for two additional patterns (Rhine III). Signed-off-by: Roger Luethi [PATCH] USB: unusual_devs.h update On Mon, 3 May 2004, zcat wrote: > I am trying to get my camera going as a webcam (concord EyeQ Duo in PC > mode, not HDD mode) with the 2.6.4 kernel using the se401 driver > (compiled in).. It logged the following message, which doesn't mean much > to me so I have no idea if it's useful information or not; > > May 3 21:08:11 mrsnorris kernel: usb 1-1: new full speed USB device > using address 2 > May 3 21:08:16 mrsnorris kernel: usb 1-1: control timeout on ep0out > May 3 21:08:16 mrsnorris kernel: usb-storage: This device > (0595,4343,0100 S 00 P 00) has an unneeded Protocol entry in unusual_devs.h > May 3 21:08:16 mrsnorris kernel: Please send a copy of this message > to This fixes the "unneeded Protocol entry" message. We never solved the control timeout problem. Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Fix disconnect bug in dummy_hcd Greg: This patch fixes a bug in disconnect handling for the dummy_hcd driver. After a disconnect the driver would still accept URBs for endpoint 0, leading to an oops. It also improves the ad-hoc technique used by the driver to track its gadget's struct usb_device and fixes the way port-power changes are handled. Please apply. Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] Add support for ISD-300 controller This patch adds support in unusual_devs.h for the ISD-300 USB controller used in CD-ROM enclosures. With it, since 2.6.0 it allowed me to move gigabytes of data and worked without a hitch. Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman [PATCH] USB: pxa/rndis device descriptor This fixes a problem that all pxa2xx_udc g_ether devices would run into. They'd give the wrong descriptors, like: > --------msg1- usbview ---------- > Device Descriptor: bcdUSB: 0x0200 > bDeviceClass: 0xFF > bDeviceSubClass: 0x00 > bDeviceProtocol: 0x00 > bMaxPacketSize0: 0x10 (16) Windows doesn't like RNDIS-supporting devices to point out that they're really vendor-specific. So this patch makes sure they don't. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usb retry cleanups This patch stops changing the reported fault mode in cases where retries of GET_DESCRIPTOR fail because the device just doesn't have such a descriptor. Plus, it stops printing messages when retrying. It also reduces the number of retries; the first retry seems to resolve most of these firmware problems. Signed-Off-By: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: proper evaluation of the union descriptor for CDC ACM this changes acm_probe() to using the proper union descriptor. It contains the workaround David suggested. Please apply. - fix probing to use cdc union descriptor Signed-off-by: Oliver Neukum Signed-off-by: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman [PATCH] USB: error handling of open of acm driver this adds error handling to the open method of the cdc acm driver. The change set is relative to my last patch rewriting probe. - add error handling to open method Signed-off-by: Oliver Neukum Signed-off-by: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix racy access to urb->status in cdc acm driver Hi, fix access to urb->status by introduction of an explicit flag for finished data transfer. - fix racy access to urb->status Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix race between disconnect and write of acm driver acm uses a workqueue to defer part of a write operation. In case of disconnect this work must be waited for. - fix race between write and disconnect Signed-off-by: Oliver Neukum Signed-off-by: Vojtech Pavlik Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Minor cleanups for hub driver Greg: This patch takes care of some small miscellaneous items in hub.c: Move the definition of CONFIG to the right place; Print the proper value for submission status in the error log; Remove an unused list of all hubs; Remove some unneeded braces; Kill an accidentally-resurrected comment. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Move usb_new_device() et al. into hub.c This patch moves usb_new_device(), usb_disconnect(), usb_choose_address(), and usb_release_address() from usb.c to hub.c. As a side benefit, choose_address() and release_address() can now become static. The other two can't, because they have to be exported for use by HCD's when registering/unregistering root hubs. Some other features of the patch: The usb_snddefctrl() and usb_rcvdefctrl() macros have been removed, since only one of them was used and only in one spot. The comment about configuration choice needing to interact with hub power budgeting has been moved in accordance with David's wish. usb_new_device() checks to make sure a configuration could be chosen and logs a warning if no choice was made. Following Linus's preference, the #ifdef preprocessor stuff has been removed from around the calls the show_string routine. It is now defined as a non-inline routine when debugging is enabled and as an inline no-op otherwise (the compiler will optimize away the useless tests). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [Driver Model] Consolidate attribute definition macros - Create __ATTR(), __ATTR_RO(), and __ATTR_NULL macros to help define attributes in a neat, short-hand form. - Apply these macros to the attribute definition in include/linux/device.h - Note: These can be used to more cleanly define attributes in your own code. e.g: static struct device_attribute attrs[] = { __ATTR_RO(foo), __ATTR_RO(bar), __ATTR(baz,0666,baz_show,baz_store), __ATTR_NULL, }; ...etc. Signed-off-by: Greg Kroah-Hartman [PATCH] ata_check_bmdma Move hand-coded BMDMA status check into separate function. [ACPI] fix !CONFIG_PCI build (Bjorn Helgaas) [Driver Model] Fix up silly scsi usage of DEVICE_ATTR() macros. - Hey, just because the macro incorrectly included a ';' doesn't mean one shouldn't add one on their own.. (Or at least be consistent.) Signed-off-by: Greg Kroah-Hartman Add basic sysfs support for raw devices This is needed by people who use udev and want raw devices. SuSE is shipping with this patch. Signed-off-by: Greg Kroah-Hartman [sysfs] Add attr_name() macro - Returns the name of an embedded attribute in a higher-level attribute. [Driver Model] Add default attributes for classes class devices. - add struct class::class_attrs, which is designed to point to an array of class_attributes that are added when the class is registered and removed when the class is unregistered. This allows for more consolidated and cleaner definition of and management of attributes. - Add struct class::class_dev_attrs to do something similarly for class devices. Each class device that is registered with the class gets that set of attributes added for them, and subsequently removed when the device is unregistered. Each array depends on a terminating attribute with a NULL name. Hint: use the new __ATTR_NULL macro to terminate it. Driver Model: More cleanup of silly scsi use of the *ATTR macros... Signed-off-by: Greg Kroah-Hartman Driver Model: Cleanup the i2c driver silly use of the *ATTR macros which just broke Signed-off-by: Greg Kroah-Hartman Cset exclude: vojtech@suse.cz|ChangeSet|20040602201956|45549 Oops, this broke device removal pretty badly :( Signed-off-by: Greg Kroah-Hartman [PATCH] Add class support to cpuid.c This patch adds class support to arch/i386/kernel/cpuid.c. This enables udev support. I have tested on a 2-way SMP system and on a 2-way built as UP. Here are the results for the SMP: [hlinder@w-hlinder2 hlinder]$ tree /sys/class/cpuid /sys/class/cpuid |-- cpu0 | `-- dev `-- cpu1 `-- dev 2 directories, 2 files [hlinder@w-hlinder2 hlinder]$ more /sys/class/cpuid/cpu0/dev 203:0 [hlinder@w-hlinder2 hlinder]$ more /sys/class/cpuid/cpu1/dev 203:1 [hlinder@w-hlinder2 hlinder]$ And for the UP: [root@w-hlinder2 root]# tree /sys/class/cpuid /sys/class/cpuid `-- cpu0 `-- dev 1 directory, 1 file Signed-off-by: Greg Kroah-Hartman [PATCH] USB: 2.6-BK usb (printing) broken On Sat, 29 May 2004, Jens Axboe wrote: > > > Both 2.6.7-rc1 and BK current spit out a bunch of: > > > > > > drivers/usb/class/usblp.c: usblp1: nonzero read/write bulk status received: -2 > > > drivers/usb/class/usblp.c: usblp1: error -2 reading from printer > > > drivers/usb/class/usblp.c: usblp1: error -115 reading from printer > > > drivers/usb/class/usblp.c: usblp1: error -115 reading from printer > > > ... > > > > > > (about ~80 of that last line) but work for me. > Sorry wasn't quite clear - the above messages are with 2.6.7-rc1 and > current bk with your patch backed out. Current bk with the patch reports > only the timeouts I originally listed. Okay, I feel better. It looks like those errors you see are caused by a bug in the usblp driver. The patch below ought to help. [PATCH] USB: kyocera 7135 patch Here is a patch based on 2.6.7-rc2 that makes the Kyocera 7135 work. The Kyocera appears to have the same setup as the Trio. Its endpoints are laid out like this: > >>>type address > >>>usb bulk out: 0x01 > >>>usb interrupt in: 0x82 > >>>usb bulk out: 0x03 > >>>usb bulk in: 0x84 The last two are the ones used for the syncing communication. So the patch adds the ids for the kyocera and makes the treo_attach function handle the kyocera too. I also changed the comment; it appears there was an error in the original comment about the treo: Joe Nardelli wrote: > Actually, the comment isn't quite right for Treos either (oops). It > should read: > > ... > 1st bulk in endpoint to communicate with the 2nd bulk out endpoint > ... Signed-off-by: Greg Kroah-Hartman [Driver Model] Add default attributes for struct bus_type. - Similar to default attributes for struct class, this is an array of attributes, terminated with an attribute with a NULL name, that are added when the bus is registered, and removed when the bus is unregistered. USB: remove "devfs" message from kernel log for usb-serial driver No one uses devfs on 2.6 :) Signed-off-by: Greg Kroah-Hartman [Driver Model] Add default device attributes to struct bus_type. - Add struct bus_type::dev_attrs, which is an array of device attributes that are added to each device as they are registered. - Also make sure that we don't hang when removing bus attributes if adding one failed.. [PATCH] 1/2 3ware 9000 SATA-RAID driver v2.26.00.009 Here is an updated version v2.26.00.009 of the 3ware 9000 SATA-RAID driver. Changes in this release: - Convert driver to pci_driver format. - Remove proc interface, add sysfs attributes. - Return SCSI_MLQUEUE_HOST_BUSY when card status is busy. Future versions may include: - PAE fix - 80 column wrap fixes - Remove more prototypes by re-ordering functions. - sysfs queue depth adjustment instead of module_param Signed-off-by: James Bottomley [PATCH] 2/2 3ware 9000 SATA-RAID driver v2.26.00.009 Signed-off-by: James Bottomley [ACPI] acpi=force overrides blacklist pci=noacpi or acpi=noirq (Andi Kleen) [PATCH] fix dpt_i2o compilation for alpha and sparc This patch has been floating around for ages, got reminded of it again when looking at the debian kernel package. Signed-off-by: James Bottomley [PATCH] tmscsim: Store pDCB in device->hostdata On Sun, 23 May 2004, Christoph Hellwig wrote: > The other thing is that most calls to dc390_findDCB could probably be > replaced with stroing the pDCB in scsi_device->hostdata on slave_alloc, > but that could aswell be done in an incremental patch. Done in the attached patch. Tested as usual and a bit harder. Signed-off-by: James Bottomley [PATCH] remove sleep_on_timeout usage in megaraid megaraid does sleep_on_timeout on a stack waitq - use msleep instead. Signed-off-by: James Bottomley [PATCH] handle NO_SENSE in sd Original patch from http://marc.theaimsgroup.com/?l=linux-scsi&m=107428662718579&w=2 reworked to according to James' suggestion to handle NO_SENSE the same as RECOVERED_ERROR. Signed-off-by: James Bottomley [PATCH] fix check_region usage in eata_pio I'd love to rework the init sequence a bit more, but without beeing able to actually test the driver I'd rather stick to the bulletproof fix. Signed-off-by: James Bottomley [PATCH] fix sym53c416 check_region usage again, the init code could use some bigger rework, but let's stick to the minimal fix until we have some testers. Signed-off-by: James Bottomley [PATCH] remove obsolete API usage from dpt_i2o Signed-off-by: James Bottomley [PATCH] Advansys: Add basic highmem/DMA support On Wed, 2004-05-19 at 05:38, Herbert Xu wrote: > This is a resend of my patch that adds basic support for highmem > on i386 to the advansys driver. It has been tested in > http://bugs.debian.org/245238. > > The maintainer email address listed in the MAINTAINERS file bounced > so someone else will need to look at this. I converted your patch to use the DMA-API. This will be necessary to use the EISA advansys boards---Of course, EISA won't work properly until the entire driver is converted to the driverfs probing API, sigh, but I'll get around to that eventually. OK, and I couldn't resist getting rid of the stupid in_isr locking on the done function. Converted from original patch by Herbert Xu Signed-off-by: James Bottomley [PATCH] fix check_region usage in eata_pio Based on "eata_generic.h", this SCSI controller has 9 bytes of IO space, not 8, so update request_region(), release_region(), and n_io_port to use 9 instead of 8. diffstat:= drivers/scsi/eata_pio.c | 16 ++++++++-------- 1 files changed, 8 insertions(+), 8 deletions(-) Signed-off-by: James Bottomley [PATCH] scsi_dev_flags must be __initdata, not __init __init is only for functions Signed-off-by: James Bottomley [PATCH] Lost 2.4 change for BusLogic info From: Alan Cox I think it might be a good thing if this was fixed to match 2.4 Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] scsi_transport_spi.c build fix Signed-off-by: James Bottomley [PATCH] SCSI: replace deprecated hosts.h file Signed-off-by: James Bottomley [PATCH] 3ware 9000 driver update From: "Adam Radford" This patch updates the 3w-9xxx driver in 2.6.7-rc2-mm1 to v2.26.02.000 to cleanup several things pointed out by Chris Hellwig / Jeff Garzik. Changes in this release: - Use descriptive defines for phase numbers. - Remove un-needed casts for TW_Command_Full - Rework eh_reset(), eh_abort() spinlocks. - Remove all mdelays, replace w/ schedule_timeout(). - Remove MODULE_PARAM cmds_per_lun, add sysfs device attribute 'queue_depth'. - Remove twa_slave_configure(). - Remove twa_info(). - Remove all bitfields from structures, add bitmask macros. - Remove twa_setup_irq() wrapper, call directly. - Remove un-needed prototypes. - Propogate return value of pci_enable_device(), pci_set_dma_mask(), ioremap(). - Use pci_request/free_regions(). - Add missing call to pci_disable_device() on probe failure. - Unregister character ioctl interface in twa_remove(). - Make some excessively lengthy lines < 80 columns. - Use pci_module_init() instead of pci_register_driver(). - Remove bogus TW_IN_INTR check, fix twa_interrupt() spinlock. - Rev driver branch to .02 to denote kernel version. Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] 3ware 9000 schedule_timeout fix From: "Adam Radford" This small patch fixes the broken schedule_timeout() usage in the 3w-9xxx driver, and replaces the calls with msleep(). Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] missing forward declarations in scsi_eh.h Signed-off-by: James Bottomley [PATCH] update 53c700 to avoid obsolete headers Signed-off-by: James Bottomley [PATCH] kill dead compat code in advansys I actually wanted to fix up the check_region usage there but got lost in the mess. Let's start by kicking out the 2.2 compat and using scsi layer constants instead of their own redefinitions first. Signed-off-by: James Bottomley sg update to 20040516 From: Douglas Gilbert Here are some further refinements to this patch with help from Pat Mansfield: - replace vmalloc() with kmalloc(,GFP_KERNEL) - bump max sg devices from 8192 to 32768 Tested to 16k devices (and 8k devices on a box with 512MB ram), Patch is against lk 2.6.6 (or 2.6.6-bk1). Signed-off-by: James Bottomley Driver Model: And even more cleanup of silly scsi use of the *ATTR macros... Signed-off-by: Greg Kroah-Hartman PCI: convert to using dev_attrs for all PCI devices. Signed-off-by: Greg Kroah-Hartman [PATCH] I2C i2c-piix: Don't treat ServerWorks servers as Laptops I'm sending you this little obvious patch which should enable i2c-piix to work on IBM servers with ServerWorks chipsets. It still will treat any IBM/Intel machine as a laptop and refuse to work, but it's better than before. i2c: Treat only IBM machines with Intel chipsets as IBM laptops. Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: update I2C IDs > > Greg, should I send a patch to you with these? > > Sure, if it's needed. Just noticed that I never sent the promised patch. Here it is. I also added a few other IDs, since we have them in our (2.4) i2c CVS repository. Having them in 2.6 as well will at least prevent collisions. Signed-off-by: Greg Kroah-Hartman [PATCH] Driver Core: fix struct device::release issue Signed-off-by: Greg Kroah-Hartman On Saturday 27 March 2004 02:14, Greg KH wrote: > On Sat, Mar 06, 2004 at 12:47:24PM +0100, Frank A. Uepping wrote: > > Hi, > > if device_add fails (e.g. bus_add_device returns an error) then the release > > method will be called for the device. Is this a bug or a feature? > > Are you sure this will happen? device_initialize() gets a reference > that is still present after device_add() fails, right? So release() > will not get called. At the label PMError, kobject_unregister is called, which decrements the recount by 2, which will result in calling release at label Done (put_device). kobject_unregister should be superseded by kobject_del. Here is a patch: [PATCH] Fixes for hot-plug drivers (updated) Here is the updated patch (against 2.6.7-rc1) for the shpchp and pciehp drivers that fixes the following issues: - proper LED status when latch is open or card is not present while the user tries to power up the slot; (reported by D. Keck) - check if kmalloc() return NULL before proceeding in acpi_get__hpp(); (provided by L. Capitulino) - add up(&ctrl->crit_sect) before return in error cases in several places; - proper handling of resources when there are other onboard devices behind the p2p bridge that has the hot-plug capabaility; - need to check negotiated link width in check_lnk_status(); - cleanup board_added() in pciehp Signed-off-by: Greg Kroah-Hartman [PATCH] USB: pegasus driver and ATEN device support I have created a patch to add support for ATEN device in pegasus usb driver. I've sent the patch to the maintainer stated in pegasus.h but after several weeks I didn't recieve a response, so I'm sending it to you now. The patch should apply cleanly on 2.6.6, but it doesn't apply cleanly on todays -bk as there was some patch adding some other device. One thing I'm not 100% sure are the flags specified to PEGASUS_DEV, what means HAS_HOME_PNA? Signed-off-by: Greg Kroah-Hartman [PATCH] USB: fix Memory leak in visor.c and ftdi_sio.c Signed-off-by: Joe Nardelli Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Code cleanup for the UHCI driver This patch makes some simple cleanups in the UHCI driver: It introduces msecs_to_jiffies() conversions and uses msleep(). It wakes up threads waiting for an endpoint to be disabled in the oddball case where interrupts aren't working. (This should have been in a previous patch but I missed it.) It disables PCI interrupt generation whenever the controller is reset and enables it when the controller is started. This may possibly solve some people's problems with suspend/resume. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Debounce all connect change events This patch makes the hub driver debounce all connection changes. Right now the driver only does so if the status happens to be CONNECTED at one particular instant. However, the whole point of debouncing is that the connection is subject to transient interruptions until it has stabilized; hence deciding whether to debounce based on a single initial test defeats the entire purpose. There are some additional smaller changes that go along with the major one: Comments added to hub_port_connect_change() detailing the conditions under which it will be called. Don't clear the port's connect-changed feature if it wasn't set. Skip debouncing if there wasn't a physical connection change but only a logical port-enable change (or a firmware-download- induced device morph -- not yet implemented). Clear all the hub status change indicators in hub_events() before handling a connect change. This will reduce syslog clutter from status change bits that remain set while khubd is busy taking care of a new device. The patch includes no changes to the debounce routine itself. Please apply. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Superficial improvements to hub_port_debounce() Since my previous suggestions for changes to hub_port_debounce() encountered so much resistance, this patch makes some fairly superficial improvements to the code while leaving the logic of the algorithm almost completely intact. The only behavioral change is that it actually requests the port status at the start, rather than assuming the status is not CONNECTED. Changes include: Vastly improved comments that are now unambiguous and accurately descriptive of the code. Local variables changed to more sensible names. The stability period is now reported in milliseconds rather than a meaningless poll count. The sleep interval is moved from the start of the loop to the end, so that the first time through we read the port status immediately. If the connection has not stabilized after the total timeout expires, -ETIMEDOUT is returned rather than whatever the current connect status happens to be. If the connection does stabilize then the port status is returned so that hub_port_connect_change() will have an up-to-date value for the status rather than relying on the pre-debounce value. The changes I wanted to make but other people were worried about are included as comments. A later (small) patch will uncomment them for testing. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Genuine changes to hub_port_debounce() This patch includes the algorithmic changes I would like to see in hub_port_debounce(). They are: Increase the total timeout period from 400 ms to 1500 ms. Check the port's connect-changed status during the polling loop. Return as soon as the connection has been stable for the required time, even if it has been stably _dis_-connected. (The current code waits for the full timeout period if there isn't a connection.) In previous emails I have responded to all the concerns raised by others about these changes, and I can't imagine how they could cause any trouble. Increasing the total timeout won't affect people with properly functioning hardware. Their connections will quickly stabilize and the routine will return just as before. People with flaky hardware that takes a long time to settle down will now be able to use their devices. Checking the connect-changed status during the polling loop will make the test more conservative. The code will be able to detect transient disconnections that it would have missed before, and it won't return until the connection really _is_ stable. Furthermore, this makes the test compliant with the USB specification, which requires the stability timer to be restarted whenever a connection change occurs. Returning early for disconnections is a simple optimization. It's more important now that the total timeout length is 1.5 seconds rather than 0.4 seconds. I urge you to apply this patch and for people to try it out. If there do turn out to be problems... the patch is very small, well-contained, and easy to revert. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] Make the scsi error handler bus settle delay a per template option On 1 Jun 2004, James Bottomley wrote: > On Tue, 2004-06-01 at 15:29, Alan Stern wrote: > > In addition, the settle-time delays would have to be removed from the > > error handler -- which means adding it to all the low-level drivers. Is > > that doable? > > Well, for 2.6, I think that a simple flag indicating that the driver > will implement it's own timeout should suffice rather than altering > every LLD... Signed-off-by: Alan Stern Signed-off-by: James Bottomley [PATCH] Module section offsets in /sys/module So here I am trying to write about how one can apply gdb to a running kernel, and I'd like to tell people how to debug loadable modules. Only with the 2.6 module loader, there's no way to find out where the various sections in the module image ended up, so you can't do much. This patch attempts to fix that by adding a "sections" subdirectory to every module's entry in /sys/module; each attribute in that directory associates a beginning address with the section name. Those attributes can be used by a a simple script to generate an add-symbol-file command for gdb, something like: #!/bin/bash # # gdbline module image # # Outputs an add-symbol-file line suitable for pasting into gdb to examine # a loaded module. # cd /sys/module/$1/sections echo -n add-symbol-file $2 `/bin/cat .text` for section in .[a-z]* *; do if [ $section != ".text" ]; then echo " \\" echo -n " -s" $section `/bin/cat $section` fi done echo Currently, this feature is absent if CONFIG_KALLSYMS is not set. I do wonder if CONFIG_DEBUG_INFO might not be a better choice, now that I think about it. Section names are unmunged, so "ls -a" is needed to see most of them. Signed-off-by: Greg Kroah-Hartman Driver core: finally add a MAINTAINERS entry for it. Signed-off-by: Greg Kroah-Hartman [AGPGART] Kconfig Typo fix From: Tuncer M zayamut Ayaz Signed-off-by: Dave Jones USB: make usb devices remove their sysfs files when disconnected. Signed-off-by: Greg Kroah-Hartman [PATCH] ia64: delete McKinley A-stepping code The patch below removes the config option and one bit of code for McKinley A0/A1 CPU workarounds. These CPUs were never used in production, and IIRC this workaround really only affected X11. Signed-off-by: David Mosberger [PATCH] Re: Problems with cyberjack usb-serial-module since kernel 2.6.2 > Send me a patch to back those changes out to fix your device and I'll > apply it. If the author is around to realize this, that should wake > them up :) Ok, here you are! :) Attached is a patch for linux-2.6.7-rc2. (though the patch hasn't changed since -rc1) Again a short description: (the patch removes most of the changes done in linux-2.6.2) 1. Removed the local buffer of cyberjack_write, because something goes wrong upon a write-request bigger than the buffer. Without this, a write-request stalls with error -3. 2. Removed some usb_clear_halt() lines. Without this, the device doesn't even open and returns -7. It works for my cyberjack pinpad USB card reader on - nforce2 chipset - VIA KM266 chipset - AMD Irongate chipset Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: GetMaxLUN tightening This patch started life from Alan Stern as as274, and has been heavily modified. It narrows the case where a clear_halt() is issued after a failed GetMaxLUN command to only a STALL case. Since the only legimate responses to a GetMaxLUN are STALL or data, anything else is now considered a fatal error and we give up on the device. Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman [PATCH] USB: enable pwc usb camera driver The attached patch enables the pwc driver included with kernel 2.6.7-rc2 It also removes the warnings during compilation. However, note that I blindly duplicated the release approach used by other usb camera drivers, replacing the current no-op. The driver works for me with a Logitech QuickCam Notebook Pro and GnomeMeeting. Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Fix logic in usb_get_descriptor() This patch fixes a simple logic error in usb_get_descriptor(). It also takes the opportunity to make the subroutine a little easier to read. Please apply. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] ia64: fix ia32 virtual memory leaks due to partial-page mappings Certain IA-32 applications which do mmap/munmaps which are not PAGE_SIZE aligned could see temporary (recovered at process exit time) memory leaks, because the kernel didn't have enough data to decide if the complete page could be unmapped. This patch adds a new data structure called the "partial page list" which helps the kernel keep track of precisely which 4k pages are in use by the IA-32 application. Armed with this data, the kernel can make better decisions at munmap and mprotect time. No significant performance degradation was observed in the workloads we tested and in some cases, the performance actually improved! This is possibly due to the reduced length of the vma list. Signed-off-by: Arun Sharma Signed-off-by: Gordon Jin Signed-off-by: David Mosberger [PATCH] USB devio.c: deadlock fix proc_resetdevice is called with dev->serialize held. usb_reset_device takes dev->serialize and then calls __usb_reset_device. To avoid deadlock, proc_resetdevice should call __usb_reset_device directly. Signed-off-by: Duncan Sands Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Check port reset return code This patch adds checking for the SET-FEATURE request that actually does a port reset. Without the check, the hub driver just assumes that the port reset command actually was transferred okay. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Fix resource leakage in the hub driver The hub driver is very careless about returning resources when an error occurs while installing a new device. This patch attempts to put some order back into the situation. Details: Since usb_new_device() allocates neither the device structure nor the device address, it shouldn't release either one. Because usb_new_device() no longer releases the device structure, usb_register_root_hub() doesn't need to take an extra reference to it. Since the device address selection and TT setup code is used only for new devices, not ones being reset, move that code from hub_port_init() to hub_port_connect_change(). By the same token, hub_port_init() doesn't have to release the device address or the device structure. Just to make things look better, move the failure code in hub_port_init() to the end of the routine. And when disabling endpoint 0, disable both the IN and OUT parts of the endpoint. In hub_port_connect_change(), make all the failure paths execute the same code so that resources are always released. These resources comprise: the pointer from the parent to the new child device, the HCD state for ep0, the device's address, and the device structure itself -- in short, everything that's set up before calling usb_new_device(). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: unusual_devs.h update Given the problems that Dan Scholnik has reported, we should combine the unusual_devs.h entries for the Casio QV cameras into one. The new NEED_OVERRIDE flag will prevent complaints about unnecessary overrides, and Dan says the same subclass and protocol values should work for all the cameras. If they don't we'll hear about it soon enough! On Tue, 1 Jun 2004, Dan Scholnik wrote: > On Tue, 2004-06-01 at 14:14, Alan Stern wrote: > > On Tue, 1 Jun 2004, Dan Scholnik wrote: > > > > > Up until the 2.6 kernels, there was one entry for all the QV cameras > > > with both US_SC_8070 and US_PR_CB that I think seemed to work fine for > > > everyone. As far as I know the only problem was all the folks emailing > > > the log entry stating that the Casio entry wasn't needed. So, you could > > > revert back to that, or revert back to the 2.6.3ish version (pre-as190) > > > that had the overrides just for product IDs 1001-9009. I'm not really > > > an expert on Casio's cameras, I'm afraid, just the one model I own which > > > is 4-5 years old now. > > > > > > I'll be happy to prepare a patch any way you choose to go. > > > > How does this work for you? > > > > Alan Stern > > Works fine for me; that's I think exactly how it was from the beginning > until 2.6 and the later 2.4 kernels when all the changes were made. > Just cross your fingers that it doesn't somehow break newer Casios, as > it would seem every camera they ever made falls under that entry. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: rndis (1/4) update OID support NDIS devices have a generic attribute get/set API where the attributes are identified by 32 bit "OIDs". This fixes some problems with the OIDs supported by the original RNDIS patch: - It included OIDs not found in the RNDIS spec. These have been removed. As a rule, these weren't exported in the "OIDs I support" list, and only a couple wouldn't fail those accesses, so this mostly changes what debug printk appears. - OIDs used for optional 802.3 statistics were partially supported. They're all in the OID list now, but the support is #ifdeffed out. (Those statistics were mostly just made up, anyway!) - "Required" OIDs for suspend, resume, and wakeup support weren't listed. Their messages are now defined, but support is #ifdeffed out. Seems the docs aren't entirely accurate, and Windows can behave reasonably without them. (This area needs help from someone who knows MS-Windows power management.) There are also a few minor cleanups, more reasonable default volume level for debug messages (never at KERN_INFO, keepalives only if VERBOSE), and dumping of all bytes of some undocumented messages Windows XP has been seen emitting shortly before the host suspended itself. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: rndis (2/4) fix memory leaks Tao Huang wrote: > I'm writing udc driver for S3C2410. I found RNDIS almost not call my > driver's free_request and free_buffer. So after run my driver about 3 > hours the system will out of memory. > > This patch will fix the memory leak. > > There will still have memory leak when driver unload, but I don't known > where is the proper place to fix it. > 1) rndis.c should free resp_queue when it unload > 2) ether.c should free tx_reqs and rx_reqs when it unload (as > eth_reset_config) Thanks ... this is a nice patch to have. From: Tao Huang Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: rndis (4/4) start documenting spec variances This partially reverts one of the changes in an earlier patch, starting to document where Microsoft's spec is lying. Needed to interop with Windows ME. The Windows ME implementation of RNDIS relies on a message that Microsoft's specification says isn't used. Restore this (removed in earlier cleanup), and start collecting comments specifically on where MSFT violates its own specifications. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] ia64: Rename SN "modules" variable to "sn_modules". SN code has a "modules" variable that conflicts with a variable of the same name in kernel/module.c. This conflict breaks lcrash for ia64. Rename "modules" to "sn_modules". Signed-off-by: Keith Owens Signed-off-by: David Mosberger [AGPGART] Don't waffle about unsupported serverworks chipsets if they don't do AGP. From: Matt Domsch Signed-off-by: Dave Jones [PATCH] PCI: fix irq routing on acer travelmate 360 laptop Fixes interrupt routing on acer travelmate 360 notebooks. it looks like the bios assigned the wrong pirq value for the cardbus bridge. just assigning irq 10 to all devices with pirq 0x63 would break second usb port. pirq 0x68 seems to be right one for cardbus. Signed-off-by: Daniel Ritz Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: add alternate VCORE calculations for w83627thf and w83637hf This patch adds support for the alternate in0/VCORE calculation which is available for 2 of 4 chips this driver supports. It also fixes a minor bug in the standard voltage input calculation. Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: drivers/i2c/chips/it87.c cleanup patch Attached is a cleanup patch for the it87 sensor driver, against 2.6.7-rc2. Jean Delvare has reviewed it. Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usb root hubs can set power budgets This adds hub_set_power_budget(), mostly so that HCDs for low powered ports (cell phone, PDA, etc) can more easily report their true power budgets. It's not always 500mA per root hub port; this makes dummy_hcd report the minimum, 8mA. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usb suspend/resume work better on net2280 This makes net2280 behave more correctly with respect to usb suspend and resume processing. So for example gadget zero autoresume testing works. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: rndis (3/4) Big Endian support for gadget RNDIS Add byteswapping. Original version partially worked on PPC with Net2280, this version applies to the latest RNDIS code but hasn't been retested on big-endian. Ping should be working in at least one one direction. Also added a handful of other things from my BK: track suspend/resume (to eventually implement wake-on-lan), give a better rndis error message, and add missing declarations for PM-related OIDs (usage is #ifdeffed out by previous patch). From: Jon Neal Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] lh7a404 USB host against 2.6.7-rc2 Support for the Sharp LH7A404 OHCI, another non-PCI implementation. This uses a platform_device and a workaround for a register read problem. Signed-off-by: Marc Singer Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Initialize endpoint autoconfig in g_file_storage This one-line patch corrects a simple problem in the g_file_storage driver. It neglected to initialize the endpoint-autoconfiguration library before using it. Please apply. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] Add cpu hotplug support to cpuid.c Here is the patch that uses a cpu hotplug callback, to allow dynamic support of cpu id for classes in sysfs. This patch applies on top of the one I sent out earlier that Greg included. I do not have access to hardware that supports cpu hotswapping (virtually or not) so have not been able to test that aspect of the patch. However, the original functionality of listing static cpu's still works. Please consider for testing or inclusion. Signed-off-by: Hanna Linder Signed-off-by: Greg Kroah-Hartman [PATCH] Add platform_get_resource() This patch adds management of platform device resources to the device model, allowing drivers to lookup resources, IRQs and DMA numbers in the platform device resource array. We also add a couple of functions which allow platform devices and their resources to be registered. Signed-off-by: Russell King Signed-off-by: Greg Kroah-Hartman cpuid: fix hotplug cpu remove bug for class device. Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: w83627hf.c build fix with gcc-2.95: drivers/i2c/chips/w83627hf.c:482: parse error before `static' drivers/i2c/chips/w83627hf.c:502: parse error before `static' drivers/i2c/chips/w83627hf.c: In function `show_regs_fan_1': drivers/i2c/chips/w83627hf.c:541: warning: implicit declaration of function `show_fan' drivers/i2c/chips/w83627hf.c: In function `w83627hf_detect': drivers/i2c/chips/w83627hf.c:1074: `dev_attr_in0_min' undeclared (first use in this function) drivers/i2c/chips/w83627hf.c:1074: (Each undeclared identifier is reported only once drivers/i2c/chips/w83627hf.c:1074: for each function it appears in.) drivers/i2c/chips/w83627hf.c: At top level: drivers/i2c/chips/w83627hf.c:428: warning: `show_regs_in_min0' defined but not used drivers/i2c/chips/w83627hf.c:441: warning: `store_regs_in_min0' defined but not used Signed-off-by: Andrew Morton Signed-off-by: Greg Kroah-Hartman [PATCH] USB: add printer reset ioctl - add soft reset ioctl Signed-off-by: Oliver Neukum Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Fix bus-list root-hub race There are a few places where the code enumerates through all the USB devices on all the buses, starting with each bus's root hub and working down. However a bus does not always have a root hub, and the code does not check that the root_hub pointer is non-NULL. This patch fixes the problem, using the usb_bus_list_lock semaphore to synchronize access when root hubs are added or removed. In addition it seemed like a good idea to minimize the time that a non-fully-configured root hub is accessible through the bus's pointer. So this patch delays setting the pointer and holds usb_bus_list_lock while configuring a root hub. It turned out that a bunch of things needed to be changed for all this to work: Check for NULL root_hub pointer in usb_device_read() and usb_find_device(). Pass the root-hub device as a separate argument to hcd_register_root(). Make usb_register_root_hub() acquire the usb_bus_list_lock and set the bus->root_hub pointer. For consistency's sake, move the place where the children[] pointer to a non-root-hub device gets stored as close as possible to where usb_new_device() is called. Make usb_disconnect() acquire the usb_bus_list_lock when removing a root hub. Change usb_hcd_pci_remove() and the non-PCI host drivers so that they call usb_disconnect() with a pointer to the bus's root_hub pointer, not a pointer to a temporary variable. Change all the host controller drivers not to store the root_hub pointer in the bus structure but instead to pass it as a new argument to hcd_register_root(). I made some attempt to update the hc_sl811 driver along with the rest, but it's pretty clear that driver won't work in the current framework. Among other things, it never reads the root hub's device descriptor. To what extent is the driver really supported? Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Minor tidying up of hub driver After my last few changesets there were a few small items that needed to be tidied up. Update kerneldoc to reflect the actual operation of usb_disconnect() and usb_new_device(). The new locking requirements are listed too, though they aren't all implemented yet. Fulfill the new locking requirement in hcd_panic(). Remove unneeded local variables to conserve stack space in usb_disconnect(), which calls itself recursively. In hub_port_connect_change(), store the parent's children[] pointer as late as possible and don't lock the new device until then (that's when it becomes globally accessible). This will minimize the time that the not-fully-configured device structure is visible to other parts of the kernel. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Update root-hub code for the ohci-lh7a404 driver On Wed, 9 Jun 2004, David Brownell wrote: > Needs an update for ohci-lh7a404.c too ... I didn't even know this driver existed! Where did usb/host/* come from? Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman USB: crap, I misapplied a patch with the wrong level This gets rid of usb/host and puts the file in the proper drivers/usb/host directory. Signed-off-by: Greg Kroah-Hartman [PATCH] Driver Core: Suppress platform device suffixes Do not add numeric suffix to platform device name if device id is set to -1. This can be used when there can be only one instance of a device (like i8042). Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman [PATCH] Driver Core: Whitespace fixes Whitespace and formatting changes (a,b,c -> a, b, c) in drivers/base Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman Driver Core: more whitespace fixups This catches the files I had to do by hand as Dmitry's patch differed from my tree. Signed-off-by: Dmitry Torokhov Signed-off-by: Greg Kroah-Hartman [PATCH] PATCH: 2.6.7-rc3 drivers/usb/core/devio.c: user/kernel pointer bugs Since ctrl is copied in from userspace, ctrl.data cannot safely be dereferenced. Let me know if you have any questions or if I've made a mistake. Signed-off-by: Greg Kroah-Hartman USB: sparse cleanups for the whole driver/usb/* tree. Signed-off-by: Greg Kroah-Hartman USB: fix up dumb int_user_arg variable name as pointed out by Al Viro. Signed-off-by: Greg Kroah-Hartman I2C: sparse cleanups for drivers/i2c/* Signed-off-by: Greg Kroah-Hartman [PATCH] ia64: mark non-existent NUMA-nodes as offline I found a problem with HP NUMA configuration in 2.6.7-rc3-mm1. The node_online_map is incorrect because of actions taken by reassign_cpu_only_nodes in arch/ia64/mm/discontig.c. The mm1 patch which changes the mempolicy for the init_task uses this invalid node_online_map and eventually uses a non-existent node's zonelist when calling __alloc_pages. The patch below takes care of this issue. It puts the non-existent nodes offline. Signed-off-by: David Mosberger [PATCH] ia64: fix race in fsys_bubble_down to avoid fp-register corruption The fast system-call fall-back-path has a race: it reads PSR, modifies some bits, then writes back the new PSR. Unfortunately, the contents of PSR may change between reading and writing it. For example, an interrupt could occur which could trigger a context-switch. The context-switch might in turn flush the floating-point-high (FPH) partition to memory, clear PSR.MFH, and set PSR.DFH. To prevent this race, the patch below turns off PSR.I before reading PSR. This fixes a floating-point corruption problem that was observed on a system with a libc which has the fast system-call support enabled. The performance impact is minimal (on the order of a handful of cycles). Signed-off-by: Kevin Tian Signed-off-by: Ken Chen Signed-off-by: Asit Mallick Signed-off-by: David Mosberger [PATCH] fealnx-mac-address-and-other-issues.patch (resend - I need to get this out of my tree my one means or another..) From: "SuD (Alex)" I recently was given a surecom 10/100 ethernet card and found that i could not change Mac address for it as other driver/devices allow. I tried to implement the missing feature and noticed that the device is quite peculiar (or either my system is broken), when trying to fill mac address registers (no matter whether io_ops is set): - If I write a byte (writeb) to an even i/o address it seems like actually a word was written (the next byte is set to 0). - If I write a byte to an odd i/o address my pc gets bad freezed. That made think of writing 16bit words (writew) for the memory address, as opposed to what most driver examples do. It works for me (I hope i set the lines at the right place in device_open function after the device is reset). I hope the code is clean enough and does not mess with byte ordering. This is the patch (this time against 2.6.5): (akpm: Is this right on big-endian?) [PATCH] prism54: Kernel compatibility 2004-03-20 Margit Schubert-While * isl_38xx.[ch], isl_ioctl.c, islpci_dev.[ch], islpci_eth.c islpci_hotplug.c, islpci_mgt.[ch], oid_mgt.c, prismcompat.h: Adopt new prism54 kernel compatibility. Remove remaining kernel version ifdefs. [PATCH] fix oops from acenic ethtool Fix the following OOPS that happens when doing ifup on FC-2 with 2.6.7 in acenic and a security hole due to missing capable(NET_ADMIN), by replacing private ethtool handling with ethtool_ops. (Yes, Jes because of DEV_ETHTOOL_OPS define it will still work on ancient kernels.) [netdrvr acenic] remove unneeded ifdefs [PATCH] prism54: Fix endian patch * Split out patch islpci_eth.c : * Fix endian problem (bug 74/75 related) [PATCH] add ARM smc91x driver [PATCH] add NAPI help texts NAPI seems to be so self-explaining that no help texts are needed. ;-) I combined the two help texts that were at NAPI options, and added them to all NAPI options. [PATCH] prism54: Fix bugs 74/75 2004-03-22 Aurelien Alleaume * oid_mgt.c, isl_ioctl.c : Minor bugfixes : #74 and #75. [PATCH] prism54: Fix bugs 39/73 2004-04-07 Margit Schubert-While * Bugs 39 and 73 [PATCH] prism54: Fix bug 77, strengthened oid txn 2004-04-09 Aurelien Alleaume * oid_mgt.c, isl_ioctl.c : Cleanups. Bug #77. Minor stuffs. * islpci_mgt.c (islpci_mgt_transaction) : enforce serialization in oid transaction. lindent.sh. * islpci_mgt.c (islpci_mgt_transaction) : Strengthened oid transaction. [PATCH] prism54: Don't allow mib reads while unconfigured 004-04-17 Aurelien Alleaume * oid_mgt.c, isl_ioctl.c : Cleanup. Prevented real oid reading before the card is configured with mib values (might be related to bug #53). [PATCH] prism54: Add likely/unlikely, KO wds completely * islpci_mgt.h : Change init_wds definition * islpci_eth.c : Do some likely/unlikely [PATCH] prism54: Align skb patch * islpci_eth.c, islpci_dev.c : Align skb->data unconditonally after allocation. This would appear to improve RX rate [PATCH] prism54: Reduce module verbosity 2004-05-01 Margit Schubert-While * Reduce module verbosity [PATCH] prism54: Fix channel stats, bump version to 1.2 2004-05-20 Aurelien Alleaume * islpci_eth.c : use dev_kfree_skb_irq instead of dev_kfree_skb where needed. * isl_ioctl.c : report channel instead of frequency in scan. * islpci_hotplug.c : bump version to 1.2 [PATCH] prism54: Fix typo 2004-05-29 Margit Schubert-While * isl_ioctl.c : Fix typo [PATCH] prism54: White space and indentation 2004-05-29 Margit Schubert-While * White space and indentation patch [PATCH] ia64: Remove warnings when unwind debug is turned on Turning on UNW_DEBUG generates warnings for incorrect number of parameters for formats and several cases of "suggest explicit braces to avoid ambiguous `else'", because UNW_DPRINT contains an if statement. Signed-off-by: Keith Owens Signed-off-by: David Mosberger ia64: Update defconfig [PATCH] USB: Mark devices as NOTATTACHED as soon as possible This patch implements something we've been lacking for a long time: a way to mark devices as USB_STATE_NOTATTACHED as soon as we know that they're gone. The usb_device->state member is no longer protected by the ->serialize semaphore; instead there's a new private spinlock. Usbcore routines should no longer set ->state directly; instead they should use the new utility routine usb_set_device_state(). There are protections against changing states while devices are being added or removed. Change assignments to udev->state into calls of usb_set_device_state(). Add new private device_state_lock to the hub driver, along with usb_set_device_state() and recursively_mark_NOTATTACHED(). Acquire the new spinlock while adding or removing children[] pointers. When disabling a port that has a child device, mark the child as NOTATTACHED. You mentioned once having tried to do something like this and running into trouble. Take a good look and let me know if you see any difficulties here. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: ATI Remote driver update Here are some contributed improvements for the ATI remote driver. I submitted the driver and it was accepted several months ago. Since then a few people have sent me patches and suggestions. This patch adds two things: (1) support for the "Lola" X10 remote, sent to me by Seth Cohn (2) key autorepeat support, sent to me by Vincent Vanackere The key autorepeat support has been tested by me, but the Lola support has not, as I don't have the hardware. Thanks to Seth and Vincent, with my apologies for taking so long to forward their improvements along. Signed-off-by: Torrey Hoffman Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usbtest just uses module_param() This prevents some warnings during modprobe. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usbnet shouldn't oops on cdc error path If the string descriptor fetch works, no problem. Else make the disconnect() logic -- newly called because of "recent" changes to interface claiming logic -- use its fast cleanup path, since we're still not fully set up yet. Should resolve OSDL bugid 2714; please merge. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: retry string fetches on ZLPs not just STALLs This matches the behavior for other descriptor fetches. Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: usb on big endian, ehci needs a byteswap Adds a missing byteswap that would affect interrupt transfers with EHCI on big-endian platforms, like Rick's MIPS-4km uClinux. Needed for external hubs, and then likely for mice, keyboards, and so on. From: Rick Sewill Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: clarify pci.txt wrt IRQ allocation I think we should make it explicit that PCI IRQs shouldn't be relied upon until after pci_enable_device(). This patch: ftp://ftp.kernel.org/pub/linux/kernel/people/akpm/patches/2.6/2.6.7-rc3/2.6.7-rc3-mm1/broken-out/bk-acpi.patch does PCI interrupt routing (based on ACPI _PRT) and IRQ allocation at pci_enable_device()-time. (To avoid breaking things in 2.6, the above patch still allocates all PCI IRQs in pci_acpi_init(), before any drivers are initialized. But that shouldn't be needed by correct drivers, and I'd like to remove it in 2.7.) Signed-off-by: Greg Kroah-Hartman [PATCH] PCI Hotplug: rpaphp.patch -- multi-function devices not handled correctly I made changes to rpaphp code, so it can handle multi-fuction devices correctly. The problem is that the pci_dev field of slot struct can only record one pci_dev of the devices of a multi-fuction card. I changed pci_dev (a single pci_dev type pointer) to pci_funcs( a list of pci_dev type pointers). I rewrote some of the config/unconfig code to support the slot struct change. Along with above changes, I added LDRSLOT(logical I/O slot) support. We need LDRSLOT support for DLPAR I/O. A card in a LDRSLOT can't be physically removed, but can be logically removed from one partiton and reassinged to another partition. I also merged rpaphp changes from ames tree. Signed-off-by: Greg Kroah-Hartman [PATCH] Driver Model: Add class support to msr.c This patch enables class support in arch/i386/kernel/msr.c. Very simliar to cpuid (with the fixes Zwane/Greg made, thanks). [root@w-hlinder2 root]# tree /sys/class/msr /sys/class/msr | -- msr0 | `-- dev `-- msr1 `-- dev 2 directories, 2 files Thanks to Randy Dunlap for pointing out the unnecessary tabs. Fixed. Signed-off-by Hanna Linder Signed-off-by: Greg Kroah-Hartman [PATCH] sysfs: fs/sysfs/inode.c: modify parents ctime and mtime on creation When a node is added to sysfs (e.g. a device plugged in via USB), the filesystem fails to make this change visible in the parent directory's ctime/mtime. This is in contrast to removing a device, because in that case, sysfs makes use of the function simple_unlink from fs/libfs.c which takes care of that. Instead of using simple_link from fs/libfs.c on creation, sysfs implements its own mechanism. This patch hooks into the function sysfs_create and sets the ctime and the mtime of the parent to CURRENT_TIME. Signed-off-by: Sebastian Henschel Signed-off-by: Greg Kroah-Hartman [NET] first bits of net/core/stream.c Move tcp sk_wmem_queued related functions to net/core/stream.c, will be used by other SOCK_STREAM protocols, starting with LLC. Also move the tcp_charge_skb to sock.h, for the same reasons. Signed-off-by: Arnaldo Carvalho de Melo I2C: sparse cleanups again, based on comments from lkml This is more like the original code. Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: INQUIRY fixup, mode-sense options, Genesys devices This patch does a few things (all in the same section of code). It started life as patches as226b, as280, and as275. Later it was merged into as226e and I added significantly to it. First, this patch introduces a new config option to allow people to enable write-protect detection for their USB devices. With some luck, we've finally got it right and can eventually remove this option in favor of enabling this behavior all the time. Next, we change how we force some flags on -- it turns out that there are some 'generic' entries in the SCSI devinfo which was overriding us when we didn't want it. Finally, we add a safety check to the workaround for GeneSys Logic devices -- if the max_sectors parameter has already been turned down, we won't turn it up. Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: Fix race when removing the SCSI host This patch fixes a race is disconnecting a usb-storage device that occurs with the SCSI layer. It's primarily reproducable via adding delays into various disconnect and reset processing paths, but has also been encountered in the field. This patch started life as as281b, and was modified by me only to patch properly against current kernels. The main features of the patch are: Store the host pointer at the start of the control thread rather than trying to get it from srb->device; after the host is removed the SCSI device structure may no longer exist. Keep dev_semaphore locked during the entire time the control thread or reset handlers are using the us_data structure. Reorder the items in dissociate_dev() and release_resources() so that things are released in the opposite order from the way they were acquired originally. Don't bother to increment and decrement the usb_device's reference count; it's unnecessary. In disconnect(), first set the DISCONNECTING flag so that no more I/O will take place and no more requests will be accepted. Next, cut short the current command and wait for it to finish. Then call scsi_remove_host(). The SCSI core guarantees that when scsi_remove_host() returns, the host will not be in error recovery and all outstanding commands will have been cancelled. Remove some old useless left-over code that was #if'ed out. Use a wait_queue for the 6-second delay during device resets so that we can be woken up in the middle if a disconnect occurs. The key point here is that after scsi_remove_host(), everything is idle as far as the SCSI midlayer is concerned. But if there was a command in progress at the time, the midlayer will abort it without telling us or waiting for it to complete. Hence we have to wait for the control thread to be idle before we can try to kill it. This should happen quickly, since all I/O attempted by the thread will fail immediately. Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Fix bug in TT initialization introduced by earlier This patch repairs a bug introduced by an earlier patch: The TT initialization code was moved to _after_ the TT's first use. The patch simply puts the code back the way it used to be. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] I2C: add alternate VCORE calculations for w83627thf and w83637hf Pick a VRM (for VID interpretation) based on the VRM & OVT config, if available. Props to Jean Delvare for the idea & code fragment. Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Fix PME bits in pci.txt Signed-off-by: Roger Luethi Signed-off-by: Greg Kroah-Hartman [PATCH] PCI: Fix off-by-one in pci_enable_wake Fix off-by-one in pci_enable_wake. Bit field location determined by mask, not value. Signed-off-by: Roger Luethi Signed-off-by: Greg Kroah-Hartman [libata] don't probe from workqueue Since we want the probe phase to call other workqueues, this is required to eliminate future deadlocks. Other methods would include starting a single-shot thread just for probing, but overall, using a separate thread for probing is pointless since we are already in process context when we probe. So, we simply call ata_bus_probe directly. [PATCH] USB: Remove private khubd semaphore This patch removes the private semaphore used by the hub driver, and uses the regular "serialize" semaphore instead. This will satisfy the general locking requirements for adding and removing devices attached to the hub. The only tricky aspect is that now the hub event handler must take a reference to the hub device while waiting to acquire the semaphore, in case the hub is disconnected during the wait. The patch also replaces a few occurrences of spin_lock_irqsave() in regions where interrupts are known to be enabled with spin_lock_irq(). Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] Typo in ethtool code in acenic driver In 10mbps detection code. [PATCH] Kill stale references to Documentation/networking/8139too.txt Documentation/networking/8139too.txt was removed with this ChangeSet: ChangeSet@1.1371.153.2 2004-01-10 15:34:47-05:00 jgarzik@redhat.com [netdrvr] remove Documentation/networking/8139too.txt All sections of the document are woefully outdated. However, `grep' still reveals these references to it: drivers/net/8139too.c:90: See 8139too.txt for more details. drivers/net/Kconfig:1539: as well as the Documentation/networking/00-INDEX:7:8139too.txt Signed-off-by: Arthur Othieno [PATCH] prism94 build fix init_wds is being instantiated in both isl_ioctl.c and islpci_eth.c, causing linkage errors. drivers/net/wireless/prism54/islpci_mgt.o(.rodata+0x198): In function `islpci_mgmt_rx_fill': /usr/src/25/drivers/net/wireless/prism54/islpci_mgt.c:154: multiple definition of `init_wds' drivers/net/wireless/prism54/islpci_eth.o(.rodata+0x1c8):/usr/src/25/include/linux/skbuff.h:815: first defined here Signed-off-by: Andrew Morton [libata] PCI IDE DMA code shuffling PCI IDE DMA standard (or "bmdma") helper routines ata_bmdma_stop, ata_bmdma_ack_irq, and ata_bmdma_status are added to linux/libata.h, and used in libata-core. There is a minor behavior change, such that, the Alt Status register is read before acknowledging the bmdma interrupt. This should be ok, and furthermore there will be more significant behavior changes in this area coming soon. [libata] PCI IDE command-end/irq-acknowledge cleanup Restruct default irq handler (used for many PCI IDE-like SATA controllers) to obtain device status and acknowledge interrupts a bit differently. In an attempt to better attack the "ich5 screaming interrupt" problem, acknowledge and clear the device's INTRQ by reading the Status register _before_ ack'ing the controller's irq status. This is a deviation from how the Linux IDE driver acknowledges interrupts, but it may be the best method, since the ICH5 appears to continue to assert the interrupt bit in the BMDMA until the device INTRQ line is cleared. Of course, SATA has no INTRQ line per se, so ICH5 essentially has new interrupt behavior not seen before in the PCI IDE world, while pretending that it's compatible with PCI IDE. Sigh. This change affects all SATA controllers (for which there are libata drivers) except for sata_promise and sata_sx4. [libata] ->qc_prep hook Rename ->fill_sg hook to ->qc_prep, and call it unconditionally (as opposed to ->fill_sg, which was called only when the flag ATA_QCFLAG_SG was set). NTFS: sparse fix: void function with return (value) Sparse: ======= CHECK fs/ntfs/attrib.c fs/ntfs/malloc.h:57:15: warning: return expression in void function [repeated several times] From: Mika Kukkonen Signed-off-by: Randy Dunlap Signed-off-by: Anton Altaparmakov NTFS: - Add new element itype.index.collation_rule to the ntfs inode structure and set it appropriately in ntfs_read_locked_inode(). - Implement a new inode type "index" to allow efficient access to the indices found in various system files and adapt inode handling accordingly (fs/ntfs/inode.[hc]). An index inode is essentially an attribute inode (NInoAttr() is true) with an attribute type of AT_INDEX_ALLOCATION. As such, it is no longer allowed to call ntfs_attr_iget() with an attribute type of AT_INDEX_ALLOCATION as there would be no way to distinguish between normal attribute inodes and index inodes. The function to obtain an index inode is ntfs_index_iget() and it uses the helper function ntfs_read_locked_index_inode(). Note, we do not overload ntfs_attr_iget() as indices consist of multiple attributes so using ntfs_attr_iget() to obtain an index inode would be confusing. Signed-off-by: Anton Altaparmakov [ARM] Add clock API Since peripheral clocks are be derived in SoC or even platform specific ways, we need a way to keep this information out of the drivers. AMBA Primecells are defined in terms of functional units where clocks are derived from external sources, and it is up to the SoC designer to determine where to derive those clocks from. Therefore, we provide a very basic API which allows platforms to provide this information in a generic manner to their peripherals. This framework also allows peripherals to shut down unused clock sources when they're not in use. NTFS: Ensure that there is no overflow when doing page->index << PAGE_CACHE_SHIFT by casting page->index to s64 in fs/ntfs/aops.c. Signed-off-by: Anton Altaparmakov [ARM PATCH] 1926/3: PXAFB cleanups and fixes Patch from Ian Campbell Sorry, 1926/2 was missing a brace. Fixed here. Previous commentry: I have corrected the grayscale conversion to correctly use the upper byte rather than the lower one. As requested I have also left the actual grayscale conversion where it was this time and just dealt with the palette differences in pxafb_setpalettereg. fb_alloc_cmap is only called when bits_per_pixel is < 16, otherwise any existing cmap is freed. I also fixed up all the spaces and brackets issues (not just the one you raised previously) this introduces some noise in the patch, if you'd like the two patches separately please ask. [ARM PATCH] 1928/1: lh7a40x #7 Changes to memory model to support contiguous SDRAM Patch from Marc Singer [if's replaced by ifdef's.] While the BLOB boot loader doesn't support it, there are two others, UBOOT and Logic's LOLO, that will initialize the SDRAM controller such that the memory appears as a contiguous region. This layout to be required for WinCE and, thus, is the default for these loaders. The memory organization had been optimized for discontiguous blocks. Now, it supports a default mode that is compatible with all of the bootloaders as well as options to optimize for either contiguous or discontiguous models. Withing, there is also a slight change to the way that the DEBUG_LL macros select the UART address. Now it uses immediate constants exclusively. [ARM] pxafb doesn't need to include asm/mach-types.h [PATCH] clean up SCSI_TIMEOUT usage - qlogicfc.c abuses SCSI_TIEMOUT although it's not part of the scsi core, give it it's own ISP_TIMEOUT define - avoid redefining timeouts #ifdef DEBUG, that's a cause for heisenbugs just waiting to happen - now SCSI_TIMEOUT is private to scsi_scan.c, move it there Signed-off-by: James Bottomley [PATCH] avoid obsolete scsi APIs in eata_pio Signed-off-by: James Bottomley [PATCH] tmscsim: 64-bit cleanup > Although, I think, there's still a glitch there (modified if's order). > I'll send a new version, if the approach is approved in principle. Ok, attached is version 3:-) It also fixes a definite (although, perhaps, harmless) bug in scsiiom.c. And removes a redundant assignment in tmscsim.c. Signed-off-by: Guennadi Liakhovetski Signed-off-by: James Bottomley [PATCH] drivers/scsi/megaraid.c: user/kernel pointer bugs From: "Robert T. Johnson" Since arg is a user pointer, so are uioc_mimd and uiocp, and hence umc is a user pointer. Thus reading umc->xferaddr requires dereferencing a user pointer, which isn't safe. Signed-off-by: Andrew Morton Signed-off-by: James Bottomley [PATCH] modular scsi/mca_53c9x doesn't work On Mon, Jun 14, 2004 at 08:22:15PM +0100, Christoph Hellwig wrote: > On Mon, Jun 14, 2004 at 08:52:56PM +0200, Adrian Bunk wrote: > > The issue described in the mail forwarded below is still present in > > 2.6.7-rc3-mm2 (but not specific to -mm). > > > > I'd suggest the following workaround: > > Please add the exports instead. It'll affect all the other 53C9X-based > drivers aswell. This sounds like a better solution. Signed-off-by: James Bottomley [PATCH] Comment out an unused function in drivers/scsi/wd7000.c Eliminate unused function wd7000_abort() in wd7000 driver. CC [M] drivers/scsi/wd7000.o drivers/scsi/wd7000.c:1612: warning: `wd7000_abort' defined but not used As the author states in his comment, this is "unfinished business" ;-) From: Mika Kukkonen Signed-off-by: Randy Dunlap Signed-off-by: James Bottomley Fix endless loop in SCSI SPI transport class If the driver doesn't update the peroid, we go around forever. The fix is to keep our old period unless the driver returns a greater one. Signed-off-by: James Bottomley [PATCH] ia64: fix info in /proc/pal/*/bus_info This patch fixes to minor bugs: - corrected descriptions for bit 52 and 53 of the /proc/pal/CPU*/bus_info entry; they were swapped - corrected a typo for bit 55 of the /proc/pal/CPU*/bus_info entry Signed-off-by: Stephane Eranian Signed-off-by: David Mosberger [ARM] Timer cleanup Signed-off-by: Deepak Saxena [ARM] Remove bogus gettimeoffset ptr from machine_desc struct. This was accidently added during the timer code cleanup. Signed-off-by: Deepak Saxena [ARM] Delete include/asm-arm/arch-nexuspci/time.h Signed-off-by: Deepak Saxena [ARM] Delete include/asm-arm/arch-iop3xx/time.h Signed-off-by: Deepak Saxena [ARM] Delete include/asm-arm/arch-ixp4xx/time.h Signed-off-by: Deepak Saxena [ARM] Delete include/asm-arm/arch-versatile/time.h Signed-off-by: Deepak Saxena [ARM] Add include/asm-arm/mach/time.h for shared timer definitions Signed-off-by: Deepak Saxena [NET]: Update some sysctl documentation. I ran the following (crappy) script: ... In /proc/sys/ and found a host of undocumented sysctls. This patch documents a number of them, and at least mentions the rest as 'TODO'. Please verify my code-inspired documentation before applying! Signed-off-by: Bert Hubert Signed-off-by: David S. Miller [ECONET] kill some trivial warnings Signed-off-by: Arnaldo Carvalho de Melo [NET]: Add tc extensions infrastructure. Signed-off-by: Jamal Hadi Salim Signed-off-by: David S. Miller [SELINUX]: Fix sock_orphan race. The patch below fixes a race between sock_orphan() and selinux_socket_sock_rcv_skb() which can lead to a null pointer deref oops under heavy load. The sk_callback_lock is used in the patch to synchronize access to the incoming socket's inode security state. This patch has been under test in the Fedora kernel for over a month without incident. Author: Stephen Smalley Signed-off-by: James Morris Signed-off-by: David S. Miller [IPV6]: UDPv6 checksum. We always need to check UDPv6 checksum because it is mandatory. Author: Yoshifuji Hideaki Signed-off-by: David S. Miller [TCP]: Tweak some default sysctl values. tcp_default_win_scale: 7 tcp_vegas_cong_avoid: 1 tcp_moderate_rcvbuf: 1 tcp_bic: 1 [ATM]: Include compiler.h in atm.h [NET]: Allow IP header alignment to be overriden. Author: Anton Blanchard Signed-off-by: David S. Miller [SELINUX]: Fine-grained Netlink support - SELinux headers This patch regenerates the SELinux module headers to reflect new class and access vectors definitions. The size of the diff is misleading; much of it is simply a change in the ordering of the automatically generated definitions. The corresponding generation script has been changed to ensure a stable order in the future. Author: Stephen Smalley Signed-off-by: Stephen Smalley Signed-off-by: James Morris Signed-off-by: David S. Miller [SELINUX]: Fine-grained Netlink support - move security_netlink_send() hook. This patch moves the security_netlink_send() LSM hook after the user copy, so that LSM modules can safely examine skb payload content. For SELinux, we need to look at the Netlink message type. Signed-off-by: James Morris Signed-off-by: David S. Miller [SELINUX]: Fine-grained Netlink support - add sk to netlink_send hook Modifies the LSM netlink_send() hook so that it takes a struct sock parameter. SELinux will use this parameter to lookup the class of socket, which was assigned during socket security initialization. Signed-off-by: James Morris Signed-off-by: David S. Miller [SELINUX]: Fine-grained Netlink support - SELinux changes This patch contains SELinux changes which add support for extended Netlink socket classes and the associated permissions nlmsg_read and nlmsg_write. Signed-off-by: James Morris Signed-off-by: David S. Miller SCSI: fix uninitialised variable warning Spotted By: Andrew Morton drivers/scsi/scsi_transport_spi.c: In function `spi_dv_retrain': drivers/scsi/scsi_transport_spi.c:393: warning: `period' might be used uninitialized in this function Signed-off-by: James Bottomley [AGPGART] Re-add VIA VP3 support. The refactoring of the PCI IDs supported by the VIA driver dropped this one. Spotted-by: Carsten Rietzschel Signed-off-by: Dave Jones scsi_debug: num_parts, ptype and (re-)scans From: Douglas Gilbert Changes in version 1.73: - 'num_parts' parameter to specify 0 to 4 partitions - 'ptype' to specify (or change via sysfs) SCSI peripheral device type - support ability to increase the number of targets and/or luns then re-scan a scsi_debug host - remove redundant trailing spaces The new facilties are described at: http://www.torque.net/sg/sdebug26.html A tarball of driver (version 1.73) is also there. Signed-off-by: James Bottomley (conflict resolution) [AGPGART] Delete trailing whitespace in generic routines. Bump copyright dates whilst we're there. Signed-off-by: Dave Jones [NET]: Clear dev refs in dst->child. This is a resend of an earlier patch to dst_dev_event. I've changed it slightly by moving the input/output assignment into dst_ifdown. To recap, this patch drops lingering IPsec references to a device that is being unregistered. The child processing in the GC is too late since it never runs until the reference on the dst hits zero which could take a long time for things like TCP connections. The reason I've left the input/output assignment outside the loop is because they aren't really necessary for the IPsec dst's, and if it were in the loop then we'll have to do the same child processing in ___dst_free as well. I've tested this with an ESP/IPCOMP tunnel and I can confirm that it does fix the problem. Signed-off-by: Herbert Xu Signed-off-by: David S. Miller [AGPGART] If we can't do AGP x8 in v3 mode, just drop back to x4. This should stop people seeing crazy stuff like agpgart trying to set itself to x0 mode when it sees a x8 bridge and a x4 card. Signed-off-by: Dave Jones [AGPGART] Show the untampered arguments in debug printk agp_v3_parse_one() does some changes to these args by the time we get to the printk. It'll be useful to know what they started at. Signed-off-by: Dave Jones PPC: Make Motorola CPM2 I/O core support more generic. It's used on more than one CPU. [IPV4]: Fix interface selection in multicast sockops. PPC: Move CPM2 common core routines to arch/ppc/syslib/ [AGPGART] Improved AGPx8 handling. If something fails, we should now explain what happened, before we fall back to AGPx4 gracefully. Signed-off-by: Dave Jones [AGPGART] Extra debugging info just in case. Signed-off-by: Dave Jones [AGPGART] Remove typo from comment Signed-off-by: Dave Jones [NET]: Tidy somaxconn sysctl doc. PPC: Add support for ADS8272 board. From Kumar Gala [TG3]: Always do 4gb tx dma test, and fix the test. Based upon a patch from Sun. [TCP]: No vegas by default just yet. fix throttle to limit number of requests to 50 on wire to server at one time. Signed-off-by: Steve French (sfrench@us.ibm.com) [PATCH] add new via-velocity gigabit ethernet driver Contributed by VIA, cleaned up by Alan. UART driver for Motorola CPM/CPM2 I/O core on 8xx/8xxx chips. Remove old MPC82xx (CPM2) uart driver PPC SBC82xx: Move RTC to 0xd0000000 to make room for PCI I/O stuff. PCI host bridge support for Motorola MPC826x Add support for i8259 IRQ controller on WindRiver PowerQUICC II [PATCH] ia64: Support SN platform specific error features The SN prom supports fine grained error handling features, the OS needs to tell the prom if the OS expects to use these platform specific features. Signed-off-by: Keith Owens Signed-off-by: David Mosberger [PATCH] ia64: update sn2_defconfig Small patch to update the sn2_defconfig file. I just did a 'make oldconfig' with the current sn2_defconfig and removed 8250 support. Signed-off-by: David Mosberger [IDE] Introduce SATA enable/disable config option This config option is introduced to help reduce user confusion, and eliminate conflicts between the IDE driver (which is often built into user kernels) and the new libata SATA driver. [libata] Add NVIDIA SATA driver [libata] put nvidia in Kconfig, in alphabetical order ia64: Fix ia32 partial-page-list code to compile cleanly in more configs. ia64: Nuke two warnings in mca.c that showed in the simulator configuration. Fix /proc/fs/cifs/Stats to handle larger return data, and correct Kconfig reference to /proc/fs/cifs/Stats Signed-off-by: Steve French (sfrench@us.ibm.com) [libata/IDE nvidia] shuffle pci ids * Mark conflicting PCI ids with CONFIG_BLK_DEV_IDE_SATA * Move not-yet-released PCI ids to libata sata_nv driver [ACPI] *** Warning: "acpi_register_gsi" [drivers/serial/8250_acpi.ko] undefined! Signed-off-by: Andrew Morton [ACPI] mp_find_ioapic() oops from mp_register_gsi() on device resume Signed-off-by: Andrew Morton [ACPI] delete "__init" from x86_64 version of mp_find_ioapic() Signed-off-by: Arnd Bergmann Signed-off-by: Andrew Morton [ACPI] Fix a lockup which Sid Boyce discovered with IOAPIC disabled. The problem was that drivers/serial/8250_acpi.c found COM1 in the ACPI namespace and called acpi_register_gsi() to set up its IRQ. ACPI tells us that the COM1 IRQ is edge triggered, active high, but acpi_register_gsi() was ignoring the edge_level argument, so it blindly set the COM1 IRQ to be level-triggered. Signed-off-by: Bjorn Helgaas Signed-off-by: Andrew Morton Change new Motorola copyright notices and email addresses to Freescale. Requested by Kumar Gala Workaround for MPC826x PCI erratum #9. fix typo in cifs kernel config option title Signed-off-by: Steve French (sfrench@us.ibm.com) [SPARSE]: Get rid of warning in irtty_ioctl(). Don't really need verify_area because result of copy_to_user is checked. Add annotation to get rid of sparse warnings. Signed-off-by: Stephen Hemminger Signed-off-by: Jean Tourrilhes Signed-off-by: David S. Miller [SPARSE]: Add annotations to sock_filter.h Since sock_fprog is argument in ioctl, the filter pointer needs to be annotated. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller [BRIDGE]: Fix bridge sysfs improprely initialized kobject. The bridge sysfs interface introduced around 2.6.7-rc1 created a bad entry in /sys because it didn't initialise the name member of the kobject. Signed-off-by: Andrew Morton Signed-off-by: David S. Miller [SPARSE]: Annotate csum_and_copy_to_user(). [SPARSE]: Get rid of warning in bridge ethtool ioctl. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller [SPARSE]: Fix another net warning. Get rid of warning from assignment in conditional. Signed-off-by: Stephen Hemminger Signed-off-by: David S. Miller Cset exclude: kuznet@ms2.inr.ac.ru|ChangeSet|20040616204246|05149 [NET]: In unregister_netdevice(), do synchronize_net() before final dev_put(). This way we make sure that all destination cache updates to remove references to this device are seen by entire system before final destruction of the device. [ACPI] PCI bus numbering workaround for ServerWorks from David Shaohua Li http://bugzilla.kernel.org/show_bug.cgi?id=1662 [IPV6]: Fix OOPS in fragmentation. Incorrect SKB pointer is passed to output() callback in ip6_fragment(). Work done by James Morris and Yoshifuji Hideaki. Signed-off-by: James Morris Signed-off-by: Yoshifuji Hideaki Signed-off-by: David S. Miller [ARM] Consolidate various ARM timer fns. into single timer_tick() call. Signed-off-by: Deepak Saxena [PATCH] USB: Only process ports with change events pending This patch adds a bit-array to the hub driver's private data structure, used for storing the contents of the hub's interrupt status message. That message indicates which ports have events pending (and whether the hub itself has events pending). By only polling the status of the ports listed in the bit-array we can save a fair amount of overhead in hub communication. (The #error test added to hub.h is a little awkward, but it's purely precautionary -- it won't matter until someone decides to support hubs with more than 31 ports!) Also included in the patch, since this seemed the perfect opportunity for it, is Byron's suggestion for handling hub events in the order in which they were received. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: PhidgetServo driver fixes Here is a patch for the phidgetservo driver -- it was using memory after kfree(), and using driver_info is much nicer. :) Signed-off-by: Greg Kroah-Hartman [PATCH] proper bios handoff in ehci-hcd Stuart Hayes here at Dell has identified this or/and mix-up in the ehci-hcd driver. Because of this, ehci-hcd is not properly released by BIOSes supporting full 2.0 and port behavior can then become erratic. (Code predates general availability of such BIOS firmware. This version of the patch also fixes minor linewrap issues.) From: Gary Lerhaupt Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB: add support for Buffalo LUA-U2-KTX Add support for Buffalo's LUA-U2-KTX, which is a AX8817X based usb ethernet adapter. I just added the USB id and it worked like a dream. From: Neil Bortnak Signed-off-by: David Brownell Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: Lexar Jumpshot CF reader This patch is required to fix up the jumpshot driver, and to supress the 'unneeded entry' message for another device which uses the same VID/PID/rev for multiple different versions of the device. Alan Stern cooked this patch up, originally. Signed-off-by: Matthew Dharm Signed-off-by: Greg Kroah-Hartman [PATCH] USB Storage: unusual_devs.h update On Thu, 17 Jun 2004, Daniel Nouri wrote: > I get this message when inserting my USB MMC card reader: > > usb 3-1: new full speed USB device using address 4 > usb.agent[5388]: usb-storage: already loaded > usb-storage: This device (04e6,0006,0205 S 01 P 01) has an unneeded Protocol entry in unusual_devs.h > Please send a copy of this message to Thanks for letting us know. This patch will eliminate that log message. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman [PATCH] USB: Fix endian bug in g_file_storage This patch fixes a couple of places in g_file_storage where I forgot to use proper byte-swapping. Signed-off-by: Alan Stern Signed-off-by: Greg Kroah-Hartman ia64: Squish compiler-warning in perfmon.c when compiling for UP. [ARM] Remove ADIFCC machine type The code is completely out of date, I am no longer maintaining it, and nobdy has volunteered to do so; therefore, I am killing it. Signed-off-by: Deepak Saxena ia64: Squish some more hazards & warnings for UP compile. ia64: Fix build-problem when CONFIG_IA32 is not enabled. Without this fix, you'll get unresolved references to sys_rt_sigaction(). [PATCH] ia64: fix SN2 interrupt rerouting Signed-off-by: Patrick Gefre Signed-off-by: David Mosberger [PATCH] ia64: switching between CPEI & CPEP A couple of months ago Hidetoshi Seto from Fujitsu proposed a patch to provide similar switching between interrupt mode and polling mode for corrected platform events (CPE) as we have for processor events (CMC) [with the obvious difference that not all platforms support an interrupt for CPE]. I dusted it off and made a couple of very minor cleanups (which Seto-san checked out last night on his test setup and confirmed still passes). Signed-off-by: Tony Luck Signed-off-by: David Mosberger [XFS] No longer hold the BKL for the entire ioctl operation, its not needed here. SGI Modid: xfs-linux:xfs-kern:173032a Signed-off-by: nathans@sgi.com [XFS] Remove a couple of redundant NULL parent inode pointer checks. SGI Modid: xfs-linux:xfs-kern:173033a Signed-off-by: nathans@sgi.com [XFS] Fix xfs_lowbit64, it mishandled zero in the high bits. Cleanup a couple of other ffs users, since ffs(0) is apparently undefined on some architectures. SGI Modid: xfs-linux:xfs-kern:173034a Signed-off-by: nathans@sgi.com [XFS] sparse: fix uses of macros before their definitions, etc. SGI Modid: xfs-linux:xfs-kern:173194a Signed-off-by: nathans@sgi.com [XFS] Change things to use new version of xfs_dm_init/xfs_dm_exit SGI Modid: xfs-linux:xfs-kern:173206a Signed-off-by: nathans@sgi.com [XFS] Fix non-dmapi build SGI Modid: xfs-linux:xfs-kern:173222a Signed-off-by: nathans@sgi.com [XFS] Ensure buffers that map to unwritten extents are only submitted when properly setup. SGI Modid: xfs-linux:xfs-kern:173555a Signed-off-by: nathans@sgi.com [XFS] Sanitise the ACL initialisation macros. SGI Modid: xfs-linux:xfs-kern:173559a Signed-off-by: nathans@sgi.com [XFS] Remove unused MAC macros, never needed on Linux. SGI Modid: xfs-linux:xfs-kern:173561a Signed-off-by: nathans@sgi.com [XFS] Remove the one remaining, broken use of XFS_WRITEIO_LOG and sanitize direct IO map blocks call. SGI Modid: xfs-linux:xfs-kern:173562a Signed-off-by: nathans@sgi.com [XFS] Fix flags argument to xfs_incore call on attr removal. SGI Modid: xfs-linux:xfs-kern:173563a Signed-off-by: nathans@sgi.com [XFS] Fix a race condition in the undo-delayed-write buffer routine. SGI Modid: xfs-linux:xfs-kern:173564a Signed-off-by: nathans@sgi.com [XFS] Fix up memory allocators to be more resilient. SGI Modid: xfs-linux:xfs-kern:173571a Signed-off-by: nathans@sgi.com [ACPI] fix passive cooling mode indicator (Luming Yu) http://bugzilla.kernel.org/show_bug.cgi?id=1770 [ACPI] avoid spurious interrupts on VIA http://bugzilla.kernel.org/show_bug.cgi?id=2243 [XFS] Fix for NFS+XFS data corruption problem. See http://oss.sgi.com/bugzilla/show_bug.cgi?id=198 for full details. SGI Modid: xfs-linux:xfs-kern:173598a Signed-off-by: nathans@sgi.com Fix typo in name of CIFS Kconfig option and add rename stats [PATCH] ppc64: Implement CONFIG_PREEMPT This implements CONFIG_PREEMPT for ppc64. Aside from the entry.S changes to check the _TIF_NEED_RESCHED bit when returning from an exception, there are various changes to make the ppc64-specific code preempt-safe, mostly adding preempt_enable/disable or get_cpu/put_cpu calls where needed. I have been using this on my desktop G5 for the last week without problems. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [PATCH] ppc64: Optimize exception/syscall entry/exit This rewrites the PPC64 exception entry/exit routines to make them smaller and faster. In particular we no longer save all of the registers for the common exceptions - system calls, hardware interrupts and decrementer (timer) interrupts - only the volatile registers. The other registers are saved and restored (if used) by the C functions we call. This involved changing the registers we use in early exception processing from r20-r23 to r9-r12, which ended up changing quite a lot of code in head.S. Overall this gives us about a 20% reduction in null syscall time. Some system calls need all the registers (e.g. fork/clone/vfork and [rt_]sigsuspend). For these the syscall dispatch code calls a stub that saves the nonvolatile registers before calling the real handler. This also implements the force_successful_syscall_return() thing for ppc64. Signed-off-by: Paul Mackerras Signed-off-by: Linus Torvalds [XFS] Fix up highmem build and error handling on inode shrink register. SGI Modid: xfs-linux:xfs-kern:173764a Signed-off-by: nathans@sgi.com [PATCH] alpha: fix discontigmem+initrd build From: Ivan Kokshaysky Compilation fails due to incorrect usage of NODE_DATA(). Reported by hpa. [ACPI] handle SCI override to nth IOAPIC http://bugzilla.kernel.org/show_bug.cgi?id=2835 [IPV6] make several functions static in ip6_tunnel that should be. [IPV6] XFRM: add missing xfrm6_policy_check(). [IPV6] XFRM: support (uncompressed) tunnel mode ipcomp6 using xfrm6_tunnel infrastructure. [XFRM] fix dependency issues for CONFIG_IPV6=m. [ARM] Add support code for ARM hardware vector floating point This cset adds the code to handle the hardware vector floating point unit found on some ARM926 and later CPUs. The hardware provides an implementation for the common cases, and bounces exceptions for other cases, which have to be handled in software, and signalling SIGFPE as appropriate. [PATCH] mm: flush TLB when clearing young Traditionally we've not flushed TLB after clearing the young/referenced bit, it has seemed just a waste of time. Russell King points out that on some architectures, with the move from 2.4 mm sweeping to 2.6 rmap, this may be a serious omission: very frequently referenced pages never re-marked young, and the worst choices made for unmapping. So, replace ptep_test_and_clear_young by ptep_clear_flush_young throughout rmap.c. Originally I'd imagined making some kind of TLB gather optimization, but don't see what now: whether worth it rather depends on how common cross-cpu flushes are, and whether global or not. ppc and ppc64 have already found this issue, and worked around it by arranging TLB flush from their ptep_test_and_clear_young: with the aid of pgtable rmap pointers. I'm hoping ptep_clear_flush_young will allow ppc and ppc64 to remove that special code, but won't change them myself. It's worth noting that it is Andrea's anon_vma rmap which makes the vma available for ptep_clear_flush_young in page_referenced_one: anonmm and pte_chains would both need an additional find_vma for that. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] mm: pretest pte_young and pte_dirty Test for pte_young before going to the costlier atomic test_and_clear, as asm-generic does. Test for pte_dirty before going to the costlier atomic test_and_clear, as asm-generic does (I said before that I would not do so for pte_dirty, but was missing the point: there is nothing atomic about deciding to do nothing). But I've not touched the rather different ppc and ppc64. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32: support for e500 and 85xx Here is both a GNU style and BK patch for adding support for the e500 core and 85xx platform to 2.6. This is pretty much a direct port from 2.4 with a bit of cleanup around the edges. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc32 irq.c cpumask fix 2.6.7-rc3-mm1 changed cpumask_t from ulong to a struct, causing compile-time errors in arch/ppc/kernel/irq.c. Proposed fix below. Tested on a G3. Signed-off-by: Mikael Pettersson Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: avoid multiline /proc/cmdline content on iSeries /proc/cmdline is filled via an OS400 call iSeries_init(). It scans the returned data from the end, instead of the beginning. This leads to multiple lines in /proc/cmdline Just scan from the beginning and stop at the first newline. This patch changes also the /proc/iSeries/mf/*/cmdline interface to do the same as the initial setup. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Add PPC4xx MAINTAINERS entry, merge CREDITS from 2.4 Add myself as the PPC4xx maintainer. Merge CREDITS entry from 2.4 Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Handle non-readable binfmt_misc executables I work in a group that works on enabling the IA-32 Execution Layer (http://www.intel.com/pressroom/archive/releases/20040113comp.htm) on Linux. In a few words - this is a dynamic translator for IA-32 binaries on IPF platform. Following David Mosberger's advice - we use the binfmt_misc mechanism for the invocation of the translator whenever the user tries to exec an IA-32 binary. The EL is meant to help in the migration path from IA-32 to IPF. From our beta customers we learnt that at first stage - they tend to keep their environment mostly intact, using the legacy IA-32 binaries. Such an environment has, naturally, setuid and non-readable binaries. It will be useless to ask the administrator to change the settings of such an environment - some of them are very complex, and the administrators are reluctant to make any changes in a system that already proved itself to be robust and secure. So, our target with these patches is not to enhance the support for scripts but rather to allow a translator to be integrated into a working environment that is not (and should not be) aware to the fact it's being emulated. As I said before - it is practically hopeless to expect an administrator of such a system to change it so that it will suit the current behavior of binfmt_misc. But, even if we could do that, I'm not sure it would be a good idea - these changes are likely to be less secure than the suggested patches - - In order to execute non-readable binaries the binary will have to be made readable, which is obviously less secure than allowing only a trusted translator to read it - There will be no way for the translator to calculate the accurate AT_SECURE value for the translated process. This might end up with the translated process running in a non-secured mode when it actually needs to be secured. I prepared a patch that solves a couple of problems that interpreters have when invoked via binfmt_misc. currently - 1) such interpreters cannot open non-readable binaries 2) the processes will have their credentials and security attributes calculated according to interpreter permissions and not those of the original binary the proposed patch solves these problems by - 1) opening the binary on behalf of the interpreter and passing its fd instead of the path as argv[1] to the interpreter 2) calling prepare_binprm with the file struct of the binary and not the one of the interpreter The new functionality is enabled by adding a special flag to the registration string. If this flag is not added then old behavior is not changed. A preliminary version of this patch was sent to the list on 9/1/2003 with the title "[PATCH]: non-readable binaries - binfmt_misc 2.6.0-test4". This new version fixes the concerns that were raised by the patch, except of calling unshare_files() before allocating a new fd. this is because this feature did not enter 2.6 yet. Arun Sharma says: We were going through an internal review of this patch: http://marc.theaimsgroup.com/?l=linux-kernel&m=107424598901720&w=2 which is in your tree already. I'm not sure if this line of code got sufficient review. + /* call prepare_binprm before switching to interpreter's file + * so that all security calculation will be done according to + * binary and not interpreter */ + retval = prepare_binprm(bprm); The case that concerns me is: unprivileged interpreter and a privileged binary. One can use binfmt_misc to execute untrusted code (interpreter) with elevated privileges. One could argue that all binfmt_misc interpreters are trusted, because only root can register them. But that's a change from the traditional behavior of binfmt_misc (and binfmt_script). (Update): Arun pointed out that calculating the process credentials according to the binary that needs to be translated is a bit risky, since it requires the administrator to pay extra attention not to register an interpreter which is not intended to run with root credentials. After discussing this issue with him, I would like to propose a modified patch: The old patch did 2 things - 1) open the binary for reading and 2) calculate the credentials according to the binary. I removed the riskier part of changing the credentials calculation, so the revised patch only opens the binary for reading. It also includes few words of warning in the description of the 'open-binary' feature in binfmt_misc.txt, and makes the function entry_status print the flags in use. As for the 'credentials' part of the patch, I will prepare a separate patch for it and send it again to the LKML, describe the problem and ask for people comments. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds Enable clustering in the 53c700 driver Signed-off-by: James Bottomley [PATCH] binfmt_misc: improve calculation of interpreter's credentials This patch allows for misc binaries to run with credentials and security token that are calculated according to the binaries, and not according to the interpreter, which is the legacy behavior of binfmt_misc. The way it is done is by calling prepare_binprm, which is where these attributes are calculated, before switching the 'file' field in the bprm from the binary to the interpreter. This feature should be used with care, since the interpreter will have root permissions when running a setuid binary owned by root. Please note - - Only root can register an interpreter with binfmt_misc. The feature is documented and the administrator is advised to handle it with care - The new feature is enabled only with a special flag in the registration string. When this flag is not specified the current behavior of binfmt_misc is kept - This is the only 'right' way for an interpreter to know the correct AT_SECURE value for the interpreted binary From: Chris Wright This patchset looks OK, except for one problem. It installs the fd (which could've been unreadable) without unsharing the ->files. So someone can use this to read unreadable yet executable files. Here's a patch which fixes that up. I added one bit that's commented out because I'm not positive if a final steal_locks() is needed. I did a fair amount of rearranging to simplify the error conditions relative to the fd_install(), and unshare_files(). From: Chris Wright I found that the intel patchset (and mine as well) leaked i_writecount on the original executed file. In addition, I verified that the steal_locks() bit is indeed needed. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Clean up asm/pgalloc.h include This patch cleans up needless includes of asm/pgalloc.h from the fs/ kernel/ and mm/ subtrees. Compile tested on multiple ARM platforms, and x86, this patch appears safe. This patch is part of a larger patch aiming towards getting the include of asm/pgtable.h out of linux/mm.h, so that asm/pgtable.h can sanely get at things like mm_struct and friends. I suggest testing in -mm for a while to ensure there aren't any hidden arch issues. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Clean up asm/pgalloc.h include This patch cleans up needless includes of asm/pgalloc.h from the drivers/ subtree. drivers/char/mem.c has been compile tested; the others have not, since they are for non-x86 and non-ARM architectures. This patch is part of a larger patch aiming towards getting the include of asm/pgtable.h out of linux/mm.h, so that asm/pgtable.h can sanely get at things like mm_struct and friends. I suggest testing in -mm for a while to ensure there aren't any hidden arch issues. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] Clean up asm/pgalloc.h include 3 This patch cleans up needless includes of asm/pgalloc.h from the arch/i386/ subtree. Compile tested on x86_pc SMP. [I also tried VISWS + SMP without PM doesn't build in smpboot.c, though I don't believe its caused by this patch. With PM, fails to link complaining maxcpus is undefined. Therefore, I presume VISWS + SMP is an invalid configuration.] This patch is part of a larger patch aiming towards getting the include of asm/pgtable.h out of linux/mm.h, so that asm/pgtable.h can sanely get at things like mm_struct and friends. I suggest testing in -mm for a while to ensure there aren't any hidden arch issues. The outstanding list of files for other architectures can be found at http://www.arm.linux.org.uk/misc/pgalloc.txt Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] ppc64: uninline __pte_free_tlb() The pgalloc.h changes broke ppc64: In file included from include/asm-generic/tlb.h:18, from include/asm/tlb.h:24, from arch/ppc64/mm/hash_utils.c:48: include/asm/pgalloc.h: In function `__pte_free_tlb': include/asm/pgalloc.h:110: dereferencing pointer to incomplete type include/asm/pgalloc.h:111: dereferencing pointer to incomplete type Uninlining __pte_free_tlb() fixes that. Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds [PATCH] reiserfs: block allocator optimizations From: From: The current reiserfs allocator pretty much allocates things sequentially from the start of the disk, it works very nicely for desktop loads but once you've got more then one proc doing io data files can fragment badly. One obvious solution is something like ext2's bitmap groups, which puts file data into different areas of the disk based on which subdirectory they are in. The problem with bitmap groups is that if you've got a group of subdirectories their contents will be spread out all over the disk, leading to lots of seeks during a sequential read. This allocator patch uses the packing locality to determine which bitmap group to allocate from, but when you create a file it looks in the bitmaps to see how 'full' that packing locality already is. If it hasn't been heavily used yet, the packing locality is inherited from the parent directory putting files in new subdirs close to the parent su