1. 12 11月, 2014 2 次提交
  2. 27 7月, 2008 2 次提交
    • A
      [SCSI] scsi_eh_prep_cmnd should save scmd->underflow · 12265709
      Alan Stern 提交于
      This patch (as1116) fixes a bug in scsi_eh_prep_cmnd() and
      scsi_eh_restore_cmnd().  These routines are supposed to save any
      values they change and restore them later, but someone forgot to
      save & restore scmd->underflow.
      
      This fixes part of the problem reported in Bugzilla #9638.
      
      [jejb: fix up rejections around DIF/DIX]
      Signed-off-by: NAlan Stern <stern@rowland.harvard.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      12265709
    • M
      [SCSI] Command protection operation · db007fc5
      Martin K. Petersen 提交于
      Controllers that support DMA of protection information must be told
      explicitly how to handle the I/O.  The controller has no knowledge of
      the protection capabilities of the target device so this information
      must be passed in the scsi_cmnd.
      
       - The protection operation tells the HBA whether to generate, strip or
         verify protection information.
      
       - The protection type tells the HBA which layout the target is
         formatted with.  This is necessary because the controller must be
         able to correctly interpret the included protection information in
         order to verify it.
      
       - When a scsi_cmnd is reused for error handling the protection
         operation must be cleared and saved while error handling is in
         progress.
      
       - prot_op and prot_type are placed in an existing hole in scsi_cmnd
         and don't cause the structure to grow.
      Signed-off-by: NMartin K. Petersen <martin.petersen@oracle.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      db007fc5
  3. 02 5月, 2008 1 次提交
    • B
      [SCSI] Let scsi_cmnd->cmnd use request->cmd buffer · 64a87b24
      Boaz Harrosh 提交于
       - struct scsi_cmnd had a 16 bytes command buffer of its own.
         This is an unnecessary duplication and copy of request's
         cmd. It is probably left overs from the time that scsi_cmnd
         could function without a request attached. So clean that up.
      
       - Once above is done, few places, apart from scsi-ml, needed
         adjustments due to changing the data type of scsi_cmnd->cmnd.
      
       - Lots of drivers still use MAX_COMMAND_SIZE. So I have left
         that #define but equate it to BLK_MAX_CDB. The way I see it
         and is reflected in the patch below is.
         MAX_COMMAND_SIZE - means: The longest fixed-length (*) SCSI CDB
                            as per the SCSI standard and is not related
                            to the implementation.
         BLK_MAX_CDB.     - The allocated space at the request level
      
       - I have audit all ISA drivers and made sure none use ->cmnd in a DMA
         Operation. Same audit was done by Andi Kleen.
      
      (*)fixed-length here means commands that their size can be determined
         by their opcode and the CDB does not carry a length specifier, (unlike
         the VARIABLE_LENGTH_CMD(0x7f) command). This is actually not exactly
         true and the SCSI standard also defines extended commands and
         vendor specific commands that can be bigger than 16 bytes. The kernel
         will support these using the same infrastructure used for VARLEN CDB's.
         So in effect MAX_COMMAND_SIZE means the maximum size command
         scsi-ml supports without specifying a cmd_len by ULD's
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      64a87b24
  4. 08 4月, 2008 2 次提交
  5. 31 1月, 2008 2 次提交
    • B
      [SCSI] bidirectional command support · 6f9a35e2
      Boaz Harrosh 提交于
      At the block level bidi request uses req->next_rq pointer for a second
      bidi_read request.
      At Scsi-midlayer a second scsi_data_buffer structure is used for the
      bidi_read part. This bidi scsi_data_buffer is put on
      request->next_rq->special. Struct scsi_cmnd is not changed.
      
      - Define scsi_bidi_cmnd() to return true if it is a bidi request and a
        second sgtable was allocated.
      
      - Define scsi_in()/scsi_out() to return the in or out scsi_data_buffer
        from this command This API is to isolate users from the mechanics of
        bidi.
      
      - Define scsi_end_bidi_request() to do what scsi_end_request() does but
        for a bidi request. This is necessary because bidi commands are a bit
        tricky here. (See comments in body)
      
      - scsi_release_buffers() will also release the bidi_read scsi_data_buffer
      
      - scsi_io_completion() on bidi commands will now call
        scsi_end_bidi_request() and return.
      
      - The previous work done in scsi_init_io() is now done in a new
        scsi_init_sgtable() (which is 99% identical to old scsi_init_io())
        The new scsi_init_io() will call the above twice if needed also for
        the bidi_read command. Only at this point is a command bidi.
      
      - In scsi_error.c at scsi_eh_prep/restore_cmnd() make sure bidi-lld is not
        confused by a get-sense command that looks like bidi. This is done
        by puting NULL at request->next_rq, and restoring.
      
      [jejb: update to sg_table and resolve conflicts
      also update to blk-end-request and resolve conflicts]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      6f9a35e2
    • B
      [SCSI] implement scsi_data_buffer · 30b0c37b
      Boaz Harrosh 提交于
      In preparation for bidi we abstract all IO members of scsi_cmnd,
      that will need to duplicate, into a substructure.
      
      - Group all IO members of scsi_cmnd into a scsi_data_buffer
        structure.
      - Adjust accessors to new members.
      - scsi_{alloc,free}_sgtable receive a scsi_data_buffer instead of
        scsi_cmnd. And work on it.
      - Adjust scsi_init_io() and  scsi_release_buffers() for above
        change.
      - Fix other parts of scsi_lib/scsi.c to members migration. Use
        accessors where appropriate.
      
      - fix Documentation about scsi_cmnd in scsi_host.h
      
      - scsi_error.c
        * Changed needed members of struct scsi_eh_save.
        * Careful considerations in scsi_eh_prep/restore_cmnd.
      
      - sd.c and sr.c
        * sd and sr would adjust IO size to align on device's block
          size so code needs to change once we move to scsi_data_buff
          implementation.
        * Convert code to use scsi_for_each_sg
        * Use data accessors where appropriate.
      
      - tgt: convert libsrp to use scsi_data_buffer
      
      - isd200: This driver still bangs on scsi_cmnd IO members,
        so need changing
      
      [jejb: rebased on top of sg_table patches fixed up conflicts
      and used the synergy to eliminate use_sg and sg_count]
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
      Signed-off-by: NJames Bottomley <James.Bottomley@HansenPartnership.com>
      30b0c37b
  6. 18 10月, 2007 1 次提交
  7. 13 10月, 2007 1 次提交
    • B
      [SCSI] scsi_error: Refactoring scsi_error to facilitate in synchronous REQUEST_SENSE · e1c23468
      Boaz Harrosh 提交于
       - Drivers/transports that want to send a synchronous REQUEST_SENSE command
         as part of their .queuecommand sequence, have 2 new API's that facilitate
         in doing so and abstract them from scsi-ml internals.
      
         void scsi_eh_prep_cmnd(struct scsi_cmnd *scmd,
      	struct scsi_eh_save *sesci, unsigned char *cmnd,
      	int cmnd_size, int sense_bytes)
      
         Will hijack a command and prepare it for request sense if needed.
         And will save any later needed info into a scsi_eh_save structure.
      
         void scsi_eh_restore_cmnd(struct scsi_cmnd* scmd,
      	struct scsi_eh_save *sesci);
      
         Will undo any changes done to a command by above function. Making
         it ready for completion.
      
       - Re-factor scsi_send_eh_cmnd() to use above APIs
      Signed-off-by: NBoaz Harrosh <bharrosh@panasas.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      e1c23468
  8. 11 6月, 2006 1 次提交
  9. 20 5月, 2006 1 次提交
  10. 15 5月, 2006 1 次提交
    • T
      [PATCH] SCSI: implement shost->host_eh_scheduled · ee7863bc
      Tejun Heo 提交于
      libata needs to invoke EH without scmd.  This patch adds
      shost->host_eh_scheduled to implement such behavior.
      
      Currently the only user of this feature is libata and no general
      interface is defined.  This patch simply adds handling for
      host_eh_scheduled where needed and exports scsi_eh_wakeup() to
      modules.  The rest is upto libata.  This is the result of the
      following discussion.
      
      http://thread.gmane.org/gmane.linux.scsi/23853/focus=9760
      
      In short, SCSI host is not supposed to know about exceptions unrelated
      to specific device or command.  Such exceptions should be handled by
      transport layer proper.  However, the distinction is not essential to
      ATA and libata is planning to depart from SCSI, so, for the time
      being, libata will be using SCSI EH to handle such exceptions.
      Signed-off-by: NTejun Heo <htejun@gmail.com>
      ee7863bc
  11. 27 1月, 2006 1 次提交
  12. 07 9月, 2005 1 次提交
  13. 29 8月, 2005 1 次提交
    • J
      [SCSI] convert SPI transport class to scsi_execute · 33aa687d
      James Bottomley 提交于
      This one's slightly more difficult.  The transport class uses
      REQ_FAILFAST, so another interface (scsi_execute) had to be invented to
      take the extra flag.  Also, the sense functions are shifted around to
      allow spi_execute to place data directly into a struct scsi_sense_hdr.
      With this change, there's probably a lot of unnecessary sense buffer
      allocation going on which we can fix later.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      33aa687d
  14. 17 4月, 2005 1 次提交
    • L
      Linux-2.6.12-rc2 · 1da177e4
      Linus Torvalds 提交于
      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!
      1da177e4