Summary of changes from v2.6.7 to v2.6.8 ============================================ 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: [email protected]|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 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