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