Print this page
4630 clean stale references to ddi_iopb_alloc and ddi_iopb_free
4634 undocument scsi_hba_attach() and ddi_dma_lim(9s)


1673         (void) scsi_setup_cdb((union scsi_cdb *)un->un_rqs->pkt_cdbp,
1674             SCMD_REQUEST_SENSE, 0, MAX_SENSE_LENGTH, 0);
1675         FILL_SCSI1_LUN(devp, un->un_rqs);
1676         un->un_rqs->pkt_flags |= (FLAG_SENSING | FLAG_HEAD | FLAG_NODISCON);
1677         un->un_rqs->pkt_time = st_io_time;
1678         un->un_rqs->pkt_comp = st_intr;
1679         ri = (recov_info *)un->un_rqs->pkt_private;
1680         if (st_recov_sz == sizeof (recov_info)) {
1681                 ri->privatelen = sizeof (recov_info);
1682         } else {
1683                 ri->privatelen = sizeof (pkt_info);
1684         }
1685 
1686         un->un_sbufp = getrbuf(km_flags);
1687         un->un_recov_buf = getrbuf(km_flags);
1688 
1689         un->un_uscsi_rqs_buf = kmem_alloc(SENSE_LENGTH, KM_SLEEP);
1690 
1691         /*
1692          * use i_ddi_mem_alloc() for now until we have an interface to allocate
1693          * memory for DMA which doesn't require a DMA handle. ddi_iopb_alloc()
1694          * is obsolete and we want more flexibility in controlling the DMA
1695          * address constraints.
1696          */
1697         (void) i_ddi_mem_alloc(devp->sd_dev, &st_alloc_attr,
1698             sizeof (struct seq_mode), ((km_flags == KM_SLEEP) ? 1 : 0), 0,
1699             NULL, (caddr_t *)&un->un_mspl, &rlen, NULL);
1700 
1701         (void) i_ddi_mem_alloc(devp->sd_dev, &st_alloc_attr,
1702             sizeof (read_pos_data_t), ((km_flags == KM_SLEEP) ? 1 : 0), 0,
1703             NULL, (caddr_t *)&un->un_read_pos_data, &rlen, NULL);
1704 
1705         if (!un->un_sbufp || !un->un_mspl || !un->un_read_pos_data) {
1706                 ST_DEBUG6(devp->sd_dev, st_label, SCSI_DEBUG,
1707                     "probe partial failure: no space\n");
1708                 goto error;
1709         }
1710 
1711         bzero(un->un_mspl, sizeof (struct seq_mode));
1712 
1713         cv_init(&un->un_sbuf_cv, NULL, CV_DRIVER, NULL);
1714         cv_init(&un->un_queue_cv, NULL, CV_DRIVER, NULL);
1715         cv_init(&un->un_clscv, NULL, CV_DRIVER, NULL);




1673         (void) scsi_setup_cdb((union scsi_cdb *)un->un_rqs->pkt_cdbp,
1674             SCMD_REQUEST_SENSE, 0, MAX_SENSE_LENGTH, 0);
1675         FILL_SCSI1_LUN(devp, un->un_rqs);
1676         un->un_rqs->pkt_flags |= (FLAG_SENSING | FLAG_HEAD | FLAG_NODISCON);
1677         un->un_rqs->pkt_time = st_io_time;
1678         un->un_rqs->pkt_comp = st_intr;
1679         ri = (recov_info *)un->un_rqs->pkt_private;
1680         if (st_recov_sz == sizeof (recov_info)) {
1681                 ri->privatelen = sizeof (recov_info);
1682         } else {
1683                 ri->privatelen = sizeof (pkt_info);
1684         }
1685 
1686         un->un_sbufp = getrbuf(km_flags);
1687         un->un_recov_buf = getrbuf(km_flags);
1688 
1689         un->un_uscsi_rqs_buf = kmem_alloc(SENSE_LENGTH, KM_SLEEP);
1690 
1691         /*
1692          * use i_ddi_mem_alloc() for now until we have an interface to allocate
1693          * memory for DMA which doesn't require a DMA handle.


1694          */
1695         (void) i_ddi_mem_alloc(devp->sd_dev, &st_alloc_attr,
1696             sizeof (struct seq_mode), ((km_flags == KM_SLEEP) ? 1 : 0), 0,
1697             NULL, (caddr_t *)&un->un_mspl, &rlen, NULL);
1698 
1699         (void) i_ddi_mem_alloc(devp->sd_dev, &st_alloc_attr,
1700             sizeof (read_pos_data_t), ((km_flags == KM_SLEEP) ? 1 : 0), 0,
1701             NULL, (caddr_t *)&un->un_read_pos_data, &rlen, NULL);
1702 
1703         if (!un->un_sbufp || !un->un_mspl || !un->un_read_pos_data) {
1704                 ST_DEBUG6(devp->sd_dev, st_label, SCSI_DEBUG,
1705                     "probe partial failure: no space\n");
1706                 goto error;
1707         }
1708 
1709         bzero(un->un_mspl, sizeof (struct seq_mode));
1710 
1711         cv_init(&un->un_sbuf_cv, NULL, CV_DRIVER, NULL);
1712         cv_init(&un->un_queue_cv, NULL, CV_DRIVER, NULL);
1713         cv_init(&un->un_clscv, NULL, CV_DRIVER, NULL);