aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/constants.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2011-05-23Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivialLinus Torvalds1-1/+1
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (39 commits) b43: fix comment typo reqest -> request Haavard Skinnemoen has left Atmel cris: typo in mach-fs Makefile Kconfig: fix copy/paste-ism for dell-wmi-aio driver doc: timers-howto: fix a typo ("unsgined") perf: Only include annotate.h once in tools/perf/util/ui/browsers/annotate.c md, raid5: Fix spelling error in comment ('Ofcourse' --> 'Of course'). treewide: fix a few typos in comments regulator: change debug statement be consistent with the style of the rest Revert "arm: mach-u300/gpio: Fix mem_region resource size miscalculations" audit: acquire creds selectively to reduce atomic op overhead rtlwifi: don't touch with treewide double semicolon removal treewide: cleanup continuations and remove logging message whitespace ath9k_hw: don't touch with treewide double semicolon removal include/linux/leds-regulator.h: fix syntax in example code tty: fix typo in descripton of tty_termios_encode_baud_rate xtensa: remove obsolete BKL kernel option from defconfig m68k: fix comment typo 'occcured' arch:Kconfig.locks Remove unused config option. treewide: remove extra semicolons ...
2011-05-10treewide: fix a few typos in commentsJustin P. Mattock1-1/+1
- kenrel -> kernel - whetehr -> whether - ttt -> tt - sss -> ss Signed-off-by: Justin P. Mattock <justinmattock@gmail.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2011-04-15[SCSI] Log thin provisioning threshold eventShyam Iyer1-0/+1
At least log the message that we received a THIN PROVISIONING SOFT THRESHOLD REACHED Unit Attention. Also added it to unit attention decodes. Signed-off-by: Shyam Iyer <shyam_iyer@dell.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-09-02[SCSI] Fix warning: zero-length gnu_printf format stringJean Sacren1-3/+3
warning: zero-length gnu_printf format string Fix the above warning by inserting a space into the literal string. Signed-off-by: Jean Sacren <sakiwit@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-19[SCSI] Fix printing of failed 32-byte commandsMartin K. Petersen1-0/+3
Having the large CDB allocation logic in sd.c means that scsi_io_completion does not have access to the command buffer. That in turn causes garbage to be printed when a 32-byte command fails. Move the command printing to sd_done where the command buffer is intact. Clear the command buffer pointer after the extended CDB has been freed. Make scsi_print_command ignore commands with NULL CDB pointers to inhibit printing of garbled command strings. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Reviewed-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2010-02-19[SCSI] Fix printing of variable length commandsMartin K. Petersen1-10/+7
We dereferenced the MAINTENANCE IN array when decoding variable length commands. Use the right array. Also consolidate identical if statements below. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-12-04[SCSI] scsi: Add missing command definitionsMartin K. Petersen1-0/+1
Add definitions for UNMAP, WRITE SAME{16,32} and GET LBA STATUS commands. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-08-22[SCSI] update scsi/constants.cDouglas Gilbert1-20/+75
It has been 3 years since this file was sync-ed with www.t10.org . Information taken from the last bunch of drafts released in May 2009. More asc/ascq codes are coming for thin provisioning; when approved and allocated another patch could add them prior to this patch going live. Changelog: - add some new command names and rename two commands - sync asc/ascq table with www.t10.org/lists/asc-num.txt - correct bug in scsi_extd_sense_format() [second for loop] Signed-off-by: Douglas Gilbert <dgilbert@interlog.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com> Signed-off-by: James Bottomley <James.Bottomley@suse.de>
2009-03-12[SCSI] Remove SUGGEST flagsMartin K. Petersen1-10/+3
The SUGGEST_* flags in the SCSI command result have been out of fashion for a while and we don't actually use them in the error handling. Remove the remaining occurrences. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-10-13[SCSI] scsi: add transport host byte errors (v3)Mike Christie1-1/+2
Currently, if there is a transport problem the iscsi drivers will return outstanding commands (commands being exeucted by the driver/fw/hw) with DID_BUS_BUSY and block the session so no new commands can be queued. Commands that are caught between the failure handling and blocking are failed with DID_IMM_RETRY or one of the scsi ml queuecommand return values. When the recovery_timeout fires, the iscsi drivers then fail IO with DID_NO_CONNECT. For fcp, some drivers will fail some outstanding IO (disk but possibly not tape) with DID_BUS_BUSY or DID_ERROR or some other value that causes a retry and hits the scsi_error.c failfast check, block the rport, and commands caught in the race are failed with DID_IMM_RETRY. Other drivers, may hold onto all IO and wait for the terminate_rport_io or dev_loss_tmo_callbk to be called. The following patches attempt to unify what upper layers will see drivers like multipath can make a good guess. This relies on drivers being hooked into their transport class. This first patch just defines two new host byte errors so drivers can return the same value for when a rport/session is blocked and for when the fast_io_fail_tmo fires. The idea is that if the LLD/class detects a problem and is going to block a rport/session, then if the LLD wants or must return the command to scsi-ml, then it can return it with DID_TRANSPORT_DISRUPTED. This will requeue the IO into the same scsi queue it came from, until the fast io fail timer fires and the class decides what to do. When using multipath and the fast_io_fail_tmo fires then the class can fail commands with DID_TRANSPORT_FAILFAST or drivers can use DID_TRANSPORT_FAILFAST in their terminate_rport_io callbacks or the equivlent in iscsi if we ever implement more advanced recovery methods. A LLD, like lpfc, could continue to return DID_ERROR and then it will hit the normal failfast path, so drivers do not have fully be ported to work better. The point of the patches is that upper layers will not see a failure that could be recovered from while the rport/session is blocked until fast_io_fail_tmo/recovery_timeout fires. V3 Remove some comments. V2 Fixed patch/diff errors and renamed DID_TRANSPORT_BLOCKED to DID_TRANSPORT_DISRUPTED. V1 initial patch. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-05-02[SCSI] add support for variable length extended commandsBoaz Harrosh1-7/+3
Add support for variable-length, extended, and vendor specific CDBs to scsi-ml. It is now possible for initiators and ULD's to issue these types of commands. LLDs need not change much. All they need is to raise the .max_cmd_len to the longest command they support (see iscsi patch). - clean-up some code paths that did not expect commands to be larger than 16, and change cmd_len members' type to short as char is not enough. Signed-off-by: Boaz Harrosh <bharrosh@panasas.com> Signed-off-by: Benny Halevy <bhalevy@panasas.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11[SCSI] Add Documentation and integrate into docbook buildRob Landley1-1/+0
Add Documentation/DocBook/scsi_midlayer.tmpl, add to Makefile, and update lots of kerneldoc comments in drivers/scsi/*. Updated with comments from Stefan Richter, Stephen M. Cameron, James Bottomley and Randy Dunlap. Signed-off-by: Rob Landley <rob@landley.net> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2008-01-11[SCSI] add DID_REQUEUE string to scsi_show_result host tableMike Christie1-1/+1
I was working on patches which add new transport error values, when I noticed that DID_REQUEUE was not in the hostbyte_table. I do not think there is any way to hit the code path where scsi_show_result is called and where you return DID_REQUEUE, because DID_REQUEUE causes scsi-ml to always requeue the command. However, for completeness and because I want to one day send a patch that tries to add new host bytes values, I am sending this patch. Signed-off-by: Mike Christie <michaelc@cs.wisc.edu> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
2007-10-12[SCSI] Fix device not ready printkJames Bottomley1-0/+14
Because scsi_print_sense_hdr prefixes with KERN_INFO, the output from scsi_io_completion looks like: sd 0:0:0:0: [sdb] Device not ready: <6>: Sense Key : 0x2 [current] : ASC=0x4 ASCQ=0x3 By using scsi_show_sense_hdr, we can get the much more appealing output: sd 0:0:0:0: [sdb] Device not ready: Sense Key : 0x2 [current] sd 0:0:0:0: [sdb] Device not ready: ASC=0x4 ASCQ=0x3 Acked-by: Matthew Wilcox <willy@linux.intel.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-10-12[SCSI] make scsi_decode_sense_buffer and scsi_decode_sense_extras staticAdrian Bunk1-2/+2
Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11[SCSI] constants.c: Update ASC list and make it constMartin K. Petersen1-1/+6
Add missing additional sense code and provide pointer to upstream reference (from Doug Gilbert). Add missing const (from Michael Tokarev). Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2007-03-11[SCSI] constants.c: cleanup, verbose result printingMartin K. Petersen1-122/+145
Clean up constants.c and make result printing more user friendly: - Refactor the command and sense functions so that the actual formatting can be called from the various helper functions with the correct prefix. - Replace scsi_print_hostbyte() and scsi_print_driverbyte() with scsi_print_result() which is verbose when CONFIG_SCSI_CONSTANTS is on. Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-07-09[SCSI] update additional sense codes and some opcode namesDouglas Gilbert1-38/+88
Following on from my post titled: "additional sense codes need update" see the attachment against lk 2.6.17 . ChangeLog: - update additional sense codes table to agree with SPC-4 revision 5a (14 June 2006) - adjust some of the opcode names Signed-off-by: Douglas Gilbert <dougg@torque.net> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-30Remove obsolete #include <linux/config.h>Jörn Engel1-1/+0
Signed-off-by: Jörn Engel <joern@wohnheim.fh-wedel.de> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2006-06-10[SCSI] remove scsi_request infrastructureChristoph Hellwig1-11/+1
With Achim patch the last user (gdth) is switched away from scsi_request so we an kill it now. Also disables some code in i2o_scsi that was broken since the sg driver stopped using scsi_requests. Signed-off-by: Christoph Hellwig <hch@lst.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2006-06-10[SCSI] drivers/scsi: Use ARRAY_SIZE macroTobias Klauser1-20/+13
Use ARRAY_SIZE macro instead of sizeof(x)/sizeof(x[0]) and remove duplicates of the macro. Signed-off-by: Tobias Klauser <tklauser@nuerscht.ch> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-15[SCSI] Move scsi_print_msg to SPI classMatthew Wilcox1-108/+0
scsi_print_msg() is an SPI-specific concept. This patch moves it from constants.c to scsi_transport_spi.c and updates the Kconfig to link in the SPI class for the drivers which use scsi_print_msg(). Signed-off-by: Matthew Wilcox <matthew@wil.cx> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-12-13[SCSI] Mark some core scsi data structures constArjan van de Ven1-8/+8
patch below marks a few scsi core datastructures as const, so that they end up in the .rodata section and don't cacheline share with things that get dirtied Signed-off-by: Arjan van de Ven <arjan@infradead.org> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-10-28[SCSI] move the mid-layer printk's over to shost/starget/sdev_printkJames Bottomley1-4/+1
This should eliminate (at least in the mid layer) to make numeric assumptions about any of the enumeration variables. As a side effect, it will also make all the messages consistent and line us up nicely for the error logging strategy (if it ever shows itself again). Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28[SCSI] convert sd to scsi_execute_req (and update the scsi_execute_req API)James Bottomley1-22/+26
This one removes struct scsi_request entirely from sd. In the process, I noticed we have no callers of scsi_wait_req who don't immediately normalise the sense, so I updated the API to make it take a struct scsi_sense_hdr instead of simply a big sense buffer. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-08-28[SCSI] drivers/scsi/constants.c should include scsi_dbg.hAdrian Bunk1-0/+1
C files should include the files with the prototypes for their global functions. Signed-off-by: Adrian Bunk <bunk@stusta.de> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-18[PATCH] remove outdated print_* functions1-1/+1
We have the scsi_print_* functions in the proper namespace for a long time now and there weren't a lot users left. Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
2005-04-16Linux-2.6.12-rc2Linus Torvalds1-0/+1448
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!