scsi.c (accba5f3965d6a9d1bf7c1e1a7995d17e9d521b6) | scsi.c (f0c0a376d0fcd4c5579ecf5e95f88387cba85211) |
---|---|
1/* 2 * scsi.c Copyright (C) 1992 Drew Eckhardt 3 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale 4 * Copyright (C) 2002, 2003 Christoph Hellwig 5 * 6 * generic mid-level SCSI driver 7 * Initial versions: Drew Eckhardt 8 * Subsequent revisions: Eric Youngdale --- 740 unchanged lines hidden (view full) --- 749 if (unlikely(host->shost_state == SHOST_DEL)) { 750 cmd->result = (DID_NO_CONNECT << 16); 751 scsi_done(cmd); 752 } else { 753 rtn = host->hostt->queuecommand(cmd, scsi_done); 754 } 755 spin_unlock_irqrestore(host->host_lock, flags); 756 if (rtn) { | 1/* 2 * scsi.c Copyright (C) 1992 Drew Eckhardt 3 * Copyright (C) 1993, 1994, 1995, 1999 Eric Youngdale 4 * Copyright (C) 2002, 2003 Christoph Hellwig 5 * 6 * generic mid-level SCSI driver 7 * Initial versions: Drew Eckhardt 8 * Subsequent revisions: Eric Youngdale --- 740 unchanged lines hidden (view full) --- 749 if (unlikely(host->shost_state == SHOST_DEL)) { 750 cmd->result = (DID_NO_CONNECT << 16); 751 scsi_done(cmd); 752 } else { 753 rtn = host->hostt->queuecommand(cmd, scsi_done); 754 } 755 spin_unlock_irqrestore(host->host_lock, flags); 756 if (rtn) { |
757 scsi_queue_insert(cmd, (rtn == SCSI_MLQUEUE_DEVICE_BUSY) ? 758 rtn : SCSI_MLQUEUE_HOST_BUSY); | 757 if (rtn != SCSI_MLQUEUE_DEVICE_BUSY && 758 rtn != SCSI_MLQUEUE_TARGET_BUSY) 759 rtn = SCSI_MLQUEUE_HOST_BUSY; 760 761 scsi_queue_insert(cmd, rtn); 762 |
759 SCSI_LOG_MLQUEUE(3, 760 printk("queuecommand : request rejected\n")); 761 } 762 763 out: 764 SCSI_LOG_MLQUEUE(3, printk("leaving scsi_dispatch_cmnd()\n")); 765 return rtn; 766} --- 28 unchanged lines hidden (view full) --- 795 * 796 * Description: Pass command off to upper layer for finishing of I/O 797 * request, waking processes that are waiting on results, 798 * etc. 799 */ 800void scsi_finish_command(struct scsi_cmnd *cmd) 801{ 802 struct scsi_device *sdev = cmd->device; | 763 SCSI_LOG_MLQUEUE(3, 764 printk("queuecommand : request rejected\n")); 765 } 766 767 out: 768 SCSI_LOG_MLQUEUE(3, printk("leaving scsi_dispatch_cmnd()\n")); 769 return rtn; 770} --- 28 unchanged lines hidden (view full) --- 799 * 800 * Description: Pass command off to upper layer for finishing of I/O 801 * request, waking processes that are waiting on results, 802 * etc. 803 */ 804void scsi_finish_command(struct scsi_cmnd *cmd) 805{ 806 struct scsi_device *sdev = cmd->device; |
807 struct scsi_target *starget = scsi_target(sdev); |
|
803 struct Scsi_Host *shost = sdev->host; 804 struct scsi_driver *drv; 805 unsigned int good_bytes; 806 807 scsi_device_unbusy(sdev); 808 809 /* 810 * Clear the flags which say that the device/host is no longer 811 * capable of accepting new commands. These are set in scsi_queue.c 812 * for both the queue full condition on a device, and for a 813 * host full condition on the host. 814 * 815 * XXX(hch): What about locking? 816 */ 817 shost->host_blocked = 0; | 808 struct Scsi_Host *shost = sdev->host; 809 struct scsi_driver *drv; 810 unsigned int good_bytes; 811 812 scsi_device_unbusy(sdev); 813 814 /* 815 * Clear the flags which say that the device/host is no longer 816 * capable of accepting new commands. These are set in scsi_queue.c 817 * for both the queue full condition on a device, and for a 818 * host full condition on the host. 819 * 820 * XXX(hch): What about locking? 821 */ 822 shost->host_blocked = 0; |
823 starget->target_blocked = 0; |
|
818 sdev->device_blocked = 0; 819 820 /* 821 * If we have valid sense information, then some kind of recovery 822 * must have taken place. Make a note of this. 823 */ 824 if (SCSI_SENSE_VALID(cmd)) 825 cmd->result |= (DRIVER_SENSE << 24); --- 436 unchanged lines hidden --- | 824 sdev->device_blocked = 0; 825 826 /* 827 * If we have valid sense information, then some kind of recovery 828 * must have taken place. Make a note of this. 829 */ 830 if (SCSI_SENSE_VALID(cmd)) 831 cmd->result |= (DRIVER_SENSE << 24); --- 436 unchanged lines hidden --- |