aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/storage/protocol.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-23USB: storage: remove invalid URL from driversGreg Kroah-Hartman1-3/+0
The old URL for usb-storage driver help is long gone. So remove it from the comments to not confuse people anymore. Reported-by: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: storage: Remove redundant license textGreg Kroah-Hartman1-14/+0
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Oliver Neukum <oneukum@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-26usb: storage: fix multi-line comment styleFelipe Balbi1-4/+8
No functional changes here, just making sure our storage driver uses a consistent multi-line comment style. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-09USB: storage: fix compile warningMing Lei1-1/+2
This patch should fix the below compile warning: drivers/usb/storage/protocol.c: In function 'usb_stor_access_xfer_buf': drivers/usb/storage/protocol.c:155:22: warning: comparison of distinct pointer types lacks a cast [enabled by default] Reported-by: kbuild test robot <fengguang.wu@intel.com> Reported-by: Stephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-08USB: storage: use sg_miter_* APIs to access scsi bufferMing Lei1-54/+26
We have sg_miter_* APIs for accessing scsi sg buffer, so use them to make code clean and bug free. Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ming Lei <ming.lei@canonical.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13USB: storage: fixed space issues in coding style.Jeffrin Jose1-3/+3
Fixed space issues in coding style found by checkpatch.pl tool in drivers/usb/storage/protocol.c Signed-off-by: Jeffrin Jose <ahiliation@yahoo.co.in> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2011-11-14usb-storage: Accept 8020i-protocol commands longer than 12 bytesAlan Stern1-4/+3
The 8020i protocol (also 8070i and QIC-157) uses 12-byte commands; shorter commands must be padded. Simon Detheridge reports that his 3-TB USB disk drive claims to use the 8020i protocol (which is normally meant for ATAPI devices like CD drives), and because of its large size, the disk drive requires the use of 16-byte commands. However the usb_stor_pad12_command() routine in usb-storage always sets the command length to 12, making the drive impossible to use. Since the SFF-8020i specification allows for 16-byte commands in future extensions, we may as well accept them. This patch (as1490) changes usb_stor_pad12_command() to leave commands larger than 12 bytes alone rather than truncating them. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Tested-by: Simon Detheridge <simon@widgit.com> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-10-31usb: Add export.h for EXPORT_SYMBOL/THIS_MODULE where neededPaul Gortmaker1-0/+1
With module.h being implicitly everywhere via device.h, the absence of explicitly including something for EXPORT_SYMBOL went unnoticed. Since we are heading to fix things up and clean module.h from the device.h file, we need to explicitly include these files now. Use the lightweight version of the header that has just THIS_MODULE and EXPORT_SYMBOL variants. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
2009-03-24usb-storage: prepare for subdriver separationAlan Stern1-0/+3
This patch (as1206) is the first step in converting usb-storage's subdrivers into separate modules. It makes the following large-scale changes: Remove a bunch of unnecessary #ifdef's from usb_usual.h. Not truly necessary, but it does clean things up. Move the USB device-ID table (which is duplicated between libusual and usb-storage) into its own source file, usual-tables.c, and arrange for this to be linked with either libusual or usb-storage according to whether USB_LIBUSUAL is configured. Add to usual-tables.c a new usb_usual_ignore_device() function to detect whether a particular device needs to be managed by a subdriver and not by the standard handlers in usb-storage. Export a whole bunch of functions in usb-storage, renaming some of them because their names don't already begin with "usb_stor_". These functions will be needed by the new subdriver modules. Split usb-storage's probe routine into two functions. The subdrivers will call the probe1 routine, then fill in their transport and protocol settings, and then call the probe2 routine. Take the default cases and error checking out of get_transport() and get_protocol(), which run during probe1, and instead put a check for invalid transport or protocol values into the probe2 function. Add a new probe routine to be used for standard devices, i.e., those that don't need a subdriver. This new routine checks whether the device should be ignored (because it should be handled by ub or by a subdriver), and if not, calls the probe1 and probe2 functions. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> CC: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-01-07USB: usb-storage: merge ATAPI and QIC-157 protocol routinesAlan Stern1-22/+2
This patch (as1174) merges usb-storage's QIC-157 and ATAPI protocol routines. Since the two functions are identical, there's no reason to keep them separate. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Cc: Matthew Dharm <mdharm-usb@one-eyed-alien.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-07-21USB: remove CVS keywordsAdrian Bunk1-2/+0
This patch removes CVS keywords that weren't updated for a long time from comments. Signed-off-by: Adrian Bunk <bunk@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-03-04usb-storage: update earlier scatter-gather bug fixAlan Stern1-1/+1
This patch (as1037) makes a small update to the earlier as1035 patch. The minimum-length computation shouldn't be done in usb_stor_access_xfer_buf(), since that routine can be called multiple times for a single transfer. It should be done in usb_stor_set_xfer_buf() instead, which gets called only once. The way it is now isn't really _wrong_, but it isn't really _right_ either. Moving the statement will be an improvement. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-02-21USB: usb-storage: don't access beyond the end of the sg bufferAlan Stern1-12/+15
This patch (as1035) fixes a bug in usb_stor_access_xfer_buf() (the bug was originally found by Boaz Harrosh): The routine must not attempt to write beyond the end of a scatter-gather list or beyond the number of bytes requested. It also fixes up the formatting of a few comments and similar whitespace issues. Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2008-01-11[SCSI] usb: protocol - convert to accessors and !use_sg code path removalBoaz Harrosh1-73/+53
- Use scsi data accessors and remove of !use_sg code path Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Acked-by: Matthew Dharm <mdharm-scsi@one-eyed-alien.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-10-22[SG] Update drivers to use sg helpersJens Axboe1-1/+1
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2007-10-16USB storage: sg chaining supportJens Axboe1-9/+11
[PATCH] USB storage: sg chaining support Modify usb_stor_access_xfer_buf() to take a pointer to an sg entry pointer, so we can keep track of that instead of passing around an integer index (which we can't use when dealing with multiple scatterlist arrays). Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+254
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!