18 Apr, 2007

1 commit

  • This patch (as857) modifies the SG_GET_RESERVED_SIZE and
    SG_SET_RESERVED_SIZE ioctls in the sg driver, capping the values at
    the device's request_queue's max_sectors value. This will permit
    cdrecord to obtain a legal value for the maximum transfer length,
    fixing Bugzilla #7026.

    The patch also caps the initial reserved_size value. There's no
    reason to have a reserved buffer larger than max_sectors, since it
    would be impossible to use the extra space.

    The corresponding ioctls in the block layer are modified similarly,
    and the initial value for the reserved_size is set as large as
    possible. This will effectively make it default to max_sectors.
    Note that the actual value is meaningless anyway, since block devices
    don't have a reserved buffer.

    Finally, the BLKSECTGET ioctl is added to sg, so that there will be a
    uniform way for users to determine the actual max_sectors value for
    any raw SCSI transport.

    Signed-off-by: Alan Stern
    Acked-by: Jens Axboe
    Acked-by: Douglas Gilbert
    Signed-off-by: James Bottomley

    Alan Stern
     

30 Jan, 2007

1 commit

  • Commit 85e04e371b5a321b5df2bc3f8e0099a64fb087d7 cleaned up the timeout
    conversion, but did it exactly the wrong way. We get msecs from user
    space, and should convert them into jiffies. Not the other way around.

    Here is a fix with the overflow check sg.c has added in. This fixes DVD
    burnign with Nero.

    Signed-off-by: Mike Christie
    [ "you'll be wanting a comma there" - Andrew ]
    Cc: Andrew Morton
    Signed-off-by: Linus Torvalds

    Mike Christie
     

19 Dec, 2006

1 commit

  • The blk_rq_unmap_user() API is not very nice. It expects the caller to
    know that rq->bio has to be reset to the original bio, and it will
    silently do nothing if that is not done. Instead make it explicit that
    we need to pass in the first bio, by expecting a bio argument.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

12 Dec, 2006

2 commits


06 Dec, 2006

1 commit

  • * master.kernel.org:/pub/scm/linux/kernel/git/jejb/scsi-misc-2.6: (73 commits)
    [SCSI] aic79xx: Add ASC-29320LPE ids to driver
    [SCSI] stex: version update
    [SCSI] stex: change wait loop code
    [SCSI] stex: add new device type support
    [SCSI] stex: update device id info
    [SCSI] stex: adjust default queue length
    [SCSI] stex: add value check in hard reset routine
    [SCSI] stex: fix controller_info command handling
    [SCSI] stex: fix biosparam calculation
    [SCSI] megaraid: fix MMIO casts
    [SCSI] tgt: fix undefined flush_dcache_page() problem
    [SCSI] libsas: better error handling in sas_expander.c
    [SCSI] lpfc 8.1.11 : Change version number to 8.1.11
    [SCSI] lpfc 8.1.11 : Misc Fixes
    [SCSI] lpfc 8.1.11 : Add soft_wwnn sysfs attribute, rename soft_wwn_enable
    [SCSI] lpfc 8.1.11 : Removed decoding of PCI Subsystem Id
    [SCSI] lpfc 8.1.11 : Add MSI (Message Signalled Interrupts) support
    [SCSI] lpfc 8.1.11 : Adjust LOG_FCP logging
    [SCSI] lpfc 8.1.11 : Fix Memory leaks
    [SCSI] lpfc 8.1.11 : Fix lpfc_multi_ring_support
    ...

    Linus Torvalds
     

01 Dec, 2006

1 commit


23 Nov, 2006

1 commit


17 Nov, 2006

1 commit

  • ATAPI devices transfer fixed number of bytes for CDBs (12 or 16). Some
    ATAPI devices choke when shorter CDB is used and the left bytes contain
    garbage. Block SG_IO cleared left bytes but SCSI SG_IO didn't. This patch
    makes SCSI SG_IO clear it and simplify CDB clearing in block SG_IO.

    Signed-off-by: Tejun Heo
    Cc: Mathieu Fluhr
    Cc: James Bottomley
    Cc: Douglas Gilbert
    Acked-by: Jens Axboe
    Cc:
    Acked-by: Jeff Garzik
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Tejun Heo
     

16 Nov, 2006

1 commit


14 Nov, 2006

1 commit

  • Contrary to what the name misleads you to believe, SG_DXFER_TO_FROM_DEV
    is really just a normal read seen from the device side.

    This patch fixes http://lkml.org/lkml/2006/10/13/100

    Signed-off-by: Jens Axboe
    Signed-off-by: Linus Torvalds

    Jens Axboe
     

01 Oct, 2006

1 commit

  • Right now ->flags is a bit of a mess: some are request types, and
    others are just modifiers. Clean this up by splitting it into
    ->cmd_type and ->cmd_flags. This allows introduction of generic
    Linux block message types, useful for sending generic Linux commands
    to block devices.

    Signed-off-by: Jens Axboe

    Jens Axboe
     

13 Apr, 2006

1 commit

  • We currently have two implementations of this obsolete ioctl, one in
    the block layer and one in the scsi code. Both of them have drawbacks.

    This patch kills the scsi layer version after updating the block version
    with the missing bits:

    - argument checking
    - use scatterlist I/O
    - set number of retries based on the submitted command

    This is the last user of non-S/G I/O except for the gdth driver, so
    getting this in ASAP and through the scsi tree would be nie to kill
    the non-S/G I/O path. Jens, what do you think about adding a check
    for non-S/G I/O in the midlayer?

    Thanks to Or Gerlitz for testing this patch.

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

    Christoph Hellwig
     

08 Feb, 2006

1 commit

  • When issuing an SG_IO ioctl through sd that resulted in an unrecoverable
    error, a nearly infinite retry loop was discovered. This is due to the
    fact that the block layer SG_IO code is not setting up rq->retries. This
    patch also fixes up the sg_scsi_ioctl path.

    Signed-off-by: Brian King
    Signed-off-by: Jens Axboe

    Jens Axboe
     

12 Jan, 2006

1 commit

  • - Move capable() from sched.h to capability.h;

    - Use where capable() is used
    (in include/, block/, ipc/, kernel/, a few drivers/,
    mm/, security/, & sound/;
    many more drivers/ to go)

    Signed-off-by: Randy Dunlap
    Signed-off-by: Andrew Morton
    Signed-off-by: Linus Torvalds

    Randy.Dunlap
     

09 Jan, 2006

1 commit


06 Jan, 2006

1 commit

  • the patch below marks various read-only variables in block/* as const,
    so that gcc can optimize the use of them; eg gcc will replace the use by
    the value directly now and will even remove the memory usage of these.

    Signed-off-by: Arjan van de Ven
    Signed-off-by: Jens Axboe

    Arjan van de Ven
     

05 Jan, 2006

1 commit


20 Dec, 2005

1 commit


16 Dec, 2005

1 commit

  • - export __blk_put_request and blk_execute_rq_nowait
    needed for async REQ_BLOCK_PC requests
    - seperate max_hw_sectors and max_sectors for block/scsi_ioctl.c and
    SG_IO bio.c helpers per Jens's last comments. Since block/scsi_ioctl.c SG_IO was
    already testing against max_sectors and SCSI-ml was setting max_sectors and
    max_hw_sectors to the same value this does not change any scsi SG_IO behavior. It only
    prepares ll_rw_blk.c, scsi_ioctl.c and bio.c for when SCSI-ml begins to set
    a valid max_hw_sectors for all LLDs. Today if a LLD does not set it
    SCSI-ml sets it to a safe default and some LLDs set it to a artificial low
    value to overcome memory and feedback issues.

    Note: Since we now cap max_sectors to BLK_DEF_MAX_SECTORS, which is 1024,
    drivers that used to call blk_queue_max_sectors with a large value of
    max_sectors will now see the fs requests capped to BLK_DEF_MAX_SECTORS.

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

    Mike Christie
     

04 Nov, 2005

1 commit