1. 28 Oct, 2002 17 commits
    • James Bottomley's avatar
      34f1e874
    • James Bottomley's avatar
      merge by hand of axboe/jejb changes · bd24aecd
      James Bottomley authored
      bd24aecd
    • Christoph Hellwig's avatar
      [PATCH] get rid of global arrays in sd · ea3bedb6
      Christoph Hellwig authored
      Okay, this is the final version of the sd patch to remove sd_dsk_arr.
      Instead of keeping a big global array we allocate one structure for
      each disk dynamically in sd_attach.  We can use the higher level
      private data to access it almost everywhere, for the few other
      places we keep a linked list of all disks (these are walked only
      in slow-patheß).
      
      This patch also allows to get rid of the sd_init midlayer method and
      the CONFIG_SD_EXTRA_DEVS option - sd has no more static limit to
      the number of disk except of the number of assigned majors.
      ea3bedb6
    • James Bottomley's avatar
      8159b141
    • James Bottomley's avatar
      Merge · 41c8a0e4
      James Bottomley authored
      41c8a0e4
    • Christoph Hellwig's avatar
      fce4e14a
    • Jens Axboe's avatar
      [PATCH] scsi patches · cbfec645
      Jens Axboe authored
      Hi James,
      
      Here are the changes that are good outside the other changes :-)
      
      scsi_lib:
      	o ->errors is used as the scsi status byte for REQ_BLOCK_PC
      	o ->data_len is the residual byte count
      	o call __scsi_end_request even for !good_sectors if status is
      	  good. This legitimately can happen for REQ_BLOCK_PC commands
      	  sent from a user space program, if it gets the command setup
      	  wrong (or weird). Right now this will hang that queue.
      
      scsi_merge:
      	o set SCpnt->request_bufflen to ->data_len, this is the
      	  authoritative io byte count for REQ_BLOCK_PC. Here we deal in
      	  bytes and not sectors.
      
      sr + sd:
      	o Set transfersize and underlow correctly for REQ_BLOCK_PC
      
      sr_ioctl
      	o We want to return -EIO for command failure, not EINVAL. That
       	  is pretty stupid :-)
      
      
      ===== drivers/scsi/scsi_lib.c 1.35 vs edited =====
      cbfec645
    • Christoph Hellwig's avatar
      [PATCH] misc cleanups for sr · 90092a57
      Christoph Hellwig authored
      bring it back in line with sd:
      * get rid of typedefs where possible
      * tab-align all credits entries
      * line-wrap after 80 characters
      * use C99-initializers
      90092a57
    • Jens Axboe's avatar
      [PATCH] queue last_merge hint cleanup · c5868eb7
      Jens Axboe authored
      Cleanup the last_merge logic. There are two reasons for clearing
      last_merge when we are dealing with integrity, and these are:
      
      o Clear when handing the request to the driver, so we don't merge on
        a started request.
      
      o Clear when a request is taken off the list. This cannot be done from
        the driver (above case would already have been hit), but it can
        happen
        when we merge two requests.
      
      This makes it a lot nicer, it was always peculiar how we cleared in
      put_request.
      c5868eb7
    • Jens Axboe's avatar
      [PATCH] queue dma alignment · ad519c69
      Jens Axboe authored
      Make it possible for a device to specify the dma alignment restrictions
      it has. This will be used by future infrastructure when mapping in user
      pages, and allows us to dma to on ATAPI even though user address and
      length is not sector size aligned.
      ad519c69
    • Jens Axboe's avatar
      [PATCH] make queue prep_rq_fn() a bit more powerful · 0717c0a9
      Jens Axboe authored
      Extend q->prep_rq_fn() to return one of three values:
      
       o BLKPREP_OK: request is good, return it
       o BLKPREP_KILL: request is bad, end it completely
       o BLKPREP_DEFER: request is good, but we can't take it now
      
      We maintain compatability with old prep functions (if any, outside of
      ide-cd). This change is needed or SCSI to use prep function for command
      init, if sg table allocation fails we can just defer the request.
      0717c0a9
    • Jens Axboe's avatar
      [PATCH] make blk_dump_rq_flags a bit more useful · 8c1f67fa
      Jens Axboe authored
      Add some missing bits, and make it generally a bit more useful outside
      of REQ_PC requests.
      8c1f67fa
    • Jens Axboe's avatar
      [PATCH] elv_add_request cleanups · 86b9d08b
      Jens Axboe authored
      Request insertion in the current tree is a mess. We have all sorts of
      variants of *elv_add_request*, and it's not at all clear who does what
      and with what locks (or not). This patch cleans it up to be:
      
      o __elv_add_request(queue, request, at_end, plug)
            Core function, requires queue lock to be held
      
      o elv_add_request(queue, request, at_end, plug)
            Like __elv_add_request(), but grabs queue lock
      
      o __elv_add_request_pos(queue, request, position)
            Insert request at a given location, lock must be held
      86b9d08b
    • Jens Axboe's avatar
      [PATCH] sr_ioctl must return -EIO, not -EINVAL · 6d94d882
      Jens Axboe authored
      We must return -EIO if the command fails (the 5/20/00 sense check is
      just helping return more sane info), not -EINVAL. Getting -EINVAL return
      on an ioctl if a command fails is less than helpful for applications...
      6d94d882
    • Jens Axboe's avatar
      [PATCH] end_io bouncing · d50059ec
      Jens Axboe authored
      o Split blk_queue_bounce() into a slow and fast path. The fast path is
        inlined, only if we actually need to check the bio for possible
        bounces (and bounce) do we enter __blk_queue_bounce() slow path.
      
      o Fix a nasty bug that could cause corruption for file systems not
        using PAGE_CACHE_SIZE blok size! We were not correctly setting the
        'to' bv_offset correctly.
      
      o Add BIO_BOUNCE flag. Later patches will use this for debug checking.
      d50059ec
    • Jens Axboe's avatar
      [PATCH] make deadline_merge prefetch next entry · 1b59d3cb
      Jens Axboe authored
      Make deadline_merge() prefetch the next entry on the list.
      1b59d3cb
    • Manfred Spraul's avatar
      [PATCH] use correct wakeups in fs/pipe.c · 88591b7f
      Manfred Spraul authored
      wake_up_interruptible() and _sync() calls are reversed in pipe_read().
      
      The attached patches only calls _sync if a schedule() call follows.
      88591b7f
  2. 27 Oct, 2002 4 commits
    • Christoph Hellwig's avatar
      [PATCH] Re: [PATCH] fix sector_div use in scsicam.c · 018bcdc5
      Christoph Hellwig authored
      On Mon, Oct 28, 2002 at 01:50:53AM +0100, Andries Brouwer wrote:
      > On Sun, Oct 27, 2002 at 06:05:07PM -0600, James Bottomley wrote:
      >
      > > If the return type will be ignored by most applications, I don't see
      > > what the problem is.
      >
      > There is no problem. My longish reaction was mostly because you used
      > "future proofing", that gave the impression that you did not know
      > what this is about.
      >
      > > (like an obviously wrong truncation)
      >
      > No, the code I wrote was optimal.
      > If you have 16 bits and the value is 70000, I prefer returning
      > 65535 over 4464.
      
      Why didn't you write is as patch?  James, this in Andries code
      in patch from, it get's rid of the ugly sector_div so it should
      be in if not just because of that.
      018bcdc5
    • James Bottomley's avatar
    • Christoph Hellwig's avatar
      [PATCH] fix sector_div use in scsicam.c · 740ec8b5
      Christoph Hellwig authored
      sector_div has the same slightly strange calling convention do_div has:
      it's return value is the modulo of the two operators, the division
      result is in the first parameter.  Also optimize one of the expensive
      64bit division away (okay, okay - it's not exactly an fast-path :))
      740ec8b5
    • Christoph Hellwig's avatar
      [PATCH] remove sd_disks global array from sd.c · f41f2a01
      Christoph Hellwig authored
      Add a pointer to struct scsi_disk instead.  This also obsoletes
      sd_dskname().
      f41f2a01
  3. 26 Oct, 2002 3 commits
  4. 25 Oct, 2002 3 commits
    • Christoph Hellwig's avatar
      [PATCH] back out bogus init.h change · 55ce6346
      Christoph Hellwig authored
      sorry, the last patch I sent you contained a bogus change
      for include/linux/init.h (to get around a local compile problem).
      
      This patch backs it out.
      55ce6346
    • James Bottomley's avatar
      [PATCH scsi] use sector_div in scsicam.c · db7aff0b
      James Bottomley authored
      Thanks to Patrick Mansfield for pointing this out.
      db7aff0b
    • Christoph Hellwig's avatar
      [PATCH] sanitize ->bios_param prototype · 496a57cb
      Christoph Hellwig authored
      Currnetly the ->bios_param for host drivers exposes struct scsi_disk
      (aka Scsi_Disk or Disk) to each and every lowlevel driver, although
      this structure should be privated to the sd driver.
      
      All bios_param implementation do only use two fields:  .device and
      .capacity.  This patch passes down those two directly and gets
      rid of 99% of the sd.h inclusions (*).
      
      I've tried to not break any driver with this patch, but given the
      number of compiler errors in the current tree I might have missed
      one or two.
      
      (*) a bunch of drivers needed sd.h to get to scsi.h, I've fixed those.
      496a57cb
  5. 24 Oct, 2002 2 commits
  6. 22 Oct, 2002 6 commits
  7. 21 Oct, 2002 5 commits
    • Doug Ledford's avatar
      Update for new TCQ scheme · 9ccb0cb5
      Doug Ledford authored
      9ccb0cb5
    • James Bottomley's avatar
      [SCSI] remove duplicate device registration · 07152268
      James Bottomley authored
      From Mike Anderson and Patrick Mansfield
      07152268
    • Christoph Hellwig's avatar
      [PATCH] Re: [PATCH] fix scsi device/driver model integration · ff788a74
      Christoph Hellwig authored
      On Fri, Oct 18, 2002 at 04:18:15PM -0500, James Bottomley wrote:
      > hch@lst.de said:
      > > In current 2.5 each scsi highlevel driver registers with the driver
      > > model individually.   This is rather messy and in fact one driver was
      > > left out in the change.  Make scsi_{,un}register_device do it instead
      > > and deregister with the driver model first as we registered last.
      >
      > OK, Patrick Mochel just stomped all over this.  So I no longer trust my merge
      > corrections.  Could you resend against the current 2.5-BK.
      
      Patch below (Template changes will be part of a different patch
      now)
      ff788a74
    • Mike Anderson's avatar
      [PATCH] scsi sync caches w/ dev offline · 84a26cf5
      Mike Anderson authored
      When a scsi device is offlined and then the system is shutdown it will
      hang during the synchronizing SCSI caches task. The error handler was
      activated during this step, but post recovery the system did not
      complete the shutdown.
      
      This patch just adds a check for online before sending the command. The
      better approach appeared to be to use scsi_block_when_processing_errors,
      but I was concerned that we might block to long in a shutdown case.
      
      -andmike
      --
      Michael Anderson
      andmike@us.ibm.com
      
       sd.c |    3 +++
       1 files changed, 3 insertions(+)
      84a26cf5
    • Mike Anderson's avatar
      [PATCH] scsi_error device offline fix · 6532af8c
      Mike Anderson authored
      This patch corrects a problem in scsi error handling.
      
      When a device is offlined indicated by a message like ...Device offlined
      - not ready...
      
      the command return status was not being updated with a failure status if
      the IO was a timeout.
      
      I tested the patch on system with ips, aic, and qlogic fc adapters, but
      was unable to generate a satisfactory device offline test case.
      
      I did test this fix on uml with scsi_debug and generated a device
      offline condition with verified this fix was working correctly.
      
      -andmike
      --
      Michael Anderson
      andmike@us.ibm.com
      
       scsi_error.c |    8 ++++++--
       1 files changed, 6 insertions(+), 2 deletions(-)
      6532af8c