summaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage
Commit message (Collapse)AuthorAgeFilesLines
* [SCSI] usb-storage: do not increment cmd->serial_numberChristoph Hellwig2011-05-011-1/+0
| | | | | | | | | The isd200 sub-driver increments the command serial number despite not using it at all in it's routine for sending internal scsi commands. Remove the increment to prepare for removing the serial_number field. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
* Fix common misspellingsLucas De Marchi2011-03-314-5/+5
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* Merge branch 'staging-next' of ↵Linus Torvalds2011-03-165-0/+847
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6 * 'staging-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging-2.6: (961 commits) staging: hv: fix memory leaks staging: hv: Remove NULL check before kfree Staging: hv: Get rid of vmbus_child_dev_add() Staging: hv: Change the signature for vmbus_child_device_register() Staging: hv: Get rid of vmbus_cleanup() function Staging: hv: Get rid of vmbus_dev_rm() function Staging: hv: Change the signature for vmbus_on_isr() Staging: hv: Eliminate vmbus_event_dpc() Staging: hv: Get rid of the function vmbus_msg_dpc() Staging: hv: Change the signature for vmbus_cleanup() Staging: hv: Simplify root device management staging: rtl8192e: Don't copy dev pointer to skb staging: rtl8192e: Pass priv to cmdpkt functions staging: rtl8192e: Pass priv to firmware download functions staging: rtl8192e: Pass priv to rtl8192_interrupt staging: rtl8192e: Pass rtl8192_priv to dm functions staging: rtl8192e: Pass ieee80211_device to callbacks staging: rtl8192e: Pass ieee80211_device to callbacks staging: rtl8192e: Pass ieee80211_device to callbacks staging: rtl8192e: Pass ieee80211_device to callbacks ...
| * usb-storage: fix menu orderingRandy Dunlap2011-03-111-15/+15
| | | | | | | | | | | | | | | | Move the USB_STORAGE_ENE_UB6250 entry so that it stays under the USB_STORAGE menu. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb-storage: ene_ub6250 depends on USB_STORAGERandy Dunlap2011-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix ene_ub6250 build: it uses usb_storage driver interfaces, so it should depend on USB_STORAGE. ene_ub6250.c:(.text+0x14ff19): undefined reference to `usb_stor_reset_resume' ene_ub6250.c:(.text+0x14ffb1): undefined reference to `usb_stor_bulk_transfer_buf' ene_ub6250.c:(.text+0x14ffdd): undefined reference to `usb_stor_bulk_srb' ene_ub6250.c:(.text+0x14fff1): undefined reference to `usb_stor_bulk_transfer_sg' ene_ub6250.c:(.text+0x1503dd): undefined reference to `usb_stor_set_xfer_buf' ene_ub6250.c:(.text+0x15048e): undefined reference to `usb_stor_access_xfer_buf' ene_ub6250.c:(.text+0x150723): undefined reference to `usb_stor_probe1' ene_ub6250.c:(.text+0x150795): undefined reference to `usb_stor_probe2' ene_ub6250.c:(.text+0x1507af): undefined reference to `usb_stor_disconnect' drivers/built-in.o:(.data+0x10224): undefined reference to `usb_stor_suspend' drivers/built-in.o:(.data+0x10230): undefined reference to `usb_stor_pre_reset' drivers/built-in.o:(.data+0x10234): undefined reference to `usb_stor_post_reset' Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: ene_ub6250: fix memory leak in ene_load_bincode()Dan Carpenter2011-03-111-4/+0
| | | | | | | | | | | | | | | | | | "buf" gets allocated twice in a row. It's the second allocation which is correct. The first one should be removed. Signed-off-by: Dan Carpenter <error27@gmail.com> Acked-by: huajun li <huajun.li.lee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * Staging: Merge ENE UB6250 SD card codes from keucr to drivers/usb/storagehuajun li2011-03-075-0/+850
| | | | | | | | | | | | | | | | The usb portion of this driver can now go into drivers/usb/storage. This leaves the non-usb portion of the code still in staging. Signed-off-by: Huajun Li <huajun.li.lee@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | USB: Remove delay_t unused variable from sierra_ms.c driver initialisation codeHuzaifa Sidhpurwala2011-03-021-2/+0
| | | | | | | | | | | | | | trivial patch to remove unused delay_t varible Signed-off-by: Huzaifa Sidhpurwala <huzaifas@redhat.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb_storage: realtek_cr patch: add const modifierwwang2011-02-171-1/+1
| | | | | | | | | | | | | | Add const modifier before global variable realtek_cr_ids. Signed-off-by: wwang <wei_wang@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb_storage: realtek_cr patch: fix sparse warningwwang2011-02-171-2/+2
| | | | | | | | | | | | | | Fix some sparse warning for realtek_cr patch Signed-off-by: wwang <wei_wang@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge 2.6.38-rc5 into usb-nextGreg Kroah-Hartman2011-02-172-0/+37
|\| | | | | | | | | | | | | This is needed to resolve some merge conflicts that were found in the USB host controller patches, and reported by Stephen Rothwell. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: usb-storage: unusual_devs entry for Coby MP3 playerAlan Stern2011-02-031-0/+7
| | | | | | | | | | | | | | | | | | | | This patch (as1444) adds an unusual_devs entry for an MP3 player from Coby electronics. The device has two nasty bugs. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Jasper Mackenzie <scarletpimpernal@hotmail.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: Storage: Add unusual_devs entry for VTech KidizoomNick Holloway2011-02-031-0/+7
| | | | | | | | | | | | | | | | | | This device suffers from the off-by-one error when reporting the capacity, so add entry with US_FL_FIX_CAPACITY. Signed-off-by: Nick Holloway <Nick.Holloway@pyrites.org.uk> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: usb-storage: unusual_devs entry for CamSport EvoAlan Stern2011-01-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | This patch (as1438) adds an unusual_devs entry for the MagicPixel FW_Omega2 chip, used in the CamSport Evo camera. The firmware incorrectly reports a vendor-specific bDeviceClass. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Reported-by: <ttkspam@free.fr> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: usb-storage: unusual_devs update for TrekStor DataStation maxi g.u ↵Richard Schütz2011-01-221-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | external hard drive enclosure The TrekStor DataStation maxi g.u external hard drive enclosure uses a JMicron USB to SATA chip which needs the US_FL_IGNORE_RESIDUE flag to work properly. Signed-off-by: Richard Schütz <r.schtz@t-online.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: usb-storage: unusual_devs update for Cypress ATACBRichard Schütz2011-01-221-0/+5
| | | | | | | | | | | | | | | | New device ID added for unusual Cypress ATACB device. Signed-off-by: Richard Schütz <r.schtz@t-online.de> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | USB: usb_storage: add ums-realtek driverwwang2011-01-225-0/+729
|/ | | | | | | | ums_realtek is used to support the power-saving function for Realtek RTS51xx USB card readers. Signed-off-by: wwang <wei_wang@realsil.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Merge 2.6.37-rc5 into usb-nextGreg Kroah-Hartman2010-12-221-0/+7
|\ | | | | | | | | | | | | | | | | This is to resolve the conflict in the file, drivers/usb/gadget/composite.c that was due to a revert in Linus's tree needed for the 2.6.37 release. Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: usb-storage: unusual_devs entry for the Samsung YP-CP3Vitaly Kuznetsov2010-12-161-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an unusual_devs entry for the Samsung YP-CP3 MP4 player. User was getting the following errors in dmesg: usb 2-6: reset high speed USB device using ehci_hcd and address 2 usb 2-6: reset high speed USB device using ehci_hcd and address 2 usb 2-6: reset high speed USB device using ehci_hcd and address 2 usb 2-6: USB disconnect, address 2 sd 3:0:0:0: [sdb] Assuming drive cache: write through sdb:<2>ldm_validate_partition_table(): Disk read failed. Dev sdb: unable to read RDB block 0 unable to read partition table Signed-off-by: Vitaly Kuznetsov <vitty@altlinux.ru> Acked-by: Alan Stern <stern@rowland.harvard.edu> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> CC: stable@kernel.org Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge branch 'usb-next' into musb-mergeGreg Kroah-Hartman2010-12-161-28/+54
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * usb-next: (132 commits) USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission path USB: uas: Ensure we only bind to a UAS interface USB: uas: Rename sense pipe and sense urb to status pipe and status urb USB: uas: Use kzalloc instead of kmalloc USB: uas: Fix up the Sense IU usb: musb: core: kill unneeded #include's DA8xx: assign name to MUSB IRQ resource usb: gadget: g_ncm added usb: gadget: f_ncm.c added usb: gadget: u_ether: prepare for NCM usb: pch_udc: Fix setup transfers with data out usb: pch_udc: Fix compile error, warnings and checkpatch warnings usb: add ab8500 usb transceiver driver USB: gadget: Implement runtime PM for MSM bus glue driver USB: gadget: Implement runtime PM for ci13xxx gadget USB: gadget: Add USB controller driver for MSM SoC USB: gadget: Introduce ci13xxx_udc_driver struct USB: gadget: Initialize ci13xxx gadget device's coherent DMA mask USB: gadget: Fix "scheduling while atomic" bugs in ci13xxx_udc USB: gadget: Separate out PCI bus code from ci13xxx_udc ...
| * USB: uas: Use GFP_NOIO instead of GFP_KERNEL in I/O submission pathMatthew Wilcox2010-12-151-1/+1
| | | | | | | | | | | | | | | | | | If swap is on a UAS device, we could recurse into the driver by using GFP_KERNEL. Using GFP_NOIO ensures we won't. Reported-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: uas: Ensure we only bind to a UAS interfaceMatthew Wilcox2010-12-151-7/+30
| | | | | | | | | | | | | | | | | | While all existing UAS devices use alternate interface 1, this is not guaranteed, and it has caused confusion with people trying to bind the uas driver to non-uas devices. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: uas: Rename sense pipe and sense urb to status pipe and status urbMatthew Wilcox2010-12-151-16/+16
| | | | | | | | | | | | | | | | | | The spec calls this the status pipe. While it is used to receive sense IUs, it is also used to receive other IUs, so this can be confusing. Reported-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: uas: Use kzalloc instead of kmallocMatthew Wilcox2010-12-151-2/+2
| | | | | | | | | | | | | | | | | | | | The IUs are not being fully initialised by the driver (due to the reserved space). Since we should be zeroing reserved fields, use kzalloc to do it for us. Reported-by: Luben Tuikov <ltuikov@yahoo.com> Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: uas: Fix up the Sense IUMatthew Wilcox2010-12-151-2/+5
| | | | | | | | | | | | | | | | | | Add a comment to the Sense IU data structure that it's also used for Read Ready and Write Ready. Remove the 'service response' element since it's gone from the current draft (04). Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge branch 'usb-linus' of ↵Linus Torvalds2010-11-241-1/+1
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6 * 'usb-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: USB: EHCI: fix obscure race in ehci_endpoint_disable USB: gadget: AT91: fix typo in atmel_usba_udc driver USB: isp1362-hcd - fix section mismatch warning USB: EHCI: AMD periodic frame list table quirk USB: OTG: langwell_otg: fix up some sysfs attribute permissions USB: misc: usbsevseg: fix up some sysfs attribute permissions USB: misc: usbled: fix up some sysfs attribute permissions USB: misc: trancevibrator: fix up a sysfs attribute permission USB: misc: cypress_cy7c63: fix up some sysfs attribute permissions USB: storage: sierra_ms: fix sysfs file attribute USB: ehci: fix debugfs 'lpm' permissions USB: atm: ueagle-atm: fix up some permissions on the sysfs files xhci: Fix command ring replay after resume. xHCI: fix wMaxPacketSize mask xHCI: release spinlock when setup interrupt xhci: Remove excessive printks with shared IRQs.
| * | USB: storage: sierra_ms: fix sysfs file attributeGreg Kroah-Hartman2010-11-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A non-writable sysfs file shouldn't have writable attributes. Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Cc: Kevin Lloyd <klloyd@sierrawireless.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | | SCSI host lock push-downJeff Garzik2010-11-162-2/+6
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the mid-layer's ->queuecommand() invocation from being locked with the host lock to being unlocked to facilitate speeding up the critical path for drivers who don't need this lock taken anyway. The patch below presents a simple SCSI host lock push-down as an equivalent transformation. No locking or other behavior should change with this patch. All existing bugs and locking orders are preserved. Additionally, add one parameter to queuecommand, struct Scsi_Host * and remove one parameter from queuecommand, void (*done)(struct scsi_cmnd *) Scsi_Host* is a convenient pointer that most host drivers need anyway, and 'done' is redundant to struct scsi_cmnd->scsi_done. Minimal code disturbance was attempted with this change. Most drivers needed only two one-line modifications for their host lock push-down. Signed-off-by: Jeff Garzik <jgarzik@redhat.com> Acked-by: James Bottomley <James.Bottomley@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* / block: remove REQ_HARDBARRIERChristoph Hellwig2010-11-101-4/+1
|/ | | | | | | | | | | | | | | | | | | | REQ_HARDBARRIER is dead now, so remove the leftovers. What's left at this point is: - various checks inside the block layer. - sanity checks in bio based drivers. - now unused bio_empty_barrier helper. - Xen blockfront use of BLKIF_OP_WRITE_BARRIER - it's dead for a while, but Xen really needs to sort out it's barrier situaton. - setting of ordered tags in uas - dead code copied from old scsi drivers. - scsi different retry for barriers - it's dead and should have been removed when flushes were converted to FS requests. - blktrace handling of barriers - removed. Someone who knows blktrace better should add support for REQ_FLUSH and REQ_FUA, though. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
* Merge branch 'for-next' of ↵Linus Torvalds2010-10-241-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) Update broken web addresses in arch directory. Update broken web addresses in the kernel. Revert "drivers/usb: Remove unnecessary return's from void functions" for musb gadget Revert "Fix typo: configuation => configuration" partially ida: document IDA_BITMAP_LONGS calculation ext2: fix a typo on comment in ext2/inode.c drivers/scsi: Remove unnecessary casts of private_data drivers/s390: Remove unnecessary casts of private_data net/sunrpc/rpc_pipe.c: Remove unnecessary casts of private_data drivers/infiniband: Remove unnecessary casts of private_data drivers/gpu/drm: Remove unnecessary casts of private_data kernel/pm_qos_params.c: Remove unnecessary casts of private_data fs/ecryptfs: Remove unnecessary casts of private_data fs/seq_file.c: Remove unnecessary casts of private_data arm: uengine.c: remove C99 comments arm: scoop.c: remove C99 comments Fix typo configue => configure in comments Fix typo: configuation => configuration Fix typo interrest[ing|ed] => interest[ing|ed] Fix various typos of valid in comments ... Fix up trivial conflicts in: drivers/char/ipmi/ipmi_si_intf.c drivers/usb/gadget/rndis.c net/irda/irnet/irnet_ppp.c
| * Update broken web addresses in the kernel.Justin P. Mattock2010-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The patch below updates broken web addresses in the kernel Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Cc: Maciej W. Rozycki <macro@linux-mips.org> Cc: Geert Uytterhoeven <geert@linux-m68k.org> Cc: Finn Thain <fthain@telegraphics.com.au> Cc: Randy Dunlap <rdunlap@xenotime.net> Cc: Matt Turner <mattst88@gmail.com> Cc: Dimitry Torokhov <dmitry.torokhov@gmail.com> Cc: Mike Frysinger <vapier.adi@gmail.com> Acked-by: Ben Pfaff <blp@cs.stanford.edu> Acked-by: Hans J. Koch <hjk@linutronix.de> Reviewed-by: Finn Thain <fthain@telegraphics.com.au> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | usb: makefile cleanupmatt mooney2010-10-221-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For all modules, change <module>-objs to <module>-y; remove if-statements and replace with lists using the kbuild idiom; move flags to the top of the file; and fix alignment while trying to maintain the original scheme in each file. None of the dependencies are modified. Signed-off-by: matt mooney <mfm@muteddisk.com> Acked-by: Sam Ravnborg <sam@ravnborg.org> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb-storage: add new no_read_capacity_16 quirkHans de Goede2010-10-222-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Rockbox based mp4 players will crash when ever they see a read_capacity_16 scsi command. So add a new US_FL which tells the scsi sd driver to not issue any read_capacity_16 scsi commands. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb-storage: add new no_read_disc_info quirkHans de Goede2010-10-222-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Appotech ax3003 (the larger brother of the ax203) based devices are even more buggy then the ax203. They will go of into lala land when ever they see a READ_DISC_INFO scsi command. So add a new US_FL which tells the scsi sr driver to not issue any READ_DISC_INFO scsi commands. [akpm@linux-foundation.org: fix build] Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: James Bottomley <James.Bottomley@HansenPartnership.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb: change to new flag variablematt mooney2010-10-221-1/+1
| | | | | | | | | | | | | | | | | | Replace EXTRA_CFLAGS with ccflags-y. Signed-off-by: matt mooney <mfm@muteddisk.com> Acked-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | USB: Add UAS driverMatthew Wilcox2010-10-223-0/+765
| | | | | | | | | | | | | | | | | | | | | | | | USB Attached SCSI is a new protocol specified jointly by the SCSI T10 committee and the USB Implementors Forum. Signed-off-by: Matthew Wilcox <willy@linux.intel.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> [mina86@mina86.com: updated to use new USB_ prefix] Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | USB: storage: Use USB_ prefix instead of US_ prefixMichal Nazarewicz2010-10-2216-350/+350
|/ | | | | | | | | | | | This commit changes prefix for some of the USB mass storage class related macros (ie. USB_SC_ for subclass and USB_PR_ for class). Signed-off-by: Michal Nazarewicz <mina86@mina86.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb-storage: implement autosuspendAlan Stern2010-08-101-0/+4
| | | | | | | | | | | | | | | | | | | | | This patch (as1400) adds runtime-PM support to usb-storage. It utilizes the SCSI layer's runtime-PM implementation, so its scope is limited. Currently the only effect is that disk-like devices (such as card readers or flash drives) will be autosuspended if they aren't mounted and their device files aren't open. This would apply, for example, to card readers that don't contain a memory card. Unfortunately this won't interact very well with the removable-media polling normally carried out by hal or DeviceKit. Maybe those programs can be changed to use a longer polling interval, or maybe the default autosuspend time for usb-storage should be set to something below 1 second. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: James Bottomley <James.Bottomley@suse.de> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: storage: freecom: Fixed several coding style issues.Martin Enderleit2010-08-101-12/+11
| | | | | | | | | | Fixed several coding style issues in freecom.c. Signed-off-by: Martin Enderleit <menderleit@gmail.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Daniel Mack <daniel@caiaq.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: isd200.c: Remove unnecessary kmalloc castJoe Perches2010-08-101-2/+1
| | | | | | Signed-off-by: Joe Perches <joe@perches.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb-storage: fix initializations of urb fieldsBob Copeland2010-07-261-3/+1
| | | | | | | | | | | | | | | | | Commit 0ede76fcec5415ef82a423a95120286895822e2d, "USB: remove uses of URB_NO_SETUP_DMA_MAP" introduced a regression by inadvertantly removing initialization of the transfer flags. This caused initialization failures in the ums-karma driver. Fix the regression by zeroing it. While at it, as Alan Stern points out, the initializers for actual_length and status are handled by the core and error_count only matters for isochronous urbs, so they don't need to be set here. Remove them. Signed-off-by: Bob Copeland <me@bobcopeland.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb-storage: always print quirksFelipe Contreras2010-05-201-3/+6
| | | | | | | | | | | | | | | Right now quirks are printed only when the are manually overriden with the module parameters. It's not so useful to remind the user that his parameters are correctly applied; what is useful is to print out the quirks the user is not aware are being applied. So let's do the smart thing and print the quirks when they are present. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: usb-storage: trivial debug improvementsFelipe Contreras2010-05-201-29/+32
| | | | | | | | | | | Use pr_foo and dev_foo instead of printk. Maybe US_DEBUG* should be replaced too. Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: unusual-dev: Add bad sense flag for Appotech ax203 based picture framesHans de Goede2010-05-201-0/+15
| | | | | | | | | | | These Appotech controllers are found in Picture Frames, they provide a (buggy) emulation of a cdrom drive which contains the windows software Uploading of pictures happens over the corresponding /dev/sg device. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Cc: stable <stable@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: rename usb_buffer_alloc() and usb_buffer_free() usersDaniel Mack2010-05-202-8/+8
| | | | | | | | | | | | | | | | | | For more clearance what the functions actually do, usb_buffer_alloc() is renamed to usb_alloc_coherent() usb_buffer_free() is renamed to usb_free_coherent() They should only be used in code which really needs DMA coherency. All call sites have been changed accordingly, except for staging drivers. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Pedro Ribeiro <pedrib@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: storage: Remove unneeded SL11R unusual_devs entryPhil Dibowitz2010-05-201-9/+0
| | | | | | | | | | | | | | It seems unlikely that this entry is needed anymore since the kernel has logic to handle devices that poorly respond to INQUIRY. Since we now have another entry with the same VID/PID but different flags, it's a good time to attempt to clean this up. The original submitter's email no longer works, so we'll keep an eye out for any regression reports. Signed-off-by: Phil Dibowitz <phil@ipom.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: remove uses of URB_NO_SETUP_DMA_MAPAlan Stern2010-05-203-14/+6
| | | | | | | | | | | | | | | | | | | | This patch (as1350) removes all usages of coherent buffers for USB control-request setup-packet buffers. There's no good reason to reserve coherent memory for these things; control requests are hardly ever used in large quantity (the major exception is firmware transfers, and they aren't time-critical). Furthermore, only seven drivers used it. We might as well always use streaming DMA mappings for setup-packet buffers, and remove some extra complexity from usbcore. The DMA-mapping portion of hcd.c is currently in flux. A separate patch will be submitted to remove support for URB_NO_SETUP_DMA_MAP after everything else settles down. The removal should go smoothly, as by then nobody will be using it. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: Remove large struct from the stack in USB storage isd200 driverIan Munsie2010-05-201-2/+2
| | | | | | | | | | | | | | | | | | | The compiler throws the following warning when compiling for a PowerPC 64 bit machine: drivers/usb/storage/isd200.c:580: warning: the frame size of 2208 bytes is larger than 2048 bytes There is a struct scsi_device which is placed on the stack and is largely responsible for such wastage. The struct is just a dummy struct filled with NULLs and set as the scsi_cmnd->device to make the usb_stor_Bulk_transport function happy. This patch makes the struct static, so that it is never placed onto the stack and silences the compiler warning. Signed-off-by: Ian Munsie <imunsie@au.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-306-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* USB: Remove last bit of CONFIG_USB_BERRY_CHARGEChristoph Egger2010-03-191-14/+0
| | | | | | | | | | One last bit was missed while removing the USB_BERRY_CHARGE config option in a8d4211f33a9573f7b1bdcfd9c9c48631d1515ee which gets dropped by this patch. Signed-off-by: Christoph Egger <siccegge@stud.informatik.uni-erlangen.de> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>