Lines Matching refs:nscp
1540 register struct scsi_cmnd *nscp; in gdth_putq() local
1554 nscp = (struct scsi_cmnd *)pscp->SCp.ptr; in gdth_putq()
1556 while (nscp && gdth_cmnd_priv(nscp)->priority <= priority) { in gdth_putq()
1557 pscp = nscp; in gdth_putq()
1558 nscp = (struct scsi_cmnd *)pscp->SCp.ptr; in gdth_putq()
1561 scp->SCp.ptr = (char *)nscp; in gdth_putq()
1567 for (nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr) in gdth_putq()
1579 register struct scsi_cmnd *nscp; in gdth_next() local
1594 for (nscp = pscp = ha->req_first; nscp; nscp = (struct scsi_cmnd *)nscp->SCp.ptr) { in gdth_next()
1595 struct gdth_cmndinfo *nscp_cmndinfo = gdth_cmnd_priv(nscp); in gdth_next()
1596 if (nscp != pscp && nscp != (struct scsi_cmnd *)pscp->SCp.ptr) in gdth_next()
1599 b = nscp->device->channel; in gdth_next()
1600 t = nscp->device->id; in gdth_next()
1601 l = nscp->device->lun; in gdth_next()
1626 if (nscp->cmnd[0] == TEST_UNIT_READY) { in gdth_next()
1658 if (b == ha->virt_bus && nscp->cmnd[0] != INQUIRY && in gdth_next()
1659 nscp->cmnd[0] != READ_CAPACITY && nscp->cmnd[0] != MODE_SENSE && in gdth_next()
1669 if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) in gdth_next()
1673 if (!(cmd_index=gdth_fill_raw_cmd(ha, nscp, BUS_L2P(ha, b)))) in gdth_next()
1677 memset((char*)nscp->sense_buffer,0,16); in gdth_next()
1678 nscp->sense_buffer[0] = 0x70; in gdth_next()
1679 nscp->sense_buffer[2] = NOT_READY; in gdth_next()
1680 nscp->result = (DID_OK << 16) | (CHECK_CONDITION << 1); in gdth_next()
1684 gdth_scsi_done(nscp); in gdth_next()
1686 } else if (gdth_cmnd_priv(nscp)->internal_command) { in gdth_next()
1687 if (!(cmd_index=gdth_special_cmd(ha, nscp))) in gdth_next()
1692 !(cmd_index=gdth_fill_raw_cmd(ha, nscp, BUS_L2P(ha, b)))) in gdth_next()
1698 nscp->cmnd[0], b, t, l)); in gdth_next()
1699 nscp->result = DID_BAD_TARGET << 16; in gdth_next()
1703 gdth_scsi_done(nscp); in gdth_next()
1705 switch (nscp->cmnd[0]) { in gdth_next()
1714 TRACE(("cache cmd %x/%x/%x/%x/%x/%x\n",nscp->cmnd[0], in gdth_next()
1715 nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3], in gdth_next()
1716 nscp->cmnd[4],nscp->cmnd[5])); in gdth_next()
1717 if (ha->hdr[t].media_changed && nscp->cmnd[0] != INQUIRY) { in gdth_next()
1720 nscp->cmnd[0], t)); in gdth_next()
1722 memset((char*)nscp->sense_buffer,0,16); in gdth_next()
1723 nscp->sense_buffer[0] = 0x70; in gdth_next()
1724 nscp->sense_buffer[2] = UNIT_ATTENTION; in gdth_next()
1725 nscp->result = (DID_OK << 16) | (CHECK_CONDITION << 1); in gdth_next()
1729 gdth_scsi_done(nscp); in gdth_next()
1730 } else if (gdth_internal_cache_cmd(ha, nscp)) in gdth_next()
1731 gdth_scsi_done(nscp); in gdth_next()
1735 TRACE(("cache cmd %x/%x/%x/%x/%x/%x\n",nscp->cmnd[0], in gdth_next()
1736 nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3], in gdth_next()
1737 nscp->cmnd[4],nscp->cmnd[5])); in gdth_next()
1738 if ( (nscp->cmnd[4]&1) && !(ha->hdr[t].devtype&1) ) { in gdth_next()
1740 nscp->result = DID_OK << 16; in gdth_next()
1741 nscp->sense_buffer[0] = 0; in gdth_next()
1745 gdth_scsi_done(nscp); in gdth_next()
1747 nscp->cmnd[3] = (ha->hdr[t].devtype&1) ? 1:0; in gdth_next()
1749 nscp->cmnd[4],nscp->cmnd[3])); in gdth_next()
1750 if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) in gdth_next()
1757 TRACE2(("cache cmd %s\n",nscp->cmnd[0] == RESERVE ? in gdth_next()
1759 if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) in gdth_next()
1772 nscp->cmnd[0], t)); in gdth_next()
1774 memset((char*)nscp->sense_buffer,0,16); in gdth_next()
1775 nscp->sense_buffer[0] = 0x70; in gdth_next()
1776 nscp->sense_buffer[2] = UNIT_ATTENTION; in gdth_next()
1777 nscp->result = (DID_OK << 16) | (CHECK_CONDITION << 1); in gdth_next()
1781 gdth_scsi_done(nscp); in gdth_next()
1782 } else if (!(cmd_index=gdth_fill_cache_cmd(ha, nscp, t))) in gdth_next()
1787 TRACE2(("cache cmd %x/%x/%x/%x/%x/%x unknown\n",nscp->cmnd[0], in gdth_next()
1788 nscp->cmnd[1],nscp->cmnd[2],nscp->cmnd[3], in gdth_next()
1789 nscp->cmnd[4],nscp->cmnd[5])); in gdth_next()
1791 ha->hanum, nscp->cmnd[0]); in gdth_next()
1792 nscp->result = DID_ABORT << 16; in gdth_next()
1796 gdth_scsi_done(nscp); in gdth_next()
1803 if (nscp == ha->req_first) in gdth_next()
1804 ha->req_first = pscp = (struct scsi_cmnd *)nscp->SCp.ptr; in gdth_next()
1806 pscp->SCp.ptr = nscp->SCp.ptr; in gdth_next()
3129 struct scsi_cmnd *nscp; in gdth_timeout() local
3146 nscp=ha->req_first; nscp; nscp=(struct scsi_cmnd*)nscp->SCp.ptr) in gdth_timeout()