1. 27 7月, 2011 3 次提交
    • S
      [SCSI] qla2xxx: Code changes to support new dynamic logging infrastructure. · 7c3df132
      Saurav Kashyap 提交于
      The code is changed to support the new dynamic logging infrastructure.
      Following are the levels added.
      Default is 0 - no logging.  0x40000000 - Module Init & Probe.
      0x20000000 - Mailbox Cmnds. 0x10000000 - Device Discovery.
      0x08000000 - IO tracing.    0x04000000 - DPC Thread.
      0x02000000 - Async events.  0x01000000 - Timer routines.
      0x00800000 - User space.    0x00400000 - Task Management.
      0x00200000 - AER/EEH.       0x00100000 - Multi Q.
      0x00080000 - P3P Specific.  0x00040000 - Virtual Port.
      0x00020000 - Buffer Dump.   0x00010000 - Misc.
      0x7fffffff - For enabling all logs, can be too many logs.
      
      Setting ql2xextended_error_logging module parameter to any of the above
      value, will enable the debug for that particular level.
      Do LOGICAL OR of the value to enable more than one level.
      Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NAndrew Vasquez <andrew.vasquez@qlogic.com>
      Signed-off-by: NJoe Carnuccio <joe.carnuccio@qlogic.com>
      Signed-off-by: NChad Dupuis <chad.dupuis@qlogic.com>
      Signed-off-by: NMadhuranath Iyengar <Madhu.Iyengar@qlogic.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      7c3df132
    • S
      [SCSI] qla2xxx: Basic infrastructure for dynamic logging. · 3ce8866c
      Saurav Kashyap 提交于
      This patch adds the dynamic logging framework to the qla2xxx driver.
      The user will be able to change the logging levels on the fly i.e.
      without load/unload of the driver. This also enables logging to be
      enabled for a particular section of the driver such as initialization,
      device discovery etc.
      Signed-off-by: NSaurav Kashyap <saurav.kashyap@qlogic.com>
      Signed-off-by: NGiridhar Malavali <giridhar.malavali@qlogic.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      3ce8866c
    • J
      [SCSI] scsi_lib: pause between error retries · 573e5913
      James Smart 提交于
      During cable pull tests on our 16G FC adapter, we are seeing errors,
      typically reads to close targets, which fail due to CRC or framing
      errors caused by the cable being pull (return status DID_ERROR).
      The adapter detects the error on one of the first frames received,
      marks the FC exchange as dead (further frames go to bit bucket) and
      signals the host of the error. This action is so quick, and coupled
      with fast host CPUs, creates a scenario in which the midlayer sees
      the failure and retries the io almost immediately. We've seen link
      traces with the retry on the link while the original i/o is still
      being processed by the target. We're also seeing the time window
      for the "link to pull-apart" and the physical interface to report
      disconnected to be in the few millisecond range. Which means, we're
      encountering scenarios where the full retry count is exhausted
      (all with error) by the midlayer before the link disconnect state
      is detected.
      
      We looked at 8G FC behavior and occasionally see the same behavior,
      but as the link was slower, it rarely could exhaust all retries
      before the link reported disconnect.
      
      What is needed is a slight delay between io retries due to DID_ERROR
      to cover this error.  It is inappropriate to put this delay in the
      driver, as the error is indistinguishable from other link-related errors,
      nor does the driver track whether the io is a retry or not. This is also
      easier than tracking between-io-error bursts that are seen in this
      scenario.
      
      The patch below updates the retry path so that it inserts a delay as
      if the target was busy.  The busy delay is on the order of 6ms. This
      delay is sufficient to ensure the link down condition is reported
      before the retry count is exhausted (at most 1 retry is seen).
      Signed-off-by: NAlex Iannicelli <alex.iannicelli@emulex.com>
      Signed-off-by: NJames Smart <james.smart@emulex.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      573e5913
  2. 26 7月, 2011 12 次提交
  3. 22 7月, 2011 4 次提交
    • J
      [SCSI] fix crash in scsi_dispatch_cmd() · bfe159a5
      James Bottomley 提交于
      USB surprise removal of sr is triggering an oops in
      scsi_dispatch_command().  What seems to be happening is that USB is
      hanging on to a queue reference until the last close of the upper
      device, so the crash is caused by surprise remove of a mounted CD
      followed by attempted unmount.
      
      The problem is that USB doesn't issue its final commands as part of
      the SCSI teardown path, but on last close when the block queue is long
      gone.  The long term fix is probably to make sr do the teardown in the
      same way as sd (so remove all the lower bits on ejection, but keep the
      upper disk alive until last close of user space).  However, the
      current oops can be simply fixed by not allowing any commands to be
      sent to a dead queue.
      
      Cc: stable@kernel.org
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      bfe159a5
    • K
      [SCSI] sr: check_events() ignore GET_EVENT when TUR says otherwise · 79b9677d
      Kay Sievers 提交于
      Some broken devices indicates that media has changed on every
      GET_EVENT_STATUS_NOTIFICATION.  This translates into MEDIA_CHANGE
      uevent on every open() which lets udev run into a loop.
      
      Verify GET_EVENT result against TUR and if it generates spurious
      events for several times in a row, ignore the GET_EVENT events, and
      trust only the TUR status.
      
      This is the log of a USB stick with a (broken) fake CDROM drive:
      
       scsi 5:0:0:0: Direct-Access     SanDisk  U3 Cruzer Micro  8.02 PQ: 0 ANSI: 0 CCS
       sd 5:0:0:0: Attached scsi generic sg3 type 0
       scsi 5:0:0:1: CD-ROM            SanDisk  U3 Cruzer Micro  8.02 PQ: 0 ANSI: 0
       sd 5:0:0:0: [sdb] Attached SCSI removable disk
       sr2: scsi3-mmc drive: 48x/48x tray
       sr 5:0:0:1: Attached scsi CD-ROM sr2
       sr 5:0:0:1: Attached scsi generic sg4 type 5
       sr2: GET_EVENT and TUR disagree continuously, suppress GET_EVENT events
       sd 5:0:0:0: [sdb] 31777279 512-byte logical blocks: (16.2 GB/15.1 GiB)
       sd 5:0:0:0: [sdb] No Caching mode page present
       sd 5:0:0:0: [sdb] Assuming drive cache: write through
       sd 5:0:0:0: [sdb] No Caching mode page present
       sd 5:0:0:0: [sdb] Assuming drive cache: write through
       sdb: sdb1
      
      -tj: Updated to consider only spurious GET_EVENT events among
           different types of disagreement and allow using TUR for kernel
           event polling after GET_EVENT is ignored.
      
      Reported-By: Markus Rathgeb maggu2810@googlemail.com
      Signed-off-by: NKay Sievers <kay.sievers@vrfy.org>
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Cc: stable@kernel.org	# >= v2.6.38, fixes udev busy looping w/ certain devices
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      79b9677d
    • E
      [SCSI] bnx2i: Fixed kernel panic due to illegal usage of sc->request->cpu · 0d83ab65
      Eddie Wai 提交于
      A kernel panic was observed when passing the sc->request->cpu = -1 to
      retrieve the per_cpu variable pointer:
       #0 [ffff880011203960] machine_kexec at ffffffff81022bc3
       #1 [ffff8800112039b0] crash_kexec at ffffffff81088630
       #2 [ffff880011203a80] __die at ffffffff8139ea20
       #3 [ffff880011203aa0] no_context at ffffffff8102f3a7
       #4 [ffff880011203ae0] __bad_area_nosemaphore at ffffffff8102f665
       #5 [ffff880011203ba0] retint_signal at ffffffff8139dd1f
       #6 [ffff880011203cc8] bnx2i_indicate_kcqe at ffffffffa03dc4f2
       #7 [ffff880011203da8] service_kcqes at ffffffffa03cb04f
       #8 [ffff880011203e68] cnic_service_bnx2x_kcq at ffffffffa03cb14a
       #9 [ffff880011203e88] cnic_service_bnx2x_bh at ffffffffa03cb1b3
      
      The problem lies in the slow path sg_io (and perhaps sg_scsi_ioctl) call to
      blk_get_request->get_request/wait->blk_alloc_request->blk_rq_init which
      re-initializes the request->cpu to -1.  There is no assignment for cpu from
      that to the request_fn call to low level drivers.
      
      When this happens, the sc->request->cpu will be using the init value of
      -1.  This will create a kernel panic when it hits bnx2i because the code
      refers it to get the per_cpu variables ptr.
      
      This change is to put in a guard against that and also for cases when
      bio affinity/queue completion to the same cpu is not enabled.  In those
      cases, the request->cpu will remain a -1 also.
      
      This bug was created from commit:  b5cf6b63
      
      For the case when the blk layer did not setup the request->cpu, bnx2i
      will complete the sc with the current CPU of the thread.
      Signed-off-by: NEddie Wai <eddie.wai@broadcom.com>
      Signed-off-by: NJames Bottomley <JBottomley@Parallels.com>
      0d83ab65
    • M
      cnic: Add VLAN ID as a parameter during netevent upcall · 415199f2
      Michael Chan 提交于
      The bnx2fc driver needs to handle netdev events on VLAN devices.
      Signed-off-by: NMichael Chan <mchan@broadcom.com>
      Reviewed-by: NBhanu Prakash Gollapudi <bprakash@broadcom.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      415199f2
  4. 21 7月, 2011 2 次提交
  5. 18 7月, 2011 1 次提交
  6. 04 7月, 2011 1 次提交
  7. 03 7月, 2011 17 次提交