Skip to content
Snippets Groups Projects
Select Git revision
  • 0b8d616fb5a8ffa307b1d3af37f55c15dae14f28
  • vme-testing default
  • ci-test
  • master
  • remoteproc
  • am625-sk-ov5640
  • pcal6534-upstreaming
  • lps22df-upstreaming
  • msc-upstreaming
  • imx8mp
  • iio/noa1305
  • vme-next
  • vme-next-4.14-rc4
  • v4.14-rc4
  • v4.14-rc3
  • v4.14-rc2
  • v4.14-rc1
  • v4.13
  • vme-next-4.13-rc7
  • v4.13-rc7
  • v4.13-rc6
  • v4.13-rc5
  • v4.13-rc4
  • v4.13-rc3
  • v4.13-rc2
  • v4.13-rc1
  • v4.12
  • v4.12-rc7
  • v4.12-rc6
  • v4.12-rc5
  • v4.12-rc4
  • v4.12-rc3
32 results

taskstats.c

Blame
  • scsi_error.c 49.20 KiB
    /*
     *  scsi_error.c Copyright (C) 1997 Eric Youngdale
     *
     *  SCSI error/timeout handling
     *      Initial versions: Eric Youngdale.  Based upon conversations with
     *                        Leonard Zubkoff and David Miller at Linux Expo, 
     *                        ideas originating from all over the place.
     *
     *	Restructured scsi_unjam_host and associated functions.
     *	September 04, 2002 Mike Anderson (andmike@us.ibm.com)
     *
     *	Forward port of Russell King's (rmk@arm.linux.org.uk) changes and
     *	minor  cleanups.
     *	September 30, 2002 Mike Anderson (andmike@us.ibm.com)
     */
    
    #include <linux/module.h>
    #include <linux/sched.h>
    #include <linux/timer.h>
    #include <linux/string.h>
    #include <linux/slab.h>
    #include <linux/kernel.h>
    #include <linux/kthread.h>
    #include <linux/interrupt.h>
    #include <linux/blkdev.h>
    #include <linux/delay.h>
    
    #include <scsi/scsi.h>
    #include <scsi/scsi_cmnd.h>
    #include <scsi/scsi_dbg.h>
    #include <scsi/scsi_device.h>
    #include <scsi/scsi_eh.h>
    #include <scsi/scsi_transport.h>
    #include <scsi/scsi_host.h>
    #include <scsi/scsi_ioctl.h>
    
    #include "scsi_priv.h"
    #include "scsi_logging.h"
    
    #define SENSE_TIMEOUT		(10*HZ)
    #define START_UNIT_TIMEOUT	(30*HZ)
    
    /*
     * These should *probably* be handled by the host itself.
     * Since it is allowed to sleep, it probably should.
     */
    #define BUS_RESET_SETTLE_TIME   (10)
    #define HOST_RESET_SETTLE_TIME  (10)
    
    /* called with shost->host_lock held */
    void scsi_eh_wakeup(struct Scsi_Host *shost)
    {
    	if (shost->host_busy == shost->host_failed) {
    		wake_up_process(shost->ehandler);
    		SCSI_LOG_ERROR_RECOVERY(5,
    				printk("Waking error handler thread\n"));
    	}
    }
    
    /**
     * scsi_schedule_eh - schedule EH for SCSI host
     * @shost:	SCSI host to invoke error handling on.
     *
     * Schedule SCSI EH without scmd.
     **/
    void scsi_schedule_eh(struct Scsi_Host *shost)
    {
    	unsigned long flags;
    
    	spin_lock_irqsave(shost->host_lock, flags);