27 May, 2007

1 commit


12 Mar, 2007

1 commit

  • scsi tgt breaks up a command into multple scatterlists
    if we cannot fit all the data in one. This was because
    the block rq helpers did not support large requests and
    because we can get a command of any old size so it is
    hard to preallocate pages for scatterlist large enough
    (we cannot really preallocate pages with the bio map
    user path). In 2.6.20, we added large request support to
    the block layer helper, blk_rq_map_user. And at LSF,
    we talked about increasing SCSI_MAX_PHYS_SEGMENTS for
    scsi tgt if we want to support really really :) large
    (greater than 256 * PAGE_SIZE in the worst mapping case)
    requests.

    The only target currently implemented does not even support
    the multiple scatterlists stuff and only supports smaller
    requests, so this patch just coverts scsi tgt to use
    blk_rq_map_user.

    Signed-off-by: Mike Christie
    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    Mike Christie
     

26 Nov, 2006

1 commit

  • This patch contains the needed changes to the scsi-ml for the target
    mode support.

    Note, per the last review we moved almost all the fields we added
    to the scsi_cmnd to our internal data structure which we are going
    to try and kill off when we can replace it with support from other
    parts of the kernel.

    The one field we left on was the offset variable. This is needed to handle
    the case where the target gets request that is so large that it cannot
    execute it in one dma operation. So max_secotors or a segment limit may
    limit the size of the transfer. In this case our tgt core code will
    break up the command into managable transfers and send them to the
    LLD one at a time. The offset is then used to tell the LLD where in
    the command we are at. Is there another field on the scsi_cmd for
    that?

    Signed-off-by: Mike Christie
    Signed-off-by: FUJITA Tomonori
    Signed-off-by: James Bottomley

    FUJITA Tomonori
     

07 Aug, 2006

1 commit


10 Jul, 2006

1 commit

  • Currently struct scsi_cmnd has various fields that are used to backup
    original data after the corresponding fields have been overridden for
    EH commands. This means drivers can easily get at it and misuse it.
    Due to the old_ naming this doesn't happen for most of them, but two
    that have different names have been used wrong a lot (see previous
    patch). Another downside is that they unessecarily bloat the scsi_cmnd
    size.

    This patch moves them onstack in scsi_send_eh_cmnd to fix those two
    issues aswell as allowing future EH fixes like moving the EH command
    submissions to use SG lists like everything else.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

26 Jun, 2006

1 commit

  • This patch simplifies "good_bytes" computation in sd_rw_intr().
    sd: "good_bytes" computation is always done in terms of the resolution
    of the device's medium, since after that it is the number of good bytes
    we pass around and other layers/contexts (as opposed ot sd) can translate
    that to their own resolution (block layer:512). It also makes
    scsi_io_completion() processing more straightforward, eliminating the
    3rd argument to the function.

    It also fixes a couple of bugs like not checking return value,
    using "break" instead of "return;", etc.

    I've been running with this patch for some time now on a
    test (do-it-all) system.

    Signed-off-by: Luben Tuikov
    Signed-off-by: James Bottomley

    Luben Tuikov
     

23 Jun, 2006

1 commit


11 Jun, 2006

1 commit


15 May, 2006

1 commit

  • Introduce scsi_req_abort_cmd(struct scsi_cmnd *).
    This function requests that SCSI Core start recovery for the
    command by deleting the timer and adding the command to the eh
    queue. It can be called by either LLDDs or SCSI Core. LLDDs who
    implement their own error recovery MAY ignore the timeout event if
    they generated scsi_req_abort_cmd.

    First post:
    http://marc.theaimsgroup.com/?l=linux-scsi&m=113833937421677&w=2

    Signed-off-by: Luben Tuikov

    Signed-off-by: Tejun Heo

    Luben Tuikov
     

15 Apr, 2006

1 commit

  • The current dc395x driver uses PIO to transfer up to 4 bytes which do not
    get transferred by DMA (under unclear circumstances). For this the driver
    uses page_address() which is broken on highmem. Apart from this the
    actual calculation of the virtual address is wrong (even without highmem).
    So, e.g., for reading it reads bytes from the driver to a wrong address
    and returns wrong data, I guess, for writing it would just output random
    data to the device.

    The proper fix, as suggested by many, is to dynamically map data using
    kmap_atomic(page, KM_BIO_SRC_IRQ) / kunmap_atomic(virt). The reason why it
    has not been done until now, although I've done some preliminary patches
    more than a year ago was that nobody interested in fixing this problem was
    able to reliably reproduce it. Now it changed - with the help from
    Sebastian Frei (CC'ed) I was able to trigger the PIO path. Thus, I was
    also able to test and debug it.

    There are 4 cases when PIO is used in dc395x - data-in / -out with and
    without scatter-gather. I was able to reproduce and test only data-in with
    and without SG. So, the data-out path is still untested, but it is also
    somewhat simpler than the data-in. Fredrik Roubert (also CC'ed) also had
    PIO triggering on his system, and in his case it was data-out without SG.
    It would be great if he could test the attached patch on his system, but
    even if he cannot, I would still request to apply the patch and just wait
    if anybody cries...

    Implementation: I put 2 new functions in scsi_lib.c and their declarations
    in scsi_cmnd.h. I exported them without _GPL, although, I don't feel
    strongly about that - not many drivers are likely to use them. But there
    is at least one more - I want to use them in tmscsim.c. Whether these are
    the right files for the functions and their declarations - not sure
    either. Actually, they are not scsi-specific, so, might go somewhere
    around other scattergather magic? They are not platform specific either,
    and most SG functions are defined under arch/*/... As these issues were
    discussed previously there were some more routines suggested to manipulate
    scattergather buffers, I think, some of them were needed around
    crypto code... So, might be a common place reasonable, like
    lib/scattergather.c? I am open here.

    Signed-off-by: James Bottomley

    Guennadi Liakhovetski
     

28 Feb, 2006

1 commit


15 Jan, 2006

1 commit

  • LLDDs should never see REQ_BLOCK_PC requests, we can handle them just
    fine in the core code. There is a small behaviour change in that some
    check in sr's rw_intr are bypassed, but I consider the old behaviour
    a bug.

    Mike found this cleanup opportunity and provdided early patches, so all
    the credit goes to him, even if I redid the patches from scratch beause
    that was easier than forward-porting the old patches.

    Signed-off-by: Christoph Hellwig
    Signed-off-by: James Bottomley

    Christoph Hellwig
     

16 Dec, 2005

1 commit


14 Dec, 2005

1 commit


31 Oct, 2005

1 commit

  • I recently picked up my older work to remove unnecessary #includes of
    sched.h, starting from a patch by Dave Jones to not include sched.h
    from module.h. This reduces the number of indirect includes of sched.h
    by ~300. Another ~400 pointless direct includes can be removed after
    this disentangling (patch to follow later).
    However, quite a few indirect includes need to be fixed up for this.

    In order to feed the patches through -mm with as little disturbance as
    possible, I've split out the fixes I accumulated up to now (complete for
    i386 and x86_64, more archs to follow later) and post them before the real
    patch. This way this large part of the patch is kept simple with only
    adding #includes, and all hunks are independent of each other. So if any
    hunk rejects or gets in the way of other patches, just drop it. My scripts
    will pick it up again in the next round.

    Signed-off-by: Tim Schmielau
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tim Schmielau
     

28 Oct, 2005

1 commit


08 Aug, 2005

1 commit

  • There are certain rogue devices (and the aic7xxx driver) that return
    BUSY or QUEUE_FULL forever. This code will apply a global timeout (of
    the total number of retries times the per command timer) to a given
    command. If it is exceeded, the command is completed regardless of its
    state.

    The patch also removes the unused field in the command: timeout and
    timeout_total.

    This solves the problem of detecting an endless loop in the mid-layer
    because of BUSY/QUEUE_FULL bouncing, but will not recover the device.
    In the aic7xxx case, the driver can be recovered by sending a bus reset,
    so possibly this should be tied into the error handler?

    Signed-off-by: James Bottomley

    James Bottomley
     

27 Jun, 2005

4 commits


19 Apr, 2005

2 commits


17 Apr, 2005

1 commit

  • 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!

    Linus Torvalds