09 Jan, 2015

5 commits

  • Instead of having constants.c littered with ifdef statements we should
    be moving dummy functions into the header and condintionally compile in
    constants.c if selected. And update the Kconfig description to reflect
    the actual size difference.

    Suggested-by: Christoph Hellwig
    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Convert scsi_print_result() to use the per-cpu buffer for decoding the
    command result and disposition.

    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Convert sense buffer logging to use the per-cpu buffer to avoid line
    breakup.

    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • Use an external buffer for __scsi_print_command() and move command
    logging over to use the per-cpu logging buffer. With that we can
    guarantee the command always will always be formatted in one line.
    So we can even print out a variable length command correctly across
    several lines. Finally rename __scsi_print_command() to
    __scsi_format_comment() to better reflect the functionality.

    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • The last time these SCSI asc/ascq codes were synced with T10 was
    2013/06/05. Sync the SCSI ASC/ASCQ number to string tables with those
    found at http://www.t10.org/lists/asc-num.txt dated 2014/12/21.

    Signed-off-by: Douglas Gilbert
    Reviewed-by: Hannes Reinecke
    Signed-off-by: Christoph Hellwig

    Douglas Gilbert
     

03 Dec, 2014

1 commit

  • One of the two callers passes an unintialized pointer as "fmt" and
    expects it to be set to NULL if there is no format string. Let's make
    this function work as expected.

    Fixes: d811b848ebb7 ('scsi: use sdev as argument for sense code printing')
    Signed-off-by: Dan Carpenter
    Reviewed-by: James Bottomley
    Signed-off-by: Christoph Hellwig

    Dan Carpenter
     

25 Nov, 2014

2 commits

  • SPC-3 defines SERVICE ACTION IN(12), SERVICE_ACTION OUT(12),
    SERVICE ACTION OUT(16), and SERVICE ACTION BIDIRECTIONAL.
    And READ MEDIA SERIAL NUMBER has long since been deprecated.
    So update callers to refer to the new cdb name.

    Signed-off-by: Hannes Reinecke
    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     
  • SPC-3 defines SERVICE ACTION IN(12) and SERVICE ACTION IN(16).
    So rename SERVICE_ACTION_IN to SERVICE_ACTION_IN_16 to be
    consistent with SPC and to allow for better distinction.

    Signed-off-by: Hannes Reinecke
    Tested-by: Robert Elliott
    Reviewed-by: Robert Elliott
    Signed-off-by: Christoph Hellwig

    Hannes Reinecke
     

12 Nov, 2014

12 commits


10 Jul, 2013

1 commit

  • It has been several years since the SCSI constants.c
    file has been updated. The attached is against lk 3.10
    and brings the command strings, sense keys and additional
    sense code strings into sync with spc4r36g.pdf.

    Certain SCSI command names that previously only took the
    opcode (i.e. byte 0 of the cdb) into account, have been
    split into several command names using the associated
    service action field to differentiate. For example,
    persistent reservations that previously had 2 commands
    (i.e. "in" and "out") have been expanded to 12 commands
    (e.g. "Persistent reserve in, read reservation").

    Sync SCSI command names, sense key strings and additional
    sense code strings with SPC-4 draft revision 36g

    [jejb: whitespace fix]
    Signed-off-by: Douglas Gilbert
    Signed-off-by: James Bottomley

    Douglas Gilbert
     

14 Sep, 2012

1 commit


24 May, 2011

1 commit

  • * '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
    ...

    Linus Torvalds
     

10 May, 2011

1 commit


16 Apr, 2011

1 commit


03 Sep, 2010

1 commit


20 Feb, 2010

2 commits

  • 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
    Reviewed-by: Boaz Harrosh
    Signed-off-by: James Bottomley

    Martin K. Petersen
     
  • 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
    Signed-off-by: James Bottomley

    Martin K. Petersen
     

05 Dec, 2009

1 commit


23 Aug, 2009

1 commit

  • 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
    Signed-off-by: James Bottomley
    Signed-off-by: James Bottomley

    Douglas Gilbert
     

13 Mar, 2009

1 commit

  • 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
    Signed-off-by: James Bottomley

    Martin K. Petersen
     

13 Oct, 2008

1 commit

  • 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
    Signed-off-by: James Bottomley

    Mike Christie
     

03 May, 2008

1 commit

  • 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
    Signed-off-by: Benny Halevy
    Signed-off-by: James Bottomley

    Boaz Harrosh
     

12 Jan, 2008

2 commits

  • 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
    Signed-off-by: James Bottomley

    Rob Landley
     
  • 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
    Signed-off-by: James Bottomley

    Mike Christie
     

13 Oct, 2007

2 commits


12 Mar, 2007

2 commits


09 Jul, 2006

1 commit