- 05 1月, 2006 40 次提交
-
-
由 Matthew Dharm 提交于
This patch adds another usb-storage subdriver, which supports two fairly old dual-XD/SmartMedia reader-writers (USB1.1 devices). This driver was written by Daniel Drake <dsd@gentoo.org> -- he notes that he wrote this driver without specs, however a vendor-supplied GPL driver for the previous generation of products ("sma03") did prove to be quite useful, as did the sddr09 driver which also has to deal with low-level physical block layout on SmartMedia. The original patch has been reformed by me, as it clashed with the libusual patches. We really need to consolidate some of this common SmartMedia code, and get together with the MTD guys to share it with them as well. Signed-off-by: NDaniel Drake <dsd@gentoo.org> Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Matthew Dharm 提交于
This is the third of three patches to prepare the sddr09 subdriver for conversion to the Sim-SCSI framework. This patch (as596) moves the computation of the LBA to the start of the read/write routines, so that addresses completely beyond the end of the device can be detected and reported differently from transfers that are partially within the device's capacity. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Acked-by: NAndries Brouwer <Andries.Brouwer@cwi.nl> Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Matthew Dharm 提交于
This is the second of three patches to prepare the sddr09 subdriver for conversion to the Sim-SCSI framework. This patch (as595) updates the code to use standard error values for return codes instead of our special-purpose USB_STOR_TRANSPORT_... codes. The reverse update is then needed in the transport routine, but with the Sim-SCSI framework that routine will go away. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Acked-by: NAndries Brouwer <Andries.Brouwer@cwi.nl> Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Matthew Dharm 提交于
This is the first of three patches to prepare the sddr09 subdriver for conversion to the Sim-SCSI framework. This patch (as594) straightens out the initialization procedures and headers: Some ugly code from usb.c was moved into sddr09.c. Set-up of the private data structures was moved into the initialization routine. The connection between the "dpcm" version and the standalone version was clarified. A private declaration was moved from a header file into the subdriver's .c file. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Acked-by: NAndries Brouwer <Andries.Brouwer@cwi.nl> Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Matthew Dharm 提交于
The OneTouch subdriver submits its own interrupt URB for notifications about button presses. Consequently it needs to know about suspend and resume events, so it can cancel or restart the URB. This patch (as593) adds a hook to struct us_data, to be used for notifying subdrivers about Power Management events, and it implements the hook in the OneTouch driver. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NNick Sillik <n.sillik@temple.edu> Signed-off-by: NMatthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Pete Zaitcev 提交于
Alan Stern pointed out that (in 2.6 kernel) one successful submission results in one callback, even for ISO-out transfers. Thus, the silly check can be removed from usbmon. This reduces the amount of garbage printed in case of ISO and Interrupt transfers. Signed-off-by: NPete Zaitcev <zaitcev@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as615b) edits a large number of comments in the uhci-hcd code, mainly removing excess apostrophes. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as616) changed the uhci_explen macro in uhci-hcd.h so that it now accepts the desired length, rather than length - 1 with special handling for 0. This also fixes a minor bug that would show up only when a driver submits a 0-length bulk URB. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Marcelo Feitoza Parisi 提交于
They deal with wrapping correctly and are nicer to read. Signed-off-by: NMarcelo Feitoza Parisi <marcelo@feitoza.com.br> Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Horst Schirmeier 提交于
Minimum data length must be UART_STATE + 1, as data[UART_STATE] is being accessed for the new line_state. Although PL-2303 hardware is not expected to send data with exactly UART_STATE length, this keeps it on the safe side. Signed-off-by: NHorst Schirmeier <horst@schirmeier.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 fabien COSSE 提交于
This patch adds an unusual_devs.h entry for NIKON Coolpix 2000 camera wich cause error: "Not Ready: Medium not present" Works fine with th patched kernel... Here are the informations in /proc/bus/usb/devices: T: Bus=02 Lev=01 Prnt=01 Port=00 Cnt=01 Dev#= 2 Spd=12 MxCh= 0 D: Ver= 1.10 Cls=00(>ifc ) Sub=00 Prot=00 MxPS= 8 #Cfgs= 1 P: Vendor=04b0 ProdID=0301 Rev= 0.10 S: Manufacturer=NIKON S: Product=NIKON DSC E2000 C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 0mA I: If#= 0 Alt= 0 #EPs= 3 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage E: Ad=01(O) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=82(I) Atr=02(Bulk) MxPS= 64 Ivl=0ms E: Ad=83(I) Atr=03(Int.) MxPS= 8 Ivl=16ms Signed-off-by: NFabien COSSE <fabien.cosse@wanadoo.fr> Signed-off-by: NPhil Dibowitz <phil@ipom.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Richard Purdie 提交于
The device data in ohci-pxa27x is a struct hcd, not a struct ohci_hcd. This correct the suspend/resume calls to account for this and adds some code to invalidate the platform data when the module is removed. Signed-off-by: NRichard Purdie <rpurdie@rpsys.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Arjan van de Ven 提交于
patch below marks various USB tables and variables as const so that they end up in .rodata section and don't cacheline share with things that get written to. For the non-array variables it also allows gcc to optimize more. Signed-off-by: NArjan van de Ven <arjan@infradead.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Adrian Bunk 提交于
The Coverity checker found this dead code. Signed-off-by: NAdrian Bunk <bunk@stusta.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as614) makes a small change to the part of the hub driver responsible for remote wakeup of root hubs. When these wakeups occur the driver is suspended, and in case the resume fails the driver should remain suspended -- it shouldn't try to proceed with its normal processing. This will hardly ever matter in normal use, but it did crop up while I was debugging a different problem. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as613) moves the updates to hcd->state in the dummy_hcd driver to where they now belong. It also uses the new HC_FLAG_HW_ACCESSIBLE flag in a way that simulates a real PCI controller, and it adds checks for attempts to resume the bus while the controller is suspended or to suspend the controller while the bus is active. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as612) removes the "volatile" declarations from the file-storage gadget. It turns out that they aren't needed for anything much; adding a few memory barriers does a sufficient job. The patch also removes a wait_queue. Not much point having a queue when only one task is ever going to be on it! Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Chris Humbert 提交于
USB: don't allocate dma pools for PIO HCDs hcd_buffer_alloc() and hcd_buffer_free() have a similar dma_mask check and revert to kmalloc()/kfree(), but hcd_buffer_create() doesn't check dma_mask and allocates unused dma pools. Signed-off-by: NChris Humbert <mahadri-kernel@drigon.com> Acked-by: NDavid Brownell <david-b@pacbell.net> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Daniel Ritz 提交于
Some versions of the controller seem to put multiple report packet into a single urb. also it can happen that a packet is split across multiple urbs. unpatched you get a jumpy cursor on some screens. the patch does: - handle multiple packets per urb - handle packets split across multiple urb - check packet type - cleanups Signed-off-by: NDaniel Ritz <daniel.ritz@gmx.ch> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Luiz Fernando Capitulino 提交于
There is a race-condition in usb-serial driver that can be triggered if a processes does 'port->tty->driver_data = NULL' in serial_close() while other processes is in kernel-space about to call serial_ioctl() on the same port. This happens because a process can open the device while there is another one closing it. The patch below fixes that by adding a semaphore to ensure that no process will open the device while another process is closing it. Note that we can't use spinlocks here, since serial_open() and serial_close() can sleep. Signed-off-by: NLuiz Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Luiz Fernando Capitulino 提交于
Checks if 'port' is NULL before using it in all tty operations, this can avoid NULL pointer dereferences. Signed-off-by: NLuiz Capitulino <lcapitulino@mandriva.com.br> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Olav Kongas 提交于
When going to suspend, there's no point in setting HC state in host controller driver as USB core takes care of this. Signed-off-by: NOlav Kongas <ok@artecdesign.ee> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Pavel Machek 提交于
Remove useless initalizers. Signed-off-by: NPavel Machek <pavel@suse.cz> Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
-
由 Alan Stern 提交于
This patch (as610) adds a field to struct usb_device to store the device's port number. This allows us to remove several loops in the hub driver (searching for a particular device among all the entries in the parent's array of children). Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as609) changes the way we keep track of power budgeting for USB hubs and devices, and it updates the choose_configuration routine to take this information into account. (This is something we should have been doing all along.) A new field in struct usb_device holds the amount of bus current available from the upstream port, and the usb_hub structure keeps track of the current available for each downstream port. Two new rules for configuration selection are added: Don't select a self-powered configuration when only bus power is available. Don't select a configuration requiring more bus power than is available. However the first rule is #if-ed out, because I found that the internal hub in my HP USB keyboard claims that its only configuration is self-powered. The rule would prevent the configuration from being chosen, leaving the hub & keyboard unconfigured. Since similar descriptor errors may turn out to be fairly common, it seemed wise not to include a rule that would break automatic configuration unnecessarily for such devices. The second rule may also trigger unnecessarily, although this should be less common. More likely it will annoy people by sometimes failing to accept configurations that should never have been chosen in the first place. The patch also changes usbcore's reaction when no configuration is suitable. Instead of raising an error and rejecting the device, now the core will simply leave the device unconfigured. People can always work around such problems by installing configurations manually through sysfs. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Fengwei Yin 提交于
It looks like that the gs_serial module maybe sleep with spinlock in gs_close. Sometimes, system hang when I remove the gs_serial module. From: Fengwei Yin <xaityyy@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Adrian Bunk 提交于
This patch contains the following cleanups: - make needlessly global functions static - every file should #include the headers containing the prototypes for it's global functions Signed-off-by: NAdrian Bunk <bunk@stusta.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
The earlier USB locking updates didn't touch the suspend/resume routines. They need updating as well, since now the caller holds the device semaphore. This patch (as608) makes the necessary changes. It also adds a line to store the correct power state when a device is resumed, something which was unaccountably missing. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as606b) is an updated version of my earlier patch to disconnect children from a hub device when the hub driver is unbound. Thanks to the changes in the driver core locking, we now know that the entire hub device (and not just the interface) is locked whenever the hub driver's disconnect method runs. Hence it is safe to disconnect the child device structures immediately instead of deferring the job. The earlier version of the patch neglected to disable the hub's ports. We don't want to forget that; otherwise we'd end up with live devices using addresses that have been recycled. This update adds the necessary code. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as605) removes the private udev->serialize semaphore, relying instead on the locking provided by the embedded struct device's semaphore. The changes are confined to the core, except that the usb_trylock_device routine now uses the return convention of down_trylock rather than down_read_trylock (they return opposite values for no good reason). A couple of other associated changes are included as well: Now that we aren't concerned about HCDs that avoid using the hcd glue layer, usb_disconnect no longer needs to acquire the usb_bus_lock -- that can be done by usb_remove_hcd where it belongs. Devices aren't locked over the same scope of code in usb_new_device and hub_port_connect_change as they used to be. This shouldn't cause any trouble. Along with the preceding driver core patch, this needs a lot of testing. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
It is no longer needed, so let's remove it, saving a bit of memory. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
This fixes the driver that forgot to set the module owner up. Now we can remove the unneeded pointer from the usb driver structure. The idea for how to do this was from Al Viro, who did this for the PCI drivers. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
This lets drivers, like the usb-serial ones, disable the ability to add ids from sysfs. The usb-serial drivers are "odd" in that they are really usb-serial bus drivers, not usb bus drivers, so the dynamic id logic will have to go into the usb-serial bus core for those drivers to get that ability. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
Echo the usb vendor and product id to the "new_id" file in the driver's sysfs directory, and then that driver will be able to bind to a device with those ids if it is present. Example: echo 0557 2008 > /sys/bus/usb/drivers/foo_driver/new_id adds the hex values 0557 and 2008 to the device id table for the foo_driver. Note, usb-serial drivers do not currently work with this capability yet. usb-storage also might have some oddities. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Greg Kroah-Hartman 提交于
This will make the dynamic-id stuff easier to do, as it will be self-contained. No logic was changed at all. Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Pete Zaitcev 提交于
Make the bias parameter writeable. Writing the parameter does not trigger a rebind of currently attached storage devices. Signed-off-by: NPete Zaitcev <zaitcev@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Pete Zaitcev 提交于
This patch adds a shim driver libusual, which routes devices between usb-storage and ub according to the common table, based on unusual_devs.h. The help and example syntax is in Kconfig. Signed-off-by: NPete Zaitcev <zaitcev@redhat.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
This patch (as515b) adds a routine to usbcore to simplify handling of host controllers that lost power or were reset during suspend/resume. The new core routine marks all the child devices of the root hub as NOTATTACHED and tells khubd to disconnect the device structures as soon as possible. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 Alan Stern 提交于
The recent platform_device update has reintroduced into dummy_hcd.c the dreaded dev->dev syndrome. This harkens back to when an earlier version of that driver included the unforgettable line: dev->dev.dev.driver_data = dev; This patch (as602) renames the platform_device variables to "pdev", in the hope of reducing confusion. Signed-off-by: NAlan Stern <stern@rowland.harvard.edu> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-
由 A.YOSHIYAMA 提交于
adds new module parameter "devid" that points to a string with format "device_name:vendor_id:device_id:flags". if provided at module load time, this string is being parsed and a new entry is created in usb_dev_id[] and pegasus_ids[] so the new device can later be recognized by the probe routine. this might be helpful for someone who don't know/wish to build new module/kernel, but want to use his new usb-to-eth device that is not yet listed in pegasus.h Signed-off-by: NPetko Manolov <petkan@nucleusys.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@suse.de>
-