1. 01 7月, 2006 3 次提交
  2. 30 6月, 2006 1 次提交
  3. 29 6月, 2006 18 次提交
    • M
      [SCSI] iscsi: add async notification of session events · 53cb8a1f
      Mike Christie 提交于
      This patch adds or modifies the transport class functions
      used to notify userspace of session state events.
      
      We modify the session addition up event and add a destruction event
      to notify userspace of session creation, relogin and destruction.
      
      And we modify the conn error event to be sent by broadcast
      since multiple listeners may want to listen for it.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      53cb8a1f
    • M
      [SCSI] iscsi: pass target nr to session creation · 6a8a0d36
      Mike Christie 提交于
      So the drivers do not use the channel numbers, but some do
      use the target numbers. We were just adding some goofy
      variable that just increases for the target nr. This is useless
      for software iscsi because it is always zero. And for qla4xxx
      the target nr is actually the index of the target/session
      in its FW or FLASH tables. We needed to expose this to userspace
      so apps could access those numbers so this patch just adds the
      target nr to the iscsi session creation functions. This way
      when qla4xxx's Hw thinks a session is at target nr 4
      in its hw, it is exposed as that number in sysfs.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      6a8a0d36
    • M
      [SCSI] iscsi: break up session creation into two stages · 8434aa8b
      Mike Christie 提交于
      qla4xxx is initialized in two steps like other HW drivers.
      It allocates the host, sets up the HW, then adds the host.
      For iscsi part of HW setup is setting up persistent iscsi
      sessions. At that time, the interupts are off and the driver
      is not completely set up so we just want to allocate them.
      We do not want to add them to sysfs and expose them to userspace
      because userspace could try to do lots of fun things with them
      like scanning and at that time the driver is not ready.
      
      So this patch breakes up the session creation like other
      functions that use the driver model in two the alloc
      and add parts. When the driver is ready, it can then add
      the sessions and userspace can begin using them.
      
      This also fixes a bug in the addition error patch where
      we forgot to do a get on the session.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      8434aa8b
    • M
      [SCSI] iscsi: rm channel usage from iscsi · e6f3b63f
      Mike Christie 提交于
      I do not remember what I was thinking when we added the channel
      as a argument to the session create function. It was probably
      due to too much cut and paste work from the FC transport class.
      
      The channel is meaningless for iscsi drivers so this patch drops
      its usage everywhere in the iscsi related code.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      e6f3b63f
    • M
      [SCSI] iscsi: fix session refcouting · f53a88da
      Mike Christie 提交于
      iscsi_tcp and iser cannot be rmmod from the kernel when sessions
      are running because session removal is driven from userspace. For
      those modules we get a module reference when a session is
      created then drop it when the session is removed.
      
      For qla4xxx, they can jsut remove the sessions from the pci remove
      function like normal HW drivers, so this patch moves the module
      reference from the transport class functions shared by all
      drivers to the libiscsi functions only used be software iscsi
      modules.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      f53a88da
    • M
      [SCSI] iscsi: convert iscsi_tcp to new set/get param fns · 5c75b7fc
      Mike Christie 提交于
      Convert iscsi_tcp to new lib functions.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      5c75b7fc
    • M
      [SCSI] iscsi: convert iser to new set/get param fns · 358ff019
      Mike Christie 提交于
      Convert iser to libiscsi get/set param functions.
      Fix bugs in it returning old error return values and
      have it expose exp_statsn.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      358ff019
    • M
      [SCSI] iscsi: fixup set/get param functions · a54a52ca
      Mike Christie 提交于
      Reduce duplication in the software iscsi_transport modules by
      adding a libiscsi function to handle the common grunt work.
      
      This also has the drivers return specifc -EXXX values for different
      errors so userspace can finally handle them in a sane way.
      
      Also just pass the sysfs buffers to the drivers so HW iscsi can
      get/set its string values, like targetname, and initiatorname.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      a54a52ca
    • M
      [SCSI] iscsi: add target discvery event to transport class · 01cb225d
      Mike Christie 提交于
      Patch from david.somayajulu@qlogic.com:
      
      Add target discovery event. We may have a setup where the iscsi traffic
      is on a different netowrk than the other network traffic. In this case
      we will want to do discovery though the iscsi card. This patch adds
      a event to the transport class that can be used by hw iscsi cards that
      support this.
      Signed-off-by: NMike Christie <michaelc@cs.wisc.edu>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      01cb225d
    • M
      [SCSI] st: remove unused st_buffer.in_use · 332959cb
      Martin Habets 提交于
      I noticed that in_use in st_buffer is not used. The patch below
      against 2.6.17-rc3 removes it, assuming there is no future use for it.
      It was tested in a sparc SS20 with a DLT4000.
      Signed-off-by: NMartin Habets <errandir_news@mph.eclipse.co.uk>
      Acked-by: NKai Mäkisara <kai.makisara@kolumbus.fi>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      332959cb
    • J
      Merge ../linux-2.6/ · f28e7161
      James Bottomley 提交于
      Conflicts:
      
      	drivers/scsi/aacraid/comminit.c
      
      Fixed up by removing the now renamed CONFIG_IOMMU option from
      aacraid
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      f28e7161
    • R
      [SCSI] atp870u: reduce huge stack usage · dc6a78f1
      Randy Dunlap 提交于
      The atp870u driver is the largest stack eater reported by checkstack
      (on x86_864, allmodconfig).  This converts the offending function
      to kmalloc+kfree struct atp_unit instead of allocating it on the stack.
      Was:
      0x0000164c atp870u_probe [atp870u]:			3176
      Now:
      0x0000164c atp870u_probe [atp870u]:			408
      Signed-off-by: NRandy Dunlap <rdunlap@xenotime.net>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      dc6a78f1
    • E
      [SCSI] mptsas: Adding 1078 ROC support · 87cf8986
      Eric Moore 提交于
      * Adding 1078 ROC (Raid On Chip) Support - New host adapter
      
      * Moving all PCI Vendor/Device ids to using internal defines; a request
      from Christoph/James B. some time ago for when the next chip was added.
      
      * Removing SAS 1066/1066E Vendor/Device IDs, as there are no plans to
      manufacture that controller.
      Signed-off-by: NEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      87cf8986
    • E
      [SCSI] mptsas: wide port support · 547f9a21
      Eric Moore 提交于
      * Wide port support added - using James Bottomley's new SAS wide port API.
      (There is a known problem in sas transport layer reported yesterday to
      James. The Kobject dev.bus_ids for end devices are not unique across
      expanders. I have added a work around in this patch, where I asigning
      an unique port identifier for every port within the host - this solves
      the problem, but I expect a fix from James in the sas transport).
      
      * Adding target_alloc and target_destroy entry points, and moving code over
      from the slave entry points.
      
      * The renaming of some mptscsih_xxx functions declared in mptsas.c,
      to mptsas_xxx.
      
      * Target Reset moved from slave_destroy to hotplug work thread
      handling (with regard to device removal). Also inhibit IO to end device
      while device is being broken down . Talked to James Smart about this
      at Linux Expo (with questions of how the fc transport handles this).
      
      * Cleaning up the kzalloc's, and kfree's
      Signed-off-by: NEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      547f9a21
    • J
      [SCSI] scsi_transport_sas: introduce a sas_port entity · 65c92b09
      James Bottomley 提交于
      this patch introduces a port object, separates out ports and phys,
      with ports becoming the primary objects of the tree.
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      65c92b09
    • E
      [SCSI] fusion : mpi header update · 2076eb6a
      Eric Moore 提交于
      MPI Header Update
      Signed-off-by: NEric Moore <Eric.Moore@lsil.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      2076eb6a
    • B
      [SCSI] scsi: Device scanning oops for offlined devices (resend) · 309bd271
      Brian King 提交于
      If a device gets offlined as a result of the Inquiry sent
      during scanning, the following oops can occur. After the
      disk gets put into the SDEV_OFFLINE state, the error handler
      sends back the failed inquiry, which wakes the thread doing
      the scan. This starts a race between the scanning thread
      freeing the scsi device and the error handler calling
      scsi_run_host_queues to restart the host. Since the disk
      is in the SDEV_OFFLINE state, scsi_device_get will still
      work, which results in __scsi_iterate_devices getting
      a reference to the scsi disk when it shouldn't.
      
      The following execution thread causes the oops:
      
      CPU 0 (scan)				CPU 1 (eh)
      
      ---------------------------------------------------------
      scsi_probe_and_add_lun
                              ....
                                              scsi_eh_offline_sdevs
                                              scsi_eh_flush_done_q
      scsi_destroy_sdev
      scsi_device_dev_release
                                              scsi_restart_operations
                                               scsi_run_host_queues
                                                __scsi_iterate_devices
                                                 get_device
      scsi_device_dev_release_usercontext
                                                scsi_run_queue
                                                  <---OOPS--->
      
      The patch fixes this by changing the state of the sdev to SDEV_DEL
      before doing the final put_device, which should prevent the race
      from occurring.
      
      Original oops follows:
      
      Badness in kref_get at lib/kref.c:32
      Call Trace:
      [C00000002F4476D0] [C00000000000EE20] .show_stack+0x68/0x1b0 (unreliable)
      [C00000002F447770] [C00000000037515C] .program_check_exception+0x1cc/0x5a8
      [C00000002F447840] [C00000000000446C] program_check_common+0xec/0x100
       Exception: 700 at .kref_get+0x10/0x28
          LR = .kobject_get+0x20/0x3c
      [C00000002F447B30] [C00000002F447BC0] 0xc00000002f447bc0 (unreliable)
      [C00000002F447BB0] [C000000000254BDC] .get_device+0x20/0x3c
      [C00000002F447C30] [D000000000063188] .scsi_device_get+0x34/0xdc [scsi_mod]
      [C00000002F447CC0] [D0000000000633EC] .__scsi_iterate_devices+0x50/0xbc [scsi_mod]
      [C00000002F447D60] [D00000000006A910] .scsi_run_host_queues+0x34/0x5c [scsi_mod]
      [C00000002F447DF0] [D000000000069054] .scsi_error_handler+0xdb4/0xe44 [scsi_mod]
      [C00000002F447EE0] [C00000000007B4E0] .kthread+0x128/0x178
      [C00000002F447F90] [C000000000025E84] .kernel_thread+0x4c/0x68
      Unable to handle kernel paging request for <7>PCI: Enabling device: (0002:41:01.1), cmd 143
      data at address 0x000001b8
      Faulting instruction address: 0xd0000000000698e4
      sym1: <1010-66> rev 0x1 at pci 0002:41:01.1 irq 216
      sym1: No NVRAM, ID 7, Fast-80, LVD, parity checking
      sym1: SCSI BUS has been reset.
      scsi2 : sym-2.2.2
      cpu 0x0: Vector: 300 (Data Access) at [c00000002f447a30]
          pc: d0000000000698e4: .scsi_run_queue+0x2c/0x218 [scsi_mod]
          lr: d00000000006a904: .scsi_run_host_queues+0x28/0x5c [scsi_mod]
          sp: c00000002f447cb0
         msr: 9000000000009032
         dar: 1b8
       dsisr: 40000000
        current = 0xc0000000045fecd0
        paca    = 0xc00000000048ee80
          pid   = 1123, comm = scsi_eh_1
      enter ? for help
      [c00000002f447d60] d00000000006a904 .scsi_run_host_queues+0x28/0x5c [scsi_mod]
      [c00000002f447df0] d000000000069054 .scsi_error_handler+0xdb4/0xe44 [scsi_mod]
      [c00000002f447ee0] c00000000007b4e0 .kthread+0x128/0x178
      [c00000002f447f90] c000000000025e84 .kernel_thread+0x4c/0x68
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      309bd271
    • B
      [SCSI] scsi: Add allow_restart sysfs class attribute · a144c5ae
      Brian King 提交于
      This is a resend of a patch I generated in response to an email sent
      by Ruben Faelens <parasietje@gmail.com>. His original email to
      linux-scsi requested a method in which he could spin down a scsi disk
      when not in use and have the kernel automatically spin it back up when
      an I/O was generated to the disk. The infrastructure to automatically
      spin a disk up has been in the scsi error handler for some time now,
      but it is not enabled by default. This patch adds an sd sysfs attribute
      which allows userspace to enable this behavior.
      Signed-off-by: NBrian King <brking@us.ibm.com>
      Signed-off-by: NJames Bottomley <James.Bottomley@SteelEye.com>
      a144c5ae
  4. 28 6月, 2006 18 次提交