An error occurred fetching the project authors.
  1. 04 Mar, 2004 1 commit
    • James Bottomley's avatar
      Add SCSI lots of disk support · 9897d23f
      James Bottomley authored
      From: 	Kurt Garloff <garloff@suse.de>
      
      Based on earlier patches from
       Badari Pulavarty <pbadari@us.ibm.com>,
       Matthew Wilcox <willy@debian.org>
      9897d23f
  2. 24 Feb, 2004 1 commit
    • Jens Axboe's avatar
      [PATCH] fix SCSI non-sector bio backed IO · 15680951
      Jens Axboe authored
      This fixes the SCSI layer to handle non-sector-aligned requests from
      SG_IO (and potentially anything else producing these requests) that
      could stall the machine and cause all sorts of funnies depending on the
      low level driver used.
      15680951
  3. 04 Feb, 2004 1 commit
    • Andrew Morton's avatar
      [PATCH] fix blockdev --getro for sr, sd, ide-floppy · 2b0bcc8b
      Andrew Morton authored
      From: John McKell <mckellj@iomega.com>
      
      This 2.6.1 patch works by setting gendisk->policy to the correct value
      during initialization as the various drivers decide whether or not the disk
      is writeable.  This patch persuades "blockdev --getro ..." to correctly
      report the read-only state of a newly inserted disk.  This patch applies to
      sr.c, sd.c and ide-floppy.c.  ide-cd.c already has this functionality built
      into it.
      
      Using an Iomega Zip drive as the test case...
      
      Without the patch, I always see:
      
      $ sudo blockdev --getro /dev/sda
      0
      $
      
      That's only correct for writeable disks though.  Only when the patch
      is applied do I see a write-protected disk described correctly:
      
      $ sudo blockdev --getro /dev/sda
      1
      $
      2b0bcc8b
  4. 02 Feb, 2004 1 commit
    • Patrick Mansfield's avatar
      [PATCH] change scsi_cmd_ioctl to take a gendisk instead of a queue · 807adbc5
      Patrick Mansfield authored
      This patch against a recent bk 2.6 changes scsi_cmd_ioctl to take a
      gendisk as an argument instead of a request_queue_t. This allows scsi char
      devices to use the scsi_cmd_ioctl interface.
      
      In turn, change bio_map_user to also pass a request_queue_t, and add a
      __bio_add_page helper that takes a request_queue_t.
      
      Tested ide cd burning with no problems.
      
      If the scsi upper level scsi_cmd_ioctl usage were consolidated in
      scsi_prep_fn, we could pass a request_queue_t instead of a gendisk to
      scsi_cmd_ioctl.
      807adbc5
  5. 23 Oct, 2003 1 commit
    • Mike Anderson's avatar
      [PATCH] Add release function to sd for scsi_disk structure · f7ad2011
      Mike Anderson authored
      This patch removes the delay in calling device_del on the sdev struct
      device during a surprise removal event. Reference counting functions for
      sd's scsi_disk structure where also added to fix issues of unregistering
      when a sd is open.
      
      I have tested this patch using scsi_debug with differnt combinations of
      adds / removes. I mounted both partitioned and un-partitioned sd disks,
      remove the host, and then did a umount. The ref count debug output shows
      the objects staying in place prior to the umount and cleaning up once
      the umount is called.
      
      This patch fixes an issue with a delayed call of device_del on the
      sdev_gendev struct device.
      	- Remove the delayed call to device_del.
      	- Add kobject to sd scsi_disk structure.
      	- Add release function for scsi_disk kobject.
      	- Add get / put functions for scsi_disk and calls to these
      	  functions.
      
       drivers/scsi/scsi.c       |    4 --
       drivers/scsi/scsi_sysfs.c |    3 --
       drivers/scsi/sd.c         |   63 ++++++++++++++++++++++++++++++++++++++++------
       3 files changed, 57 insertions(+), 13 deletions(-)
      f7ad2011
  6. 16 Oct, 2003 1 commit
    • Patrick Mansfield's avatar
      [PATCH] SCSI: limit mode sense usage · 92933518
      Patrick Mansfield authored
      Re-roll of the patch against 2.6.0-test6 to allow overriding or setting of
      mode sense related flags, includes Alan Stern's as95 patch minus his
      scsiglue.c changes.
      
      Moves scsi_devinfo.h for use outside of drivers/scsi, and adds three new
      devinfo flags:
      
      	BLIST_MS_SKIP_PAGE_08
      	BLIST_MS_SKIP_PAGE_3F
      	BLIST_USE_10_BYTE_MS
      
      Adds a per host template flags, and use of it in scsiglue.c. The per host
      value can be overridden by a devinfo entry, the patch does not allow
      scsi_default_dev_flags to override default host values.
      
      USB mass storage and removable media (for testing mode page 3f use) were
      not tested, if you have a USB storage device that still chokes on mode
      sense 3f please give this a spin.
      
       drivers/scsi/scsi_devinfo.c    |   15 +++++++++++----
       drivers/scsi/scsi_devinfo.h    |   17 -----------------
       drivers/scsi/scsi_priv.h       |    3 ++-
       drivers/scsi/scsi_scan.c       |   17 +++++++++++++----
       drivers/scsi/sd.c              |    9 +++++++++
       drivers/usb/storage/scsiglue.c |    8 ++++----
       include/scsi/scsi_device.h     |    2 ++
       include/scsi/scsi_devinfo.h    |   22 ++++++++++++++++++++++
       include/scsi/scsi_host.h       |    6 ++++++
       9 files changed, 69 insertions(+), 30 deletions(-)
      92933518
  7. 25 Sep, 2003 1 commit
    • Patrick Mansfield's avatar
      [PATCH] don't set underflow for REQ_BLOCK_PC · ee99c100
      Patrick Mansfield authored
      I got underflow warnings and failures when sending an INQUIRY page 0x83
      via the SG_IO REQ_BLOCK_PC interface.
      
      The underflow field should only be set if we know for certain the size of
      the data being transfered, so fix this by leaving it at zero for scsi
      REQ_BLOCK_PC cases.
      ee99c100
  8. 24 Sep, 2003 1 commit
  9. 25 Aug, 2003 2 commits
  10. 16 Aug, 2003 1 commit
    • Alan Stern's avatar
      [PATCH] PATCH: (as70b) Update request_bufflen to match this_count · 133d35e0
      Alan Stern authored
      This patch addresses a problem in both sd.c and sr.c.  When a read/write
      command is initialized, the routines may reduce this_count (the number of
      sectors to transfer) if it exceeds the maximum allowed value (i.e., 0xffff
      for READ(10)).  However, the code does not similarly alter
      scmd->request_bufflen and scmd->bufflen to match the change in the CDB
      value.
      
      scmd->request_bufflen is important for the usb-storage driver, which
      requires that it be exactly equal to the number of bytes transferred.
      scmd->bufflen is used in the rw_intr() routines, where it is passed to
      scsi_io_completion() as the number of sectors transferred if no errors
      occur.
      
      Another small change in the patch concerns the code in sr.c that checks
      whether the total of the scatter-gather area lengths matches
      scmd->request_bufflen.  If they don't match, the patch bumps the kernel
      log message level up to KERN_ERR, and it takes the more conservative
      approach of adjusting scmd->request_bufflen only if the s-g length is
      smaller than the request length.
      133d35e0
  11. 15 Aug, 2003 1 commit
    • James Bottomley's avatar
      oops in sd_shutdown · 177342da
      James Bottomley authored
      From: Andries Brouwer <aebr@win.tue.nl>
      
      I see an Oops in the SCSI code, caused by the fact that sdkp is NULL
      in sd_shutdown. "How can that be?", you will ask - dev->driver_data was set
      in sd_probe. But in my case sd_probe never finished. An insmod usb-storage
      hangs forever, or at least for more than six hours, giving ample opportunity
      to observe this race between sd_probe and sd_shutdown.
      (Of course sd_probe hangs in sd_revalidate disk.)
      
      Perhaps the obvious test is a good idea.
      Locking seems meaningless - sd_probe will never finish.
      177342da
  12. 02 Aug, 2003 1 commit
    • Mike Anderson's avatar
      [PATCH] recovered error forward port · a5090bb3
      Mike Anderson authored
      Forward port of Kurt Garloff's recovered error fix.
      http://marc.theaimsgroup.com/?l=linux-scsi&m=104470522312140&w=2
      
      Also corrected some typos related to setting local scope variable by mistake.
      
      Signature without fix:
      Current sdc: sense key Recovered Error
      Additional sense: Failure prediction threshold exceeded
      end_request: I/O error, dev sdc, sector 1808
      Buffer I/O error on device sdc, logical block 226
      
      Signature with fix:
      scsi_debug: cmd 28 00 00 00 3f 10 00 00 f0 00
      scsi_debug: ... <1 0 0 0> non-zero result=0x8000002
      Current sdsdc: sense key Recovered Error
      Additional sense: Failure prediction threshold exceeded
      
       drivers/scsi/sd.c |    6 ++--
       drivers/scsi/sr.c |   79 +++++++++++++++++++++++++++++++++++-------------------
       2 files changed, 56 insertions(+), 29 deletions(-)
      a5090bb3
  13. 17 Jul, 2003 1 commit
    • Adrian Bunk's avatar
      [PATCH] remove all #include <blk.h>'s · 117b5e29
      Adrian Bunk authored
      This causes blk.h to print a warning and removes all uses of blk.h.
      I've tested the compilation in 2.6.0-test1 with a .config that tries to
      compile as many drivers as possible.
      117b5e29
  14. 08 Jul, 2003 2 commits
    • Christoph Hellwig's avatar
      [PATCH] pull scsi_scan_host out of scsi_add_host · 892af51c
      Christoph Hellwig authored
      As Douglas mentioned on this list a while ago there's hardware these
      days where we don't want to automatically perform an initial bus scan
      in scsi_add_host.  Currently we only have ieee1394 in the tree but
      I can imagine more uses like iscsi or certain fc setups.
      
      This patch removes the call to scsi_scan_host from scsi_add_host
      and moves it into the drivers that want in.
      892af51c
    • Christoph Hellwig's avatar
      [PATCH] consistant names for device model related struct members · d8a22dd2
      Christoph Hellwig authored
      currently the embedded struct devices and class devices have totally
      irregular and sometimes confusing (sdev_driverfs_dev) names.  Name
      them consistanly s{dev,host}_{class,gen}dev.
      d8a22dd2
  15. 26 Jun, 2003 1 commit
    • Christoph Hellwig's avatar
      [PATCH] use generic dma direction bits in scsi · a5449cb9
      Christoph Hellwig authored
      Make the *_data_direction flags of type enum dma_data_direction from
      the generic dma mapping API.  The SCSI_DATA_* defines are kept for
      compatiblity and map to the dma mapping API values now.
      scsi_to_pci_dma_dir and scsi_to_sbus_dma_dir are kept as stubs -
      we define them to nothing as both the PCI and SBUS constants have
      the same values as the generic dma mapping ones.  Unfortunately
      we can't check anymore whether someone messes this up as the values
      are enumes now and not cpp defines.
      a5449cb9
  16. 25 Jun, 2003 2 commits
    • Christoph Hellwig's avatar
      [PATCH] add scsi_driver.h · 7de427c5
      Christoph Hellwig authored
      include/scsi/scsi_driver.h contains æverything related to upper
      level drivers.  Unlike the other header moves there's no compatiblity
      this time as it's easy to fix up the few users.
      7de427c5
    • James Bottomley's avatar
      SCSI: abstract mode_sense 6 and 10 out completely · 5c8dfe47
      James Bottomley authored
      Move the mode_sense request routines to a central location and make
      all block device consumers use it.  Also abstract the header as
      part of the return to hide the 6/10 differences.
      5c8dfe47
  17. 17 Jun, 2003 1 commit
    • Heiko Carstens's avatar
      [PATCH] sd.c: set data direction to SCSI_DATA_NONE for START_STOP · 39ee5201
      Heiko Carstens authored
      while trying to access a disk drive via an FCP bridge we got an FCP_RSP IU
      with the RSP_CODE field set to "FCP_CMND Fields Invalid". This happened
      after sending a START_STOP command to the device. Reason for this was that
      the FCP_CMND IU incorrectly had the RDDATA field set to one, because of a
      bug in sd_spinup_disk(). There the data direction for START_STOP is set
      to SCSI_DATA_READ instead of SCSI_DATA_NONE.
      Please apply the patch below.
      
      Thanks,
      Heiko
      39ee5201
  18. 15 Jun, 2003 1 commit
    • Matthew Dharm's avatar
      [PATCH] unusual_devs fixups · c202927c
      Matthew Dharm authored
      This moves the initialization of the struct scsi_device fields
      use_10_for_ms and use_10_for_rw into a central place.  This allows the
      host's slave_configure() function to change them (with effect).  This
      also collapses two identical sections of code into a single one.
      
      This is needed by usb-storage, so we can resolve some Babble problems,
      some device-crashing problems, and remove a great deal of troublesome
      mode-sense-translation code.
      c202927c
  19. 11 Jun, 2003 2 commits
  20. 06 Jun, 2003 1 commit
  21. 05 Jun, 2003 1 commit
    • Christoph Hellwig's avatar
      [PATCH] fix sd medium removal handling · 3e5edf7c
      Christoph Hellwig authored
      sdev->access_count is incremented not only by sd but also e.g. by
      sg.  Now if sd opens first, then sg, then sd closes and sg last
      medium removal will still be prevented.
      
      Add a counter in scsi_disk for doorlocking instead.
      3e5edf7c
  22. 30 May, 2003 1 commit
    • Christoph Hellwig's avatar
      [PATCH] driver model for scsi upper drivers, take 2 · 9dd755d2
      Christoph Hellwig authored
      On Tue, May 27, 2003 at 09:32:18AM +0200, Christoph Hellwig wrote:
      >  - removed the tape sysfs pseudodevice crap that caused hangs
      >  - switched sg to a class_interface.  This means sg can be used
      >    on devices already claimed be an upper driver again.  This
      >    also means I had to remove the sg sysfs attributes temporarily
      >    because the old mechanism is gone, but I'll restore them
      >    differently in a followon patch.
      
      Yikes, this was the old patch again.  Here's the right one:
      9dd755d2
  23. 23 May, 2003 2 commits
    • Eddie Williams's avatar
      [PATCH] scsi: allow devices to restrict start on add · 22359323
      Eddie Williams authored
      When a SCSI disk is added and it returns a NOT READY the SD driver is 
      automatically sending a START_UNIT command to spin the device up.  While this 
      may be the desired behavior for many if not most devices not all devices 
      either want or need this.  The attached patch provides a mechanism via the 
      device_list that allows a device to be defined to disable the automatic start 
      being issued on an add.
      
      The patch also modifies the device_list for several devices that would prefer 
      to not have the start command issued. 
      22359323
    • Andries E. Brouwer's avatar
      [PATCH] scsi: ten -> use_10_for_rw / use_10_for_ms · e7ac90bc
      Andries E. Brouwer authored
      In the old days, ancient scsi devices understood 6-byte commands
      and more recent ones also understood 10-byte commands.
      Thus, we had a "ten" flag indicating that 10-byte commands worked.
      
      These days, especially for usb-storage devices, the opposite
      sometimes holds - 10-byte commands are supported, but 6-byte commands
      are not.
      
      The patch below changes the field ten into the pair of fields
      use_10_for_rw, use_10_for_ms set initially when the driver
      thinks these are supported. Ifthe device returns ILLEGAL_REQUEST
      they are cleared.
      
      This patch obsoletes a large amount of code in usb-storage,
      and not only that, once the subsequent patch removes all this
      usb-storage code many devices will work that hang today.
      
      
      Andries
      e7ac90bc
  24. 21 May, 2003 1 commit
    • James Bottomley's avatar
      Fix while in spinup loop of sd · b1c89a3b
      James Bottomley authored
      We must loop on UNIT ATTENTION sense (to clear the condition).  However, the code 
      is assuming that a sense condition will always be accompanied by a not good status.
      We have several drivers in the tree that return GOOD with DRIVER_SENSE, so make the
      loop condition reflect this.
      b1c89a3b
  25. 12 May, 2003 1 commit
  26. 10 May, 2003 1 commit
    • James Bottomley's avatar
      [PATCH] sd.c spinup code can go into a wild loop · 9b4a996f
      James Bottomley authored
      This problem was reported against 2.4 by Eddie.Williams@SteelEye.com
      
      There's a problem in the sd spinup code in that if the unit returns NOT
      READY, we begin to spin it up, but thereafter if it returns anything
      other than NOT READY or success, the while loop in the spinup code will
      be executed *without* the 1s delay that's in the NOT READY case.
      
      The problem was seen with a real device: Compaq multi-path storage
      arrays return NOT READY to probes down inactive paths, but when the
      start unit is sent to activate the path, they can then respond back with
      error conditions.
      
      The fix is to terminate the while loop for any unexpected return.
      9b4a996f
  27. 07 May, 2003 1 commit
    • Christoph Hellwig's avatar
      [PATCH] remove scsi_slave_attach/scsi_slave_detach · af1cbdf2
      Christoph Hellwig authored
      I added those two to factor out common code from the upper drivers
      a long time ago, but after Doug & Lubens nice work there's nothing
      left but incrementing/decrementing a counter in struct scsi_device
      that's never used except in the case were we not it must be NULL
      because we just walked the chain of drivers to detach every single
      one..
      af1cbdf2
  28. 29 Apr, 2003 2 commits
    • Heiko Carstens's avatar
      [PATCH] set data direction in sd_synchronize_cache in sd.c · 199cefec
      Heiko Carstens authored
      Hi,
      
      the following patch sets the data direction in sd_synchronize_cache
      to SCSI_DATA_NONE. Otherwise the data direction would be
      SCSI_DATA_UNKNOWN, which is at least a problem for the zfcp
      lldd, since it expects a value differently from unknown.
      Please apply, thanks.
      
      Heiko
      199cefec
    • Christoph Hellwig's avatar
      [PATCH] split private and public scsi headers · 21eb047c
      Christoph Hellwig authored
      Two new headers:
      
        scsi_priv.h - for macros/declarations private to the scsi midlayer
      		  (= not EXPORT_SYMBOL()ed)
        scsi_logging.h - for SCSI_LOG_* and friends, semi-private to the
        		midlayer and the upper drivers.  One abuse of this
      		in dpt_i2o killed.
      21eb047c
  29. 18 Apr, 2003 1 commit
  30. 10 Apr, 2003 1 commit
    • Badari Pulavarty's avatar
      Isn't sd_major() broken ? · bb9e1c7a
      Badari Pulavarty authored
      I am little confused about the correctness of sd_major() in drivers/scsi/sd.c.
      
      static int sd_major(int major_idx)
      {
              switch (major_idx) {
              case 0:
                      return SCSI_DISK0_MAJOR;
              case 1 ... 7:
                      return SCSI_DISK1_MAJOR + major_idx - 1;
              case 8 ... 15:
                      return SCSI_DISK8_MAJOR + major_idx;
              default:
                      BUG();
                      return 0;       /* shut up gcc */
              }
      }
      
      So, if major_idx = 8, It returns 143. 
      But according to major.h, scsi has 128-135 reserved
      majors. But it is registering 136 - 143 as its majors.
      
      #define SCSI_DISK8_MAJOR        128
      #define SCSI_DISK9_MAJOR        129
      #define SCSI_DISK10_MAJOR       130
      #define SCSI_DISK11_MAJOR       131
      #define SCSI_DISK12_MAJOR       132
      #define SCSI_DISK13_MAJOR       133
      #define SCSI_DISK14_MAJOR       134
      #define SCSI_DISK15_MAJOR       135
      bb9e1c7a
  31. 14 Mar, 2003 1 commit
    • Alex Tomas's avatar
      [PATCH] Re: hot scsi disk resize · d685cc6d
      Alex Tomas authored
      Hi!
      
      Here is new version of the patch. All procfs-related stuff has been removed.
      One may rescan device size writing something to /sysfs/.../<scsi device>/rescan:
      
      root@zefir:~# echo 1 >/sysfs/bus/scsi/devices/0\:0\:1\:0/rescan
      root@zefir:~# dmesg
      scsi0:A:1:0: Tagged Queuing enabled.  Depth 64
      scsi: host 0 channel 0 id 1 lun16384 has a LUN larger than allowed by the host adapter
      SCSI device sda: 2097152 512-byte hdwr sectors (1074 MB)
      SCSI device sda: drive cache: write through
       sda: unknown partition table
      Attached scsi disk sda at scsi0, channel 0, id 1, lun 0
      SCSI device sda: 125829120 512-byte hdwr sectors (64425 MB)
      root@zefir:~#
      d685cc6d
  32. 08 Mar, 2003 1 commit
    • Andrew Morton's avatar
      [PATCH] register_blkdev cleanups · 9a64905a
      Andrew Morton authored
      Patch from Andries.Brouwer@cwi.nl
      
      The following patch does the following:
      
      - static const char *blkdevs[MAX_BLKDEV]; disappears
      - get_blkdev_list, (un)register_blkdev, __bdevname
        are moved from block_dev.c to genhd.c
      - the third "fops" parameter of register_blkdev was unused;
        now removed everywhere
      - zillions of places had printk("cannot get major") upon
        error return from register_blkdev; removed all of these
        and inserted a single printk in register_blkdev.
      
      Of course the reason for the patch is that one fixed size
      array is eliminated.
      9a64905a
  33. 06 Mar, 2003 1 commit
  34. 24 Feb, 2003 1 commit