10 Jun, 2006

1 commit


06 Jun, 2006

1 commit

  • Various scsi drivers use scsi_cmnd.buffer and scsi_cmnd.bufflen in their
    queuecommand functions. Those fields are internal storage for the
    midlayer only and are used to restore the original payload after
    request_buffer and request_bufflen have been overwritten for EH. Using
    the buffer and bufflen fields means they do very broken things in error
    handling.

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

    Christoph Hellwig
     

26 Mar, 2006

1 commit


20 Mar, 2006

1 commit

  • I think I promised to do this two years ago

    This patch adds a scsi_disk class with the cache type and FUA
    parameters, so user land application can easily obtain them without
    having to parse dmesg. It also allows setting the cache type (use with
    care...)

    This patch is a bit dangerous because I've replaced the disk kref with a
    class device reference ...

    Signed-off-by: James Bottomley

    James Bottomley
     

12 Mar, 2006

1 commit

  • Add device-major aliases in drivers/scsi, allowing kmod autoload:

    MODULE_ALIAS_CHARDEV_MAJOR(SCSI_CHANGER_MAJOR)
    MODULE_ALIAS_CHARDEV_MAJOR(OSST_MAJOR)
    MODULE_ALIAS_CHARDEV_MAJOR(SCSI_TAPE_MAJOR)
    MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_CDROM_MAJOR)
    MODULE_ALIAS_BLOCKDEV_MAJOR(SCSI_DISKN_MAJOR)

    Signed-off-by: Andrew Morton
    Acked-by: Kai Makisara
    Signed-off-by: James Bottomley

    Rene Herman
     

28 Feb, 2006

3 commits


27 Feb, 2006

1 commit

  • There's a problem in sd where we blindly believe the length of the
    headers and block descriptors. Some devices return insane values for
    these and cause our length to end up greater than the actual buffer
    size, so check to make sure.

    Signed-off-by: Al Viro

    Also removed the buffer size magic number (512) and added DPOFUA of
    zero to the defaults

    Signed-off-by: James Bottomley
    Signed-off-by: Linus Torvalds

    Al Viro
     

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
     

13 Jan, 2006

1 commit


09 Jan, 2006

1 commit

  • HDIO_GETGEO is implemented in most block drivers, and all of them have to
    duplicate the code to copy the structure to userspace, as well as getting
    the start sector. This patch moves that to common code [1] and adds a
    ->getgeo method to fill out the raw kernel hd_geometry structure. For many
    drivers this means ->ioctl can go away now.

    [1] the s390 block drivers are odd in this respect. xpram sets ->start
    to 4 always which seems more than odd, and the dasd driver shifts
    the start offset around, probably because of it's non-standard
    sector size.

    Signed-off-by: Christoph Hellwig
    Cc: Jens Axboe
    Cc:
    Cc: Jeff Dike
    Cc: Paolo Giarrusso
    Cc: Bartlomiej Zolnierkiewicz
    Cc: Neil Brown
    Cc: Markus Lidel
    Cc: Russell King
    Cc: David Woodhouse
    Cc: Martin Schwidefsky
    Cc: James Bottomley
    Signed-off-by: Adrian Bunk
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Christoph Hellwig
     

06 Jan, 2006

3 commits

  • Add FUA support for barriers to SCSI disk.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jens Axboe

    Tejun Heo
     
  • All ordered request related stuff delegated to HLD. Midlayer
    now doens't deal with ordered setting or prepare_flush
    callback. sd.c updated to deal with blk_queue_ordered
    setting. Currently, ordered tag isn't used as SCSI midlayer
    cannot guarantee request ordering.

    Signed-off-by: Tejun Heo
    Signed-off-by: Jens Axboe

    Tejun Heo
     
  • add @uptodate argument to end_that_request_last() and @error
    to rq_end_io_fn(). there's no generic way to pass error code
    to request completion function, making generic error handling
    of non-fs request difficult (rq->errors is driver-specific and
    each driver uses it differently). this patch adds @uptodate
    to end_that_request_last() and @error to rq_end_io_fn().

    for fs requests, this doesn't really matter, so just using the
    same uptodate argument used in the last call to
    end_that_request_first() should suffice. imho, this can also
    help the generic command-carrying request jens is working on.

    Signed-off-by: tejun heo
    Signed-Off-By: Jens Axboe

    Tejun Heo
     

16 Dec, 2005

2 commits


14 Dec, 2005

2 commits


09 Nov, 2005

1 commit

  • sd_issue_flush() is called from atomic context so we can't use the
    semaphore based routines to get a reference to the scsi_disk. Assume
    something else already got the reference so we can safely use it.

    Signed-off-by: James Bottomley

    James Bottomley
     

05 Nov, 2005

1 commit

  • Currently the driver takes a reference only for requests coming by way
    of the gendisk, not for requests coming by way of the struct device or
    struct scsi_device. Such requests can arrive in the rescan, flush,
    and shutdown pathways.

    The patch also makes the scsi_disk keep a reference to the underlying
    scsi_device, and it erases the scsi_device's pointer to the scsi_disk
    when the scsi_device is removed (since the pointer should no longer be
    used).

    This resolves Bugzilla entry #5237.

    Signed-off-by: Alan Stern
    Signed-off-by: James Bottomley

    Alan Stern
     

29 Oct, 2005

2 commits


15 Sep, 2005

1 commit


07 Sep, 2005

2 commits

  • James Bottomley
     
  • This patch adds a delay tailored for USB flash devices that are slow to
    initialize their firmware. The symptom is a repeated Unit Attention with
    ASC=0x28 (Not Ready to Ready transition). The patch will wait for up to 5
    seconds for such devices to become ready. Normal devices won't send the
    repeated Unit Attention sense key and hence won't trigger the patch.

    This fixes a problem with James Roberts-Thomson's USB device, and I've
    seen several reports of other devices exhibiting the same symptoms --
    presumably they will be helped as well.

    Signed-off-by: Alan Stern
    Signed-off-by: James Bottomley

    Alan Stern
     

29 Aug, 2005

2 commits


14 Jul, 2005

1 commit


26 May, 2005

1 commit

  • a) TYPE_SDAD renamed to TYPE_RBC and taken to scsi.h
    b) in sbp2.c remapping of TYPE_RPB to TYPE_DISK turned off
    c) relevant places in midlayer and sd.c taught to accept TYPE_RBC
    d) sd.c::sd_read_cache_type() looks into page 6 when dealing with
    TYPE_RBC - these guys have writeback cache flag there and are not guaranteed
    to have page 8 at all.
    e) sd_read_cache_type() got an extra sanity check - it checks that
    it got the page it asked for before using its contents. And screams if
    mismatch had happened. Rationale: there are broken devices out there that
    are "helpful" enough to go for "I don't have a page you've asked for, here,
    have another one". For example, PL3507 had been caught doing just that...
    f) sbp2 sets sdev->use_10_for_rw and sdev->use_10_for_ms instead
    of bothering to remap READ6/WRITE6/MOD_SENSE, so most of the conversions
    in there are gone now.

    Incidentally, I wonder if USB storage devices that have no
    mode page 8 are simply RBC ones. I haven't touched that, but it might
    be interesting to check...

    Signed-off-by: Al Viro
    Signed-off-by: James Bottomley

    Al Viro
     

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